Howdy all. I got this nitpick back a few days ago:
Rather than going directly to the jsp, you should make all your access to jsp pages pass through the servlet. Your URL should look something like this:
OK. I've tried this and can't get it to work. Perhaps because I don't fully understand what it's doing, maybe (I don't remember reading much about it in Head First Servlets & JSP). But anyway, all it does when I write the URL like that is to reload the listvideos.jsp page (which is where this link is written). I can't seem to get it to load the addvideo.jsp page no matter how I write the URL (I've tried .../VideoServlet?action=addvideo.jsp, .../VideoServlet?action=addvideo, .../VideoServlet?forward=addvideo.jsp, etc.).
Any suggestions, help, advise, etc would be greatly appreciated. Thanks!
Marilyn de Queiroz
Joined: Jul 22, 2000
Do you have an "action" in your servlet that matches the "action" in the url? Otherwise, the servlet will do the "default" action.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Mar 06, 2006
Man, that was a tough one (for me anyways). Had to dig a little bit but learned several things I didn't know and had just taken for granted. Thanks!