This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes subfolder and context problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "subfolder and context problem" Watch "subfolder and context problem" New topic

subfolder and context problem

luca invernizzi

Joined: Apr 23, 2013
Posts: 4
I just started programming in jsp.
I have a problem about the jsp file.
In my application there are now more than 100 jsp files and they are all in the root folder (the web folder, use tomcat). It's going to become problematic way among all these files.
Now I would like to create subfolders to divide those 100 files based on their operational function.
Starting to move, I realized that become wrong all calls between the various jsp pages and such as loading images from the folder /img (now I have to set ../img because the page is in a subdirectory).

Is there a way to tell all these pages to refer to the parent folder as if they were there (change all the references is too long and difficult)?
Does anyone have any suggestions for me?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60745

See the JspFaq. It outlines how to create URLs for images and other resources that do not depend upon the address of the current page.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: subfolder and context problem
Similar Threads
tomcat6 and apache
Images are not shown in netbeans web application on jsp page
creating directories...HELP
Can we saperate Jsp files folder from Tomcat?
help required on access managment of jsp pages