Hi Aurelio,
I'd recommend using the beanclass attribute wherever possible. That way
you don't have to worry about changing (or remembering) URLs. One nice
shortcut is to use beanclass="${actionBean.class}" to point to the
ActionBean that forwarded to the current JSP.
In all situations I've come across the useActionBean tag is unnecessary.
I used it way back when but now it seems to be mostly obsolete.
Aaron
Aurelio D'Amico wrote:
Hi, I'm migrating from 1.4.2 to 1.5.1
All my actions and related JSP pages where structured such as
(ver1.4.2 without problems):
@UrlBinding(Actions.LOGIN_URL)
*public* *class* LoginActionBean *extends* ApplicationActionBean {
...
<c:set var=/"action" /value=/"<%=Actions.LOGIN_URL%>"//>
<stripes:useActionBean binding=${action}/" /var=/"bean"//>
In this way I was able to use the variable ${action} for binding,
errors and forms submission without incurring in spelling errors.
As for the version 1.5.1 I get an error while compiling the JSP.
It seems like the useActionBean tag is parsed before the set tag.
Do you have any suggestion rather than setting the binding with the
textual string (i.e. "/app/action/pub/Login")?
java.lang.ClassCastException: java.lang.Object
javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:138)
net.sourceforge.stripes.tag.UseActionBeanTagExtraInfo.validate(UseActionBeanTagExtraInfo.java:73)
javax.servlet.jsp.tagext.TagInfo.validate(TagInfo.java:274)
org.apache.jasper.compiler.Validator$TagExtraInfoVisitor.visit(Validator.java:1669)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Validator.validate(Validator.java:1749)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
it.cnr.siper.web.servlets.DispatcherServlet.service(DispatcherServlet.java:28)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
it.cnr.siper.web.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:54)
it.cnr.siper.web.filters.SecurityFilter.doFilter(SecurityFilter.java:45)
it.cnr.siper.web.filters.SessionExpiredFilter.doFilter(SessionExpiredFilter.java:36)
it.cnr.siper.web.filters.RedirectFilter.doFilter(RedirectFilter.java:32)
it.cnr.siper.web.filters.InitializationFilter.doFilter(InitializationFilter.java:93)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
------------------------------------------------------------------------
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users