It is possible that this application is NOT the default (or in Tomcat terms
'ROOT' application).

In that case, it is correct...

> <form name="loginForm" method="post" action="/gannett/gannett/login">
                           (servlet context)   ^^^^^^^^
                                  (your path mapping)   ^^^^^^^^^^^^^^


If this application was the default, then that would eliminate one the first
"/gannett"s

Hope that helps.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



----- Original Message -----
From: "Sam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 11, 2004 11:03 PM
Subject: Config issue


> Greetings,
>
> I'm a STRUTS newbie and am having a problem I can't seem to solve,
> searched everywhere I can think of and haven't found an answer.
>
> I have STRUTS 1.1 running with Tomcat 5.0.18 and am
> having a URI context issue.  All of my html form actions
> are coming out with the wrong URI -- should be "/gannett/login"
> but are coming out as "/gannett/gannett/login" duplicating the prefix.
>
> Any ideas out there?  Following is my config.
>
> Thanks,
>
> Sam
>
> web.xml snippet:
>
> <web-app>
> <display-name>Gannett Web Application</display-name>
>     <servlet>
>         <servlet-name>gannett</servlet-name>
>         <servlet-class>
>           org.apache.struts.action.ActionServlet
>         </servlet-class>
>         <init-param>
>         <param-name>config</param-name>
>         <param-value>/WEB-INF/struts-config.xml</param-value>
>         </init-param>
>         <init-param>
>         <param-name>debug</param-name>
>         <param-value>4</param-value>
>         </init-param>
>         <init-param>
>         <param-name>detail</param-name>
>         <param-value>4</param-value>
>         </init-param>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>     <servlet-name>gannett</servlet-name>
>     <url-pattern>/gannett/*</url-pattern>
>     </servlet-mapping>
>
> Struts-config:
> <action-mappings>
> <action
> path="/login"
> input="/login.jsp"
> name="loginForm"
> scope="request"
> type="com.dimeta.security.LoginAction"
> validate="false">
> <forward name="Success" path="/chooser.jsp" redirect="true"/>
> <forward name="Failure" path="/login.jsp" redirect="true"/>
> </action>
>
> HTML for login.jsp:
> <html:form action="/login" method="post">
> </html:form>
>
> HTML source from browser:
> <form name="loginForm" method="post" action="/gannett/gannett/login">
> </form>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



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

Reply via email to