Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Getting JSP and JDBC example to work
Getting JSP and JDBC example to work [message #205574] Tue, 11 December 2007 11:37 Go to next message
Eclipse UserFriend
Originally posted by: MacAdam.eden.invalid

Hi,

I'm trying to get the following example to work in Eclipse:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-exam ples-howto.html

The error message I get in Eclipse, after saving my .jsp is:
Cannot find the tag library descriptor for
(1) http://java.sun.com/jsp/jstl/core
and
Cannot find the tag library descriptor for
(2) http://java.sun.com/jsp/jstl/sql

I downloaded the 'Jakarta Taglib Standard 1.1', and extracted the
jstl.jar and standard.jar files to
D:\eclipse\workspace\DBTest\WebContent\WEB-INF\lib

The taglib's I use in my jsp are:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> (1)
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> (2)

Note: (1) and (2) in error message and taglib correspond to each other.

So the easy question is, what do I need to do to get this example
working?

My problem might be caused by the place I saved my Context
configuration. I placed it in %CATALINA_HOME%/conf/context.xml. So it
might be Eclipse did not find this context configuration. Might it be I
need to add this context configuration to Eclipse too? Where?

TIA,
Abel
Re: Getting JSP and JDBC example to work [message #205584 is a reply to message #205574] Tue, 11 December 2007 13:45 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Abel wrote:
> Hi,
>
> I'm trying to get the following example to work in Eclipse:
> http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-exam ples-howto.html
>
> The error message I get in Eclipse, after saving my .jsp is:
> Cannot find the tag library descriptor for
> (1) http://java.sun.com/jsp/jstl/core
> and
> Cannot find the tag library descriptor for
> (2) http://java.sun.com/jsp/jstl/sql
>
> I downloaded the 'Jakarta Taglib Standard 1.1', and extracted the
> jstl.jar and standard.jar files to
> D:\eclipse\workspace\DBTest\WebContent\WEB-INF\lib
>
> The taglib's I use in my jsp are:
> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> (1)
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> (2)
>
> Note: (1) and (2) in error message and taglib correspond to each other.
>
> So the easy question is, what do I need to do to get this example working?
>
> My problem might be caused by the place I saved my Context
> configuration. I placed it in %CATALINA_HOME%/conf/context.xml. So it
> might be Eclipse did not find this context configuration. Might it be I
> need to add this context configuration to Eclipse too? Where?
>
> TIA,
> Abel

For info about the Tomcat support in WTP see the Tomcat FAQ[1]. It was
written for WTP 1.5.x, but most of it applies to WTP 2.0.x. I almost
have the edits done to add the WTP 2.0.x info.

Though WTP 2.0.x added logging.properties to the files imported into the
subfolder of the Servers project when you create the Tomcat server,
"conf/context.xml" is still missing for Tomcat 5.5.x and 6.0.x. That
will be fixed in WTP 3.0. In the mean time, you can use
File->Import->General->File System to import the context.xml from the
"conf" directory of you installation to the subfolder of the Servers
project associated with the Tomcat server. This added file will be
included with the others when the server is published.

With regard to the taglibs, do the jars appear in Web App Libraries
library container? If not, you may need to refresh the
WebContent/WEB-INF/lib folder to make them visible in your workspace.
Otherwise, what you describe should work.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ
Re: Getting JSP and JDBC example to work [message #205621 is a reply to message #205574] Wed, 12 December 2007 14:53 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

If you added the tag libraries to the WEB-INF/lib folder *after* you
saw the validation messages in the Problems view, you'll want to
re-run validation in your files to clear them.

---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:J2EE Module Dependencies Disappear
Next Topic:edit HTML file
Goto Forum:
  


Current Time: Fri Apr 26 22:16:49 GMT 2024

Powered by FUDForum. Page generated in 0.02991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top