struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] Updated: (STR-1820) [taglib] <html:form> should not require form bean or should use better warning
Date Wed, 17 Dec 2008 03:50:38 GMT

     [ https://issues.apache.org/struts/browse/STR-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul Benedict updated STR-1820:
-------------------------------

    Assignee:     (was: Joe Germuska)

> [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: Tag Libraries
>    Affects Versions: Nightly Build
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ralf Hauser
>            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.


Mime
View raw message