History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: STR-2793
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Wendy Smoak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Postback form (optional 'action' attribute for html-el:form) is not working

Created: 13/Mar/06 09:24 PM   Updated: 03/Jul/07 08:36 PM
Component/s: Tag Libraries EL (Dormant)
Affects Version/s: 1.3.0
Fix Version/s: 1.3.3

Environment:
Operating System: other
Platform: Other

Bugzilla Id: http://issues.apache.org/bugzilla/show_bug.cgi?id=38956


 Description  « Hide
The release notes for 1.3 mention 'Postback forms' and say that the 'action'
attribute of the form tag is now optional. This hasn't been changed in the tld
for the html-el taglib. Making that change resulted in the following NPE. Was
this feature implemented in the Struts EL taglib?

14:20:18,187 - ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[example.com].[/myapp].[action]
- Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at org.apache.struts.taglib.TagUtils.getActionMappingName(TagUtils.java:560)
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:755)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:410)
at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:396)
at
org.apache.jsp.WEB_002dINF.jsp.chooseAgresrelBody_jsp._jspx_meth_html_form_0(org.apache.jsp.WEB_002dINF.jsp.chooseAgresrelBody_jsp:132)
at
org.apache.jsp.WEB_002dINF.jsp.chooseAgresrelBody_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.chooseAgresrelBody_jsp:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Niall Pemberton - 14/Mar/06 05:32 PM
From what I can see, it shouldn't need anything additional in the EL flavour
FormTag. My guess is you've hit a scenario where it just doesn't work - EL or
regular. Looks for some reason like the original URI is null, causing the
problem. Have you tried it with the regular "non-EL" FormTag - I suspect that
would also do the same.

I started trying to add a postback example to the struts-examples webapp - but
I found other problems - See STR-2795.

Don Brown - 28/Apr/06 04:37 AM
I agree with Niall that this would also be a problem with the regular tag, but I'm not seeing how the original URI isn't set. Are you using a custom request processor chain? Is this happening on a chained action? Could you give some details on what you were doing when you encounted this error? Thanks, we'll get to the bottom of it yet! :)

Wendy Smoak - 06/May/06 07:41 PM
Fixed reported-by so this shows up in my list.

Wendy Smoak - 07/May/06 07:28 AM
The 'action' attribute of <html-el:form> is now optional.
http://svn.apache.org/viewcvs?rev=404737&view=rev

After fixing the TLD, I'm unable to reproduce the NullPointerException.

In an example app, this JSP

   <html:form>

correctly renders this HTML:

   <form name="inputForm" method="post" action="/mywebapp/Input.do">

Closing as fixed.

Wendy Smoak - 25/Aug/06 12:05 PM
This may be related to STR-2935. The SetOriginalURI command was missing from the Tiles chain-config file.

That might explain why I couldn't reproduce the problem with a simple (non-Tiles) example.