I am trying to track down an error with are having with Stripes 1.4.3.  We have
our application deployed and working fine on Tomcat 6, Jetty 6, and JBoss 4. 
Everything works no problem.  However the same exact EAR file deployed on Jboss
4 does not work in IBM Websphere 6.1.

The error we are getting is on our login page.  I have looked this error up in
the mailing list and the only solution is to make sure @DontValidate is turned
on.  We have that on and like i said it works fine in Tomcat, Jetty, JBoss. 
Just getting this error in Websphere 6.1.

I have read the forums about not using a _sourcepage hidden field as the cause
of the error but we are using a proper <stripes:form> which is supposed to
append that anyway.  The error seems like it is ALWAYS trying to do the
validation.  Any help would be much appreciated.  Or at least an explanation why
it works in Tomcat, Jetty, JBOss but NOT in Websphere would also do.

"java.lang.IllegalStateException: Here's how it is. Someone (quite possible the
Stripes Dispatcher) needed to get the source page resolution. But no source page
was supplied in the request, and unless you override
ActionBeanContext.getSourcePageResolution() you're going to need that value.
When you use a <stripes:form> tag a hidden field called '_sourcePage' is
included. If you write your own forms or links that could generate validation
errors, you must include a value  for this parameter. This can be done by
calling request.getServletPath()."



Here is the ActionBean in question:


public class LoginActionBean extends BaseActionBean {
    
    protected static final String LOGIN = "/WEB-INF/jsp/Login.jsp";

    @SpringBean
    private SecurityService securityService;

    @Validate(required = true, minlength = 5)
    private String username;

    @Validate(required = true, minlength = 6)
    private String password;

    private String targetUrl;

    @DontValidate
    public Resolution display() {
        LOG.debug("Displaying login screen");
        getContext().getRequest().getSession().invalidate();
        return new ForwardResolution(LOGIN);
    }

    @DefaultHandler
    public Resolution login() {
        LOG.debug("Logging into XXXX");
        Resolution resolution = getContext().getSourcePageResolution();

        ...

        return resolution;
    }


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to