Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Model 2 approach

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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,
Navatha
 
Victor Boveda
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can refer to your pages with absolute
address="/public_html/yourpage.jsp"
or relative path
address="../../yourpage.jsp"
I prefer relative path, because you can change the html server path without change your servlet.
Hope this helps
Victor
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic