I'm including a JSP page inside another, the second page is in a different directory and so the images cant be found as the path is now screwy. The images arent in the root directory and I cant hardcode their path either, so I put an attribute in the web-xml that gives me the path to the images directory and use that. Is this the way to do things or is there a way to use the relative path like you can in asp?
Joined: Jun 12, 2000
Use ./../../ notation to locate your images form the current directory
<a href="http://www.jobklub.com" target="_blank" rel="nofollow">http://www.jobklub.com</a><br /> 'Add Job To Life'
Joined: Sep 11, 2002
You can define a Context Root in the deployment descriptor. This way, you can refer to a relative URL in your include. Are you using Include directive or Include Action?