Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse jsp the function fn:escapeXml is undefined

I am beginning my first google app engine jsp project. I am following the tutorial for the guestbook from here: https://developers.google.com/appengine/docs/java/gettingstarted/introduction. I am on the datastore step ( https://developers.google.com/appengine/docs/java/gettingstarted/usingdatastore ) and have pasted in the code on that page directly into my project. The code compiles and works, but I get the red squiggly underlines under fn:escapeXml calls. I see that these are functions from a taglib, as explained here: http://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm . So, how do I make eclipse know what is going on and not think this is an error?

like image 553
MrGibbage Avatar asked Aug 19 '12 16:08

MrGibbage


3 Answers

I also had the same issues.

I have included JSTL-1.2.jar file as recomended above and have also included the following line in .jsp file

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

and ran clean project

this fixed the error

like image 128
ramit girdhar Avatar answered Oct 21 '22 10:10

ramit girdhar


You have to include JSTL-1.2.jar in build path of your application project.

like image 10
KV Prajapati Avatar answered Oct 21 '22 11:10

KV Prajapati


In order to compile jsp you need a JDK installed in your system. If you are running on a JRE you will get this error. If you don't have a JDK, download the 32 or 64 bit version depending on your version of Eclipse. Then in Eclipse, go to: Window->Preferences->Java->Installed JREs and check to see if you have an entry for the path from the previous step. If not, then Click add->Standard VM, then for the JRE Path enter the path from the previous step. You should see all of the JARs added to the library section. Make sure the previous JRE is unchecked, apply, and clean your project.

like image 1
yellavon Avatar answered Oct 21 '22 12:10

yellavon