Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Include problems  RSS feed

 
Dave Matthews
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use ./../../ notation to locate your images form the current directory
 
Jose Velarde
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!