struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@cgey.com>
Subject Re: url-pattern
Date Tue, 24 Jun 2003 12:54:44 GMT
Struts controller uses extra path info to know which Action to execute (action-mapping). If
you map "/logon" to Struts
ActionServlet, they're no extra path info when requesting http://<server>/Logon.

You can map ActionServlet to "/do" and request "/do/Logon". I think struts modules will not
work using this type of
mapping.

Why don't you want to use "standard" .do servlet mapping ?

Nico.

> I want to map out all my action servlet in the web.xml file like this:
>
>   <servlet>
>     <servlet-name>action</servlet-name>
>     <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>   </servlet>
>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/Logon</url-pattern>
>   </servlet-mapping>
>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/Logoff</url-pattern>
>   </servlet-mapping>
>
> (without the *.do or /action/* pattern)
>
> In my input page logon.jsp I have action="/Logon" in the html:form, however
> the generated html always comes back with action="".
>
> I know there is something to do with the url-pattern that I have been setup.
>
> An alternative will be:
>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/</url-pattern>
>   </servlet-mapping>
>
> But, I don't want everything including jsp or html page to go thru
> ActionServlet.
>
> Any suggestion?
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message