[ 
https://issues.apache.org/struts/browse/STR-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44054#action_44054
 ] 

Paul Benedict commented on STR-1820:
------------------------------------

Ralf, can you help me understand this better? Granted, I did read the issue :-) 
but still need some help.

> [taglib] <html:form> should not require form bean or should use better warning
> ------------------------------------------------------------------------------
>
>                 Key: STR-1820
>                 URL: https://issues.apache.org/struts/browse/STR-1820
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Taglibs
>    Affects Versions: Nightly Build
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ralf Hauser
>            Assignee: Joe Germuska
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> For some simple forms, we noticed that having in the jsp just
>  <html:form action="/nextAction.do" >   
> is sufficient if the submit button values are retrieved via:
>  String yesBtn = request.getParameter("submitPropertyName");
> The corresponding form was never declared in the jsp, in fact, it never even
> existed as a Java class.
> Now it turns out that this was only possible because there was another form
> we used globally for language switching (both declared in struts-config.xml 
> and
> existing as java class). This language form, however was not named in
> "nextAction"'s  <action path=...  ,
> only globally.
> Once we removed that other (language-switcher) form, we finally got the 
> below stacktrace and error message.
> Conclusion:
> 1) The form bean now identified as being null was filled with another form 
> that
>   a) wasn't used by this form's action anyway
>   b) was only globally declared
> 2) So, if it is possible to access form values without a form existing, I 
> guess
>   a) Either I should get a warning whenever a form uses an action that
>      doesn't have a declaration for this form  -- or
>   b) let the form not complain at all since doesn't really need the form 
> anyway.
> javax.servlet.ServletException: Cannot retrieve definition for form bean null
>       at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
>       at org.apache.jsp.ourFilejsp._jspService(ourFilejsp.java:86)
>       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to