This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Model 2 approach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Model 2 approach" Watch "Model 2 approach" New topic

Model 2 approach

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am trying to get familiar with the Model 2 approach. Basically I am confused about how to give the path when the 'controller' servlet switches to a JSP page using Request Dispatcher getServletContext().getRequestDispatcher(address). I have stored the html and jsp files in a subdirectory public_html and the servlet resides in /public_html/servlets/example.
Thank you,
Victor Boveda

Joined: May 22, 2001
Posts: 6
You can refer to your pages with absolute
or relative path
I prefer relative path, because you can change the html server path without change your servlet.
Hope this helps
I agree. Here's the link:
subject: Model 2 approach
Similar Threads
how to use usebean
servlets in weblogic
Where in Javawebserver2.0 should I place my Html , Jsp and Java programs
document root for JSP
compiling web.xml