Category Archives: Newsletter

Caucho Newsletter August 2020

Newsletter at a glance

  • Resin 4.0.65 released
  • TLS v1.3 for OpenSSL
  • Disabling insecure cipher suites
  • ?Protocol and cipher-suite in resin.properties
  • Customer success story – Thai AirAsia migrates to NTT Data Intramart powered by Resin and reduces 80% of its outsourcing costs

Resin 4.0.65 released

Resin 4.0.65 comes with numerous bug fixes. Notably, it adds support for TLS v1.3.

Here’s the change list for Resin 4.0.65 – released July 29, 2020

  • openssl: add +/tlsv1.3
  • class-scan: catch and continue from .class parse exceptions
  • access-log: add %{param}p for parameter (#6305, rep by Yoo)
  • websocket: avoid wrapping IOException in IllegalStateException
  • jdk: EventManager need to use ConcurrentHashMap.putIfAbsent, not Map.putIfAbsent
  • config: openssl-protocol, openssl-cipher-suite, openssl-chain-file
  • health: avoid reporting time outside window as downtime

In case you missed it, here’s the change list for Resin 4.0.64 – released February 2, 2020

  • cluster: fix heartbeat close
  • deploy: fix duplicate remote deploy
  • config: add jvm_classpath to cluster-default.xml
  • config: add access_log_format
  • jdk: TcpPort._activeConnectionSet.keySet() must use Map api
  • jdk: getAttribute should not wrap AttributeNotFound
  • jdk-compat: dynamic Logging during initialization

If you’d like to discuss updates or take advantage of new Resin features for your deployment, please email Alexandra Garmon, garmon@caucho.com, to arrange a web meeting with one of our engineers.

TLS v1.3 for OpenSSL

Resin 4.0.65 adds support for TSL v1.3, which is significantly faster than TLS v1.2 to complete the SSL handshake. To enable TLS v1.3, simply install an OpenSSL library that supports it.  For users that whitelist SSL protocols in their config with “-all”, you will need whitelist it in resin.properties:

protocol : -all +tlsv1.2 +tlsv1.3

Disabling insecure cipher suites

TLS v1.3 improves security by removing support for insecure cipher suites.  For older TLS versions however, you’ll need to disable them manually in resin.properties:

cipher-suite : ALL:!aNULL:!ADH:!NULL:!LOW:!MEDIUM:!EXP:!SSLv3:+HIGH

The above disables low and medium strength cipher suites.

Customer success story – Thai AirAsia migrates to NTT Data Intramart – powered by Resin – and reduces 80% of its outsourcing costs

Intramart is the major Business Process Management workflow software provider in Japan with over 6,000 Intramart customers deployed on Resin. Intramart’s “Open & Easy” concept provides flexibility, scalability and development productivity to thousands of users, including some of the largest companies in the world.

Problem

  • Workflow previously required Thai AirAsia to outsource development, which was costly and time consuming

Solution

  • Deployment of intra-mart, which enables Thai AirAsia to insource all changes of operation flow
  • ?Operation of Thai AirAsia using intra-mart workflow covers everything from travel expense adjustment called eDTR (electric Duty Travel Request) and using VPN to applying for purchases.

Results

  • Time: Dramatically shortens the time to create and change workflow systems
  • ?Cost: 80% reduction of outsourcing costs by complete insourcing
  • Paper reduction: 60% reduction in departmental paper use

“The ability of intra-mart to easily create workflow processes from scratch with drag and drop was outstanding compared to other products”
Mr. Pakpom – Project Coordinator, ICT Department

Read full case study here:
https://www.nttdata.com/th/en/news/2020/january/transform-your-business-and-productivity


 

http://caucho.com/products/resin/download

                                                  



   Download the latest version of Resin today!

Caucho Newsletter December 2019

main caucho logo 3caucho founding outer richmond

Our deployment has run on Caucho Resin for over a decade. Resin is reliable, stable and easy to maintain/upgrade. Our production sites are critical to our business and we don’t have downtime issues while running on Resin. Additionally, Caucho tech support is great. They use experienced engineers for support and we always get a fast response." 

                    - Stewart Morse | CEO | IBRC, Inc.
 

Newsletter at a glance

  • Resin 4.0.63 released
  • Spring WebSocket support via Maven plugin
  • ?Resin tip – cloud deployment made easy
  • Customer success story – Resin replaces Apache and improves performance?!

Resin 4.0.63 released

Resin 4.0.63 comes with numerous bug fixes. Notably, it resolves most JDK 11 compatibility issues and JDK6/7 regressions.

Here’s the change list for Resin 4.0.63 – released October 28, 2019

  • admin: added resin.admin.heap-dump.file system property for heap-dump directory
  • config: add health_log_expire_timeout
  • config: add openssl_chain_file to cluster-default.xml
  • dist: split out jpa-16.jar from javaee-16.jar
  • file: add default-content-type to FileServlet
  • hessian: close of Hessian proxy stream when result is inputstream
  • http: HttpProxy encoding issue with ch>0×8000
  • http: HttpsEmbed missing jsse.init()
  • jdk: use Map.keySet() instead of ConcurrentHashMap.keySet() for linking issues
  • jdk-compat: jdk init with -javaagent cannot use logging from appendToClassPathForInstrumentation
  • jdk-compat: TcpPort.close() exception on JDK6/7
  • jsp-el: issues with bean getters and get()
  • mod_caucho: handling of https forwarding
  • port: thread launchers were started before initialization
  • remote: allow JDK11 w/o WebService class
  • server: on HMUX requests, wait for server start
  • server: keepalive timeout needs to killKeepalive not turn to active
  • session: SessionImpl should not clear _isModified on no-change load

In case you missed it, here’s the change list for Resin 4.0.62 – released May 23, 2019

  • cloud: distributed server update issue with .git/refs
  • debian: update debian release
  • distribution: update .jar versions and remove jars with possible conflicts
  • ?elastic: add –elastic-server-index
  • elastic: cleanup of join server-id and server-address, and timeout
  • elastic: add server-timeout to resin:ElasticCloudService
  • embed: add HttpsEmbed
  • file: cache file updates when webapp-jar changes
  • integration: WebApp.getMimeMapping
  • integration: WebApp.getLocaleMapping
  • jmx: add application-hash to WebAppMXBean
  • quercus: find interface method if available
  • security: foo.;html produces 500 exception
  • security: j_security_check with no auth should issue warning and 404 instead of 500
  • security: setting setServerHeader to null will remove Server header
  • servlet: don’t reuse form/invocation ByteToChar when very large
  • spring: add ClasspathPath to MergePath.addClassPath
  • ssl: add trust-store-algorithm and trust-store-provider to jsse
  • ssl: add key-manager-password and key-store-password to jsse
  • ssl: add key-manager-algorithm and key-manager-provider to jsse
  • websocket: add WebSocketContext.ping

If you’d like to discuss updates or take advantage of new Resin features for your deployment, please email Alexandra Garmon, garmon@caucho.com, to arrange a web meeting with one of our engineers.

Resin Spring WebSocket support via Maven plugin

Resin now integrates with spring-websocket via a Maven plugin. The plugin provides a
ResinRequestUpgradeStrategy that is responsible for upgrading an HTTP request into a WebSocket connection for Spring. It works with both Spring 4.x and 5.x. To use it:

1. add Maven dependency

    <dependency>
        <groupId>com.caucho</groupId>
        <artifactId>spring4-websocket</artifactId>
        <version>4.0.63</version>
    </dependency>

2. set a HandshakeHandler that uses ResinRequestUpgradeStrategy:

    @Configuration
    @EnableWebSocket
    public class WebSocketConfig implements WebSocketConfigurer {
 
        @Override
        public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
            HandshakeHandler handshakeHandler = new DefaultHandshakeHandler(new ResinRequestUpgradeStrategy());
 
            registry.addHandler(myHandler(), "/myHandler").setHandshakeHandler(handshakeHandler);
        }
 
        ...
    }

Resin tip – cloud deployment made easy

Resin Pro makes it super easy to deploy your webapp to the entire cluster with just one command:

    $ resinctl deploy mywebapp.war

That’s it! With that command, Resin distributes the WAR to every server in the cluster and starts it
right up. No more manual copying of WARs. No more ssh’ing into each individual server.

Under the hood is a complex symphony that makes it all possible:

  1. 1. command uploads the webapp to a triad/hub server in your Resin configuration
  2. 2. triad server commits the webapp into its internal git repository for reliability
  3. 3. server unpacks and starts up the webapp
  4. 4. triad server distributes the webapp to other triad servers for redundancy
  5. 5. triad servers distribute the webapp to the rest of the servers in the cluster

Then to undeploy it:

    $ resinctl undeploy mywebapp.war

Customer success story – Resin solves web server performance and structural problems for Gyeonggi Provincial Office of Education

Xest Information Technology, our South Korea Premier Partner and VAR successfully worked with Gyeonggi Provincial Office of Education to solve Apache performance problems.

Problems

  • Apache’s low performance made the homepage vulnerable to overloading
  • Service slowed down with as little as about 200 concurrent users
  • In the AIX OS environment, Apache and Resin were linked as proxy passes, resulting in reduced performance

Solutions

  • Replace Apache with Resin web server
  • Configure the file server separately

Results

  • After Resin web server replaced Apache, the issues that slowed down the simultaneous connection immediately disappeared and performance significantly improved.
  • The result of using Resin is that Gyeonggi’s services achieve fast performance and stability to meet user demands for information.
  • ?Since Gyeonggi migrated to Resin, they have not experienced any issues or slowdowns. Their services run fast, smooth and without user complaints.

“Our homepage was often down because of the low performance of Apache which is vulnerable to overloading. Resin solved this problem for us with its fast performance and full compatibility. I’m now very proud that no complaints have been made since we migrated to Resin.”
- Gyeonggi Provincial Office of Education, Computerized Officer S.Y.Kang

http://caucho.com/products/resin/download Download the latest version of Resin today!

paradise-beach.jpg

Caucho Newsletter May 2019

main caucho logo 3

“Congratulations to our partners NTT Data Intramart for being named a Niche Player in Gartner’s Magic Quadrant for 2019 Intelligent Business Process Management! NTT Data Intramart has achieved over 6,000 customer sales and has also been ranked #1 BPM solution in the Japanese market for 10 consecutive years.”

   - Steve Montal, Co-Founder and CEO of Caucho

Newsletter at a glance

  • Resin 4.0.61 released
  • Resin supports JDK 11
  • Spring Boot 2 and tailored support
  • Gartner Magic Quadrant report lists Caucho partner, NTT Data Intramart as a Niche Player

Resin 4.0.61 released

Check out the change list for Resin 4.0.61 – released March 1, 2019

  • security: additional invalid-URL rejection for matrix parameters
  • file: redirect must not html convert the location (#6212)

In case you missed it, here’s the change list for Resin 4.0.60 – released February 6, 2019

  • embed: force close of file descriptors (#6208)
  • webapp: add info log when WebApp does not start within active-wait-time starts (#6197)
  • hessian: added default blacklist classes
  • deploy: added alarm for deployment .git gc
  • deploy: .git changes to allow for git clone from resin-data

We release Resin every 12-16 weeks. Possible changes include performance enhancements, bug fixes, feature requests, and security patches. Having a process in place to update your production systems frequently and reliably will optimize performance. If you’d like to discuss updating your deployment with a Caucho engineer, please email Alexandra Garmon, garmon@caucho.com, to arrange a call.

Resin supports JDK 11

Resin 4.0.61 is the first Resin version to officially support JDK 11.  Supporting JDK 11 was a seamless process for us and it was surprisingly easy.  So easy in fact that prior versions of Resin should be able to run on JDK 11 with only minor cosmetic issues (deprecated warning messages from the JVM).  However, Resin 4.0.61+ are the only versions that we are testing against JDK 11 going forward.

We expect your JDK 11 upgrade experience to be as seamless as it was for us.  Check out JDK 11 and its new host of exciting features like new garbage collectors and enhanced cryptography support here: https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html.

Resin support for Spring Boot 2 in the works

We’re nearing official support for Spring Boot 2, one of the most requested features by Resin users.  In the first phase, which we expect to complete late summer, we’ll be adding embedding and Spring WebSockets support.  Other Spring features will come in subsequent updates.  Stay tuned and feel free to send us your feedback/requirement through Alexandra, garmon@caucho.com.

NTT Data Intramart listed in Magic Quadrant Gartner report

Congratulations to our partners NTT Data Intramart for being positioned as one of the Niche Players in Magic Quadrant (MQ) for 2019 Intelligent Business Process Management Suite (iBPMS) issued by Gartner!

The Gartner MQ is a culmination of research in a specific market, giving you a wide-angle view of the relative positions of the market’s competitors. By applying a graphical treatment and a uniform set of evaluation criteria, a MQ helps you quickly ascertain how well technology providers are executing their stated visions and how well they are performing against Gartner’s market view.

NTT Data Intramart has over 6,000 customers and will continue to develop digital business with a focus on BPM globally and also strive to improve the customer experience and expand business. NTT Data Intramart has been the #1 BPM solution in Japan for the last 10 consecutive years.

For more details, please visit: http://www.intra-mart.com/

http://caucho.com/products/resin/download

   Download the latest version of Resin today!

Facebook: Caucho Technology  Resin Twitter page

paradise-beach.jpg

Caucho Technology

4455 Morena Blvd. Suite 210

San Diego, California 92117

US

Caucho Newsletter January 2019

main caucho logo 3



“After 2 years with Resin Pro in production, Nssam has achieved 99.99% uptime and now operates with simplistic operational scalability. We saved 20% of our cost and are very satisfied with the performance of the Resin load balancer and the combination of reliable Resin web application server”





   - Nssam Technical Supervision Director – Ho-joong, Kim 

case study: Resin’s dynamic scaling & clustering eliminates downtime without major code alterations 
 

Newsletter at a glance – Caucho celebrates 21 years in business!

  • Resin 4.0.59 released
  • Resin in Maven Central
  • Resin supports JDK 9, JDK 10 and 11 in the works
  • Oracle introduces Java SE subscription
  • Resin tested against OpenJDK
  • Resin Cookbooks               

  



Resin 4.0.59 released

Check out the change list for Resin 4.0.59 – released December 10, 2018

  • database: avoid loop when shared XA connection fails allocation (#6200)
  • http-proxy: escape utf-8 urls when used in rewrite (#6198)
  • config: updated resin.properties for http examples
  • cluster: cluster .war deployment issues (#6188)
  • tcp: only force socket close on shutdown in test mode to avoid threading issues (#6190)
  • jsp/embed: jsptaglib detection issues with embedded resin (#6191)
  • access.log: truncation of long url in access.log needs matching truncation headers (#6168)
  • file: redirect needs to encode with HTML encoding (#6184)
  • embed: deadlock with ResinEmbed and type introspection (#6177)
  • load-balance: cookies losing double quotes (#6181)
  • quercus: curl needs to use TLSv1.2 as default

 

In case you missed it, here is the change list for Resin 4.0.58 – released August 27, 2018

  • servlet: AsyncContext timing issues due to back-compat (#6168)
  • servlet: add load-on-startup-allow-fail (#6171)
  • config: add openssl_protocol and openssl_cipher_suite to resin.properties (#6169)
  • quercus: exception wrapping when stack trace is missing or empty
  • network: change SocketLinkThreadLauncher to permanent (#6166)
  • servlet: immutability of getParameterValues (#6172)
  • classloading: scanning of module-info should be skipped (#6170)
  • security: invalid URL detection with filters
  • quercus: QuercusContext array extension using wrong variable
  • session: added cookie-same-site for version=0 (#6167)



We release Resin every 12-16 weeks. Possible changes include performance enhancements, bug fixes, feature requests, and security patches. Having a process in place to update your production systems frequently and reliably will optimize performance. If you’d like to discuss updating your deployment with a Caucho engineer, please email Alexandra Garmon, garmon@caucho.com, to arrange a call.





 

Resin in Maven Central Repository

Check out Resin in the Maven Central repository:

 

<dependency>

    <groupId>com.caucho</groupId>

    <artifactId>resin</artifactId>

    <version>4.0.59</version>

</dependency>

 

Did you know you can easily embed Resin? Here’s one way:

 

ResinEmbed resin = new ResinEmbed();

resin.addPort(new HttpEmbed(8080));

 

WebAppEmbed webApp = new WebAppEmbed(“/”, “webapps/ROOT”);

resin.addWebApp(webApp);

 

resin.start();

resin.join();





 

Resin supports JDK 9. JDK 10 and JDK 11 in the works
 

The new Java release schedule calls for a feature release every six months, an update release every quarter, and a long-term support (LTS) release every three years.

 

Resin supports JDK 9 and we are currently adding support for JDK 10 and JDK 11.




Oracle introduces Java SE subscription

Oracle is introducing a new paid Java support model called Java SE Subscription.  It replaces Oracle’s old perpetual support plan and along with it comes new licensing terms for the Oracle JDK. 



In short, Oracle JDK 8 users do not need a subscription for commercial deployments 

(see the Java SE 8 license: https://www.oracle.com/technetwork/java/javase/terms/license/index.html).

 

Oracle JDK 11 users must have a subscription for commercial deployments (see the Java SE 11 license: https://www.oracle.com/technetwork/java/javase/terms/license/javase-license.html).


 

This isn’t entirely bad news because going forward with version 11, the Oracle JDK build will be the same as theOracle OpenJDK build.  The only difference is that Oracle JDK comes with a paid support model, whereas Oracle OpenJDK does not.

 

So what does it mean to you?

 

JDK 8

  • option #1: use Oracle JDK 8 but with no more public updates
  • option #2: use Oracle JDK 8 and pay Oracle for updates with a Java SE Subscription
  • option #3: use an OpenJDK distribution that provides updates like RedHat, Azul, IBM, etc. (Caucho recommends OpenJDK over the Oracle JDK) 

JDK 9/10

  • end-of life 

JDK 11:

  • option #1: use Oracle JDK 11 with a Java SE Subscription
  • option #2: use an OpenJDK distribution that provides updates like RedHat, Azul, IBM, etc.

For more information, see:

https://blog.joda.org/2018/08/java-is-still-available-at-zero-cost.html

https://docs.google.com/document/d/1nFGazvrCvHMZJgFstlbzoHjpAVwv5DEdnaBr_5pKuHo/view








Resin tested against OpenJDK



We recommend using OpenJDK, which is what we use to test Resin.  Interesting tidbit: internally, we do not use Oracle JDK at all.



 

 

Resin Cookbooks

 

Check out our 10-minute overviews of various Resin topics, available for viewing at:  

https://caucho.com/getting-started-with-resin For new users or even users who want brief refreshers on advanced Resin topics, the cookbooks are a great place to start.

 

Resin Deployment

basic application deployment on Resin

 

Resin Debugging

useful debugging tools for Resin deployments

 

Resin on Amazon EC2

get setup on Amazon EC2 in minutes

 

Resin Security

4 ways to secure your deployment

 





https://caucho.com/products/resin/download

                                                  



Download the latest version of Resin today!

 

Facebook: Caucho Technology  Resin Twitter page

paradise-beach.jpg

Caucho Newsletter September 2018

Caucho Newsletter June 2018

Caucho Newsletter February 2018


Caucho Newsletter November 2017

Caucho Newsletter September 2017


Caucho Newsletter July 2017

 

paradise-sky.jpg  

          main caucho logo 3
 
  
           New Releases, Partnerships and Success Stories!

          Resin Pro has the advantages of being lightweight and fast. Thanks to the fast and precise support of Xest Information Technology, Caucho’s Korean partner, we have been able to create our current Resin operating environment. I've used WebLogic, Jeus, JBoss and other app servers. Resin is the most satisfying of all of them.” 

– Kyobobooks IT Team Leader Seo-ho, Cho (Kyobobooks is a leading bookstore in South Korea, with 35 bookstores and a mobile site that services 160,000 users/day).
 

Newsletter at a GlanceSun_with_Sunglasses_Transparent_Picture.png

  • Resin 4.0.52 and 4.0.53

  • Case Study – ChosunILBO migration from WebLogic to Resin

  • Caucho Partners with NTT Data Intramart Figtree Innovation Centre in Sydney, Australia

  • ​Cool Resin tip – dispatch rule

 

Resin Updates
 

A lot of engineering work has gone into the latest release of Resin.  Users see a notable growth in performance and long-term stability. Good news! We have less than 10 open bug reports, including feature requests.

 

Bug fixes in the new versions include:

 

Resin – 4.0.52

==============

- 0006051: Diffie-Hellman group vulnerability

- 0006041:  com.caucho.jmx.MBeanView does not match wildcard queries

- 0006037:  ByteCodeParser with jdk8 constants

- 0006042:  JSP and PHP is not reloaded after modification

- 0006045: issue with mmap read

- 0006033:  access.log rotation issue

- 0005920:  access log not archived intermittently

- 0006049:  indirection through jndi:/server/<path> removes server

- 0006047:  resin-data db corruption creates large log file, prevents restart

- 0006044:  stat_data.db startup time slow

- 0006038:  Access log broken data

- 0005943:  Dupliate Access-Log Entries when using host-level Redirect Rule with an IfMBeanEnabled condition
- 0006039:  session saving issue with forward

 

Upcoming fixes in the new 4.0.53 (in progress)

 

Resin – 4.0.53

==============

- 0005951: 4.0.46 bad install over existing 4.0.37

- 0005979: Double start of application

- 0006059: PHP is not reloaded after modification

- 0006061: TempCharStream null pointer

- 0006060: UnsupportedOperationException: com.caucho.bytecode.MethodTypeConstant

- 0006055: Add log-level configuration to resin.properties
- 0006058: NullPointerException @ buildInvocation(WebAppContainer.java:847) instead of 503 Service Temporarily Unavailable

 

Resin 4.0.52 improves efficiency of data and log storage. Resin 4.0.53 will also include single line configuration in resin.properties for enabling/disabling health and modifying logging content & levels of resin-data.

 

These changes are being implemented at the request of developers. Send us your bugs at http://bugs.caucho.com/main_page.php

Case Study – Korea's largest media company increases performance by 30% and reduces TCO by 40% by migrating from WebLogic to Resin

Check out these impressive performance and cost savings results for ChosunILBO, Korea’s largest media company that also publishes the most influential newspaper in the country. 
 

        “Before Caucho, we used WebLogic in our main business systems. By migrating to Resin, we 'caught two birds with one stone’ and successfully achieved high performance. We also reduced our total cost of ownership (TCO) by 40%.”

        - SeongHyun, Song, Sir. Development Team, ChosunILBO
 

Working with our Korean partners, Xest Information Technology, ChosunILBO replaced WebLogic with Resin. Engineers benefitted from the following changes in productivity, performance and scalability:

  • They could increase work efficiency​ ​rapidly​ ​by a simple setting method and configuration change 

  • They could apply​ ​app source changes without downtime even if application source code was altered frequently 

  • By using Resin’s lightweight and rapid restart in less than 10 seconds, they could minimize downtime and increase efficiency by over 30% 

Because Resin provides seamless integration with popular frameworks including Spring, iBatis and Struts, developers used Resin as the core for their vital applications while successfully integrating their legacy applications.
 
Read the full ChosunILBO case study here.

 

Caucho Partners with NTT Data Intramart Figtree Innovation Centre

  

In June 2017, Caucho joined the Intramart Figtree Innovation Centre in beautiful Sydney, Australia. The partnership was formalized in San Diego by Luis Ohri, Senior VP of NTT DATA Intramart; Ricky Au, CEO of NTT Data Figtree Systems and Steve Montal, CEO of Caucho.



This technology alliance will seek strengthen NTT DATA Intramart’s sales footprint in the Asia Pacific region, while bolstering NTT DATA Figtree Systems’ technology capability and service portfolio in business process management (BPM). The Intramart Figtree Innovation Centre recognizes the significant technical benefits and synergy of incorporating Caucho products, where customers can leverage the powerful architecture of Resin, Quercus and Baratine.

 

The Intramart Figtree Innovation Centre will seek to develop upon the existing product IP offered by NTT DATA Figtree Systems, NTT DATA Intramart and Caucho to provide a mutually beneficial sales model and growth strategy throughout the over 5,500 existing clients, distribution channels and NTT DATA Group companies.

 

Caucho is honored to join the Intramart Figtree Innovation Centre. We look forward to working with our friends in Australia!
 

 

Cool Resin Tip: Dispatch Rules

 

Controlling flow, access, and authorization within individual web-apps is simple with Resin.

Resin's dispatching is based on a list of dispatch rules configured in the resin-web.xml or the resin.xml configuration files. Each rule has a regular expression matching request URLs. The first dispatch rule that matches takes control of the request. For example, a <resin:Redirect> sends a HTTP redirect, and a <resin:Dispatch> dispatches the request as normal.

Each matching rule can rewrite the URL using a target attribute that accepts Java regular expressions. The following rule flips the first two segments around, so /foo/bar would become /bar/foo.

Basic conditions check the request and return true if the condition matches. Conditions can check on authentication (<resin:IfUserInRole>), the remote IP (<resin:IfNetwork>), check for SSL (<resin:IfSecure>), and check for activation time (<resin:IfCron>) or if a file exists (<resin:IfFileExists>).

The rewrite conditions can also be used as security conditions, e.g. for <resin:Allow> or <resin:Deny>.An action tag can have zero condition tags or at most one. If you want combine multiple conditions, then you'll need to use composite conditions like <resin:And>, <resin:Or>, <resin:Not>, <resin:NotAnd>, and <resin:NotOr>.

Example: send 403 Forbidden if port is 80 and user is not admin

<web-app xmlns="http://caucho.com/ns/resin"
​xmlns:resin="urn:java:com.caucho.resin">

<resin:Forbiddenregexp="^/secret">
<resin:And>
<resin:IfLocalPort value="80"/>
<resin:Not>
<resin:IfUserInRole role="admin"/>
</resin:Not>
</resin:And>
</resin:Forbidden>  

</web-app>

  
Download Resin and Develop up! 

 http://caucho.com/products/resin/download                                                   Facebook: Caucho Technology  Resin Twitter page

paradise-beach.jpg