aspose file tools*
The moose likes JSP and the fly likes Getting include to work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting include to work" Watch "Getting include to work" New topic
Author

Getting include to work

Tom Joiner
Ranch Hand

Joined: Sep 19, 2006
Posts: 47
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


SCJP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rusty Smythe
Ranch Hand

Joined: Aug 09, 2006
Posts: 93
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

Joined: Dec 11, 2004
Posts: 13410

Do you really have space in your context path?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Don't get me started about those stupid light bulbs.
 
subject: Getting include to work
 
Similar Threads
server side includes
Code too large for try statement
Possible to selectively exlucde a file from having the prelude and coda?
href link not working
how to access jsp under WEB-INF folder