struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Brown <mr...@twdata.org>
Subject Re: Servlet mapping in a Struts app?
Date Fri, 17 Mar 2006 22:18:09 GMT
Struts doesn't support multiple servlet mappings, which is probably why you are seeing some
strange results.

Don

Jay Burgess wrote:
> I must be misunderstanding something about the way servlet mapping works with my
> Struts application in Tomcat.  I have two servlet mappings in web.xml:
> 
>     <servlet-mapping>
>         <servlet-name>action</servlet-name>
>         <url-pattern>*.do</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>action</servlet-name>
>         <url-pattern>/API/*</url-pattern>
>     </servlet-mapping>
> 
> The first is for my action handlers.  The second is recently added, and
> represents a collection of "third party API functions" that I've implemented
> (also as action handlers).  However, my base application is now doing the
> following.  
> 
> When I hit "https://localhost/MyApp/login.jsp" for my main app, the following
> <html:form> tag in login.jsp:
> 
>     <html:form action="Login.do" focus="userId">
> 
> Gets turned into:
> 
>     <form name="loginForm" method="post" action="/MyApp/API/Login">
> 
> I'm confused as to why it's adding the "/API" to the form action, but it's got
> to be related to the new <servlet-mapping>.  My struts-config.xml looks like the
> following, and there's not mention of API:
> 
>     <action path="/Login"
>             type="com.vtgroup.controller.LoginAction"
>             name="loginForm"
>             scope="request"
>             validate="false"
>             input="/login.jsp">
>     </action>
> 
> Please enlighten me, as I feel stupid about this, but can't figure it out.
> 
> Thanks.
> 
> Jay
> 
> | Jay Burgess [Vertical Technology Group]
> | http://www.vtgroup.com/
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


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


Mime
View raw message