That probably explains it then. :)  I'm still a little confused, though, as I
thought that the mappings were directives for the container (Tomcat in this
case), but obviously Struts also needs to get it from somewhere to build the
form action URL, so this must be where it's getting messed up.

I'm going to play around some more this weekend, but it may be that I end up
having to call my API function ".do's" to get it to work. 

Thanks for the reply.

Jay

-----Original Message-----
From: Don Brown [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 4:18 PM
To: Struts Developers List
Subject: Re: Servlet mapping in a Struts app?

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to