JSTL, Tomcat & NoClassDefFoundError

Hi,
I am having a little problem with JSTL on my web hosting companies server.
My code works fine, until I put it on their server. I have copied their set up, ie. same version of java & tomcat onto my computer, and it still works fine here.
The only difference is that they are using Linux.
The error happens as soon as I insert a JSTL tag into a jsp page. ie:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<body>
  <c:out value="Hello" />
</body>
</html>The first time I get a VerifyError:
java.lang.VerifyError: (class: org/apache/taglibs/standard/lang/jstl/JSTLVariableResolver, method: resolveVariable signature: (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;) Incompatible object argument for function call
And on subsequent refreshes (until Tomcat is restarted) I get a NoClassDefFoundError:
java.lang.NoClassDefFoundError:org/apache/taglibs/standard/lang/jstl/Evaluator
Heres what I have done to attempt to resovle this so far:
- Use the Java SDK not JRE
- Put all the JSTL JARs into %TOMCAT_HOME%/common/lib
- Edit my classpath to include the current dir (.) and JSTL's standard.jar
- Then I added tools.jar & rt.jar to my classpath
Well i'm still getting the errors, and I can't figure out why. From what over people have said on the forums, it might be a classpath error... but I can't see how, as i've added the stuff i'm sure it needs to the classpath!
Any sugesstions will be greatly appriciated, I'm tearing my hair out!
My set up:
Tomcat v4.1.24
Java SDK 1.3.1_06
Linux on web hosting companies server, win2k on my machine
Thank you!
Mel

Hi,
I tried putting all the JSTL libraries in the WEB-INF/lib file, but it caused Tomcat to throw up loads of errors (in all set ups I tried) when it started. So by putting the JARs in common/lib I can avoid this. I did try your suggestion and just put the jstl.jar in WEB-INF/lib. It caused no errors on Tomcat startup, but didn't fix the problem either!
The JSTL tld's are definetely in WEB-INF/tlds and the web.xml file has the correct entries in it.
I suspect that it is a classpath error... or path.. or some kind of configuration like permissions or something.
Confused!

Similar Messages

  • Servlet + Tomcat NoClassDefFoundError

    Hi,
    I am developing a servlet which takes data from Amazon's Web services (in XML format) and then outputs a RSS feed. I use xerces for parsing the XML and then use Rome to output the RSS feed. When I run the servlet then I get the following error.
    However when I run the same code over the commandline, it runs fine, however running it as a servlet, it shows the NoClassDefFoundError . I am also sending the code , it contains the commented out System.out statements which I use when I am running it over the command line
    Thanks
    Gaurav
    javax.servlet.ServletException: Invoker service() exception
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:524)
         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.lang.NoClassDefFoundError
         at form_input.doPost(form_input.java:84)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:466)
         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    The Code:
    //JAXP 1.1
    import org.w3c.dom.*;
    import org.w3c.dom.Document;
    import javax.xml.parsers.*;
    import org.apache.xerces.dom.DocumentImpl;
    import org.apache.xerces.dom.DOMImplementationImpl;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.Vector;
    import org.apache.xerces.jaxp.*;
    import org.apache.xerces.*;
    import org.apache.xerces.dom.*;
    import org.apache.xerces.parsers.*;
    //import org.apache.xml.serialize.*;
    import org.xml.sax.*;
    import com.sun.syndication.feed.synd.*;
    import com.sun.syndication.io.SyndFeedOutput;
    import com.sun.syndication.io.FeedException;
    import java.io.IOException;
    import java.text.ParseException;
    import java.io.FileWriter;
    import java.io.Writer;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class form_input extends HttpServlet
    private static final DateFormat DATE_PARSER = new SimpleDateFormat("yyyy-MM-dd");
         public void doGet(HttpServletRequest request, HttpServletResponse response)
                             throws IOException, ServletException
              doPost(request,response);
         public void doPost(HttpServletRequest request, HttpServletResponse response)
                             throws IOException, ServletException
    response.setContentType("text/xml");
              PrintWriter out = response.getWriter();
              URL data = new URL("http://xml.amazon.com/onca/xml3?t=myWebsite-20&dev-t=1RX5WFR818MJJAEN8A02&KeywordSearch=dogs&mode=books&type=lite&page=1&f=xml");
              URLConnection connection = data.openConnection();
              connection.setUseCaches(false);
    Document doc= null;
              NodeList DetailList = null;
              NodeList DetailChildren = null;
              Node Detail = null;
              Node DetailChild = null;
              Node ChildValue = null;
              DOMParser dparsers = new DOMParser();
              List entries = new ArrayList();
              SyndFeed feed = new SyndFeedImpl();
              SyndEntry entry;
              SyndContent description;
              SyndFeedOutput output = new SyndFeedOutput();
              try
                   feed.setFeedType("rss_1.0");
                   feed.setTitle("Amazon search for dog");
    feed.setLink("http://www.amazon.com");
    feed.setDescription("Amazon search results for dogs");
                   dparsers.parse(new InputSource(connection.getInputStream()));
                   doc = dparsers.getDocument();
                   DetailList = doc.getElementsByTagName("Details");
                   for( int i=0; i<DetailList.getLength(); i++)
                        Detail = DetailList.item(i);
                        DetailChildren = Detail.getChildNodes();
                        entry = new SyndEntryImpl();
                        for( int j=0; j<DetailChildren.getLength(); j++)
                             //Iterate through each of the children and start filling out the RSS thingie
                             //Gotta extract Asin, ProductName, ReleaseDate, Manufacturer, Authors -> Author
                             DetailChild = DetailChildren.item(j);
                             if(DetailChild.getNodeName().equals("Asin"))
                                  //if(DetailChild.hasChildNodes())
                                  //     System.out.println(DetailChild.getNodeName() + " has child nodes");
                                  ChildValue = DetailChild.getFirstChild();
                                  //System.out.println(DetailChild.getNodeName()+ " type = "+DetailChild.getNodeType()+" value="+ChildValue.getNodeValue());
                                  entry.setLink("http://www.amazon.com/exec/obidos/ASIN/"+ChildValue.getNodeValue());
                                  //System.out.println("Match found for Asin");
                             else if(DetailChild.getNodeName().equals("ProductName"))
                                  ChildValue = DetailChild.getFirstChild();
                                  //System.out.println(DetailChild.getNodeName()+ " type = "+DetailChild.getNodeType()+" value="+ChildValue.getNodeValue().length());
                                  if(ChildValue.getNodeValue().length() > 100 )
                                       entry.setTitle(ChildValue.getNodeValue().substring(0,100));
                                  else
                                       entry.setTitle(ChildValue.getNodeValue());
                                  //System.out.println("Match found for ProductName");
                             else if(DetailChild.getNodeName().equals("ReleaseDate"))
                                  ChildValue = DetailChild.getFirstChild();
                                  //System.out.println(DetailChild.getNodeName()+ " type = "+DetailChild.getNodeType()+" value="+ChildValue.getNodeValue());
                                  //System.out.println("ReleaseDate: "+DetailChild.getNodeValue());
                                  //entry.setPublishedDate(DATE_PARSER.parse(DetailChild.getNodeValue()));
                                  entry.setPublishedDate(DATE_PARSER.parse("2004-07-07"));
                                  //System.out.println("Match found for ReleaseDate");
                             else if(DetailChild.getNodeName().equals("Manufacturer"))
                                  ChildValue = DetailChild.getFirstChild();
                                  //System.out.println(DetailChild.getNodeName()+ " type = "+DetailChild.getNodeType()+" value="+ChildValue.getNodeValue());
                                  description = new SyndContentImpl();
                                  description.setType("text/plain");
                                  description.setValue("Initial release of Rome");
                                  entry.setDescription(description);
                        entries.add(entry);
                   feed.setEntries(entries);
                   String fxml = output.outputString(feed);
                   out.println(fxml);
              catch (ParseException ex) {
    // IT CANNOT HAPPEN WITH THIS SAMPLE
    ex.printStackTrace();
    out.println("ERROR: "+ex.getMessage());
              catch( SAXException se)
                   se.printStackTrace();
    out.println("ERROR: "+se.getMessage());
              catch (Exception ex) {
    ex.printStackTrace();
    out.println("ERROR: "+ex.getMessage());

    Hi,
    I am building the servlet for now in
    $TOMCAT_HOME/webapps/examples/WEB-INF/classes ,
    however there is no 'lib' directory in
    $TOMCAT_HOME/webapps/examples/WEB-INF . I created one
    and put the jar files there, but still I get the same
    error. Infact when I start the server, I do not see
    the jar file in CLASSPATH
    Thanks
    GauravYou shouldn't be putting your app in the examples directory.
    You should create a directory under TOMCAT_HOME/webapps for YOUR individual apps. Each one should have a WEB-INF directory under that, and /classes and /lib under that. Your web.xml belongs in the WEB-INF directory. Your .class files, and their package directories, belong under WEB-INF/classes. 3rd party JARs, like JDBC drivers, belong in WEB-INF/lib.
    The problem is that you don't know how to deploy a Web app properly on Tomcat.

  • JSP useBean and Tomcat NoClassDefFoundError

    Hi,
    I have a webapp on tomcat whose structure is like this
    /tomcat
    --/webapps
    ----/mywebappname
    ------/WEB-INF
    --------/classes
    ----------MyBean.java
    When I use useBean class="MyBean" I get a NoClassDefFoundError for this particular class.
    I suspect this is some kind of classpath issue but do not know how to fix it. Help appreciated.

    place u'r class file in <tomcat-root>/classes folder.
    if there's no such folder ,u'll have to create it.

  • Jstl tomcat

    hi,
    i'm trying to install jwsdp 2 . i'm using tomcat 5.5 . but jwsdp2 is not recognizing tomcat 5.5 . it is looking for tomcat 5 or sun java application server. could you please tell what version of jwsdp is compatible with tomcat 5.5 . and where i can download it. in sun website on jwsdp 2 is available. i was looking to download jawsdp 1.3 but i cant find it anywhere. or jwsdp1.4 will do. just want to try. and see what works.
    could someone explain me clearly about jstl. not the technical part. how to download what to use. there are may sites each site gives different procedure some say download from apache and some say download jwsdp from sun to install. are jstl from apache and sun same. what is the difference. what should i download. and what will be compatible with tomcat 5.5.
    i tried downloading jstl from apache from this page http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
    In tis page i selected link apache jakarta project mirror. i got some links like this
    BCEL
    BSF
    Cactus
    JCS
    JMeter
    Regexp
    i thought these might different sites to download jstl .
    i clicked on one of them. what i'm getting is something like jcs.zip or bsf .zip . i unzipped it. but there is no jstl.jar standard.jar . how to download these and where to?. i also downloaded sjwsdp2 from sun.but it is not installing it asking for tomcat 5 and i'm using tomcat 5. some please help me.

    user10257774 wrote:
    hi,
    i'm trying to install jwsdp 2 . i'm using tomcat 5.5 . but jwsdp2 is not recognizing tomcat 5.5 . it is looking for tomcat 5 or sun java application server. could you please tell what version of jwsdp is compatible with tomcat 5.5 . and where i can download it. in sun website on jwsdp 2 is available. i was looking to download jawsdp 1.3 but i cant find it anywhere. or jwsdp1.4 will do. just want to try. and see what works.You are using the wrong Tomcat 5. There is a special Tomcat 5 for Java WSDP available here: http://java.sun.com/webservices/containers/tomcat_for_JWSDP_1_5.html
    Don't forget to read the section on that page that says "Tomcat 5.0 for Java WSDP is not intended for deployment or production environments".
    >
    could someone explain me clearly about jstl. not the technical part. how to download what to use. there are may sites each site gives different procedure some say download from apache and some say download jwsdp from sun to install. are jstl from apache and sun same. what is the difference. what should i download. and what will be compatible with tomcat 5.5. You can read about and download JSTL from here: http://jstl.java.net/

  • JSTL + Tomcat + Eclipse problem

    "The 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 keep getting this error when i try to run a jsp in eclipse with web plugin. i added the jstl-1.2.jar to my application "\WebContent\WEB-INF\lib" folder. Is there something else i need to do to get JSTL and EL to work?

    bandarurm wrote:
    Jahvah wrote:
    "The 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 keep getting this error when i try to run a jsp in eclipse with web plugin. i added the jstl-1.2.jar to my application "\WebContent\WEB-INF\lib" folder. Is there something else i need to do to get JSTL and EL to work?Did you add jstl-1.2.jar to your project in eclipse using project(right click) -> properties -> java build path?Yes i done add external jar but it didnt help.

  • JSTL : unable to load class

    Hi,
    I know this is one of the jstl + tomcat problem again, but I need some help here. I think I've got everything right, but it seems Tomcat can't load the relevant class.
    I was try run this free source code, but got this error:
    org.apache.jasper.JasperException: /index.jsp(13,0) Unable to load class box
    I'm using Tomcat 4.1.27-LE-JDK1.4
    This is in my JSP file:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="tldc" uri="/tldc" %>
    the standard tld works fine, but I think the user-created tld is causing the problem.
    This is my file structure:
    webapps/jstl-blog/WEB-INF/tlds/tldc.tld
    My web.xml file is:
    <?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/j2ee/dtds/web-app_2.3.dtd">
    <web-app>
    <display-name>WebLog</display-name>
    <description>
    JSTL WebLog
    </description>
    <taglib>
    <taglib-uri>/tldc</taglib-uri>
    <taglib-location>/WEB-INF/tlds/tldc.tld</taglib-location>
    </taglib>     
    </web-app>

    This is in my JSP file:
    <%@ taglib prefix="c"
    uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="tldc" uri="/tldc" %>
    Try this instead:
    <%@ taglib prefix="tldc" uri="/WEB-INF/tlds/tldc.tld" %>
    Patrek

  • Help needed to run JSTL 1.1 in Tomcat 6.0.16

    Hi All,Help needed to run JSTL 1.1 in Tomcat 6.0.16. I am trying to run the example given in http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html The example tries to connect to MySQL database from JSP using JSTL and JNDI Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin to start and stop Tomcat server from Eclipse IDE.
    My web.xml file has <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    </web-app>
    and test.jsp has proper taglib directives
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    I have placed the jstl.jar and standard.jarof the jakarta-taglibs-standard-1.1.2.zip under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory also placedcontext.xml file under E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of context.xml is as below
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>
    Now while running the example, Eclipse creates one DBTest.xml file under C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
    which has the following line:
    <Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest" workDir="E:\Deepa\workspace\DBTest\work" />
    I am getting the following error when running http://localhost/DBTest/WebContent/test.jsp
    in Browser:
    <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:315)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    In the Tomcat Server console, I am getting the following error:
    INFO: Server startup in 7295 ms
    May 20, 2009 6:36:48 AM org.apache.jasper.compiler.TldLocationsCache processWebDotXml
    WARNING: Internal Error: File /WEB-INF/web.xml not found
    May 20, 2009 6:36:48 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw 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
    what is the problem with my code?
    When running the same example, by creating a local server in Eclipse(creating new Server connection pointing to same Tomcat 6.0 installation) it runs fine without any error.

    Hi evnafets,
    Wow, very helpful information, great insight into working of Eclipse. Thanks a lot.
    I have one more question. I have a context.xml file under {color:#0000ff}E:\Deepa\workspace\DBTest\WebContent\META-INF{color} folder and that has the Resource element to connect to MySQL database:
    {code{color:#000000}}{color}<Context path="/DBTest" docBase="DBTest" debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    {color:#0000ff}url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>{color}
    {color:#0000ff}</Context>{color}As usual when running application in local Tomcat server of Eclipse, this data source works fine. But when I run the application on Tomcat, by starting Sysdeo plugin from Eclipse, the DBTest.xml file created in C:\Tomcat 6.0\conf\Catalina\localhost has the context entry as<Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest\WebContent" workDir="E:\Deepa\workspace\DBTest\work">
    </Context>The<Resource> element I have specified in the context.xml of \WebContent\META-INF folder is not taken into account by Tomcat and it gives the following error:May 21, 2009 5:20:04 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException_: Cannot create JDBC driver of class '' for connect URL 'null'"
    _at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(_QueryTagSupport.java:276_)
    at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(_QueryTagSupport.java:159_)
    at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(_test_jsp.java:113_)
    at org.apache.jsp.test_jsp._jspService(_test_jsp.java:66_)
    at org.apache.jasper.runtime.HttpJspBase.service(_HttpJspBase.java:70_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.jasper.servlet.JspServletWrapper.service(_JspServletWrapper.java:374_)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(_JspServlet.java:342_)
    at org.apache.jasper.servlet.JspServlet.service(_JspServlet.java:267_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:290_)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:206_)
    at org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:233_)
    at org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:191_)
    at org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:128_)
    at org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:102_)
    at org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:109_)
    at org.apache.catalina.connector.CoyoteAdapter.service(_CoyoteAdapter.java:286_)
    at org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:845_)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(_Http11Protocol.java:583_)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(_JIoEndpoint.java:447_)
    at java.lang.Thread.run(_Thread.java:619_)
    {code}
    So to overcome this error I had to place the <Resource> element in DBTest.xml under C:\Tomcat 6.0\conf\Catalina\localhost {color:#000000}and then it works fine. {color}{color:#ff0000}*Why is the context.xml file in META-INF not considered by Tomcat server using Sysdeo Plugin?*
    *Thanks,*
    *Deepa*{color}
    {color}
    Edited by: Deepa76 on May 26, 2009 9:32 PM

  • Tomcat 5.5 or 6.0 + JSTL 1.2 - fmt:message doesn't work (for me :(   )

    I have trolled many forum posts and mailing list threads. I'm sure this question has been asked thousands of times (in fact I've read answers and tried to implement but come up short every time).
    Q: How do you make fmt: message work with multiple bundle files?
    I have simple test page test.jsp that includes a taglibs fragment. The page attempts to localize a key from a Messages bundle. I get the following as output:
    ???shoop???
    This JSP has been deployed on Tomcat 5.5.23 and Tomcat 6.0.13 with the same result.
    I have configured the web.xml many different ways, but currently it's per the 2.4 servlet spec. I have jstl-1.2.jar located in WEB-INF/lib. This is the only webapp library included my deployment. The rest is "vanilla" Tomcat.
    I'm including the contents of the important files below.
    What could be wrong?
    test.jsp
    <%@ include file="/taglibs.jsp" %>
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
         <html xmlns="http://www.w3.org/1999/xhtml">
         <head>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <title>Simple i18n Test</title>
         </head>
         <body>
              <fmt:setBundle var="msgBundle" basename="Messages"/>
              <p><fmt:message key="shoop" bundle="${msgBundle}"/></p>
         </body>
         </html>
    taglibs.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" 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">
         <context-param>
              <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
              <param-value>en</param-value>
         </context-param>
         <display-name>test</display-name>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>
    ------------------

    Hi all -
    evnafets continues to grow his collection of platinum stars. :)
    The trick was to set basename in fmt:setBundle to i18n.Messages.Messages. It's not clear from the tag's javadoc, but it appears that the convention is
    path.to.bundledirectory.bundledefaultfilenamelessdotpropertiesextension
    So, for me
    since I have the following deployment structure
    WEB-INF/classes/i18n/Messages
    Messages.properties
    Messages_en.properties
    Messages_de.properties
    I had to specify
    <fmt:setBundle basename="i18n.Messages.Messages" var="msgBundle" />
         <p><fmt:message key="shoop" bundle="${msgBundle}" /></p>
    to finally see
    shoop
    If I add
    <fmt:setLocale value="de" /> before all that
    I get
    der shoop-a-loop
    Ha ha!
    I would mention that it is not necessary to add the localizationContext in web.xml. It's a convenience if you don't want to specify the default bundle in your JSPs. You cannot define more than one bundle in your web.xml.
    I am working with a webapp that has many different bundles, so I'll incurthe overhead of specifying bundle basenames and vars.
    Thanks!

  • Tomcat 6.0.9 and jsf 1.2 and jstl 1.2 using *.tag file error

    I using :tomcat 6.0.9 and jsf 1.2 and jstl 1.2
    My web.xml is at version 2.5 and I am using a custom tag (with the .tag extension). I am trying to use the http://java.sun.com/jsf/html library and values from my attribute. I'm new to this so I figure I must just me missing something.
    I am run http://192.168.1.1/test.jsf laster,view:
    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: Unable to compile class for JSP:
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:212)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:576)
         org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:50)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:627)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:631)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:645)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:414)
         com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:455)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.9 logs.
    if go to /WEB-INF/tags/test.tag ,delete line: <h:outputText id="test" value="hello!" />
    run http://192.168.1.1/test.jsf is OK!(no error),So I guess error for "<h:outputText id="test" value="hello!" />" line ,why in test.tag file do can't use the "http://java.sun.com/jsf/html " library,please help me.......
    Here is file WEB-INF/web.xml content:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License. You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <web-app 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_5.xsd"
    version="2.5">
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <!-- Faces Servlet -->
    <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    </web-app>
    Here is file /test.jsp code:
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <f:view>
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <!-- body start -->
    <h:outputText id="myinfo" value="test success" />
    <tags:test/>
    <!-- body end -->
    </body>
    </html>
    </f:view>
    Here is file /WEB-INF/tags/test.tag code:
    <%@tag pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <h:outputText id="test" value="hello!" />
    Thanks for any help.

    Don't know if it's important, but there is no schema avaiable at: http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd
    I found the right one at: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
    /perty
    Message was edited by:
    perajonsson

  • Problem when use multiple c:import jstl on jsp on Tomcat 5.0

    I have jsp that use multipe import jstl tag. I was able to run on the Tomcat 5.5.9. When I deploy it on Tomcat 5.0.28, it is not working.
    For example:
    <c:import url="/jsp/page1.jsp" />
    <c:import url="/jsp/page2.jsp" />
    I look at Tomcat cache directory and I only see page1.jsp compiled but not page2.jsp. I look at the catalina.out log file and the error message shows below. I thought JSTL is working for Tomcat 5.x up. Do anyone have any idea? Please help.
    Thanks.
    java.lang.ArrayIndexOutOfBoundsException: 204
         at org.apache.jasper.compiler.JspReader.peekChar(JspReader.java:164)
         at org.apache.jasper.compiler.JspReader.isSpace(JspReader.java:357)
         at org.apache.jasper.compiler.JspReader.isDelimiter(JspReader.java:440)
         at org.apache.jasper.compiler.JspReader.parseToken(JspReader.java:405)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1285)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
         at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(Unknown Source)
         at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(Unknown Source)
         at org.apache.jsp.jsp.offermgmt.ajax.ajaxPromotion_jsp._jspx_meth_c_import_1(ajaxPromotion_jsp.java:218)
         at org.apache.jsp.jsp.offermgmt.ajax.ajaxPromotion_jsp._jspService(ajaxPromotion_jsp.java:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

    Can you access page1 and page2.jsp correctly on their own?
    ie could the problem be with page2.jsp rather than the import command?

  • Link between Tomcat 5 and JSTL 1.1

    Could someone help me to point to the right URI, please. Here is my code and error.
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
    <body>
    You sent the following request headers:
    <table border="1">
    <tr>
    <th>
    Header
    </th>
    <th>
    Value
    </th>
    </tr>
    <c:forEach var="entry" items="${header}">
    <tr>
    <td>
    ${entry.key}
    </td>
    <td>
    ${entry.value}
    </td>
    </tr>
    </c:forEach>
    </table>
    </body>
    </html>
    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/core cannot be resolved in either web.xml or the jar files deployed with this application
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:365)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:151)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174)
         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:448)
         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:506)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1547)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:166)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:269)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:155)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:142)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:434)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:571)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:288)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:294)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:490)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1020)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:490)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1020)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2625)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:490)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1020)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:490)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1020)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:196)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:625)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:430)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:567)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:623)
         at java.lang.Thread.run(Thread.java:534)
    Apache Tomcat/5.0

    It's in the c.tld file inside the standard.jar.
    You should have that in your WEB-INF/lib directory.
    %

  • JSTL 1.1.2, TOMCAT 5.5, JDK 5, Eclipse and Problems

    I have been having trouble loading the JSTL library (standard.jar & jstl.jar)
    I'm using Eclipse 3.0.2 to do my development work on my JSP pages. So normally I will just create my Tomcat(5.5 on JDK5.0) project using Sysdeo(tm) plugin in its default directory (C:\eclipse\workspace\mytomcatproject).
    Then I would begin creating my JSPs and use JSTL(1.1.2) for my development. I'd put those standard.jar/jstl.jar into /WEB-INF/lib as recommended.
    The problem is I can't seem to get JSTL library working, even I tried out copy and pasting the example code into my pages.
    I have :
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    ... //some code
    ${fn:escapeXml(param["myreq"])} will show out in the JSP exactly "${fn:escapeXml(param["myreq"])}" without processing. Although no runtime errors comes out (meaning the TOMCAT successfully loaded the library) but seems that the taglib is not working!!!
    I did some experiments:
    Experiment 1 :-
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    (notice the uri, its without /jsp)
    and it works for /core taglib, but not the /functions taglib. Meaning somewhere in the TOMCAT library it load the older 1.0 version of JSTL.
    When I try using the /functions taglib
    <%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %>
    TOMCAT will complaint about the non-existence of this JSTL.
    Experiment 2 :-
    I tried to copy all the JSTL tld into my /WEB-INF/tld and and change my web.xml to include the tld location by using <jsp-config><taglib>.
    Doesn't work as well!!! The taglib just didn't get process.
    Experiment 3 :-
    I tried to modify the <Context> in server.xml to include tldNameAware and tldValidation to TRUE.
    Not Working as well!!!
    Experiment 4 :-
    I comment out the <my_tomcat_home>/conf/server.xml <Context> (the one that Eclipse created for my Tomcat project) and directly paste my project directory into <my_tomcat_home>/webapps and restarted my TOMCAT.
    IT WORKS!!!
    So does JSTL 1.1.2 only works in TOMCAT webapps home? Seems that TOMCAT only load the /WEB-INF/lib when the project is in its webapps, but when the project is outside of the webapps dir, it seems doesn't process the JSTL lib.
    Any idea how to make it work outside the Tomcat webapps cause I try to encourage my team to use Eclipse and CVS.

    The probable cause of the issue is your web.xml file.
    If your web.xml file is declared as being servlet version 2.3, then it disables the JSTL expression language (EL) by default.
    ie if you have this:
    <?xml version="1.0"?>
    <!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>It should change to be this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app 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"
        version="2.4">Undo all of that hacking you did through the config files.
    JSTL needs no tld files, and no entries in web.xml to make it work.
    Hope this helps,
    evnafets

  • JSTL, MySQL, Tomcat sql:query error

    Hi to everyone...
    This is my first post, but since im employed now as a java developer ill be here regulary.
    Right now im trying to use the JSTL to make some simple sql selects in my JSPs....
    Here�s the JSP code:
    <%@ page language="java" import="java.lang.*,java.util.*" %>
    <%@ taglib uri="/jstl-core" prefix="c" %>
    <%@ taglib uri="/jstl-sql" prefix="sql" %>
    <html>
    <head>
    <title> A first JSP database </title>
    </head>
    <body>
    <sql:setDataSource scope="session" var="dataSource"
    url="jdbc:mysql://127.0.0.1/zolltek" driver="com.mysql.jdbc.Driver"
    user="root" password="root"/>
    <!-- The following UPDATE works fine.. -->
    <sql:update var="users" dataSource="${dataSource}" scope="session">
    INSERT INTO test VALUES (7,'Paul Oakenfold')
    </sql:update>
    <!-- But the select screws up.... -->
    <sql:query var="users" dataSource="${dataSource}" scope="session">
    SELECT * FROM test WHERE 1
    </sql:query>
    </body>
    </html>
    ...and the error message:
    exception :
    org.apache.jasper.JasperException:
    SELECT * FROM test WHERE 1
    : null
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    root cause
    javax.servlet.ServletException:
    SELECT * FROM test WHERE 1
    : null
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:531)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:84)
    ...and just for completion the importent part of my web.xml:
    <taglib>
    <taglib-uri>/jstl-core</taglib-uri>
    <taglib-location>/WEB-INF/c-1_0.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/jstl-sql</taglib-uri>
    <taglib-location>/WEB-INF/sql-1_0.tld</taglib-location>
    </taglib>
    i am using the jboss 3.2.3 tomcat bundle (tomcat 4.1.29)
    and mysql 4.0.18 on W32 System....
    the JSTL is installed and working - i can make <sql:update>Inserts without any problems, but any <sql:query>selects result in that error... so i guess the setDataSource is okay...
    Any idea would be appreciated....
    Thx
    J�rg

    Those URIs you've got in your JSPs aren't correct. They should be:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    These are the URIs defined in the standard.jar.
    You'd be better off setting up a Tomcat JNDI data source for your application. That will externalize the connection parameters and make it unnecessary to refer to a data source in your JSPs.
    You'd be even better off not putting SQL code in your JSPs. They're for presentation. Better to write a Java object that will communicate with the database on the JSP's behalf.
    If you just want to select all the rows in the table, the query should be "SELECT * FROM test". You don't need a WHERE clause in that case.
    If you change the URIs in your JSPs you should remove the <taglib> from your web.xml. It's not necessary. Tomcat will find the TLD by looking in the JARs in the CLASSPATH and matching the URIs.

  • Tomcat: java.lang.NoClassDefFoundError: oracle/sql/NUMBER

    hi,
    i have managed to come this far with my "simple" webapplication under tomcat.
    the exception is:
    java.lang.NoClassDefFoundError: oracle/sql/NUMBER
    since i have tried to put the classes12.jar in every reasonable directory without effect, i have to bother this forum. does anyone know "where the dog is burried"(german saying)?
    greetz
    Selim Keser

    Hi yves,
    This class is in the jdev_home/jdbc.lib/ojdbc14.jar.
    But prior to deploying your ADF application, did you install the ADF runtime libraries to Tomact as explained here?:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3?topic=j2ee_ptomcatdeploy_html
    Thanks
    Prasanth

  • Unable to make use of JSTL with Tomcat 4.1

    I have downloaded jakarta taglibs 1.1.2 from Jakarta site .Copied the
    Jstl.jar under lib directory which I kept under WEB-INF of my specific
    web directory but tomcat is unable to identify the tag like forEach, set etc.
    Same thing happened with Java Application Server.
    The code is like this
    Even I tried with prefix c and http://java.sun.com/jstl/core uri
    <%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %>
    <html>
    <head>
    <title>Simple Example</title>
    </head>
    <body>
    <c_rt:set var="browser" value="${header['User-Agent']}"/>
    <c_rt:out value="${browser}"/>
    </body>
    </html>
    regards
    Diptish
    India

    In regards to the problem being observed on "Java Application Server", you may consider consulting the Sun Java System Application Server forums:
    http://forum.sun.com/jive/category.jspa?categoryID=7

Maybe you are looking for

  • Fin Rep 9.3.1 Error 5200 " Unknown Member: Same as Column A" in print prev

    Using Hyperion Financial Reporting Studio 9.3.1, we are attempting to print preview a report and received the following message: +5200 : Error executing query: ServerName/AppName/FinPlan/UserName/Error(1001005) Unknown Member [Same As Col  A] in Repo

  • Cant open file in photoshop from lightroom

    I installed portraiture yesterday in PS and now for whatever reason I cant open files from lightroom to photoshop?

  • Firefox won't launch Zimbra Desktop for mailto links

    Windows 7 Home Premium 64 bit Core 2 Duo Running Firefox 26. Installed Zimbra Desktop Email client, when I click mailto links it only offers Yahoo and Gmail. In IE and other programs Zimbra launches when I use email features of those programs. Zimbra

  • Cp1025nw won't print multiple pages

    No matter where I set the number of copies to print out, I'm only getting one. I've found other solutions related to Mopier settings, but I can not find these anywhere for this printer. Windows 7 Home CP1025NW I have reinstalled the drivers both from

  • How to read .class file?

    i am trying to read java classfile and display it in my notepad ,but can not get the anticipative result . who can tell me why and give me a hand please...