Announcement Announcement Module
Collapse
No announcement yet.
having problem using SimpleFormController please help me Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • having problem using SimpleFormController please help me

    Hi friends,

    i hate SimpleFormController, it never works for me but i end up needing it inorder to use getSuccessView() method in my application. i have very simple code, and even its not working here is the code

    application-servlet.xml
    -----------------------
    <bean id="postLoginController" class="com.rjlg.ehmdrc.core.mvc.web.PostLoginContr oller">
    <property name="sessionForm"><value>true</value></property>
    <property name="commandName"><value>queryCriteria</value></property>
    <property name="commandClass"><value>com.rjlg.ehmdrc.core.mv c.web.SearchQueryCriteriaForm</value></property>
    <!--property name="successView"><value>forward:/searchEsnFiles.do</value></property-->
    </bean>

    Controller (assuming all imports are there)
    -------------

    public class PostLoginController extends SimpleFormController
    {

    protected final Log logger = LogFactory.getLog(getClass());
    private final static Log log =
    LogFactory.getLog(com.rjlg.ehmdrc.core.mvc.web.Pos tLoginController.class);

    protected void doSubmitAction(Object command)
    throws Exception {

    log.debug("in doSubmitAction method");

    }

    protected ModelAndView processFormSubmission(HttpServletRequest request,
    HttpServletResponse response,
    Object command,
    BindException errors)
    throws Exception {

    log.debug("in processFormSubmission method");
    return new ModelAndView("search.byESN.cetads");
    }

    protected ModelAndView onSubmit(Object command)
    throws Exception{

    log.debug("in onSubmit method");
    return new ModelAndView("search.byESN.cetads");
    }
    }

    my view is configured to tiles view here is code for that in application-servlet.xml
    -----------------
    <bean id="viewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass"><value>com.rjlg.commons.mvc.web.R eferenceDataTilesJstlView</value></property>
    </bean>

    when i ran application. iam getting errors as follows:

    javax.servlet.ServletException: ModelAndView [ModelAndView: materialized View is [null]; model is {org.springframework.validation.BindException.quer yCriteria=org.springframework.validation.BindExcep tion: BindException: 0 errors, queryCriteria=[ esnQueryCriteria = [ esns = ], sranQueryCriteria = [ srans = ], baseQueryCriteria = [ bases = ], majcomQueryCriteria = [ majcoms = ], engineTypeQueryCriteria = [ engineTypes = ], uploadDateQueryCriteria = , uploadFrom = null, uploadTo = null ], oapQueryCriteria = [ flightCount = 0, sampleFrom = null, sampleTo = null, sampleBurnFrom = null, sampleBurnTo = null, oilTypes = , wearMetalSearchQueryCriteria = wearMetals null ], cetadsQueryCriteria = com.rjlg.ehmdrc.core.mvc.web.CetadsQueryCriteriaFo rm@2d09e0, testCellQueryCriteria = com.rjlg.ehmdrc.core.mvc.web.TestCellQueryCriteria Form@e38fca, authorizationQueryCriteria = com.rjlg.ehmdrc.core.mvc.web.AuthorizationQueryCri teriaForm@1f528ab, downloadFormatnull, filesToDownloadnull, hasOapQueryCriteria = true, hasCetadsQueryCriteria = true, hasTestCellQueryCriteria = true ]}] neither contains a view name nor a View object in servlet with name 'ehmdrc-core'
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:956)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:744)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:663)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:394)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:348)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:264)
    org.acegisecurity.intercept.web.FilterSecurityInte rceptor.invoke(FilterSecurityInterceptor.java:107)
    org.acegisecurity.intercept.web.FilterSecurityInte rceptor.doFilter(FilterSecurityInterceptor.java:72 )
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.ExceptionTranslationFilter.do Filter(ExceptionTranslationFilter.java:110)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.providers.anonymous.AnonymousPro cessingFilter.doFilter(AnonymousProcessingFilter.j ava:125)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.wrapper.SecurityContextHolderAwa reRequestFilter.doFilter(SecurityContextHolderAwar eRequestFilter.java:81)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.basicauth.BasicProcessingFilt er.doFilter(BasicProcessingFilter.java:181)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.AbstractProcessingFilter.doFi lter(AbstractProcessingFilter.java:217)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.logout.LogoutFilter.doFilter( LogoutFilter.java:108)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.context.HttpSessionContextIntegr ationFilter.doFilter(HttpSessionContextIntegration Filter.java:191)
    org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.util.FilterChainProxy.doFilter(F ilterChainProxy.java:148)
    org.acegisecurity.util.FilterToBeanProxy.doFilter( FilterToBeanProxy.java:90)


    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.

    can anybody help me why its giving me that,

    your friend.
Working...
X