struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Struts Wiki] Update of "StrutsStupidUriTricks" by TedHusted
Date Mon, 08 Aug 2005 22:51:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.

The following page has been changed by TedHusted:
http://wiki.apache.org/struts/StrutsStupidUriTricks

The comment on the change is:
Create FAQ from #35477 submitted by Rainer Podlas

New page:
= Why is the URI in my form tags truncated? =

In the JSP template, we've specified

* <html:form action="/input.do"> 

and in the struts-config.xml, we've specified

* <action type="MyAction" path="/input" name="myform" parameter="301" scope="session"/>

If the page is accessed using a URI like 

* http://localhost:9080/myApp/home

when the page renders, the html source contains only the application name 

* <form action="/myApp">. 

As a result, the form is not submitted to the proper URI or ActionMapping.

struts version - 1.1
environment- wsad 5.0 


Here are two things you can try, 

* First, specify the ActionMapping in the html:form tag, not the URI form with the extension.
Using the URI extension with the form tag has been deprecated since Struts 0.5.

* Second, check whether there is a leading slahs specified by the servlet mapping in the web.xml
deployment descriptor. Usually you will want to specify 

** <url-pattern>*.do</url-pattern>

without a leading slash. 

(Submitted by Rainer Podlas)

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


Mime
View raw message