Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Front Man - forwardToView alters the URL

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI there.

I am absolutely loving the frontman "framework". Its honestly everything I always wanted to do, many many thanks to Bear Bibeault!

The issue I am currently having is that if I post from a form on a jsp file to the servlet using :

<form name="input" action="command/runTest" method="post">

It runs my TestCommand class as expected but when I redirect the client with commandContext.forwardToView("Index") in that class
it redirects the client as expected but the url changes from "http://localhost:8080/FrontControllerExample/" to "http://localhost:8080/FrontControllerExample/command/runTest"

This means that if I submit again it tries to post to "http://localhost:8080/FrontControllerExample/command/command/runTest" and an exception is thrown.

This does not happen however if i use the redirectToView method.

I am pretty positive I am making some newb mistakes here but for the life of me I cant figure out a solution to the problem.
Any help would be greatly appreciated.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!