2
votes

I can't seem to get my JSTL library working in my embedded jetty project working.

My taglib line seems to be giving me grief, and it all changes when I use different URIs. Here is the line I would want to use:

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

I first tried using the normal URI http://java.sun.com/jsp/jstl/core but that throws the error:

org.apache.jasper.JasperException: /bad.jsp(1,61) 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

However when I change the URI to http://java.sun.com/jstl/core_rt. It works!

Another thing I noticed, if I have the old JSTL 1.0 url (http://java.sun.com/jstl/core) I get the following error:

org.apache.jasper.JasperException: /bad-el.jsp(4,0) PWC6236: According to TLD or attribute directive in tag file, attribute value does not accept any expressions

Now another preplexing thing I have noticed, this all works in IntelliJ! Which leads me to believe that there is a classpath problem, but the libraries should be all the same when I embed them inside the war. I think I am missing something.

So, what my question boils down to, what library do I need, or what configuration do I need to have to make this work properly?

Here are the current questions I have tried to follow but did not resolve my issues:

I have a sample project that one could checkout and try out.

1
Did you check this one stackoverflow.com/questions/18944163/… ? - erhun

1 Answers

0
votes

if you want the JSTL uri to work, you should know that jstl is two files.

  1. jstl-1.2.jar
  2. jstl-api-1.2.jar

so look for them in the internet or go to the maven repo and download the jars