Taglib - i18n in jsp 2.4

Hi,
while migrating the code from websphere 5.1 to websphere 6.1,
am facing taglib problem.
in index.jsp, i have added
<%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n"%>
this cause error as
JSPG0047E: Unable to locate tag library for uri http://jakarta.apache.org/taglibs/i18n-1.0
Error code:500
even i tried with
<%@ taglib uri="http://jakarta.apache.org/taglibs/i18n" prefix="i18n" %>
am getting error
JSPG0047E: Unable to locate tag library for uri http://jakarta.apache.org/taglibs/i18n
Error code:500
please help me out...
what is the latest version of taglib - i18n
where can i find...
thanks in advance..
regards,
sana .g

If you need more information, don't know what I mean or whatever, please ask.
I realy need this but don't know how to do...

Similar Messages

  • Taglib problem in JSP

    I'm using JFreeChart to display the chart and I define the following taglib in my JSP.
    <%@ taglib uri="/WEB-INF/chartlib.tld" prefix="chartlib" %>
    It works in Tomcat and WebLogic, but not webtogo, got this exception.
    java.lang.NoClassDefFoundError: Illegal name: /WEB-INF/chartlib.tld
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at oracle.lite.web.ServletHandler$ServletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at oracle.jsp.parse.JspUtils.loadClassJDK(JspUtils.java:219)
         at oracle.jsp.parse.JspUtils.loadClass(JspUtils.java:209)
    I have to hardcode the app name in order to make it work. Is there any good solution?
    <%@ taglib uri="//webapp/WEB-INF/chartlib.tld" prefix="chartlib" %>
    And it just solve the exception problem, it actually cannot show the chart. Anyone use the jfreechart or has problem in using custom tag library?
    Matthew

    I put the chartlib.tld in /WEB-INF/ and here is my web.xml. The uri of the taglib directive in JSP is exactly the taglib-uri here for each case.
    <taglib>
    <taglib-uri>/WEB-INF/chartlib.tld</taglib-uri>
    <taglib-location>/WEB-INF/chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>chartlib-01.tld</taglib-uri>
    <taglib-location>/chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>chartlib-02.tld</taglib-uri>
    <taglib-location>/no_chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>chartlib-03.tld</taglib-uri>
    <taglib-location>/WEB-INF/chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>chartlib-04.tld</taglib-uri>
    <taglib-location>chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>chartlib-05.tld</taglib-uri>
    <taglib-location>no_chartlib.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB/chartlib.tld</taglib-uri>
    <taglib-location>/WEB-INF/chartlib.tld</taglib-location>
    </taglib>
    And I have modified the source code in JspDirectiveTaglib.java to output some debug message, where s1 is the value of uri in JSP, s3 is the value of taglib-location in web.xml. Here is the result. It tries to load s1 first. If it returns null, then it reads the tld file s2. It shows that the leading '/' represent the webapp dir. If it is relative (i.e. no '/'), it refers to the /WEB-INF as you can see the program automatically add it in the beginning. Finally, the message "loader MyChartTag" shows that it loads my tag class successfully.
    ----Case 1: this should be the normal/ideal case, but in fact it fails.
    ----It loads the tld file but it is not a class, so throws the error.
    JspDirectiveTaglib:uri(s1)=[WEB-INF/chartlib.tld]
    JspDirectiveTaglib:s3=[WEB-INF/chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[WEB-INF/chartlib.tld]
    log1: loader: /WEB-INF/chartlib.tld
    log9: JspServlet: unable to dispatch to requested page: java.lang.NoClassDefFoundError:
    Illegal name: /WEB-INF/chartlib.tld
    ----Case 2: try to read tld in root dir.
    JspDirectiveTaglib:uri(s1)=[chartlib-01.tld]
    JspDirectiveTaglib:s3=[chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[chartlib-01.tld]
    JspDirectiveTaglib:class1=null
    log9: JspServlet: unable to dispatch to requested page: oracle.jsp.parse.JspParseException:
    Error: java.io.FileNotFoundException:
    F:\webapp\chartlib.tld (???????????)
    ----Case 3: try to read a non-existing tld to see where is the root dir.
    JspDirectiveTaglib:uri(s1)=[chartlib-02.tld]
    JspDirectiveTaglib:s3=[no_chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[chartlib-02.tld]
    JspDirectiveTaglib:class1=null
    log9: JspServlet: unable to dispatch to requested page: oracle.jsp.parse.JspParseException:
    Error: java.io.FileNotFoundException:
    F:\webapp\no_chartlib.tld (???????????)
    ----Case 4: try to read tld in absolute dir.
    JspDirectiveTaglib:uri(s1)=[chartlib-03.tld]
    JspDirectiveTaglib:s3=[WEB-INF/chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[chartlib-03.tld]
    JspDirectiveTaglib:class1=null
    log1: loader: MyChartTag
    ----Case 5: try to read tld in relative dir, but the path is changed by the program.
    JspDirectiveTaglib:uri(s1)=[chartlib-04.tld]
    JspDirectiveTaglib:s3=[WEB-INF/chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[chartlib-04.tld]
    JspDirectiveTaglib:class1=null
    log1: loader: MyChartTag
    ----Case 6: try to read a non-existing tld in relative dir, but the path is changed by the program.
    JspDirectiveTaglib:uri(s1)=[chartlib-05.tld]
    JspDirectiveTaglib:s3=[WEB-INF/no_chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[chartlib-05.tld]
    JspDirectiveTaglib:class1=null
    log9: JspServlet: unable to dispatch to requested page: oracle.jsp.parse.JspParseException:
    Error: java.io.FileNotFoundException:
    F:\webapp\WEB-INF\no_chartlib.tld (???????????)
    ----Case 7: try to compare to case 1 if the uri specifies an invalid path.
    JspDirectiveTaglib:uri(s1)=[WEB/chartlib.tld]
    JspDirectiveTaglib:s3=[WEB-INF/chartlib.tld]
    JspDirectiveTaglib:loadClass(s1)=[WEB/chartlib.tld]
    JspDirectiveTaglib:class1=null
    log1: loader: MyChartTag

  • Error in using taglib uri in jsp

    When i write the following code in my jsp to use the tags, i got the error -
    JSP Parsing Error:The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application     
    And when i used the tld (html_basic.tld & jsf_core.tld), it gave me the error
    JSP Parsing Error:Failed to load or instantiate TagLibraryValidator class: com.sun.faces.taglib.html_basic.HtmlBasicValidator

    you can use
    <taglib>
    <taglib-uri>/WEB-INF/html-basic.tld</taglib-uri>
    <taglib-location>
    /WEB-INF/html-basic.tld
    </taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/jsf-core.tld</taglib-uri>
    <taglib-location>
    /WEB-INF/jsf-core.tld
    </taglib-location>
    </taglib>
    in your web.xml

  • Taglib repeating in jsp page in TOMCAT. (Can this be Tag pool issue? )

    Hi,
    We have an application and it is running fine on one servlet container "ServletExec". We are migrating our application to Tomcat and some weird things happenned.
    In one of my JSP pages say page " A ", I have included another small JSP say " B "which just created a table with one row and various columns.
    Now the columns are created in a taglib. And I am using that taglib inside that page " B".
    Now this is working fine in ServletExec.
    But in tomcat when I refersh page A or come to this page dfrom some other page, there are multiple instance of tables from page B are rendered.
    SO every time I refresh a new entry added to already existing table.
    Can any one please help?
    I looked in some documents and found that this may be because of some Tag pooling in Tomcat newer versions. Is that right?
    If yes how can I remove this tag pooling in my taglib java class?
    Any help is highly appreciated.
    Thanks

    Hi
    try disabling the tag pooling and check the page.
    To disable the tag pooling in Tomcat
    make enablePooling = false for the jsp servlet declaration in
    $TOMCAT_HOME/conf/web.xml
    Regards

  • Custom taglib and inexplicable jsp compilation issue

    Can someone explain what could possibly be happening here? I have been working on this for two days to no avail.
    With the following configuration, my jsp behaves as I expect it to on Tomcat, but fails to compile both for Jetty and the Maven2 jspc plugin
    deepfij.tld
    <taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee [3]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
    <tlib-version>1.0</tlib-version>
    <short-name>deepfij</short-name>
    <uri>com.fijimf.deepfij</uri>
    <tag>
    <name>menuItem</name>
    <tag-class>com.fijimf.deepfij.web.tag.MenuItemTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
    <name>item</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    menubar.jsp
    <%@ taglib prefix="df" uri="/WEB-INF/tlds/deepfij.tld"%>
    <c:forEach var="page" items="${menuRootPages}">
    <df:menuItem item="${page}" />  
    </c:forEach>
    MenuItemTag.java
    package com.fijimf.deepfij.web.tag;
    .With the error: com.fijimf.deepfij.web.tag cannot be resolved to a type.
    BUT*, if I move MenuItemTag into the package com.fijimf.web, and correspondingly change the .tld, everything works as expected.
    Is this a bug, or is there a constraint in taglib packages I don't know about?
    Any guidance would be great, because I'd like to put classes where I want them.

    This is most likely a bug on the server. The JSP formatted Tag Files usually have a .tag extension on them ( [see tutorial|http://java.sun.com/javaee/5/docs/tutorial/doc/bnama.html] ). The server is probably looking at yyy.xxx.tag and trying to use it as if it was a Tag File named xxx.tag, rather than a package.

  • How to get value of attribute in taglib class in jsp?

    Dear all :
    I have a use a taglib (dbcon) which is about connecting and operating to dbatabase, but how to get the (Result) value in jsp ?

    is this a selfwritten taglib?
    or an existing one, if it's an existing one check the doc.

  • Error in Parsing the Taglib portion of JSP

    Weblogic failed to parse the JSP file. In the JSP file, I use Tag libraries.
              The setter method in the Tag class accepts the input as 'java.lang.Object'.
              If I pass the attribute value as string as given below in the error
              attached, the JSP compiler complains that it can not do the conversion.
              But if I pass the attribute as <%="true"%>, which is java String class, then
              it works great or if I accept the data in the setter method as
              java.lang.String, it works good. The same page works fine with 'JRun' and
              'Tomcat' and I think I am coding to the JAVA standards.
              If anyone knows the workaround or fix for the problem, please let me know.
              Error Message/Stack Trace
              =====================
              /test/PhraseMaintenance.jsp(39): for tag 'input', property 'readonly' of tag
              handler class 'com.faf.fwk.jsp.tags.form.InputTag', the property value must
              be a runtime expression "<%=...%>", since we cannot do an automatic
              convertion from "true" to type 'java.lang.Object'
              probably occurred due to an error in /test/PhraseMaintenance.jsp line 39:
              <faf:input readonly="true" style="HEIGHT: 19px; WIDTH: 75px" name
              ="xml:PhraseGrp.ObjectCd"/>
              Thanks
              Guru.
              

              Did you find out solution to this problem and know what causes it. I am getting
              the same thing and found your post with problem but don't see any replies to it
              on the newsgroup. Can you please help me ?
              Sameer.
              [email protected]
              "Gurumoorthy Ramasamy" <[email protected]> wrote:
              >Weblogic failed to parse the JSP file. In the JSP file, I use Tag libraries.
              >The setter method in the Tag class accepts the input as 'java.lang.Object'.
              >If I pass the attribute value as string as given below in the error
              >attached, the JSP compiler complains that it can not do the conversion.
              >
              >But if I pass the attribute as <%="true"%>, which is java String class,
              >then
              >it works great or if I accept the data in the setter method as
              >java.lang.String, it works good. The same page works fine with 'JRun'
              >and
              >'Tomcat' and I think I am coding to the JAVA standards.
              >
              >If anyone knows the workaround or fix for the problem, please let me
              >know.
              >
              >Error Message/Stack Trace
              >=====================
              >/test/PhraseMaintenance.jsp(39): for tag 'input', property 'readonly'
              >of tag
              >handler class 'com.faf.fwk.jsp.tags.form.InputTag', the property value
              >must
              >be a runtime expression "<%=...%>", since we cannot do an automatic
              >convertion from "true" to type 'java.lang.Object'
              >probably occurred due to an error in /test/PhraseMaintenance.jsp line
              >39:
              ><faf:input readonly="true" style="HEIGHT: 19px; WIDTH: 75px" name
              >="xml:PhraseGrp.ObjectCd"/>
              >
              >
              >Thanks
              >Guru.
              >
              >
              >
              

  • I18n jsp taglib, hot update

    Hi
    I'm investigating use of the jsp taglib i18n that comes with Personalization
    server.
    Is there any way of updating the .properties files so that the changes come
    thru reliably without restarting the server?
    A kind of reloadCheckSecs=0 like for jsp files would be good.
    Does such a functionality exist?
    Has anyone implemented such a functionality?
    Alternatively, is the code for the taglib available?
    Regards
    Alex

    If you need more information, don't know what I mean or whatever, please ask.
    I realy need this but don't know how to do...

  • Eclipse and Apache I18N Taglib - how to fix "bundle cannot be resolved" msg

    I edit my jsp pages in Eclipse 3.1.2
    And I use Apache I18N Taglib.
    Everythink works fine, but I get annoying messages in problem list that "bundle cannot be resolved"
    a piece jsp code
    <%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n"%>
    <i18n:bundle baseName="my.test" id="bundle"/>
    <%     
    if (isFoo) {
         buttonValue = bundle.getString("AddButtonText");
    } else {
         buttonValue = bundle.getString("UpdateButtonText");
    %>This code works fine, but Eclipse think that code has errors.
    also I want do demonstate taglib config in web.xml
         <jsp-config>
              <taglib>
                   <taglib-uri>http://jakarta.apache.org/taglibs/i18n-1.0</taglib-uri>
                   <taglib-location>/WEB-INF/i18n.tld</taglib-location>
              </taglib>
         </jsp-config>

    Well, putting all that Java code into a JSP was a bad idea in the first place, just on general design principles. But you've done it in such a way that the result of compiling the JSP is malformed Java code. Frankly I would just throw it away and put the Java code into a servlet or some other Java class, where it belongs.
    But if you're really working in a place where nobody has learned anything since 2003, and you're forced to support that old junk, then I would point out that the error occurs before the place which generates this line:
    import java.util.*;You only need to look at two of the thousand lines of code you posted.

  • Jsp taglibs in include files not detected, throws errors, no code insight

    I have a jsp which is included in all the other jsp. it looks something like this
    taglibs.jsp
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    test.jsp
    <%@ include file="/jsp/menu/taglibs.jsp"%>
    <html>
         <head>
              <title>Tours</title>
         </head>
         <body>
    <form:form commandName="testCommand">
                   <form:hidden path="tour.firstname" id="tour.firstname" />
    and so on.
    I am having 2 problems
    1. the jsp editor show errors all over the place saying
    element path not expected
    element commandName not expected etc.
    2. no code insights.
    but if i include the taglib def in test.jsp it dosn't show any error and also provides code insights. but seldom do people include all taglibs in all jsps.
    is there a way for Jdeveloper to show code insights in jsp pages which includes a jsp or like xml schemas could be added at some place(tools-pref-xml schemas) and when used anywhere, would provide code insights.

    am not sure, try with this
    <jsp:include   .../>

  • JSP custom taglib

    Hi, I've a big problem:
    I tried to realize my first custom taglib for converting a .jasper file (a precompilated formatted meta-document) into a PDF file but I poorly failed... :(
    Unfortunatly, although the code run correctly into a main class into a stand alone sample application, the same code (opportunely adapted) doesen't work correctly if used by a JSP with its relative custom tag library.
    The error message is:
    javax.servlet.ServletException: Error loading expression class : report_semplice
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:872)
         org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:114)
         org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:792)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:790)
         org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:82)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    root cause
    javax.servlet.jsp.JspTagException: Error loading expression class : report_semplice
         com.tag.GeneratePDF.doEndTag(GeneratePDF.java:72)
         org.apache.jsp.reportPDF_jsp._jspx_meth_JR_GeneratePDF_0(reportPDF_jsp.java:99)
         org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:71)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    The code of the taglib class is:
    package com.tag;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.export.*;
    import net.sf.jasperreports.engine.util.*;
    import net.sf.jasperreports.view.*;
    import java.sql.*;
    import org.apache.commons.logging.*;
    import java.io.*;
    import java.util.*;
    public class GeneratePDF extends TagSupport
      private String sourceFileName = "C:\\default.jasper";
      private String destinationFileName = "C:\\default.pdf";
      public void setSourceFileName(String sourceFileName)
        this.sourceFileName = sourceFileName;
      public void setDestinationFileName(String destinationFileName)
        this.destinationFileName = destinationFileName;
      public int doStartTag()
          return SKIP_BODY;
      public int doEndTag() throws JspTagException
        try
            //Passaggio parametri da passare al jasper.
            Map parameters = new HashMap();
            parameters.put("param1", new Integer(1));
            //Preparazione del file da stampare (in questa fase si esegue la query e si inseriscono
            //i valori estratti dalla query)
            JasperPrint jasperPrint=JasperFillManager.fillReport(sourceFileName, parameters, getConnection());
            // a schermo
            // JasperViewer.viewReport(jasperPrint);
           // test
           //pageContext.getOut().println("Destination File:" + destinationFileName);       
        //Creazione del PDF
            JasperExportManager.exportReportToPdfFile(jasperPrint, destinationFileName);
        //    System.exit(0);
           catch(Exception e)
                { throw new JspTagException(e.getMessage());
        return EVAL_PAGE;
    /**Metodo per creare la connessione al DB*/
    private static Connection getConnection() throws ClassNotFoundException, SQLException {
    //Change these settings according to your local configuration
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String connectString = "jdbc:odbc:gecoware";
    String user = "admin";
    String password = "password";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(connectString, user, password);
    return conn;
    The .TLD file is:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
        <tlibversion>1.0</tlibversion>
        <jspversion>1.1</jspversion>
        <shortname>JR</shortname>
        <uri>ReportTags</uri>
        <info>Tag library per la generazione di report a partire da files .jasper</info>
        <tag>
            <name>GeneratePDF</name>
            <tagclass>com.tag.GeneratePDF</tagclass>
            <bodycontent>empty</bodycontent>
            <info>Tag per la generazione di PDF</info>
            <attribute>
              <name>sourceFileName</name>
            </attribute>
            <attribute>
              <name>destinationFileName</name>
            </attribute>
        </tag>
    </taglib>
    And the JSP code is:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="ReportTags" prefix="JR" %>
    <html>
    <head>
    <title>GeneratePDF</title>
    </head>
    <body>
    <JR:GeneratePDF sourceFileName="c:\\report_semplice.jasper" destinationFileName="c:\\report1.pdf"/>
    </body>
    </html>
    I hope that someone could help me...
    Thank you,
    AleX

    Hi,
              I think that the container can not identify the tag's ,what you are trying to use.
              As per the j2ee specification , we need to follow the procedure to use the taglib as given below
              Procedure for using a Tag Lib :
              â€¢ Copy tag lib jar files under WEB-INF/lib ( if tag handler supplied as classes without package a jar file then we need to copy the classes under WEB_INF/classes.
              â€¢ Copy the tld files files under WEB-INF or create a directory under WEB-INF and copy tld files under this directory.
              â€¢ We need to give the information about the tag libraries in web.xml by adding the following lines to it as,
              <taglib>
              <taglib-uri>http://www.inet.com/taglibs/bodytags</taglib-uri>
              <taglib-location>/WEB-INF/tlib/tlib1.tld </taglib-location>
              </taglib>
              To use tags in jsp file we need to add taglib directive as ,
              <%@ taglib uri="http://www.inet.com/taglibs/samptags" prefix=“abc"%>
              Every tag can support zero or more number of attributes and a tag may or may not support body content.
              weblogic server try to parse the .tld file whenever the tags are encountered in jsp files.
              As per the .tld file the container identify the attributes of the tags which were defined in .tld file.
              ------ Anilkumar kari

  • Taglibs+jsp+customtags

    hello how to use taglibs and custom tags in jsp..
    what is diffrence between these two..
    kevin

    Custom taglibs or just taglibs are Java classes written to to a specification that enable you as a Java developer to create new "tags" that a web designer can then use in a JSP file. The tag represents a simplified abstraction that's easy for the web designer to work and lessens the burden on them to know "programming", and at the same time it encourages Java developers to do what they do best which is write code.
    To use a tag library (taglib) in a JSP file, you must first declare it using the taglib syntax:
    <%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0" prefix="dt" %>
    where the uri is just a unique identifier for the tag library and prefix defines how tags in the page must appear.
    For example, using the declaration above and assuming there is a format tag class defined, I'd use it like:
    <dt:format>2/8/75 10:30:33</dt:format>
    when the JSP containing this is compiled and run, control will be handed over to the class that is defined to handled <format> tags.
    Check out http://java.sun.com/products/jsp/taglibraries.html
    for more information.

  • Blocking thread: i18n:localize tag

    Hi, my server was hung (wlp816). Took the thread dump. 15 threads are in blocking state. All of them got locked at the same line which is the <i18n:localize> tag line. Is there any special about this tag?
    Thanks
    "ExecuteThread: '69' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x043914e0 nid=0x67a3 runnable [0x2977d000..0x2977fc28]     
    at java.util.HashMap.get(HashMap.java:325)     
    at com.bea.p13n.taglib.i18n.JspMessageBundle.findInCache(JspMessageBundle.java:305)     
    at com.bea.p13n.taglib.i18n.JspMessageBundle.getBundle(JspMessageBundle.java:246)     
    at com.bea.p13n.taglib.i18n.LocalizeTag.determineLanguage(LocalizeTag.java:681)     
    at com.bea.p13n.taglib.i18n.LocalizeTag.doStartTag(LocalizeTag.java:585)
    at jsp_servlet._portlets._search._jspService(search.jsp:17)     
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)     
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)     
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)     
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)     
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)     
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)     
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)     
    at com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilter.java:250)     
    - locked <0x91c6bca0>
    .......

    Can you be a bit more explicit about "doesnot seem
    to be working."
    Is the page throwing an error?
    Is it not finding your resource file?
    Is it not printing a string from it correctly?
    This JSTL code should iterate through all the keys in
    the loaded resource bundle and show you exactly what
    is in it.
    <c:forEach var="prop"
    items="${templatebundle.resourceBundle.keys}">
    <c:out value="${prop}"/>
    </c:forEach>Cheers,
    evnafetswell what is happening is that the the properties file has some properties defined aspage-message-logged-in=Logged in as
    page-label-login=Log In
    page-label-logout=Log Outand in the jsp I am accessing them as follows
    <fmt:message key="page-label-login" bundle="${templatesbundle}"/>but what I end up seeing in the jsp is the follows
    ???page-label-logout???

  • How to display arraylist in jsp

    I try to display arrayList
    past from servlet
    my code looks like
    <%@ include file="/expires.jsp" %>
    <%@ page language="java" import="java.sql.*" contentType="text/html;charset=UTF-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CEDARS</title>
    </head>
    <body>
    <% String allFound = (String) session.getAttribute("allFound");
    hallA mydata= new hallA();
        for(int j=0; j<allFound.length(); j++){
                          mydata=(hallA)allFound.get(j);  %>
                     <tr>          
                     <td>mydata.getUniversityN()</td>
                      <td> mydata.getName()</td>
                      <td>mydata.getRnumber()</td>
                      <td>mydata.getCurricumlum()</td>
                      <td> mydata.getGender()</td>
                      <td>mydata.getYear()</td>
                      <td>mydata.getMobilNo()</td>
                      <td>mydata.getEmail()</td>
                      <td> mydata.getFinalYear()</td>
                      <td> mydata.getPeriodOne()</td>
                      <td> mydata.getPeriodTwo()</td>           
                    </tr>          
           <%}%>  
    </body>
    </html> and I got the error like
    Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 13 in the jsp file: /showResultA.jsp
    hallA cannot be resolved to a type
    10:
    11:  
    12: <% String allFound = (String) session.getAttribute("allFound");
    13: hallA mydata= new hallA();
    14:     for(int j=0; j<allFound.length(); j++){
    15:                       mydata=(hallA)allFound.get(j);  %>
    16:                  <tr>          
    An error occurred at line: 13 in the jsp file: /showResultA.jsp
    hallA cannot be resolved to a type
    10:
    11:  
    12: <% String allFound = (String) session.getAttribute("allFound");
    13: hallA mydata= new hallA();
    14:     for(int j=0; j<allFound.length(); j++){
    15:                       mydata=(hallA)allFound.get(j);  %>
    16:                  <tr>          
    An error occurred at line: 15 in the jsp file: /showResultA.jsp
    hallA cannot be resolved to a type
    12: <% String allFound = (String) session.getAttribute("allFound");
    13: hallA mydata= new hallA();
    14:     for(int j=0; j<allFound.length(); j++){
    15:                       mydata=(hallA)allFound.get(j);  %>
    16:                  <tr>          
    17:                  <td>mydata.getUniversityN()</td>
    18:                   <td> mydata.getName()</td>
    An error occurred at line: 15 in the jsp file: /showResultA.jsp
    The method get(int) is undefined for the type String
    12: <% String allFound = (String) session.getAttribute("allFound");
    13: hallA mydata= new hallA();
    14:     for(int j=0; j<allFound.length(); j++){
    15:                       mydata=(hallA)allFound.get(j);  %>
    16:                  <tr>          
    17:                  <td>mydata.getUniversityN()</td>
    18:                   <td> mydata.getName()</td>
    Stacktrace:
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)I don't know how to fix it
    thnak you

    hi evnafets,
    thnak you
    for the reply
    I presume you have a session.setAttribute() call in your servlet? yes so what is the mistake I made?1. I put both standard.jar and jstl.jar under E:\apache-tomcat-6.0.10\lib
    2. I copy the tld into E:\apache-tomcat-6.0.10\webapps\Hall\WEB-INF\
    3. I change my xml to<?xml version="1.0" encoding="UTF-8"?>
    <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">
        <session-config>
            <session-timeout>10</session-timeout>
        </session-config>
             <welcome-file-list>
              <welcome-file>Hall1.jsp</welcome-file>
         </welcome-file-list>
        <servlet>
            <servlet-name>submit</servlet-name>
            <servlet-class>submit</servlet-class>
        </servlet>   
        <servlet-mapping>
            <servlet-name>submit</servlet-name>
            <url-pattern>/servlet/submit</url-pattern>
        </servlet-mapping> 
    <taglib>
        <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
        <taglib-location>/WEB-INF/fmt.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
        <taglib-location>/WEB-INF/c.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
        <taglib-location>/WEB-INF/sql.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
        <taglib-location>/WEB-INF/x.tld</taglib-location>
      </taglib>
    </web-app>jsp<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ include file="/expires.jsp" %>
    <%@ page import="java.util.*"%>
    <%@ page import="cedars.hallA"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CEDARS</title>
    </head>
    <body>
    <% ArrayList allFound = (ArrayList) session.getAttribute("allFound"); %>
    hallA myData= new hallA();
    <c:forEach var="myData" values="${allFound}">
    <table>
      <tr>
        <td>${myData.name}"</td>
        <td><c:out value="${myData.name}"/></td>
        <td><c:out value="${myData.currculum}"/></td>
    </tr>
    </c:forEach>
    </table>
    </body>
    </html>
    *error is ���d�I: Servlet.service() for servlet jsp threw exception*
    *org.apache.jasper.JasperException: /showResultA.jsp(13,0) Attribute values invalid for tag forEach according to TLD*     at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1198)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at displayhallF.doPost(displayhallF.java:166)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)
         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         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:228)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         at java.lang.Thread.run(Thread.java:619)
    {code}
    thank you                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Jsp tag libraries

    hi All,
    I am receiving an error when i come to start a jsp page, it returns null pointer exception. so when I checked it is coming from the JSP tag Libraries. instead of the jsp libraries there is a null pointer exception . so any clue how to fix that ?
    thanks
    Amgad

    Yes, marika, download the Jakarta JSTL implementation, unzip it, and put it everything in its /lib directory in your WEB-INF/lib. Then you can refer to the taglib in your JSPs like this:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>That's all you need to do. No <taglib> in your web.xml or anything else. - MOD

Maybe you are looking for

  • Error. Javamail. No object bound to name... Sun Java App. Server 9.0 updt 1

    Hello, I get this exception: No object bound to name java:comp/env/mail/SendSession I am trying to build automatic mail sending in my application I have configured my server with the next information and this code: -Error, exception: No object bound

  • How to configure HTTP Proxy

    I want XE to validate DTD references made in XML schema definitions. Metalink note 262708.1 refers to setting HTTP_PROXY environment variable/Registry value to do this through corporate firewalls. Can I set this in XE? If so, how is it done on Window

  • Safari 4.0.2 initial web page takes ages to load ...

    Hi, When I start Safari, the browser loads up fine to a blank page. I'll select one of my bookmarks or type in a web address in the address bar, press return and wait absolutely ages for the page to load. Any subsequent pages will load at normal spee

  • Opration mapping issuse

    when test the configuration test i am getting this error. plz guide me. MS

  • Cannot Connect Airport Express 802.11n to WEP 64 Bit Wireless Network

    I am currently use a Netgear MR814 who's only built in security is WEP 64bit. I am attempting to connect my Airport Express 802.11n to it and I see the WEP 40 bit option and use that and it puts in my password for the wireless as 0xPASSWORD. However