> You can define an "unknown" action that responds to requests that no
> other actions are mapped to.  See section 4.7:
> http://jakarta.apache.org/struts/userGuide/building_controller.html

Finally got it working... If no action exists for a request that was
mapped to the Struts servlet, the request is forwarded to the default
servlet. This could be extended somewhat to handle forwarding to
specific servlets for handling other kinds of dynamic content. One minor
issue however is that I am not sure whether the default servlet has the
same name on all servlet containers.


public class DefaultAction
 extends Action
{
 public ActionForward execute(...)
  throws Exception
 {
  servlet.getServletContext().
    getNamedDispatcher("default").
    forward(request, response);
  return null;
 }
}


  <action
   path="/null"
   type="DefaultAction"
   unknown="true"
   parameter="null"
  />


--
Eric Jain


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

Reply via email to