• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web.xml entry for jsp hiding

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my web.xml entry. I was hoping to place my jsp file test.jsp under
WEB-INF and call it simply by http://myapp/test. That does not seem to work.

I am sure I have some mistake in this web.xml entry. Any ideas?

----->
<servlet>
<servlet-name>test</servlet-name>
<jsp-file>/WEB-INF/test.jsp</jsp-file>
</servlet>
<servlet-name>test</servlet-name>
<url-pattern>/test</url-pattern>
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You gave

<servlet>
<servlet-name>test</servlet-name>
<jsp-file>/WEB-INF/test.jsp</jsp-file>
</servlet>
<servlet-name>test</servlet-name>
<url-pattern>/test</url-pattern>



I guess you have the <servlet-mapping> element in your web.xml.
Because it was not shown by you here.

Send whether you are getting any error messages om tomcat console.
 
Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I do not have servlet mappin tag. I really do not have servlet here I am just trying to assign a psudeo name for jsp file. I picked up this from a book and seems to not work. There is no error message in error log also.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I've tried this before and it doesn't work.
You would think that it would. It's not redirecting, so I was expecting that it would behave like a forward.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a file access filter in JSOS:
http://www.servletsuite.com/servlets/fileaccessflt.htm

It closes the direct access to JSP files
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic