I have a problem with the form-tag action-attribute
when I use newer builds
of struts. Is it a bug or a feature? maybe a buggy
feature...

Before, the action-attribute was not touched i.e. what
one wrote in the
.jsp-file was the same that came out after the taglibs
rendering.
Now the taglib tries to be clever, it is putting the
web application name
in front of what's in the action-attribute.

An example might be more clear:

Imagine a web-application with the name of
web-application.
We look into the form-tag of a .jsp-file e.g.
dothethang.jsp:

Earlier versions:
<html:form action="something.do" name="someForm" 
           type="this.is.the.type.someForm>

was translated into:
<form name="someForm" method="POST"
action="something.do">

Newer versions:
<html:form action="something.do" name="someForm" 
           type="this.is.the.type.someForm>

is translated into:
<form name="someForm" method="POST"
action="/web-application/something.do">


So why is this a problem?
Well, this is a major problem if you have a proxy
webserver with pathtrim of
the url. e.g. if the original url is 
www.someplace.com/place1/web-application/dothethang.do
the proxy might filter it so the servlet-container
thinks the url
is www.someplace.com/web-application/dothethang.do.
If we look at the form-tag examples above the older
version will
post the form to
www.someplace.com/place1/web-application/something.do
while the latter will post the form to
www.someplace.com/web-application/something.do !

Is there anyway this might change?
This is quite a disaster if you use proxy webserver
with pathtrim.

Erik


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to