JSTL download

hi,
I downloaded JSTL from java.sun.com website and did as was told to. put the c.tld file into web-inf and in the web.xml used this
<taglib>
<taglib-uri>
http://java.sun.com/jstl/core
</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
but i get this error when i run the project
Error(4): java.lang.ClassNotFoundException: org.apache.taglibs.standard.tei.ImportTEI
Error(4): Unable to load taghandler class: http://java.sun.com/jstl/core
any suggestions please.
regards,
vasanth

Or even easier, just go into project
properties-->Libraries and select the predefined JSTL
library into the project.I get: Error(31,11): Invalid element 'servlet' in content of 'web-app', expected elements '[servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-env-ref, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.
my web.xml says:
<!-- JSTL tlds-->
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
<taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
<taglib-location>/WEB-INF/c-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
<taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
<taglib-location>/WEB-INF/x-rt.tld</taglib-location>
</taglib>
what am I doing wrong?

Similar Messages

  • Jstl xml parser not working

    i cant seem to be able to select the values from the imported xml file and i dont understand why?
    my jsp page:
    <%@ page import="java.util.*;" %>
    <%@ page contentType="text/html; charset=ISO-8859-5" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
        <title>Interactive Experience Database - Template 1</title>
        <LINK REL="STYLESHEET" TYPE="text/css" HREF="style.css">
    </head>
    <body>
    <FORM>
    <c:import var="xmlfile" url="/cv.xml"/>
    <x:parse var="doc" xml="${xmlfile}"/>
    <x:out select="$doc/cv/ContactInfo/PersonName"/>
    </form>
    </body>
    </html>the xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cv>
    <cv>
    <ContactInfo>
         <PersonName>Donald Smith</PersonName>
    </ContactInfo>
    </cv>

    thanks, one thing that annoys me is that that apache
    make it so hard to download anything, finding the
    binary is so time consuming, ive been looking for the
    last half hour. its a jokeI kind of agree with you that for certain projects it is a little difficult to find the stable release of the binaries. I personally find it very time consuming to locate the binary for JSTL 1.1 , and finding the binary for Xalan seems a little more easier than finding the one for JSTL 1.1
    For Xalan I was quickly able to locate it through google:
    Searched for "download apache xalan" , then Google showed me
    http://xml.apache.org/xalan-j/downloads.html then I clicked on :
    http://www.apache.org/dyn/closer.cgi/xml/xalan-j
    ~~~~~~~~~~~~~~~~~~~~~~
    But for JSTL 1.1 it took quite a number of steps :
    Searched on Google for : "download JSTL 1.1"
    First link showed:
    http://java.sun.com/products/jsp/jstl/downloads/index.html
    Shows the link for Standard 1.0 instead of Standard 1.1
    (A newbie to JSTL wouldn't know that there's a 1.1 final release download available)
    another link for the same keywords takes me to:
    http://jakarta.apache.org/taglibs/
    Then I click on downloads: http://jakarta.apache.org/taglibs/#Downloads
    but it only shows Nightly Builds downloads not the stable release ones.
    Then I click on JSTL1.1 on the left nav takes me to
    http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
    The download link finally takes me to:
    http://people.apache.org/builds/jakarta-taglibs/nightly/
    which is again nightly
    Then I carefully read and finally see:
    Download the Binary Distribution of the Final Release:
    http://jakarta.apache.org/site/downloads/index.html
    Then I click on TagLibs
    http://jakarta.apache.org/site/downloads/downloads_taglibs.html
    and pick Standard 1.1 Tag lib (assuming that is JSTL 1.1)
    http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
    I guess I could report this issue to Apache Taglibs and have them make it more efficient to locate the download for the Taglibs.

  • Taglib problem

    I am running Tomcat 4.1.30 and am trying to use the JSTL jakarta taglibs standard 1.0.6 download.
    I placed my jars in the WEB-INF/lib folder. My application runs but I get this error:
    JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml
    or the jar files deployed with this applicationI looked at the dtd'd and in my tld's it has this:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
      PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
      "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>1.0</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>c</short-name>
      <uri>http://java.sun.com/jstl/core</uri>
      <display-name>JSTL core</display-name>
      <description>JSTL 1.0 core library</description>But in my context.xml I have the dtd of :
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">and in web.xml:
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        "http://java.sun.com/dtd/web-app_2_2.dtd">and finally here are my uri's from my jsp page:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> When I try to change the web/context.xml dtd's to match what is in the tld's my application wont
    run at all. So, I guess my question is - am I using the wrong JSTL download or the wrong dtd
    in my XML's?
    Also, could someone tell me or point me in the direction of documentation about the backwards compatiability of JSTL with Tomcat 4/5?

    fixed - onto bigger and bigger problems.... I had two description tags in my web.xml..

  • JFS Reference Implementation

    Howdy,
    anybody how can help me with the links to JFS & JSTL downloads ???
    i tried and just found the WSDP 1.2 which contains them, but it's too large archive :(
    i need just JSF and JSTL archives.

    As far as I know the only way to get the JSF RI is to download the JWSDP.
    Good luck :-)
    -bd-

  • Help with downloading JSTL library

    Hi everyone,
    I've just started doing my second year degree in Multimedia Computing and am doing a year long module in JSP. I've installed Tomcat and everything at home but I'm having trouble getting my code to work which I've copied out of my book to see how it works. This is what I have written in JPadPro...
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <c:set value="Tiddles" var="myCat" />
    <c:set var="myDbId" scope="application">jdbc:mysql://localhost/eg02dsdb</c:set>
    <html>
    <head>
    <title> Question 1 </title>
    </head>
    <body>
    <p>
    myCat is
    <c:out value="${pageScope.myCat}" default="No myCat object on this page"/>
    myDbId is
    <c:out value="${applicationScope.myDbId}" default="No myDbId object in this application"/>
    </p>
    </body>
    </html>
    When I come to open the JSP file in http://localhost:8080 a message appears stating....
    The server encountered an internal error () that prevented it from fulfilling this request.
    org.apache.jasper.JasperException: File "/WEB-INF/tld/c.tld" not found
    After doing some research on the Internet I figured that I might need to download the JSTL core library off Apache's website. However when I get to the download page I don't have a clue which link to click on and what to do fromt there. There's loads of links saying things like BCSL, Cactus etc and they all have a link beside them that says KEYS and two files under each, one a .zip and the other a tar.gz but I don't have a clue which links I have to click on or anything. I have seen a few Tomcat links but don't know whether I should click on them. I just don't want to download the wrong stuff and mess up and files that are already in place in my j3t folder. If anyone could help me I'd really appreciate it! Thank you so much.
    Joe P

    I don't know how to award the duke points but i'll do that in a sec for you. I do have mySQL on the machine but I don't have it running. That may be why, as for the classes and that, I haven't created any. I simply copied the code out of this workbook my lecture created as an example. That may be the reason the code doesn't work, its probably because I don't have the classes he created on machine. I did just try doing a simple mathematical equation in the JSP file though and that produced the following results...
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <c:set value="Tiddles" var="myCat" />
    <c:set var="myDbId" scope="application">jdbc:mysql://localhost/eg02dsdb</c:set>
    <html>
    <head>
    <title> Question 1 </title>
    </head>
    <body>
    <p>
    myCat is
    <c:out value="${pageScope.myCat}" default="No myCat object on this page"/>
    myDbId is
    <c:out value="${applicationScope.myDbId}" default="No myDbId object in this application"/>
    3+4+*5=
    <c:out value="${3+4*5}"/>
    </p>
    </body>
    </html>
    myCat is ${pageScope.myCat}
    myDbId is ${applicationScope.myDbId}
    3+4+*5= ${3+4*5}
    I'll award you these duke points now, thank you for trying to help me, sorry I'm a bit slow with understanding all this, I did a lot of quite simple java last year but it wasn't one of my favourite subject areas.

  • Where to download JSTL?

    I am sure this is a stupid question but....
    It's been a few years since I have used JSTL. Now I need to use it again with Tomcat 6. In all my internet searching I cannot find a JSTL version newer than 1.2 -- and that was completed in 2005! Is there a newer version?
    Moreover, I cannot for the life of me find where to even download 1.2. I hear it's part of glassfish but I don't want to download a massive app server just for a few jars and tlds.
    Suggestions?

    I would dispute the second statement somewhat.
    JSTL actually came after the Struts tags, and complements their use quite nicely. In fact it is recommended you use the JSTL tags in preference to the equivalent ones provided by struts - ie <c:forEach> instead of <logic:iterate>, <c:if> instead of the <logic> conditional tags etc etc.
    With regards to JSF, you don't need to use JSTL - and in fact originally the two didn't play together nicely at all. If writing in JSF I would stick to just using the JSF tags - they do most things that JSTL does anyway - and more.
    JSTL complete? I would LOVE to see a <c:break> tag for use in a <c:forEach> statement :-)
    But it is nowhere near superfluous right now - unless you're using JSF.
    Cheers,
    evnafets

  • Where to download JSTL library exactly?

    I am really confused. JSTL 1.0/1.1 can be downloaded from Apache website, while JSTL 1.2 is only downloadable from jstl.java.net???

    gimbal2 wrote:
    JSTL is an API. What you can download from the Apache website is an implementation of that API. Apparently they don't offer JSTL 1.2 as a separate download, but it is part of Apache Tomcat 7 for example. Much like the page you link to is the implementation that is delivered as part of Glassfish.I still doubt about Tomcat 7 has JSTL jar files, as I am looking at the server lib folder, there is no jstl-xxx.jar files, but it has el-xxx.jar files. In addition, when I create a new project in Eclipse for serlvet 3.0 with Tomcat 7 as server runtime, I still have to import jstl-xxx.jar files from outside. What could be missing?
    This is no different from for example the servlet-api and the jsp-api. You don't download implementations for those APIs either, they are part of the servlet container / application server.That's true. I known it already.

  • Need to download latest jstl jar - netbeans problems

    have a problem with the formatDate func: "attribute value does not accept any expressions".
    Another post says he modified the fmt func within the tld. Changed <rtexprvalue>false</rtexprvalue> to true and it started working since it was supposed to be true to begin with.
    Catch is I'm using the standard jstl 1.1 lib from within Netbeans 5.0 and I'm unable to find the file to change it.
    Hence was thinking that if I could download the jstl jar separately, then I could fiddle with it (if it had the same bug) and then import it into netbeans quite easily.
    any ideas ?
    ciao, bhishma

    Thanks evnafets, You are correct. I downloaded the apache implementation and there it clearly had the /jsp added in the 'getting started' html page and when I tried it, it works.
    The pages I was referring to for the format tld did not have the /jsp in front. I wonder if it truly worked for them.
    http://www.onjava.com/pub/a/onjava/2002/09/11/jstl2.html
    http://www.sitepoint.com/article/java-standard-tag-library/3
    This is what threw me off.
    So at this point I'm assuming that the default sun implementation present in 1.5 (which my netbeans is using) also works, but I've already switched to apache so I'm not retesting for that.
    Will do so in the next few days when I have to setup the same on my friends comp.
    Thanks for your help.
    Ciao.

  • Where can I download the JSTL 1.0 standards?

    I tried this site but I think its down and I kinda need them tonight if possible... anyone have any idea?
    http://apache.swift-networks.com/jakarta/taglibs/standard-1.0/

    My mistake: it's http://jakarta.apache.org/taglibs/doc/standard-1.0-doc/intro.html

  • Help needed on Servlets and JSTL

    Hi
    I am using tomcat 5.5 and JDK 1.5. What are the softwares I have to download for compiling servlets and creating JSTL ?. Help needed.
    Thanks
    IndyaRaja

    I tried compling servlet, but it is raising error
    that coul not find package javax.servletWhat I did not mention... you need to add those JARs in the Classpath explicitly. You will find them in %TOMCAT_HOME%\common\lib. You atleast need to add servlet-api.jar to your Classpath. :)

  • Problem when tried to work with jstl

    i have downloaded standard tag library and copied the
    jakarta-taglibs/standard-1.0/lib file into /WEB-INF/lib as said in
    http://java.about.com/od/beginningjava/l/aa_jstl_intro_2.htm
    and tried to execute hamsandwhich.jsp which is as follows
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    Setting the value: "Hello World!"
    <c:set var="hello" value="Hello World!"/>
    <p/>
    <c:out value="${hello}"/>
    i get an error
    org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
    but i dont know how to check with web.xml since i dont know xml
    here is my web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    </web-app>someone kindly help me with this.........

    hi, my problem is bit diffrent.
    i m trying to achieve a login procizer in JSP and using JSTL c and sql library. MySQL as database solution.
    most of the things are working fine but i want to add confirm password in registeration form. and i do not know how to compare two string.<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <c:if test="${param.submitted}">
         <c:if test="${empty param.name}" var="noname" />
         <c:if test="${empty param.pw}" var="nopw" />
    <c:if
    test="${not (noname or nopw or requestScope.takenName)}">
    <c:set value="${param.name}" var="name" scope="request" />
    <c:set value="${param.pw}" var="pw" scope="request" />
    <c:set value="${param.cpw}" var="cpW" scope="request" />
    <jsp:forward page="doRegister.jsp" />
         </c:if>
              </c:if>
    <html>
    <head>
    </head>
    <body bgcolor="FCDBE4" >
    <form method="post" name="frmRegister">
    <input type="hidden" name="submitted" value="true"/>
    <script type="text/javascript">
    <!--
         function add_onclick() {
              var TRUE = new Boolean("True")
              var FALSE = new Boolean("False")
              blnError = FALSE
              strError = "The following problems were found in your registration form: \n\n"
              if (frmRegister.name.value == "")
                        blnError = TRUE
                        strError = strError + " - You must provide a Login Name\n"
              if (frmRegister.pw.value == "")
                        blnError = TRUE
                        strError = strError + " - You must provide a Password\n"
              if (frmRegister.cpw.value == "")
                        blnError = TRUE
                        strError = strError + " - You must confirm your Password\n"
              if (frmRegister.pw.value != frmRegister.cpw.value)
                        blnError = TRUE
                        strError = strError + " - Your Password does not match\n"
              if (blnError == TRUE)
                        strError = strError + "\nPlease correct these mistakes and try again."
                        alert(strError)                    
              else
                        frmRegister.submit()
         //-->
         </SCRIPT>
    <p align="left"><b> Register <hr> </p>
    <p align="center"><b>Please complete the following registration form</b>  <hr><br><br>
    <img src="dmu.jpg" alt="DMU University" align="left">
    <img src="dmu.jpg" alt="DMU University" align="right">
    <table BORDER="0" ALIGN="CENTER" VALIGN="TOP" CELLPADDING=2 CELLSPACING=0>
    <tr>
    <td><Strong>Username</strong></td>
    <td><input type="text" name="name" value="<c:out value="${param.name}" />"
    />
    </td>
    </tr>
    <tr>
    <td><Strong>Password</strong></td>
    <td> <input type="password" name="pw"  value="<c:out value="${param.pw}"/>"
    />
    <tr>
    <td><Strong>Confirm password</strong></td>
    <td> <input type="password" name="cpw"  value="<c:out value="${param.cpw}"/>"
    />
    <tr><td>�</td>
    <td><input type="submit" value="register"LANGUAGE=javascript onclick="return add_onclick()" />
    </td>
    </tr>
    </table>
    <img src="dmu.jpg" alt="DMU University" align="left">
    <img src="dmu.jpg" alt="DMU University" align="right">
    </form>
    </body>
    </html>doRegister.jsp
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:setDataSource
         dataSource= "????"
         scope="session"/>
    <sql:transaction isolation="serializable">
         <sql:query var="result" >
              select username from rptable where username=?
              <sql:param value="${requestScope.name}" />
         </sql:query>
         <sql:update>
              insert into rptable(username,password) VALUES (?,?);
              <sql:param value="${requestScope.name}" />
                   <sql:param value="${requestScope.pw}" />
         </sql:update>
    </sql:transaction>
    <c:set var="user" scope="session" value="${requestScope.name}" />
    <jsp:forward page="prelogin.jsp"/>both script is working but when i try to not confirm password still it goes to the database because i do not use anythinh which compare them ad then if yes then go inside or give a error message.
    can anyone help me to do this..
    thanks in advance.

  • Getting started with JSTL

    I'm trying to use JSTL with tomcat 4.0.6. I downloaded J2EE 1.4 and put the appserv-jstl.jar from that installation into my tomcat/common/lib directory. I included this line at the top of my JSP:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    However, the taglibs are not working. Are there additional steps I need to take to be able to use JSTL in my JSP?
    Thanks,
    vlb123

    Yes, the error is giving you a clue:
    "This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application"
    I'm assuming that the JAR file you're using has the TLD files in the meta-inf directory. If it doesn't, then this method will not work.
    If your JSTL JAR doesn't have the TLDs inside it, I'd recommend that you ditch the JSTL JAR that you got from the J2EE download and use the Jakarta version instead.

  • JSTL - MySQL Connector problem

    Hello! I need your help. I don't actually know the reason, but *<sql:query>* doesn't work properly.
    So I have such a code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/publish"
    user="root" password="root"/>
    <sql:query var="books" dataSource="${datasource}">
    SELECT id, title, price FROM book
    </sql:query>
    <html>
    <head>
    <title>A First JSP Database</title
    </head>
    <body>
    <table border="1">
    <tr>
    <td>id</td><td>title</td><td>price</td>
    </tr>
    <c:forEach items="${books.rows}" var="row">
    <tr>
    <td><c:out value="${row.id}" /></td>
    <td><c:out value="${row.title}" /></td>
    <td><c:out value="${row.price}" /></td>
    </tr>
    </c:forEach>
    </table>
    </body>
    </html>The error I get when calling http://localhost:8080/DataAccess/bookList.jsp
    org.apache.jasper.JasperException: Exception in JSP: /bookList.jsp:7
    4:                  driver="com.mysql.jdbc.Driver"
    5:                     url="jdbc:mysql://localhost:3306/publish"
    6:                    user="root" password="root"/>
    7: <sql:query var="books" dataSource="${datasource}">
    8:   SELECT id, title, price FROM book
    9: </sql:query>
    10: <html>May be the reason is that the subfolder WEB-INF is badly configured.
    I have such subfolders in WEB-INF:
    */lib*
    jaxen-full.jar
    jdbc2_0-stdext.jar
    jstl.jar
    mysql-connector-java-3.0.9-stable-bin.jar
    saxpath.jar
    standard.jar
    xalan.jar
    xercesImpl.jar
    xml-apis.jar
    */tld*
    c-rt.tld
    c.tld
    fmt-rt.tld
    fmt.tld
    sql-rt.tld
    sql.tld
    x-rt.tld
    x.tldThe question is what is configured or done incorrectly? I am not quite familiar with JSP and JSTL. Thank you for any help.
    P.S I have already used MySQL. So it is set and configured as it is needed to be.

    ThomYork
    It didn't help.
    Just in case, I run tomcat 5.5.27-2 on Arch Linux; MySQL 5.0.77; Apache 2.2.11
    I tried to put mysql-connector-java-3.0.9-stable-bin.jar into
    /opt/tomcat/server/lib
    /opt/tomcat/shared/lib
    It didn't help.
    bandarurm
    After some manipulation i get such an error in my script:
    *exception*
    {noformat}org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}
    *root cause*
    {noformat}javax.servlet.ServletException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
         org.apache.jsp.bookList_jsp._jspService(bookList_jsp.java:89)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}
    *root cause*
    {noformat}javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
         org.apache.jsp.bookList_jsp._jspx_meth_sql_005fquery_005f0(bookList_jsp.java:130)
         org.apache.jsp.bookList_jsp._jspService(bookList_jsp.java:66)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}
    dsdsf
    I tried this. I downloaded the example with the source and WEB-INF directory. It doesn't work.
    Here is an error:
    *exception*
    {noformat}org.apache.jasper.JasperException: javax.servlet.jsp.JspTagException: In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}
    *root cause*
    {noformat}javax.servlet.ServletException: javax.servlet.jsp.JspTagException: In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
         org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspService(executeQuery_005fJstlSqlTag_jsp.java:116)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}
    *root cause*
    {noformat}java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
         java.lang.Class.forName0(Native Method)
         java.lang.Class.forName(Class.java:264)
         org.apache.taglibs.standard.tag.common.sql.DataSourceWrapper.setDriverClassName(DataSourceWrapper.java:46)
         org.apache.taglibs.standard.tag.common.sql.SetDataSourceTagSupport.doStartTag(SetDataSourceTagSupport.java:102)
         org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag.doStartTag(SetDataSourceTag.java:67)
         org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspx_meth_sql_005fsetDataSource_005f0(executeQuery_005fJstlSqlTag_jsp.java:137)
         org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspService(executeQuery_005fJstlSqlTag_jsp.java:88)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    {noformat}Nothing with sql query works. So it seems that the problem is in tomcat's configuration.

  • JSTL over Servlets for database work

    I have form that searches data using a Bean and use a Servlet to update and delete records in my database. It works great but was wondering why not use JSTL which seems to be alot easier to use?
    What is the negatives about JSTL??
    Please advise if JSTL is 100% way to go for accessing an updating databases?
    Also my Tomcat container is in an Intranet environment with no available connection to the internet.
    How would I use this tag:
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    Do I need to download them from somewhere and where would I put them?
    I have never used Custom Tags.

    Quoted from the JSTL specification Chapter 10
    Many web applications need to access relational databases as the source of dynamic
    data for their presentation layer. While it is generally preferred to have database
    operations handled within the business logic of a web application designed with an
    MVC architecture, there are situations where page authors require this capability
    within their JSP pages (e.g. prototyping/testing, small scale/simple applications,
    lack of developer resources).Basically this functionality is only intended for prototyping and (very) small applications.
    MVC architecture aims to separate the view from the data. JSP is the view (in this case) and should not be accessing a database. That responsibility lies elsewhere.
    Its mainly a design thing. Embedding SQL statements in your JSP makes it harder to maintain than if you had a Bean data access layer. If you write it in beans, you can change/test it independantly of a JSP page and Server.
    - The taglib retrieves the entire resultset into memory.
    - It uses a generic getObject() to retrieve data.
    - You don't have quite as much control as you would in java code.
    Having said all that though, the sql tags DO work well within their limitations. If you do end up using them, make sure you configure a JNDI datasource, rather than use the "url", "driver" etc attributes to define the connection.
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    Do I need to download them from somewhere and where would I put them? Although it looks like a location on the internet, it isn't used as such.
    You don't need to download anything extra.
    Longer explanation:
    That URI is specified in the .tld for each tag library.
    The tlds for the taglibrary are bundled with standard.jar.
    If you have standard.jar and jstl.jar in your WEB-INF/lib directory, your server should find the tag library automagically, with no further help required.
    - No entries in web.xml (its specified in the tld)
    - No tld files lying around (they are bundled in the jar)
    Basically, all you need for JSTL are the jar files in the WEB-INF/lib directory. THATS IT.
    Cheers,
    evnafets

  • Announce: JSTL (Standard Tags) + Struts (MVC) live web Demo (open source)

    If you are starting a Java Web, you should use MVC and Standard tags,
              this "kit" is a sample of "best" (at least good) practices.
              It is MVC (Struts/Tiles)+JSTL XSLT DAO (Open Source Data Access Object
              w/ SQL) + DB CRUD (Create update delete and SQL DLL scripts)+ J2EE
              Security ( to make Tomcat run like Apache )
              It is KISS (you'll see how simple and how very standard) , good
              practices Free Open Source Framework to develop any web app, with the
              aim of being 80% of any app, but done as simple as possible and easy to
              teach. Again, everything is standard and simple. And it is the fastest,
              most efficient way to develop maintainable code I know of.
              Samples include CMS (Authorize content, XSLT, CMS Comments, sinkable,
              single sign on, etc.), Issue tracking, + more coming.
              Please download and install and see if you want to attend. Details:
              http://basicportal.sourceforge.net
              I use it to teach Struts + JSTL public and private classes. I epically
              teach WHY you should want to do something in a certain way, not just how.
              To attend and see "best practices"
              http://www.basebeans.com/webEx.jsp
              The seminar requires you know servlets, jsp, SQL, JDBC, and at least
              some MVC. (a plus is if you have already deployed and MVC web app in the
              past) Oh...it is $10.00 ( but free to baseBeans clients and/or apache.org
              committers.)
              To keep in touch on this join "MVC-Programmers" mail list at
              http://www.netbean.net/mailman/listinfo/mvc-programmers
              To keep in touch with open source projects go to
              http://news.netbean.net/cgi-bin/webnews.cgi
              Future plans include more docs, Dream weaver support, mail client, RSS
              feeds, BLOG, Shopping Cart Store, etc. etc.
              Did I say everything is standard and as simple as possible?
              Vic
              "Always code to the least amount of astonishment"
              Elements of Java Style
              

    Hi Devlin.
    > And changing the TLD is not
    > something I think should be done. 
    -> http://help.sap.com/saphelp_nw04/helpdata/en/e7/1f1e405d21c442e10000000a1550b0/frameset.htm
    > I see the portal-inf/lib  Is this the
    > same as web-inf/lib and gets picked up by the
    > webserver?
    -> yes. http://help.sap.com/saphelp_nw04/helpdata/en/f9/561140d72dc442e10000000a1550b0/frameset.htm
    Regards, Karsten

Maybe you are looking for

  • Select options for multiple entries

    hi, in selection screen i have 2 select-options as below SELECT-OPTIONS: s_belnr  FOR bkpf-belnr ,                               s_bukrs  FOR bkpf-bukrs. the problem is if BELNR or BUKRS are not given the error message should be displayed as enter th

  • I'm Sorry, I Have To Vent

    My company purchased Captivate shortly before the buy-out. It sounded like a great product. It looked very promising. However, it did not work with my Sony VIO's built-in sound card. (Well, Macromedia would say it worked, you just couldn't record nar

  • Left side of my screen touch isn't working !

    The left side of my screen isn't responding to text. Letters like a, w are impossible to type and cannot access any of the icons on the left side of the screen. I went to apple and they said its an hardware issue and I'd have to pay $200 to replace m

  • Golive: Troubling drop shadow on text.

    When viewing a Golive web page in Safari, or even an old IE browser, some type (which I assigned a color to) looks fine, but in Firefox, a drop shadow of the same color is being created. I see nothing that could possibly cause this. Any thoughts?

  • Auditing SYS.AUD$ in Oracle 10g

    We created a new 10g database and imported our 9i database schema into it. One of our application teams, used to run reports on the SYS.AUD$ table in Oracle 9i. Currently in the new 10g database, they said they get an error saying table does not exis