struts-user mailing list archives

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

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="/" 
reloadable="true">
</Context>
path attribute context is set to "/" and request.getContextPath() returns "/" 
<html:form action="/myaction"> renders <form name="myform" method="post" 
action="//myaction.do"> which breaks the navigation. 

Having a look to FormTag source shows that no test is done to avoid 
action="//myaction.do" 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)
Thanks.

Ludo.





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


Mime
View raw message