File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes Servlets - 4A: ActionServlet not forwarding request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Servlets - 4A: ActionServlet not forwarding request" Watch "Servlets - 4A: ActionServlet not forwarding request" New topic
Author

Servlets - 4A: ActionServlet not forwarding request

jone jacob
Greenhorn

Joined: Jun 11, 2010
Posts: 1
Ok, I've been trying this thing out for a couple days now all to no avail.

I believe I am not too far off from the solution but I am missing something very simple. Could someone please take a look and let me know what I am missing?

The problem: I have implemented the VideoServlet as an ActionServlet but even the simplest of actions will not forward to the proper jsp. I am trying to simply have a 'ListHandler' with a key of "list" that should go to 'listvideos.jsp'. The URL on my index.html is: a href='/Video?action=list'. However when I click on this it goes to http://localhost:8080/Video/?action=list , which is not a valid URL.

EDIT/JD : Deleted functional code.

Any information would be appreciated.
Thank you,

- J Jacob
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1686
    
  12

Jone,

Please don't post code for the assignments in this forum. I have edited your post to remove your code.

The reasoning for this is to not give secrets/hints/answers away to other students on the drive. Please ask questions of your nitpicker for questions on the code itself, or you can give pseudocode in the forums here.


When you do things right, people won't be sure you've done anything at all.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20635
    ∞

I'm trying to read the question and I'm having trouble understanding the question.

The action key stuff should never go to a jsp, but always to a handler. Then the handler will forward to a jsp.



permaculture Wood Burning Stoves 2.0 - 4-DVD set
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets - 4A: ActionServlet not forwarding request