• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL & Servlet-mappings in web.xml

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quite simply, would anyone have any idea why including my servlet-mappings into my web.xml is causing the following error in my JSP?

If I take them out it works fine but obviously then, none of my Servlet calls work. Put it back I get this error (sorry it's quite a biggy)!






[ November 16, 2007: Message edited by: Keith Seller ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My first suggestion is to learn to pare down your posts to relevant parts. Posting pages and pages of stack trace rather than just the important portions is likely to turn people away.

Secondly, why are you declaring the JSTL taglibs in your web.xml? It is unnecessary and just contributes to the noise. Just plop the JSTL jars in WEB-INF/lib and use the appropriate URIs on the pages to reference them.

Did you really remove the ,tld files from their jars and put them in a folder named WEB-INf/tlds? Why?

Cleaning up the web.xml of unnecessary configuration is the first step to take.
[ November 16, 2007: Message edited by: Bear Bibeault ]
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the servlet stuff is my system

The jstl stuff (tlds, taglibs etc) is all taken from an example i found on the internet, the exmple worked, until i integrated it with the servlet stuff, that's when I got this problem.

I'll look at tidying it up thogh
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Keith Seller:
I'll look at tidying it up thogh

Good idea. Gumming up the works with goo from a poorly written online example rarely adds value.
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now getting a:

javax.servlet.ServletException: javax.servlet.ServletException: WEB2651: Exceeded maximum depth for nested request dispatches: 20

When running in Sun Java WebApp9.0, or the original error in Tomcat 6.0

It only sems to be an issue when I set the ROOT to '/', here are some snippets to my code (I think it must be something to do with the
'<c:import var="page_xml" url="/WEB-INF/xml/index_menu.xml" />'

because it was working from context root '/' before I added the taglib stuff.



Basically all it's doing is at startup, running the servlet-mapping for INDEX '/' in the
PageLoader Servlet it gets the initParam (JSP URL) and forwards it on, the JSP then shecks for a timestamp, if one doesn;t exists the it knows the user has tried to manually enter the JSP name and redirects them to pagenotfound.jsp.

This worked fine until I added the taglib stuff.
[ November 16, 2007: Message edited by: Keith Seller ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic