JSTL 1.0 problems

Hi,
Been having problems getting the JSTL 1.0 up and running. Well, the example .war works fine but when I try to use the taglib in my own app I get aThis absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this applicationI'm using tomcat 4.1.30 and jakarta-taglibs-standard-1.0.6
There's no mention of taglibs in my web.xml file and I've placed jstl.jar and standard.jar in my apps WEB-INF/lib folder.
In my JSP file I have <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> at the top and the uri tag from c.tld is <uri>http://java.sun.com/jstl/core</uri>
I've been fiddling with it for a while now and got rid of the error message when I placed the c.tld file in my WEB-INF folder and changed the include to <%@ taglib uri="WEB-INF/c.tld" prefix="c" %> but I'd like to get everything to work as it should ( by just adding the jar files to the lib folder) What am I doing wrong?

Hi,
Been having problems getting the JSTL 1.0 up and
running. Well, the example .war works fine but when I
try to use the taglib in my own app I get aThis absolute uri (http://java.sun.com/jstl/core)
cannot be resolved in either web.xml or the jar files
deployed with this applicationI'm using tomcat 4.1.30 and
jakarta-taglibs-standard-1.0.6
There's no mention of taglibs in my web.xml file and
I've placed jstl.jar and standard.jar in my apps
WEB-INF/lib folder.
In my JSP file I have <%@ taglib
uri="http://java.sun.com/jstl/core" prefix="c" %> at
the top and the uri tag from c.tld is
<uri>http://java.sun.com/jstl/core</uri>
I've been fiddling with it for a while now and got rid
of the error message when I placed the c.tld file in
my WEB-INF folder and changed the include to <%@
taglib uri="WEB-INF/c.tld" prefix="c" %> but I'd like
to get everything to work as it should ( by just
adding the jar files to the lib folder) What am I
doing wrong?Yeah, remove that c.tld from WEB-INF.
Did you copy the .jar files from the example war right into your app? Did you copy the correct directory Structure for you web app (which should be the same as a WAR)? Did you double check spelling and the like?
If yes to these, then just try to make a simple edit to your JSP page. This should force a re-compile of the JSP and maybe get you up and going.
Otherwise, I am at a loss. If the jars are in the [TOMCAT_HOME]/webappas/<appName>/WEB-INF/lib directory, then that is all I have ever had to do (TC 4 and 5)

Similar Messages

  • 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 - x:out problem

    Hi,
    I'm trying to use the JSTL - XML tag library, but I have problems using the x:out tag. I'm using JSTL 1.0.3
    My jsp is:
    <%@ taglib prefix="x" uri="http://tags/jstl-xml" %>
    <html>
    <head>
      <title>JSTL: XML Support -- Parse / Out</title>
    </head>
    <body bgcolor="#FFFFFF">
    <h3>Parse / Out</h3>
    <x:parse var="a">
      <a>
       <b>
        <c>
         foo
        </c>
       </b>
       <d>
         bar
       </d>
      </a>
    </x:parse>
    <x:out select="$a//c"/>
    <x:out select="$a/a/d"/>
    <hr />
    </body>
    </html>In Tomcat 4.0.6 I get the following error:
    java.lang.NoSuchMethodError
    at org.jaxen.dom.DOMXPath.(DOMXPath.java:101)
    at org.apache.taglibs.standard.tag.common.xml.XPathUtil.valueOf(XPathUtil.java:237)
    at org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:102)
    at org.apache.taglibs.standard.tag.el.xml.ExprTag.doStartTag(ExprTag.java:103)
    at org.apache.jsp.Out$jsp._jspService(Out$jsp.java:121)
    Using JBoss 3.2.2RC 2 I get the following error:
    javax.servlet.ServletException
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
    at org.apache.jsp.Out_jsp._jspService(Out_jsp.java:107)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    I already copied the 4 jars and the 8 tlds that come with Web Services Developing Pack 1.1
    Any idea what can be going wrong?
    Thanks
    Mary

    hi
    i dont have solution for your problem, but maybe you can help me with parsign xml-file. my jsp looks like this:
    <%@ taglib prefix="x" uri="/WEB-INF/x.tld" %>
    <%@ taglib prefix="c" uri="/WEB-INF/c.tld"%>
    <c:import var="xml" url="CV.xml"/>
    <x:parse varDom="dom" xml="${xml}"/>
    and im getting this error message:
    According to TLD or attribute directive in tag file, attribute xml does not accept any expression
    could you post the web.xml and the jsp file where the xml file is being parsed?
    Thanks!

  • 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.

  • Jstl - fmt Tag problem

    hi..
    I am facing problem in jstl. I have written a jsp file which is using jstl, <fmt> tag when I execute this file its gives me an error
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /dt.jsp(6,8) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
    Apache Tomcat/5.5.12
      my jsp file is give blow
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <html>
    <body>
    <h1>Formatting with the default locale</h1>
    <jsp:useBean id="now" class="java.util.Date" />
    Date: <fmt:formatDate value="${now}" pattern="yyyy-MM-dd HH:mm"/>
    Number: <fmt:formatNumber value="${now.time}" />
    </body>
    </html>
    I am using apache-tomcat-5.5.12 & java 1.5 on win XP
    please help me out.....
    thanks

    Hi
    Try using "sv_SE" locale.

  • Jstl and jsf problem

    i'm programming with jsf and have to use jstl tag
    i cant access "var" in jsf tags
    how can i use # with forEach items attribute ?
    or how can i use $ with jsf tags ?
    <c:forEach  items"${x}" var="x">
    <h:outputText value="${x.documentNo}" />
    </c:forEach>

    soso_xuc wrote:
    i'm programming with jsf and have to use jstl tag
    i cant access "var" in jsf tags
    how can i use # with forEach items attribute ?
    or how can i use $ with jsf tags ?
    <c:forEach  items"${x}" var="x">
    <h:outputText value="${x.documentNo}" />
    </c:forEach>
    If you're using at least JSF 1.2 with at least JSTL 1.2, you can just use unified EL (the "JSF EL") in c:forEach.
    <c:forEach items="#{x}" var="x"><h:outputText value="#{x.p}"/></c:forEach>That said, using c:forEach in JSF is not recommended (as almost every JSTL tag/taglibs, only the Functions taglib is useful). Rather go for an JSF UIData component which does not output anything, such as Tomahawk t:dataList and RichFaces' a4j:repeat. If you're using Facelets instead of JSP, you could also use ui:repeat.

  • 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.

  • BEA 9.2, JSTL Exploded EAR problem

    Application is originally deployed as EAR.
    To allow faster development I have installed it as exploded view. Within BEA I have removed EAR deployment (which is working fine), and set up EXPLODED ear. Setup is exactly the same, with exception of selecting EAR folder.
    However, for me it does not work. I got number of errors similar to:
    frontendLayout.jsp:20:35: This attribute does not support request time values.
    <c:set var="displayedObjectTitle" value="${requestScope[pageScope.DISPLAYED_OBJECT_TITLE_KEY]}" />
    with:
    compile.jsp=true
    I can not even "Accept Changes" (on BEA Web console).
    With:
    compile.jsp=false
    I can accept changes, but each page I open shows number of errors similar to one above.
    Did someone have similar issue and was is resolved?
    One of possible solutions for issue could be (as I found it somewhere) replacement of:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    with:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    But there too many pages to change, that I did not even tried it.
    Does someone know what is causing this issue? How can I Resolve it? It obviously has something to do with JSTL versions, but what is the best way to resolve it?
    Thanks.

    One of possible solutions for issue could be (as I found it somewhere) replacement of:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    with:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    Just read this. That's correct.
    But there too many pages to change, that I did not even tried it. Why do you have that embedded in each page? A better solution would be to write an include.jsp and then just @include that. One change and all the pages see it.
    Does someone know what is causing this issue? How can I Resolve it? It obviously has something to do with JSTL versions, but what is the best way to resolve it?See above.
    %

  • Jstl fmt:formatDate problem

    Hi everyone,
    I have been spending a lot of time on this "simple" issue and i hope someone is able to help. All i want to do is simple format a date and display it correctly.
    This is jsp page:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <html>
    <body>
         <jsp:useBean id="now" class="java.util.Date" />
         <fmt:formatDate pattern="yyyy-MM-dd" value="${now}" />
    </body>
    </html>This is the error i get when running this in the newest tomcat:
    org.apache.jasper.JasperException: Unable to convert string "${now}" to class "java.util.Date" for attribute "value": Property Editor not registered with the PropertyEditorManager
         org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:887)
         org.apache.jsp.index_jsp._jspx_meth_fmt_005fformatDate_005f0(index_jsp.java:135)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         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)I lib folder (version 1.1.2):
    - jstl.jar
    - standard.jar
    In WEB-INF/tld folder:
    - fmt.tld
    - c.tld
    Web.xml looks like this:
    <!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>
       <taglib>
        <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
        <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
        <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
      </taglib>
    </web-app>I really hope someone is able to help - let me know if you need more information!
    Thanks!
    /Kasper

    OK.
    1) Declare web.xml as Servlet 2.5. Tomcat supports it. Servlet 2.3 is legacy. Replace your DOCTYPE thing by:
    <?xml version="1.0" encoding="UTF-8"?>
    <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">
        <!-- Configuration here. -->
    </web-app>2) Remove all loose JSTL tld files from your classpath. Those are already included in the JSTL JAR file.
    3) Remove the TLD declarations from your web.xml. Those are already declared in the JSTL JAR's web.xml.
    4) I recommend to remove the JSTL and Standard JAR's and use JSTL 1.2 instead: [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/]. Just place it in the classpath (YourWebApp/WEB-INF/lib or Tomcat/lib) and declare the @taglib in your JSP to use it. Nothing more, nothing less. Do not extract the JAR and duplicate the stuff everywhere.

  • Jstl fn maven problems

    How do you make jstl functions work when jstl is fetched from maven repository as follows
    <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>1.1.2</version>
                <scope>compile</scope>
            </dependency>I get org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/functions cannot be resolved in either web.xml or the jar files deployed with this application
    Thank you
    Niklas

    The solution was to also include the standard taglib library. My pom.xml is now
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.appspot.classifiedsmarket</groupId>
      <artifactId>classifiedsmarket</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>classifiedsmarket Maven Webapp</name>
      <url>http://maven.apache.org</url>
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
        <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.12</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>httpunit</groupId>
                <artifactId>httpunit</artifactId>
                <version>1.6.1</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>struts</groupId>
                <artifactId>struts</artifactId>
                <version>1.2.9</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.6</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>informa</groupId>
                <artifactId>informa</artifactId>
                <version>0.6.0</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>1.3</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
                <groupId>htmlunit</groupId>
                <artifactId>htmlunit</artifactId>
                <version>1.9</version>
                <scope>compile</scope>
            </dependency>
        <dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
    <version>1.1</version>
    </dependency>
    <dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4</version>
    </dependency>
    <dependency>
                <groupId>dwr</groupId>
                <artifactId>dwr</artifactId>
                <version>1.1.3</version>
                <scope>compile</scope>
            </dependency>
    <dependency>
                <groupId>commons-dbcp</groupId>
                <artifactId>commons-dbcp</artifactId>
                <version>1.2.2</version>
                <scope>compile</scope>
            </dependency>
    <dependency>
                <groupId>commons-pool</groupId>
                <artifactId>commons-pool</artifactId>
                <version>1.4</version>
                <scope>compile</scope>
            </dependency>
    <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>1.1.2</version>
                <scope>compile</scope>
            </dependency>
    <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.2</version>
                <scope>compile</scope>
            </dependency>
      </dependencies>
      <build>
        <finalName>classifiedsmarket</finalName>
        <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>RELEASE</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>RELEASE</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>RELEASE</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
            </plugins>
      </build>
      <properties>
            <netbeans.hint.deploy.server>Tomcat55</netbeans.hint.deploy.server>
        </properties>
    </project>

  • JSTL HTML output when looping

    Hi,
    I am creating tables dynamically using JSTL. My problem is, the HTML that comes out has lots of blank space. This may sound insignificant but it makes it very hard to see what's going on when I view the source of a page.
    JSP:
         <c:forEach items="${holidaybean.monthview }" var="usermonth">
              <tr>
                   <td>
                         <a href="staffholiday.jsp?useremail=${usermonth.email}"><c:out value="${usermonth.firstname} ${usermonth.surname }"></c:out>  </a>
                  </td>
                   <c:forEach items="${usermonth.leave}" var="day">
                        <c:choose>
                             <c:when test="${day == -3 }">
                                  <c:set var="color" value="#00FF00"></c:set>
                             </c:when>
                             <c:when test="${day == -2 }">
                                  <c:set var="color" value="#BDBABD"></c:set>
                             </c:when>
                             <c:when test="${day == -1 }">
                                  <c:set var="color" value="#FFFFDD"></c:set>
                             </c:when>
                             <c:when test="${day == 0 }">
                                  <c:set var="color" value="#940000"></c:set>
                             </c:when>
                             <c:when test="${day == 2 }">
                                  <c:set var="color" value="#3399FF"></c:set>
                             </c:when>
                             <c:when test="${day == 5 }">
                                  <c:set var="color" value="#000000"></c:set>
                             </c:when>
                             <c:otherwise>
                                  <c:set var="color" value="#FFFF00"></c:set>
                             </c:otherwise>
                        </c:choose>
                        <td class="monthviewDateColumn" align="center" width="3%" bgcolor="${color }"></td>
                   </c:forEach>
              </tr>
         </c:forEach>Output HTML:
    <tr>
                   <td>
                         <a href="[email protected]                                                                         ">Olivier                                            Lewis                                               </a>
                  </td>
                        <td class="monthviewDateColumn" align="center" width="3%" bgcolor="#BDBABD"></td>
                        <td class="monthviewDateColumn" align="center" width="3%" bgcolor="#FFFFDD"></td>
    blah blah blah
    <td class="monthviewDateColumn" align="center" width="3%" bgcolor="#FFFFDD"></td>
                        <td class="monthviewDateColumn" align="center" width="3%" bgcolor="#BDBABD"></td>
              </tr>

    Depends on the appserver (the actual JSP/Servlet implementation) used. If you're using an appserver which uses the Apache JspServlet (e.g. Apache Tomcat, JBoss AS, WebSphere, etc), then you can trim the whitespace by the following JspServlet init-param in appserver's web.xml (which is in for example Tomcat located at Tomcat/conf/web.xml):
    <servlet>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>trimSpaces</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>If not, then best is to just consult the appserver's documentation using keywords like "trim", "whitespace", etc.
    By the way, don't you see a repeating pattern in your code? The c:choose can be removed if you have a mapping of day-color values.
    <td class="monthviewDateColumn" align="center" width="3%" bgcolor="${colors[day]}"></td>Where ${colors} should be a Map<Long, String> which you put in session or application scope.

  • Selectoneradio problem

    Hi,
    I've a problem with a selectoneradio in my jsf app.
    I have a jsp page where when the user click on a button a selectoneradio embedded in a fieldset get enabled.
    When the select one radio is enabled the user can chosse the radio he prefers.
    In the next page there is a back button. If the user press the back button, my apps come back to the page with selectoneradio.
    The sdelectone radio is disabled then my apps dont load value from bean properties.
    I tryied to avoid this putting in one inputhidden with the same properties of selectoneradio. But It dont work.
    Someone has a solution?
    I try with jstl, but the problem is that if I use usebean the page seems create a new bean.
    Any suggest?
    Thank Andrea

    Sapphire wrote:
    I am using Java EE with Hibernate, JSF and Seam.
    I have a bean with properties of type Integer. They used to be Boolean but I had to change them to Integer because I am using DB2 and DB2 doesnt accepts booleans.This is a failure on your part to properly configure Hibernate. It will do the translation for you.
    >
    Since selectBooleanCheckbox only works with Boolean types in the backing bean, I have decided to use selectOneRadio to serve the same purpose. Now, I have a problem with that. I dont know if its a validation issue or what but when I click the submit button to submit the form, nothing happens. I'm just learning EJB programming and this problem has completely stopped my progress.
    Here's my code:
    @Entity
    @Name("cheese")
    @Table(name="cheeses")
    public class Customer implements Serializable {
         private Integer isCheddar;
    public Integer getIsCheddar() {
              return isCheddar;
         public void setIsCheddar(Integer isCheddar) {
              this.isCheddar= isCheddar;
    cheese.xhtml
    <h:selectOneRadio id="radioCheeseType" value="#{cheese.isCheddar}" required="no" converter="javax.faces.Integer">
                                       <f:selectItem id="item1" itemLabel="" itemValue="1" />
                                       <s:convertEntity />
    </h:selectOneRadio> Can someone please help me with this and tell me what's wrong. I do not see any error messages on my console so I have no idea what the problem is. Thanks a lot!Have you added <h:messages/> to the page?

  • Change of members from one dimension to another

    Hi
    We are currently facing the below situation.
    There are 10 dimensions in our ASO cube. Ouot of these ten diemensions, two of them are called Department and Products.
    After a major business change, Many of the products in the products dimension are going to get converted into Departments.
    Our problem is how do we maintain the historical data. That is how do we maintain the old stucture and the data associated with it. Our source system is People soft and a RDBMS.
    Our users would be representing the current year data and previous year data in the same report.
    Initially myself and my team had gone ahead testing a few proto type with ASO to ASO transparent partioning (We are using 11.1.2).
    It would be great , if people out there can share some insights, if they have expereinced such changes in their projects.
    Thanks

    Just learn to understand the difference in the box model between browsers and the so-called "Quirks Mode" behaviour of IE. Declaring the document type as (X)HTML Strict instead of Transitional will help a lot. This will let IE render in standards mode instead of quirks mode.
    Some useful links:
    Box model explanation: [http://www.quirksmode.org/css/box.html]
    IE quirks mode explained: [http://www.quirksmode.org/css/quirksmode.html]
    Doctype settings: [http://hsivonen.iki.fi/doctype]
    Having said that, this all has nothing to do with JSP nor JSTL. For problems occurred in the HTML/CSS output rather use a HTML/CSS forum. There are ones at webdeveloper.com and dynamicdrive.com.

  • Struts tomcat

    hy!
    my promblem doesn't exactly match JSP and JSTL, but my problem is in the beginning.
    i've installed NetBeans IDE 3.6 on my laptop, this includes tomcat.
    then i installed a separate tomcat server...i downloaded struts, searched for instructions how to start an example (included in the struts download archive) and followed instructions...first with the separate tomcat. the message i got when i entered the url was:
    "the connection was refused when attempting to contact localhost:8080"
    i restarted tomcat, but nothing happend...
    then i tried to include it to a netBeans project, but then several errors occured...
    i don't know what i'm doing wrong!
    my jdk version is "sdk1.4.2_04", classpath is set
    please give me help either to include struts to netBeans or to solve my problem with the separate tomcat...
    i'm open for all...
    i hope i could explain my problem in an understanding way
    tia
    ciao baer

    Hi Baer,
    do you get any errors when you start up tomcat? Have you tried going through a command prompt window and starting tomcat? What is the output?
    If you go to your <tomcat>/bin directory and run: catalina start you should see what the output of tomcat is. Also, is tomcat already started as a service? If so, you might want to disable that service.
    Best of luck,
    Nate

  • Problem with formatting date with JSTL ans swedish locale

    Hi,
    I have a strange problem with JSTL fmt:formatDate -tag and swedish locale.
    -------------------------- Extract from the JSP ------------------------------
    <jsp:useBean id="date" class="java.util.Date" />
    <fmt:formatDate value="${date}" pattern="dd.MM.yyyy HH:mm" />
    With en_US and fi_FI locales date is printed just the way I want: 29.04.2005 13:28 but in se_SE locale it is printed: Fri Apr 29 13:30:09 EEST 2005
    Has anyone had this problem before?
    Thanks in advance!

    Hi
    Try using "sv_SE" locale.

Maybe you are looking for