File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes href pointing to a servlet mapping or html directory of jsp files? 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 "href pointing to a servlet mapping or html directory of jsp files?" Watch "href pointing to a servlet mapping or html directory of jsp files?" New topic
Author

href pointing to a servlet mapping or html directory of jsp files?

Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Hi,
Just need to clarify path issues regarding hrefs and requestdispatchers. In some of the code I'm looking at in a sample app, there are references to paths such as:

In some cases, this href in the sample application say could mean:
(1) the index.html file in a directory called catalog containing jsp pages at the top layer of the web application.
(2) or a mapping to a servlet with /catalog as a url mapping.
What I find difficult to understand is the difference between the 2 when going through an application. Can anyone let me know is this just a part of understanding the application fully or there a clear distinction between the 2. Find it very confusing here, missing something basic.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

I would say that (1) is a poor practice. It's fragile and ambiguous.

Other than that, yeah, you just gotta figure out what the original developer intended.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Cheers, thanks for prompt reply.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: href pointing to a servlet mapping or html directory of jsp files?
 
Similar Threads
HttpServletRequest getRequestDispatcher behaving strangely
Tomcat on Linux tutorial
Mistakenly changed web.xml
ServletConfig getInitParameter() ????
URL Pettern source