| Author |
Jetty 8.1.x jsp/sjtl/core cannot be resolved
|
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
Hello, I know that this problem is all over the Internet. I have been searching about it now for the last two days, but none of it seems to get a solution for me.
So first I was upgrading a web application from Jetty 6.1.x to 8.1.x. Previously everything was working. I have everything working now except for pages using taglibs. I am getting this error:
org.apache.jasper.JasperException: /private/dispatcher.jsp(2,63) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core/ cannot be resolved in either web.xml or the jar files deployed with this application
Other important information is that this application does not use a web.xml file everything is started for a Runner class file and configured inside of there. All Jars are in the class path. Will provide a list below. I am happy to provide any other information you might need.
Plese point me in the right direction if you can.
Current list of Jars used for this app. FYI I just downgraded to 8.1.2 because a friend has the same type of application using it and has no problems.
jars
activation.jar
ant-1.6.5.jar
commons-beanutils.jar
commons-dbcp.jar
commons-fileupload-1.2.1.jar
commons-logging-1.1.1.jar
commons-pool.jar
com.sun.el-2.2.0.v201108011116.jar
dwr.jar
GatewayClient-jdk-1.5-v2.3.jar
ibatis-2.3.4.726.jar
javax.el-2.2.0.v201108011116.jar
javax.servlet.jsp-2.2.0.v201112011158.jar
javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
jetty-continuation-8.1.2.v20120308.jar
jetty-http-8.1.2.v20120308.jar
jetty-io-8.1.2.v20120308.jar
jetty-jmx-8.1.2.v20120308.jar
jetty-rewrite-8.1.2.v20120308.jar
jetty-security-8.1.2.v20120308.jar
jetty-server-8.1.2.v20120308.jar
jetty-servlet-8.1.2.v20120308.jar
jetty-servlets-8.1.2.v20120308.jar
jetty-setuid-java-8.1.2.v20120308.jar
jetty-util-8.1.2.v20120308.jar
log4j-1.2.15.jar
mail.jar
org.apache.jasper.glassfish-2.2.2.v201112011158.jar
org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
org.eclipse.jdt.core-3.7.1.jar
org.springframework.aop-3.1.1.RELEASE.jar
org.springframework.asm-3.1.1.RELEASE.jar
org.springframework.beans-3.1.1.RELEASE.jar
org.springframework.context-3.1.1.RELEASE.jar
org.springframework.core-3.1.1.RELEASE.jar
org.springframework.expression-3.1.1.RELEASE.jar
org.springframework.jdbc-3.1.1.RELEASE.jar
org.springframework.orm-3.1.1.RELEASE.jar
org.springframework.transaction-3.1.1.RELEASE.jar
org.springframework.web-3.1.1.RELEASE.jar
postgresql-9.1-902.jdbc4.jar
servlet-api-3.0.jar
All of these jars are put into the classpath on startup via a shell script.
This is the current taglib line:
Any help is appreciated.
thanks.
|
 |
Sumit Patil
Ranch Hand
Joined: May 25, 2009
Posts: 296
|
|
|
Can you please try after adding standard.jar and jstl.jar ?
|
Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
I can but nto sure where I should get them from. Also wondering about the Jars that already come with the Jetty tar ball. Specifically below for JSP and Tablibs.
com.sun.el-2.2.0.v201108011116.jar
javax.el-2.2.0.v201108011116.jar
javax.servlet.jsp-2.2.0.v201112011158.jar
javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
org.apache.jasper.glassfish-2.2.2.v201112011158.jar
org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
org.eclipse.jdt.core-3.7.1.jar
My understanding is that javax.servlet.jsp.jstl would be representative of jstl.jar and org.apache.taglibs.standard.glassfish would be for standard.jar. If not which versions I guess and where should I try finding the standard.jar and jstl.jar that you are referencing?
Ok sorry was easy enough to find those. I put them in my class path and started the server and I still get the same error.
Thanks agian.
Thanks for the help!
-Zoop
|
 |
Sumit Patil
Ranch Hand
Joined: May 25, 2009
Posts: 296
|
|
|
Have a look at this thread, may be of some help.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
I read over that. Not really sure what they were doing. Sounds pretty specific to either Tomcat or using the WEB-INF dir etc. With this application either of those are used. ALso saw the comment about JSP jar and the servlet Jar. Unfortunately for this application both of those are required to make it work. ;)
THanks for the link.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
|
The servlet and JSP jars are required, but they are provided by the container and you should not include them in WEB-INF/lib. All you need to do to get the JSTL working is to drop the jar files into WEB=INF/lib.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
I did as you asked created a WEB-INF/lib directory in my code root and put the Jar files in there. Although there was no difference. Again this is not Tomcat, not a standard web server using .xml files to configure it. It is using a compiled Runner class which configures the server and makes it all go. All JARs are in the classpath.
Thanks responding.
-
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Joe Alveraze wrote: not a standard web server
Does it claim to be compliant with the Servlets spec? If not, we're unlikely to be able to guess how it wants to be configured -- you'll need to consult the creators. If it is, then the fact that "it's not Tomcat" or "doesn't use XML" is moot -- it should follow the same rules.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
Sorry not an expert in Java servers. so not sure how to explain it. It is using Jetty and it's jars. Let me know What I can provide to show you how it is working. I will try to provide some snippets of code here to show how the server is started.
FYI ALL JSP pages work except for those using Taglibs
from vccjspservlet.java
This is a verfy basic file generallly what is here is all that is there.
Thanks again let me know what else I can provide.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
|
The code doesn't matter. You need to find out how it expects tag libs to be configured. For any server following the Servlet and JSP specifications, that means simple dropping them into WEB-INF/lib. If it's going its own way, we have no way of knowing what that proprietary way might be.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
|
It is my understanding that when it is searching for the tag libs it will search the web.xml etc. and will search through all Jars included in the Classpath. That is according to the documentation that I have read.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
No entries in the web.xml should be necessary.
Jars placed in WEB-INF/lib will be placed into the classpath for spec-compatible containers.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
But that is not the case here as I am not using the webserverlet I am using just a standard servlet. The Jars are in the Classpath because I put them in the class pat in this case. This is the process I use to start the server.
This is run from the code root.
export CLASSPATH=..... This is where all my created class files are. put in then.
for x in `ls -1 lib/`
do
export CLASSPATH=$CLASSPATH:$BASE/lib/$x
done
rmiregistry &
java -XX:PermSize=255M -XX:MaxPermSize=256M -Xss128k -server -Xms1500M -Xmx1800M -XX:+UseThreadPriorities -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1097 -Djetty.lib=/home/zoop/jetty-hightide-8.1.4.v20120524/lib/setuid Runner &
Currently statically setting it to use the setuid.so in my home dir.
So the JARs are in the class path. I did before like you said created the WEB-INF dir and under it the lib dir and copied the Jars into that dir and started the server. But this made no change to the error.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Again, if the container is not following the servlet specification then it's unlikely we can help you. You'll need to refer to the documentation of the container to figure out how and if it can support the tag libs.
As this is all about your non-standard container, I've moved it to a more appropriate forum.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
Ah Sweet. Thanks I think I understand a little better. I think I will also look into converting it to use the WebServlet so that it uses the other style too.
Thanks for your help.
|
 |
Joe Alveraze
Greenhorn
Joined: Jul 02, 2012
Posts: 9
|
|
I wasn't ever able to find a solution to get it to work the way it had worked in the past. Not sure if I should assume it is a big in Jetty or just me not smart enough.
Anyway to get it to work I changed the Servlet that services the JSP portion of the site to use WebAppContext() instead then attached the other servlets off of it. Instead of using the ServletContextHandler() and attaching it to the server.
Anyway not sure if I should close this marked as solved or if there is a more appropriate "gave up and implemented it differently" answer.
Good luck to anyone who finds the answer. If you do find It I would like to still know.
|
 |
 |
|
|
subject: Jetty 8.1.x jsp/sjtl/core cannot be resolved
|
|
|