struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Bailly <>
Subject form tag and root context isssue
Date Wed, 28 Jul 2004 12:21:46 GMT

My web app is running under tomcat 5.0/struts 1.21. It was deployed in 
webapps/ROOT. All was working fine (request.getContextPath() was returning "").

Now the same web app is deployed using a xml file in conf/Catalina/localhost 
tomcat's directory :
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:/java/webapp/eclipse/workspace/webapp/WebContent" path="/" 
path attribute context is set to "/" and request.getContextPath() returns "/" 
<html:form action="/myaction"> renders <form name="myform" method="post" 
action="//"> which breaks the navigation. 

Having a look to FormTag source shows that no test is done to avoid 
action="//" when context path is = "/"
TagUtils.getActionMappingName(String) always returns an action beginning 
with "/"

Is there an other solution than patching the sources ?
(I can't change path attribute in the xml config file)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message