Friday, August 13, 2010

Google App Engine: Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

Hi,

this is a first blog post in my life. But it isn't topic of the post :)

Annoying problem: Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

But let's go step by step.

Couple days ago I started to figure out with Google App Engine. I started with Python (really it was funny). I'm very new in Python and it was amazing. Then I tried Java (my main language). I done everything according to the "Getting started" tutorial. And everything worked fine on my development environment (on productions as well :) except absence of the code assistance in the Eclipse for JSTL tags and even more - annoying error Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core". With the following screen:


To solve the problem, as usual, I googled at first. After several unsuccessful attempt to find the solution I had to solve the problem by myself.

And it is very easy (as figured out :).

The JSTL is provided by the App Engine: two jars:

repackaged-appengine-jakarta-jstl-1.1.2.jar
repackaged-appengine-jakarta-standard-1.1.2.jar


are located at /your_appengine-java-sdk-1.3.5_home/lib/tools/jsp. But the Google App Engine plug-in for Eclipse doesn't add these jars to build classpath. And the editor cannot find according tag library descriptor.

To solve it, select your project in the Project Explorer, then Project->Properties and add this two JARs using the "Add External JARs..." button as shown below:

That's all. After Eclipse recompile your project you have the code assistant and can run your application without any error dialog window.

But :)
After that you will have a couple of warnings "The following classpath entry ...\plugins\com.google.appengine.eclipse.sdkbundle.1.3.5_1.3.5.v201006301309\appengine-java-sdk-1.3.5\lib\tools\jsp\repackaged-appengine-jakarta-jstl-1.1.2.jar" will not be available on the server's classpath", but let's keep it as is. Probably in the next versions of the Google App Engine plug-in the build classpath will be constructed as necessary and the workaround about will not be relevant any more. :)

Have fun in programming :)