aspose file tools*
The moose likes Other Application Frameworks and the fly likes Front Man - can't forward or redirect to Command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Front Man - can Watch "Front Man - can New topic
Author

Front Man - can't forward or redirect to Command

Mark Frasertoo
Greenhorn

Joined: Oct 20, 2012
Posts: 7
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

Joined: Oct 20, 2012
Posts: 7
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)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Can you please post the command classes individually so that the line numbers match those in the stack trace?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Frasertoo
Greenhorn

Joined: Oct 20, 2012
Posts: 7
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Eesh! Sorry about the job situation!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Front Man - can't forward or redirect to Command
 
Similar Threads
Proper place to initiate DB Pooling
Problems with encoding and files
How to arraylist value pass servlet action to JSP file
display the log/output in JSP or HTML page
Log4j not working as expected with ejb module