Yufan,

This is a known problem with Struts IF Struts is used as a ROOT webapp.  It
probably happens with any container or app server, not just Tomcat.

A post back in November (25th, 2004) wrote the easiest current way to fix it
would be to hack a line or two if the RequestProcessor.processForwardConfig
class to remove the leading "/" slash character.  The URL for that post is:
http://marc.theaimsgroup.com/?l=struts-user&m=110136285004088&w=2

I think this happens because the method tries to add any path before the
slash but the HttpServletRequest gives back only a slash for the root
webapp.  I tried to check the code repository to see if this was fixed in a
version being worked on but I don't see anything suggesting it was fixed.  I
guess that for now, it is a 'letter evil' you'll need to live with.

Regards,
David

-----Original Message-----
From: Yufan Shi [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 15, 2005 1:02 PM
To: 'Struts Users Mailing List'
Subject: Tags rewrite wrong action url


Hi all,
It's a strange problem.
I have a struts-based web application installed under the ROOT context of
one vhost of Tomcat 5.
In the jsp files, if I use <html:rewrite action="/someaction"/> or
<html:form action="/someaction"/>
Struts rendered //someaction.do or <form action="//someaction.do"> to the
browser, while "/someaction.do" or "<form action="/someaction.do"/> " was
expected.
I am sure the problem is not caused by Struts's tag class as I could get
correctly outputs by directly request the jsp files.
Is that a problem of the Struts ActionServlet?
Thanks!


Yufan Shi

We are Online!

http://www.ivanshi.com/blog/






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

Reply via email to