Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forwarding users from one JSP to another

 
Awet Haddis
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Background:

I am developing a webapp that will allow users to upload data to a postgris database among other things. I have designed the web pages and I have the functionality
of the upload page completed. At this stage I want the user to first land on the home page, then if they click a link they will be forwarded to the upload page, ,then to the summary report page.

AHPDController is going to be my main controller. This is my algorithm:



Questions:

1. Should AHPDController be an abstract class, or a servlet, or both?

2. How should I communicate to my servlet that I am "trying to go to upload.do" as in the if statement

3. Is there a better/elegant method of doing this?

Thank-you guys/gals.

 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awet Haddis wrote:Background:
Questions:

1. Should AHPDController be an abstract class, or a servlet, or both?

2. How should I communicate to my servlet that I am "trying to go to upload.do" as in the if statement

3. Is there a better/elegant method of doing this?

Thank-you guys/gals.



1. If you are developing a plain servlet based without any MVC framework, your controller would be a servlet
2. You do not instantiate servlets with new operator like new UploadDataController()
3. You can create a servlet that will display upload form (doGet), and handle upload(doPost) and map it to upload.do in web.xml
4. For how to forward request to another jsp or servlet see this forward example
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic