Author | Message |
---|---|
jkerby
Posts: 12
|
Posted 10:56 Apr 07, 2013 |
Hi All,
When I go to both links below it works my project works fine on CS3: http://localhost:8080/webtest/HelloServlet OR http://localhost:8080/webtest/HelloJSTL.jsp
But in Eclipse or my browser, when I go to http://localhost:8080/webtest/HelloJSTL.jsp it gives me an error, I can not figure out. I am sure I put the JAR files correctly in the lib folder. When I go to http://localhost:8080/webtest/HelloServlet, it works as needed.
HTTP Status 500 - 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
Thanks, Jeremy
|
cysun
Posts: 2935
|
Posted 12:00 Apr 07, 2013 |
You didn't add the JSTL jar files locally as described in the instructions. |
dthomas5
Posts: 38
|
Posted 16:56 Apr 07, 2013 |
if you look under <tomcat directory>/webapps/examples/WEB-INF/lib you will see the two jar files (jstl.jar and standard.jar), copy those two files to <tomcat directory>/lib
Last edited by dthomas5 at
16:57 Apr 07, 2013.
|
jkerby
Posts: 12
|
Posted 00:12 Apr 08, 2013 |
Thanks! It worked perfectly! Can you briefly explain to me why this worked? I am new JSP stuff. |
dthomas5
Posts: 38
|
Posted 00:36 Apr 08, 2013 |
Think of it like this, all the files listed under <tomcat directory>/lib are libraries that will be loaded whenever tomcat is loaded. However, JSTL is not a default library, but an extension or plugin. So whenever you want to execute JSTL commands, you need to have the library loaded with Tomcat. The best example I can give is trying to watch a flash video on your web browser (Such as watching a video on YouTube or Vimeo). You need to have the flash player library installed on your computer before you can watch any flash videos. |