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: 14/Mar/06 05:24 AM   Updated: 04/Jul/07 03:36 AM
Component/s: Tag Libraries EL (Dormant)
Affects Version/s: 1.3.0
Fix Version/s: 1.3.3

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 38956
Resolution Date: 07/May/06 02:28 PM
Labels:


 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   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Niall Pemberton added a comment - 15/Mar/06 01:32 AM
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 made changes - 23/Apr/06 04:52 AM
Field Original Value New Value
issue.field.bugzillaimportkey 38956 28084
Don Brown added a comment - 28/Apr/06 11: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! :)

Don Brown made changes - 28/Apr/06 11:37 AM
Bugzilla Id 38956
Summary [el] Postback form (optional 'action' attribute for html-el:form) is not working Postback form (optional 'action' attribute for html-el:form) is not working
Assignee Struts Developer Mailing List [ dev@struts.apache.org ]
Wendy Smoak added a comment - 07/May/06 02:41 AM
Fixed reported-by so this shows up in my list.

Wendy Smoak made changes - 07/May/06 02:41 AM
Bugzilla Id 38956
Reporter Wendy Smoak [ wsmoak ] Wendy Smoak [ wsmoak ]
Repository Revision Date User Message
ASF #404737 Sun May 07 07:20:09 UTC 2006 wsmoak Enable 'postback forms' for Struts EL by making <html-el:form>'s 'action' attribute optional.
STR-2793
Files Changed
MODIFY /struts/action/trunk/el/src/main/resources/META-INF/tld/struts-html-el.tld

Wendy Smoak added a comment - 07/May/06 02:28 PM
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 made changes - 07/May/06 02:28 PM
Resolution Fixed [ 1 ]
Fix Version/s 1.3.3 [ 21710 ]
Status Open [ 1 ] Resolved [ 5 ]
Wendy Smoak added a comment - 25/Aug/06 07: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.


Paul Benedict made changes - 04/Jul/07 03:36 AM
Status Resolved [ 5 ] Closed [ 6 ]
Jeff Turner made changes - 01/Feb/10 01:03 AM
Project Import Mon Feb 01 01:03:21 UTC 2010 [ 1264986201992 ]