You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/06/23 07:49:08 UTC

DO NOT REPLY [Bug 35477] New: - org.apache.struts.taglib.TagUtils.getActionMappingURL()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35477>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35477

           Summary: org.apache.struts.taglib.TagUtils.getActionMappingURL()
           Product: Struts
           Version: 1.2.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P4
         Component: Custom Tags
        AssignedTo: dev@struts.apache.org
        ReportedBy: rp@kabsi.at
                CC: rp@kabsi.at


Hello,

I found a problem report at www.jGuru.com and was facing the same problem in 
my web application. Please find the original report right below and also my 
answer/solution to this problem. Anyhow it might be necessary to consider this 
case in your source code ;-)
If you have any questions please do not hesitate to contact me.

Kind regards,
Rainer

+++The original problem report+++
In the jsp, I've given <html:form action="/input.do">
and in the struts-config.xml - <action type="MyAction" path="/input" 
name="myform" parameter="301" scope="session"> </action> when I 
give "localhost:9080/myApp/home" and the page is rendered, the html source 
contains only the application name - <form action="/myApp">. As a result, the 
form doesn't get submited to the proper url. 
struts version - 1.1
environment- wsad 5.0 
Can anybody help me to solve this pbm

+++And here is my answer, what I have found out+++
Hello,

I was facing the same problem and spent quite a long time to find out the 
reason for this behaviour ;-)
For this I had to look in the html tag lib sources...

In my case I used a (wrong?) servlet-mapping in web.xml deployment descriptor, 
where I set "<url-pattern>/*.do</url-pattern>".

All my action mappings worked when requesting the URLs (e.g. 
myapp/login.do,...), but the tag libraries like "<html:form..." use a 
class "org.apache.struts.taglib.TagUtils" internally, 
calling "getActionMappingURL()" method, which only returns the context path if 
you use a servlet mapping like I did (/*.do).

If you use the same servlet mapping (file extension mapping), then try it 
without the preceeding "/" ("<url-pattern>*.do</url-pattern>). This helped in 
my case :-) And I am very happy now, that I can continue with my application. 

I will also report this to STRUTS development group.

Kind regards,
Rainer

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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