File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Can't get index.jsp to refer to hello.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Can Watch "Can New topic
Author

Can't get index.jsp to refer to hello.jsp

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
Hello,

I'm working through the example self-learning example for Spring MVC at: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html

For some reason, although I was able to get the first page working, when I made the modifications as noted in the top part of the link above (putting JSPs in directory inside WEB-INF/jsp, etc.), I can no longer get the index.jsp to load.

The tests pass, however.

When trying to load the application, either from http://localhost:8080/SpringMVCTutorial/

OR

from http://localhost:8080/SpringMVCTutorial/index.jsp, I get the errors below.

I double checked the code and it appears to be identical with that on the SpringSource site.

Any suggestions why the code isn't working would be greatly appreciated.

Spring configuration seems to be highly complex and fragile.

mike

------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /index.jsp(1,1) Unable to read TLD "META-INF/c.tld" from JAR file "file:/Users/mike/Library/apache-tomcat-6.0.18/webapps/SpringMVCTutorial/WEB-INF/lib/standard-1.1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

----

If I hit refresh a few times, I get this:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:202)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
Apache Tomcat/6.0.18
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
After fiddling with this code for another 5 hours, I got the basic first part of the second page of the Spring demo app to run OK.

I'm wondering if the MyEclipse for Spring would be a good investment.

It's currently $99/year and I just spent hours setting up 1/2 of the Spring demo app. I think most of the issues related to the JSTL configuration and getting the right libs in the right place, but of course, that's what MyEclipse for Spring does for you.

Just wondering if anyone is using it.

-mike
J Kennedy
Greenhorn

Joined: Jan 24, 2011
Posts: 1
Mike,
I'm sorry to hear that you were not originally able to get the Spring example you were reviewing to work originally.

It would be helpful to know the steps you followed in order to better support your use, and generally you should consider posting to our forums here:

http://www.myeclipseide.com/PNphpBB2-viewforum-f-61.html

Regarding the value proposition for MyEclipse for Spring, one of the key values is the ability for you to create Spring projects based on your own data model with all of the libraries and configuration wired up using Spring best practices. This can certainly help developers to avoid making investments in the project creation and configuration (bootstrapping).

We have a number of useful videos on these subjects here: http://www.youtube.com/user/myeclipseforspring and you might consider walking through one of our tutorials or scaffolding demonstrations.

We also do our best to assist developers in their evaluation of the projects and tutorials that are provided by Spring. If you post to our forums when you encounter an issue getting something put together we would be happy to help, and you can also get a sense for the use of the product by other developers.

Thanks,
Jack Kennedy

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Thanks for posting Jack.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't get index.jsp to refer to hello.jsp
 
Similar Threads
unable to display charts in tomcat6.x
Error message
The value for the useBean class attribute *class* is invalid.
Access via domain name fails on Tomcat 6
Unable to load tag handler class "com.opensymphony.webwork.views.jsp.PropertyTag