Raible's Wiki

Raible Designs
Wiki Home
Recent Changes


  - Korean
  - Chinese
  - Italian
  - Japanese

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

User Guide
  - Korean
  - Chinese

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

  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in

Edit this page

Referenced by

JSPWiki v2.2.33


Hide Menu


How to add a Servlet into AppFuse

There are some things that an AppFuse application can't do "out-of-the-box." Sometimes the best way to incorporate the needed functionality will be by adding a servlet. Adding a servlet into your AppFuse application is a pretty simple process... when you know all the steps.

1. Install dependancy libraries. Please refer to the step-by-step guide to adding libraries into AppFuse.

NOTE: If your servlet class is located in a library, then skip to step 3b.

2. Add the servlet class(es) into /src/web/.

3. Create the configuration for your servlet. There are two ways to do this step..

3a. Add XDoclet tags into your servlet to have the configuration generated automatically at build time.

 * @web.servlet
 *     display-name="My New Servlet"
 *     load-on-startup="3"
 *     name="myservlet"
 * @web.servlet-init-param
 *     name="myparam"
 *     value="${my.param.value}"
 * @web.servlet-mapping
 *     url-pattern="/myservlet/*"

3b. Or you can choose to add the servlet definition and mapping manually. This is done by adding entries into:





4. (Optional) Exclude your servlet from being decorated by SiteMesh. You may need to add an exclude entry into:



5. (Optional) Exclude your servlet from requiring a login. See the page on security settings in AppFuse.

Go to top   Edit this page   More info...   Attach file...
This page last changed on 06-Nov-2006 13:52:59 MST by NathanAnderson.