• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Front Man - can't forward or redirect to Command

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a ListVarieties command to list a table's entries. From that view, I can initiate a NewVarieties command. After inserting the new record I have tried to forwardToCommand("ListVarieties") and redirectToCommand("ListVarieties") to return to the list of records but I keep getting:

java.lang.IllegalStateException: Cannot forward after response has been committed

Do I not understand what these methods are for?

Here's my code:



Thanks for any help you can offer.
 
Mark Frasertoo
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my stack trace:

INFO http-80-1 org.bibeault.frontman.CommandBroker - executing command ListVarieties (com.allianceseed.db.commands.ListVarietiesCommand)
INFO http-80-1 org.bibeault.frontman.CommandBroker - executing command NewVariety (com.allianceseed.db.commands.NewVarietyCommand)
INFO http-80-1 org.bibeault.frontman.CommandBroker - executing command InsertVariety (com.allianceseed.db.commands.InsertVarietyCommand)
ERROR http-80-1 org.apache.catalina.core.ContainerBase.[Catalina].[ascdev].[/].[DBAdmin] - Servlet.service() for servlet DBAdmin threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.bibeault.frontman.CommandContextImplementation.forward(CommandContextImplementation.java:219)
at org.bibeault.frontman.CommandContextImplementation.forwardToView(CommandContextImplementation.java:299)
at com.allianceseed.db.commands.InsertVarietyCommand.execute(InsertVarietyCommand.java:45)
at org.bibeault.frontman.CommandBroker.doPost(CommandBroker.java:228)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.patersonglobalfoods.filter.MaintenanceModeFilter.doFilter(MaintenanceModeFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
at java.lang.Thread.run(Unknown Source)
 
Sheriff
Posts: 67266
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post the command classes individually so that the line numbers match those in the stack trace?
 
Mark Frasertoo
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just got laid off from work so I can't do the post. No kidding! Wish I was. I'm working on another app at home so I'll see if I have the problem there. I'm liking FrontMan so far. I can definitely see how to personalize it too. Nice system, Thanks!
 
Bear Bibeault
Sheriff
Posts: 67266
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eesh! Sorry about the job situation!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!