0
votes

I opened a previous ticket (Deploying existing WAR to embedded Jetty) that I had problem to deploy a WAR (containing JSP pages) to Jetty. It seems that the solution that I accepted didn't work (I was stuck I was happy at that time that I got a different exception).

So I got the following exception:

An error occurred at line: [52] in the generated java file: [/tmp/embedded-jetty-jsp/jsp/org/apache/jsp/WEB_002dINF/jsp/MainLayout_jsp.java]
Syntax error on token "<", ? expected after this token

I was recommended to remove the jstl and standard JARs from the WAR. I did that and I added them to the classpath (but outside the WAR).
Now I get the following

javax.servlet.ServletException: org.apache.jasper.JasperException: /WEB-INF/jsp/MainLayout.jsp (line: 11, column: 0) 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

Usually it means that an older JSTL is used (where the http://java.sun.com/jstl/core URI is applied). I only use the jstl-1.2.jar so in my case it means that the jstl JAR cannot be found.

So I use a single class to start Jetty and added the JARs (like JSTL and standard JARs) to the MANIFEST file of the JAR that contains this single class.

All the other information can be found in the previous ticket.
I tried several things so I am stuck at the moment.

Any idea what can go wrong?
Thanks,
V.

1
"Added to the classpath, but outside the WAR" means what exactly?Joakim Erdfelt
Hi, it means that I wrote a simple class that start Jetty. This class is bundled to a JAR file (name it like acme-jetty-starter.jar) and the Class-Path entry of the MANIFEST file contains the jstl and standard JAR files. These JAR files are in the same folder where the acme-jetty-starter.jar file resides.Viktor

1 Answers

1
votes

Be careful where you put your jstl.jar files, and how you declare the WebAppContext's own ClassLoader. It matters.

The TldScanner expects a bunch of things, and if any of them are not true, the taglibs are not found (including the jstl standard taglib)

See: