This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes RequestDispatcher and form action Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "RequestDispatcher and form action Problem" Watch "RequestDispatcher and form action Problem" New topic
Author

RequestDispatcher and form action Problem

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634



i am confused when we have to put a forward slash in the
getRequestDispatcher("/login.html")

and
action="/abc"


why do we have to put the slash in the requestdispatcher when forwarding to a html or jsp page ?


OCPJP 6.0 93%
OCPJWCD 5.0 98%
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
You may or may not use /. Try removing it and check. The code should behave the same whether you have a / or not.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: RequestDispatcher and form action Problem
 
It's not a secret anymore!