| At line 1 changed 1 line. |
| This page describes my attempt to get [AppFuse] 1.6 working on [Resin|http://www.caucho.com/download/index.xtp]. In general, I found that there were a fair amount of bugs with Resin 3.0.9. The major one being that <a href="http://www.caucho.com/quercus/bugtrack/view.xtp?bugreport_id=2285">SiteMesh can't decorate forwards</a> if you have a FORWARD dispatch on its filter-mapping in web.xml. I also had to hack the displaytag to make the non-EL version work. My experience can be found <a href="http://raibledesigns.com/page/rd?anchor=resin_slower_than_tomcat_fails">here</a>. |
| This page describes the steps to get [AppFuse] 1.9 working on [Winstone|http://winstone.sourceforge.net/]. Sincerely a simply and at the same time powerful container. |
| Have you tried to install an appfuse project as a desktop application? No! Now you can do it! How? |
| Let's see how is simple to make AppFuse run on [Winstone|http://winstone.sourceforge.net/]: |
| At line 3 changed 1 line. |
| The good news is I discovered that AppFuse runs on Resin 2.1.14 pretty good. The only modification you need to make is to comment-out or delete the entries for Clickstream's <listener> and <filter-mapping> in web.xml. |
| __1.__ Build AppFuse as usual (project name: {{felini}}): {{ant war}}; |
| At line 5 changed 1 line. |
| To install AppFuse on either version of Resin, you will need to copy your JBDC Driver, jta.jar, mail.jar and activation.jar to $RESIN_HOME/lib. Then include metadata/conf/resin-web-2.1.xml in appfuse.war's WEB-INF directory, or in the expanded WEB-INF directory. Rename it to resin-web.xml after you copy it. For Resin 3.0.x, use metadata/conf/resin-web.xml. You will need to fill in the database driver, connection and username/password information in these files. |
| __2.__ Create a directory, for example, {{felini}} and on it a sub-directory: {{lib}}; |
|
| __3.__ Download [Winstone|http://winstone.sourceforge.net/] into the {{felini}} directory, the version I will use is: {{winstone-0.8.1.jar}}; |
|
| __4.__ Copy your war file to {{felini}} directory; |
|
| __5.__ Other thing, in order to turn on JSP compilation in [Winstone|http://winstone.sourceforge.net/], you'll need to place the following jar files into the {{lib}} folder under the current directory (or the folder identified by the --commonLibFolder directive): jasper-compiler.jar, jasper-runtime.jar, ant.jar, commons-logging-api.jar, commons-el.jar (Jasper 2 only) - These are required if you are using Jasper 2.0. You can get them from the tomcat binary distribution; |
|
| __6.__ From the {{felini}} directory run: |
| <pre>java -jar winstone-0.8.1.jar --warfile=feline.war --useJasper</pre> |
|
| That's it! No more no less! But wait, it has more ... |
|
| %%note __NOTE:__ This is from Winstone docs: |
| <h2><a name="embedding">Embedding Winstone</a></h2> |
| <p>The design of Winstone has always allowed its easy embedding within another application. It's as simple |
| as:</p> |
| <pre> // at startup |
| Map args = new HashMap(); |
| args.put("webroot", "<my webroot dir>"); // or any other command line args, eg port |
| Launcher.initLogger(args); |
| Launcher winstone = new Launcher(args); // spawns threads, so your application doesn't block |
|
| ... (your application code) |
|
| // before shutdown |
| winstone.shutdown(); </pre> |
|
| <p>From v0.8 though, there is also the ability to embed in the opposite direction: that is, to |
| <b>embed your warfile into the winstone JAR itself</b>. This allows an all-in-one container plus |
| web-application JAR file to be downloaded, and then unpacked at execution time.</p> |
| <p>To use this, simply unpack the winstone JAR, and place your WAR file inside the unpacked |
| folder at the top level (with the same parent as the folder named "winstone"). Then rename |
| your WAR file to "embedded.war", and repack the jar as before (make sure to preserve the |
| META-INF and manifest).</p> |
| <p>Now if you type: <code>"java -jar winstone.jar"</code>, your application should |
| automatically deploy as the ROOT web application. Try <code>http://localhost:8080/</code> to |
| check it out.</p> |
| <p>If you need to add any default command-line arguments (eg ports or prefixes), you can embed |
| a properties file in exactly the same way, except that the file must be named |
| "embedded.properties".</p> |
| %% |
|
|
| Thanks Matt, for this space and Rick Knowles for their attention and support on [Winstone|http://winstone.sourceforge.net/]. |