From users-return-184702-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Tue Sep 02 15:21:25 2008 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 24056 invoked from network); 2 Sep 2008 15:21:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Sep 2008 15:21:25 -0000 Received: (qmail 35498 invoked by uid 500); 2 Sep 2008 15:21:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 35253 invoked by uid 500); 2 Sep 2008 15:21:10 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 35242 invoked by uid 99); 2 Sep 2008 15:21:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 08:21:10 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sw2018@gmx.com designates 213.165.64.42 as permitted sender) Received: from [213.165.64.42] (HELO mail.gmx.com) (213.165.64.42) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Sep 2008 15:20:09 +0000 Received: (qmail 10550 invoked by uid 0); 2 Sep 2008 15:19:38 -0000 Received: from 121.91.84.145 by www123.gmx.net with HTTP; Tue, 02 Sep 2008 17:19:36 +0200 (CEST) Content-Type: multipart/alternative; boundary="========GMXBoundary194181220368778185824" Date: Tue, 02 Sep 2008 17:19:38 +0200 from: "sam wun" In-Reply-To: <48BD4352.2060704@cornell.edu> Message-ID: <20080902151938.194180@gmx.com> MIME-Version: 1.0 References: <1F16910BB8546C4DA5526FABB0C98D0985F348@ebre2ksrv1.ebrc.bbsrc.ac.uk> <48B2D389.7080704@apache.org> <1F16910BB8546C4DA5526FABB0C98D0985F34A@ebre2ksrv1.ebrc.bbsrc.ac.uk> <48B2DFB5.2090207@apache.org> <1F16910BB8546C4DA5526FABB0C98D0985F351@ebre2ksrv1.ebrc.bbsrc.ac.uk> <20080826120548.208970@gmx.com> <001001c90777$01162160$0300000a@animal> <20080826131404.208990@gmx.com> <48B404E4.1060907@cornell.edu> <20080827101621.85710@gmx.com> <48B54194.8070805@cornell.edu> <20080827131146.40980@gmx.com> <48B556BC.7000501@cornell.edu> <20080827140854.41000@gmx.com> <48B56838.1050806@cornell.edu> <20080827164539.40980@gmx.com> <48B58982.2090606@cornell.edu> <20080828064416.44100@gmx.com> <20080828075023.44130@gmx.com> <48B66629.2030602@pidster.com> <20080828090252.44110@gmx.com> <20080902043750.30050@gmx.com> <48BD3402.7060703@cornell.edu> <20080902131442.194210@gmx.com> <48BD4352.2060704@cornell.edu> Subject: Re: Re: Can't execute servlet project to: "Tomcat Users List" X-Authenticated: #49480719 X-Flags: 0001 X-Mailer: WWW-Mail 6107 (Global Mail Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18MxmURB1UM2nldZ8HRnR2ZjjvW9/4zzll5V+pw5x O7SF8UBMq1hmNIc2zMxCLq1pplyQZrjfFvcQ== X-Registered: 0 X-GMX-UID: 6zXWIJMeTlI8cGdhhGprb1VOU2poZdmr X-Virus-Checked: Checked by ClamAV on apache.org --========GMXBoundary194181220368778185824 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I just went to the website , very confused. The taglib file is not a jar file. they are binary or source file. And I couldn't find standard.jar file either. Thanks > ----- Original Message ----- > From: David Smith > Sent: 02/09/08 11:44 pm > To: Tomcat Users List > Subject: Re: Can't execute servlet project > > Hmmm... good question. I moved over to Maven and don't manually > download these any more. This looks like it should do the trick: > > Try > http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi > > --David > > sam wun wrote: > > Hi David, > > > > > > > > No, I don't have this 2 jar files in the common/lib/ directory. > > > > where can I download it from? > > > > > > > > Thanks > > > > Sam > > > > > > > > > > > >> ----- Original Message ----- > >> From: David Smith > >> Sent: 02/09/08 10:39 pm > >> To: Tomcat Users List > >> Subject: Re: Can't execute servlet project > >> > >> Do you have jstl.jar and standard.jar in your WEB-INF/lib directory? > >> > >> --David > >> > >> sam wun wrote: > >> > >>> Hi, > >>> > >>> > >>> > >>> I have added testdb.jsp in the following path in Suse linux (the > tomcat > >>> server): > >>> > >>> /tomcat/apache-tomcat-5.5.26/webapps/DBTest/ > >>> > >>> > >>> > >>> The content of the testdb.jsp code is: > >>> > >>> > >>> > >>> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> > >>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> > >>> > >>> > >>> select FIRST_NAME from DBTest.Customer > >>> > >>> > >>> > >>> > >>> DB Test > >>> > >>> > >>> > >>>

Results

> >>> > >>> > >>> Foo ${row.foo}
> >>> Bar ${row.bar}
> >>>
> >>> > >>> > >>> > >>> > >>> > >>> > >>> when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, > it > >>> shown the following error: > >>> > >>> HTTP Status 500 - > >>> > >>> type Exception report > >>> > >>> message > >>> > >>> description The server encountered an internal error () that > prevented > >>> > >> it > >> > >>> from fulfilling this request. > >>> > >>> exception org.apache.jasper.JasperException: The absolute uri: > >>> http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml > >>> > >> or > >> > >>> the jar files deployed with this application > >>> > >>> > >>> > >> > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) > >> > >>> > >>> > >>> > >> > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) > >> > >>> > >>> > >>> > >> > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) > >> > >>> > >>> > >>> > >> > org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317) > >> > >>> > >>> > >>> > >> > org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148) > >> > >>> > >>> > >> > org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424) > >> > >>> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493) > >>> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557) > >>> org.apache.jasper.compiler.Parser.parse(Parser.java:127) > >>> > >>> > >>> > >> > org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212) > >> > >>> > >>> > >>> > >> > org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) > >> > >>> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156) > >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:296) > >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) > >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) > >>> > >>> > >>> > >> > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) > >> > >>> > >>> > >>> > >> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302) > >> > >>> > >>> > >> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) > >> > >>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) > >>> > >>> Here is the web.xml file I got: > >>> > >>> (in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/) > >>> > >>> > >>> > >>> > >>> >>> xmlns="http://java.sun.com/xml/ns/j2ee" > >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > >>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> > >>> > >>> DBTest > >>> > >>> > >>> Create customer servlet > >>> > >>> CreateCustomerServlet > >>> > >>> CreateCustomerServlet > >>> > >>> > >>> servlet.CreateCustomerServlet > >>> > >>> > >>> > >>> CreateCustomerServlet > >>> > >>> /CreateCustomerServlet > >>> > >>> > >>> index.html > >>> index.htm > >>> index.jsp > >>> default.html > >>> default.htm > >>> default.jsp > >>> > >>> > >>> > >>> DB Connection > >>> > >>> jdbc/TestDB > >>> > >>> javax.sql.DataSource > >>> > >>> Container > >>> > >>> > >>> > >>> > >>> > >>> > >>> Thanks > >>> > >>> Sam > >>> > >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > >>> > >>> > >>> > >>>> ----- Original Message ----- > >>>> From: Martin Gainty > >>>> Sent: 28/08/08 10:07 pm > >>>> To: sw2018@gmx.com > >>>> Subject: RE: Can't execute servlet project > >>>> > >>>> david's advice is correct.. > >>>> > >>>> configure ./META-INF/ApplicationContext.xml > >>>> >>>> debug="5" reloadable="true" crossContext="true"> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> >>>> type="javax.sql.DataSource" > >>>> maxActive="100" maxIdle="30" maxWait="10000" > >>>> username="javauser" password="javadude" > >>>> driverClassName="com.mysql.jdbc.Driver" > >>>> > >>>> url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/> > >>>> > >>>> > >>>> //sub in the username and password for the DB > >>>> also in /WEB-INF/web.xml you would need this entry > >>>> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > >>>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > >>>> version="2.4"> > >>>> MySQL Test App > >>>> > >>>> DB Connection > >>>> jdbc/TestDB > >>>> javax.sql.DataSource > >>>> Container > >>>> > >>>> > >>>> then put in this test code changing : > >>>> DBNAME to the name of your Database > >>>> TABLE to the name of the table in DBNAME you want to query > >>>> COLUMN for the specific attribute to query > >>>> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> > >>>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> > >>>> > >>>> > >>>> select COLUMN from DBNAME.TABLE > >>>> > >>>> > >>>> > >>>> > >>>> DB Test > >>>> > >>>> > >>>> > >>>>

Results

> >>>> > >>>> > >>>> Foo ${row.foo}
> >>>> Bar ${row.bar}
> >>>>
> >>>> > >>>> > >>>> > >>>> > >>>> if you need UNICODE support or Character Large Object (strings > 64k > >>>> > >> in > >> > >>>> length) download JDBC 4 driver > >>>> http://dev.mysql.com/downloads/connector/j/5.1.html > >>>> > >>>> personally I am using the 'older' version of MYSQL so I use the 3.1 > >>>> > >> jar > >> > >>>> which you can acquire here > >>>> http://dev.mysql.com/downloads/connector/j > >>>> > >>>> location of driver classes: > >>>> > >>>> is located in $TOMCAT_HOME/common/lib > >>>> personally I dont like putting anything in common since it will > affect > >>>> all webapps but i usually > >>>> place in /WEB-INF/lib > >>>> > >>>> and please follow david's advice and read the tutorial > >>>> > >>>> Martin > >>>> ______________________________________________ > >>>> Disclaimer and confidentiality note > >>>> Everything in this e-mail and any attachments relates to the > official > >>>> business of Sender. This transmission is of a confidential nature > and > >>>> Sender does not endorse distribution to any party other than > intended > >>>> recipient. Sender does not necessarily endorse content contained > >>>> > >> within > >> > >>>> this transmission. > >>>> > >>>> > >>>> > >>>> > >>>>> Date: Thu, 28 Aug 2008 11:02:52 +0200 > >>>>> From: sw2018@gmx.com > >>>>> Subject: Re: Re: Can't execute servlet project > >>>>> To: users@tomcat.apache.org; users@tomcat.apache.org > >>>>> > >>>>> Hi, > >>>>> > >>>>> > >>>>> > >>>>> I couldn't find an installation document about installing the > driver. > >>>>> > >>>>> I;ve downloaded the driver: > >>>>> > >>>>> linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls > >>>>> mysql-connector-java-5.1.3-rc-bin.jar > >>>>> mysql-connector-java-5.1.3-rc-bin.jar > >>>>> > >>>>> > >>>>> > >>>>> Do you know how to configure tomcat to make use of it? > >>>>> > >>>>> > >>>>> > >>>>> Thanks > >>>>> > >>>>> Sam > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --========GMXBoundary194181220368778185824--