• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting include to work

 
Tom Joiner
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am hoping to get an include to work for my internal web site. I am going to place the html that is common to all pages in a header and footer, which is included on all web pages. I am making them jsp so that I can enable them (with todays date for example).

However, I am having trouble getting them recognized. When I have



It produces the error:
File "/Includes/title.jsp" not found

I have created this file underneath
Web pages\Web INF\Includes\title.jsp

I have also tried



Obviously I don't understand the relative directory structure of the jsp pages. If someone could point me to a resource I would be much appreciative.

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64617
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The root of your web app should be where the WEB-INF folder is located. Not "Web INF", by the way. When posting information in questions, please try to be accurate.

So your path would be "/WEB-INF/Includes/title.jsp"

You do not specify the context path in an include path.
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom Joiner:
I have created this file underneath
Web pages\Web INF\Includes\title.jsp

Bear Bibeault:
When posting information in questions, please try to be accurate.

That one could've come right out of the FAQ...


Tom, what happens if you move "title.jsp" into "Web pages\Includes\" ?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really have space in your context path?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic