Announcement Announcement Module
Collapse
No announcement yet.
Exception: Cannot expose session attribute x because of .... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception: Cannot expose session attribute x because of ....

    Well, I thougt I was almost there.

    I extended the MultiActionController to create my form object as session attribute named "nodeBean".

    In order to edit the "nodeBean" values, I use an extended SimpleFormController. Which works fine - until I try to submit the values.

    When I try to submit the form via the extended SimpleFormController, I get an Exception (at the end of this post)thrown. Somehow the form controller doesn't seem to like it that I created the command object as a session attribute.

    Why?

    javax.servlet.ServletException: Cannot expose session attribute 'nodeBean' because of an existing model object of the same name
    at org.springframework.web.servlet.view.AbstractTempl ateView.renderMergedOutputModel(AbstractTemplateVi ew.java:137)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)
    at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:928)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:705)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:625)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:392)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:357)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at com.opensymphony.module.sitemesh.filter.PageFilter .parsePage(PageFilter.java:118)
    at com.opensymphony.module.sitemesh.filter.PageFilter .doFilter(PageFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:534)

  • #2
    Have you set sessionForm to be true on the simpleFormController?

    Comment

    Working...
    X