Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences

Edit this page


Referenced by
Articles




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseOnWinstone


This page describes the steps to get AppFuse 1.9 working on Winstone. 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:

1. Build AppFuse as usual (project name: felini): ant war;

2. Create a directory, for example, felini and on it a sub-directory: lib;

3. Download Winstone 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, 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:

java -jar winstone-0.8.1.jar --warfile=feline.war --useJasper

That's it! No more no less! But wait, it has more ...

NOTE: This is from Winstone docs:

Embedding Winstone

The design of Winstone has always allowed its easy embedding within another application. It's as simple as:

 // 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();

From v0.8 though, there is also the ability to embed in the opposite direction: that is, to embed your warfile into the winstone JAR itself. This allows an all-in-one container plus web-application JAR file to be downloaded, and then unpacked at execution time.

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).

Now if you type: "java -jar winstone.jar", your application should automatically deploy as the ROOT web application. Try http://localhost:8080/ to check it out.

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".

Thanks Matt, for this space and Rick Knowles for their attention and support on Winstone.



Go to top   Edit this page   More info...   Attach file...
This page last changed on 06-Nov-2006 13:53:00 MST by Gilbertoca.