To offer a concrete example:

  <action
    path="/somepath"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/servlet/com.med.servlet.cp.LogonServlet"/>

You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts action. Your JSPs, etc. would continue to reference /somepath without change.

L.

Craig McClanahan wrote:

You can indeed forward to a servlet ... the path that you specify must
be a context relative path (starting with a slash) to some URL that
you have mapped to your "other" servlet.

The restriction with forwards is that you cannot go outside the current webapp.

Craig

On 7/19/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:

On 7/19/05, Jane Eisenstein <[EMAIL PROTECTED]> wrote:

I would like to be able to forward to the existing servlets from Struts
code in a manner that will not need to change when a servlet is replaced
by an equivalent action. Could I use a ForwardAction action to forward
to the servlets?

I am not sure that you can forward, but you definetely can redirect.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to