Config issue

2004-02-11 Thread Sam
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-nameGannett Web Application/display-name
servlet
servlet-namegannett/servlet-name
servlet-class
  org.apache.struts.action.ActionServlet
/servlet-class
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-value4/param-value
/init-param
init-param
param-namedetail/param-name
param-value4/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-namegannett/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]



Re: Config issue

2004-02-11 Thread James Mitchell
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
/gannetts

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-nameGannett Web Application/display-name
 servlet
 servlet-namegannett/servlet-name
 servlet-class
   org.apache.struts.action.ActionServlet
 /servlet-class
 init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
 param-namedebug/param-name
 param-value4/param-value
 /init-param
 init-param
 param-namedetail/param-name
 param-value4/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-namegannett/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]



RE: Config issue

2004-02-11 Thread Navjot Singh
this can happen only when you have gannett (first )as context name 
AND
gannett (second one) as module name.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Sam
Sent: Thursday, February 12, 2004 9:34 AM
To: [EMAIL PROTECTED]
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-nameGannett Web Application/display-name
servlet
servlet-namegannett/servlet-name
servlet-class
  org.apache.struts.action.ActionServlet
/servlet-class
init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
   param-namedebug/param-name
   param-value4/param-value
/init-param
init-param
   param-namedetail/param-name
   param-value4/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
servlet-mapping
   servlet-namegannett/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]