aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question from Marcus Green 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 "Question from Marcus Green" Watch "Question from Marcus Green" New topic
Author

Question from Marcus Green

Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324

Why this code will give run time error


"Know where to find the solution and how to use it - that's the secret of success."
Priya Viswam
Ranch Hand

Joined: Dec 28, 2006
Posts: 81
The pathname must begin with a "/".

so change
RequestDispatcher dis = sc.getRequestDispatcher("menu.jsp");

this to
RequestDispatcher dis = sc.getRequestDispatcher("/menu.jsp");

and it will work.


SCJP 1.5<br />SCWCD 1.4
warren li
Ranch Hand

Joined: May 23, 2006
Posts: 128
ServletContext getRequestDispatcher's parameter must start with a /


SCBCD 1.3: 94%<br />SCWCD 1.4: 91%<br />SCJP 5: 95%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question from Marcus Green