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

Similar Messages

  • JSP, Tag Libraries, Tomcat 4.1

    Due to an internal decision to place all content within certain categories: for example, we would like all our JSP pages to be in one directory, our TLD files to be in one directory, our images to be in one directory, etc. I would like to be able to set up two Tomcat Contexts (sites). One for /jsp and one for /tld. Is it possible to load the tld and tag class handler in one context and the jsp in another context and call the tag handler even though they are in separate sites? The first reaction someone might have is to just place everything in separate directories under the same context. Well, we do not want to do this because we do not want to use relative URLs. Our testing systems are Window 2000 so it is not a big deal. But our production server is OPENVMS. We want to use aliases for everything. /jsp for JSP pages. /tld for tag libraries, etc. Any thoughts?
    Thank you.

    Yes, this is a follow-up question to my initial question. However, I was trying to take a different approach after reading the inital comments and doing lots and lots of stupid little tests.
    I have tried all three methods of using the mappings that you have suggested. And in every case, I cannot get the JSP page to recognize the location of the TLD from the URI unless I use a context in Tomcat or a relative URL for the URI declaration in the JSP page. So I must be doing something wrong. I am going to post what information is not business sensitive and see if you can find an error.
    However, with that being said. We have a specific alias/directory structure we must maintain on the OPEN VMS system. In order to do so, so we can maintain a programmer and a "live" environment we must be able to use these aliases for all our file types. Don't get me wrong, we can use these alias' within the same context of Tomcat, but we must make sure that we can still access or JSP, TLD, and servlets using some sort of alias and NOT using relative URLs. All the dynamic stuff in Tomcat while trying to use Apache for the static content. On OPENVMS, there are things called logicals which can basically be set up as an alias. The logical can point to a specific value, a directory, a group of directories, or even a specific file name or command procedure or anything else you can logically use it for. We have to use these logicals in order to set up our site. These logicals are part of the system security of OPENVMS and this helps us determine which enviroment we need to use for which user.
    Hope this gives a bit more informed information.
    Currently, the tld and .class file are packaged into a webMenuTag.jar file in the "vsjsp" site.
    There are no references to the TLD or Tag Library in the web.xml file. So here is the tld file and also the snippet of the jsp file. The class file is called webMenuTagHandler.class.
    Thank you.
    TLD:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>webMenu</short-name>
    <uri>webMenuTag</uri>
    <description>
    Tag library to print the menu on WWW site pages
    </description>
    <tag>
    <name>webMenuTagHandler</name>
    <tag-class>com.xxxxx.webMenuTagHandler</tag-class>
    <description>Create menu and framework for web pages.</description>
    <attribute>
         <name>menuStyle</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
         <name>docTitle</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
         <name>pageHeading</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
         <name>navBarName</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
         <name>navBarLocation</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
         <name>htmLocation</name>
         <required>true</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    JSP:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="com.xxxxx.*,java.io.*,java.util.*,javax.servlet.*,javax.servlet.http.*,javax.servlet.jsp.*,org.apache.jasper.runtime.*"%>
    <%@ taglib uri="webMenuTag" prefix="webMenu" %>
    <html>
    <webMenu:webMenuTagHandler docTitle="Test Page" htmLocation="top" navBarName="HOME"/>
    ... content...
    </html>

  • JSP Tag Libraries - Useful or not?

    Hello all,
    How popular are tag libraries? Are companies incorporating custom tag libraries? I just want to know if its worth learning in-depth.
    Thnx

    I know that taglibs can be very useful in at least two situations:
    1) For common HTML folk (ie: webpage designers, not software developers) taglibs can offer impressive functionality in comprehensive, simple tags. Hiding Java complexity from these people is a good thing...
    2) For sophisticated JSP pages it can be very useful to encapsulate repetitive and code-intensive functionality in tags as well, because this makes maintenance of your pages simpler (thus cheaper, since you spend less time on it).

  • Help with JSP Tag Libraries

    Could someone please help me with the setup process of tag libraries? I've looked on the Internet and found some instructions, but they are all for Tomcat. I'm using Jserv, and I'm not sure how to setup my environment to work with custom/tag libraries. Could someone help me by giving me some instructions or sending me to an article that could help me?
    Thanks in advance!
    -PV

    Hi pvongboupha
    The best source for getting to know how to set up tag libraries is the JSP specification. You can download this from :
    http://java.sun.com/products/jsp/download.html
    See the chapter on Tag libraries. Any J2EE compliant server will conform to these rules.
    You can also see a chapter from Core Servlets & JSP by Marty Hall. This chapter is on Tag Libraries
    http://developer.java.sun.com/developer/Books/javaserverpages/cservletsjsp/
    Keep me posted on your progress.
    Good Luck!
    Eshwar R
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • JSP tag libraries tutorials

    Does any of you people, knows the file made by Sun that its a PDF file, the title its JSP TAG TUTORIAL. Would you please send me the URL?

    http://java.sun.com/products/jsp/tutorial/TagLibraries.pdf

  • JSP Tag Libraries: Update URI

    I'm following the directions at the following link:
    http://help.infragistics.com/Help/NetAdvantage/JSF/2006.2/HTML/JSF_Oracle_JDeveloper.html
    I am unable to update the URI field, it is read only. Anyone know a way around this?
    thanks,
    tim

    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

  • uix:table using JSP tags

    I cannot figure out how to bind a dataobject list using the <uix:table> tag. Could someone please help me with this.
    Jeff Driskell

    Do you mean that you already have a DataObjectList which you want to set as the <uix:table>'s tableData attribute? If so, I believe you have two choices:
    1. You can use a scriptable variable for the table and call setTableData() explicitly on the TableBean.
    2. You can use a scriptable variable for a dataScope and register a DataProvider which provides access to your DataObjectList. Then, you can use the tableDataBinding attribute of the <uix:table> tag to bind to your DataProvider.
    Examples of both of these techniques are provided in the "Scriptable variables" section of the "UIX JSP Tag Libraries" section of the UIX Developer's Guide.

  • How to render custom JSP tags

    We have our own custom JSP tag libraries (some of them extend the Struts tags, but many do not) and want those to render correctly in the design view.
    Is that supported by NitroX Struts, or will it only work with built-in Struts tags?
    If it is supported, how does one get NitroX to run the custom tags?

    It is possible to customize many aspects of the rendering of a custom tag. This is done using a combination of an M7 specific metadata, and standard css rules.
    For example, you can change the label, icon and border of a custom tag by doing the following steps:
    1) Create a folder named "nitrox" where your tld file is located. For example if you have "/WEB-INF/app.tld" then create a
    folder "/WEB-INF/nitrox/".
    2) In the nitrox folder created above, create a file named "app.tlei" (for Tag Library Extra Information). The file name used here should match the name of the tld file. In this case "app".
    3) Paste the following content in the app.tlei file:
    <taglib-extrainfo>
    <css-uri>app.css</css-uri> <!-- an optional css file relative to this tlei file -->
    <tag name="myTag">
    <display-name>My Tag</display-name> <!-- The name displayed in the Tag Libraries view -->
    <rendering-label>{tag-name} ({name})</rendering-label> <!-- This will display the value of the "name" attribute in addition to the tag name in the tag view in the JSP design editor. -->
    <small-icon>images/myTag.gif</small-icon> <!-- The image uri relative to this tlei file. This is used in the Tag Libraries view and in the JSP design editor.-->
    </tag>
    </taglib-extrainfo>
    All customization tags are optional.
    4) Create the css file referenced from the tlei file above (in this example app.css in the same directory containing the tlei file).
    5) Paste the following content in the app.css file:
    myTag {border: 1 solid red; display: "inline"}
    This will render the tag as inline (i.e as one graphical object) even if the tag has nested content.
    In addition, you can use any standard css style property.
    You can customize other tags in the same fashion.
    If a custom tag inherits from a Struts tag, then the tag can inherit the full built-in tag customization as shown in the following example:
    Suppose you have a tag named "myText" that extends the Struts html:text form field tag. To inherit the NitroX html:text customization you follow the steps:
    1) insert the following in the tlei file described above:
    <tag name="myText">
    <inherit taglib-uid="http://jakarta.apache.org/struts/tags-html" tag-name="text" />
    </tag>
    2) Insert the following css rule in the css file referenced from the tlei file:
    myText {m7-inherit: "input-text"; display: inline}
    This will inherit the built-in css style for form text fields.
    Likewise, you can inherit the other Struts tags css styles by using the following rules:
    myPassword {m7-inherit: "input-password"; display: inline}
    myCancel {m7-inherit: "input-submit"; display: inline}
    myCheckbox {m7-inherit: "input-checkbox"; display: inline}
    myRadio {m7-inherit: "input-radio"; display: inline}
    mySelect {m7-inherit: "select"; display: inline}
    myTextarea {m7-inherit: "textarea"; display: inline}
    3) The inherited tag library file (in this example the struts-html.tld), must also be present under the WEB-INF directory.
    M7 Support

  • New JSP Tags in WLS 7

              Hi!
              Can someone summarize for me additional custom WebLogic JSP tags available in
              WLS 7, compared to WLS 6.1 or changes in functionality of existing custom WebLogic
              JSP tags from WLS 6.1 to WLS 7.
              Thanks,
              Rahul.
              

              I am afraid not. Becuase if you don't buy their product, they even don't let you use their classes of that product.
              I tried to use a class inside CommerceServer, but they asked for the license all the time.
              My suggestion is you can get some idea from that, but don't use it directly except you have their license.
              "KhurramZ" <[email protected]> wrote:
              >Hi all,
              >Am experimenting with WL server 5.1 (eval version) and ejbs,jsp's.
              >Also came across documentation of JSP Tag libraries of WL personalization
              >server (in BEA website). (like <pz:..> , <cm:..>, <es:...>)
              >
              >Can I use those WLPS jsp tag libs in WLserver? Though I havent got WLPS ,and
              >in fact will not be using it in future.
              >
              >Thanx in advance
              >Khurram Z
              >[email protected]
              >
              >
              

  • Where is 'Tag Libraries Reference'?

    I'm working my way through the JSP Primer for OC4J. Therein I find references to two documents - "Oracle 9iAS Containers for J2EE JSP Tag Libraries and Utilities Reference" and "Oracle9iAS Containers for J2EE Support for JavaServer Pages Reference".
    I can't, however, find these documents anywhere on Metalink, OTN, or oracle.com. Can anyone point me to a URL where these can be found?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Steve Button ([email protected]):
    gday Barry -
    I'll check into this for you. The various doc pieces we have for OC4J are all in the process of being being created and we're pushing completed pieces out whenever they are ready.
    This might be one of those situation where we've 'forward declared' the docs you mentioned but they're not completed yet.
    I'll post back here when I get an answer for you.
    cheers!
    -steve-<HR></BLOCKQUOTE>
    Barry,
    The docs you mentioned are in the final phase of review. They wiil be posted soon. thanks
    -Prasad

  • Standard JSP Tag Library ---- beginner

    Hi
    i'm using Jdeveloper 9.0.3 to develop my JSP pages.
    i'm a begiiner in JSP world & I want to use jsp tag libraries.
    i've tried this :
    <%@taglib uri="/lib/core.jar" prefix="c" %>
    and there were 2 errors :
    Error(5): java.io.FileNotFoundException: META-INF/taglib.tld not found in the jar file
    Error(5): Unable to load taghandler class: /lib/core.jar
    what is (taglib.tld) and how could i found it ? -- error 1
    how to make it possible to enable to load the taghandler class:/lib/core.jar ? -- error 2
    thank you

    <%@taglib uri="/lib/core.jar" prefix="c" %>
    Wrong.
    The URI has to match the value in the TLD, which you
    will find inside the standard.jar in the Jakarta
    release.
    Which JSTL are you using? The URI for the 1.0 JSTL
    standard, which is valid for servlet spec 2.3 and JSP
    spec 1.2, is http://java.sun.com/jstl/core for the
    core library.
    The URI for the 1.1 JSTL standard, which is valid for
    servlet spec 2.4 and JSP spec 1.3, is
    http://java.sun.com/jsp/jstl/core.
    Put the standard.jar and jstl.jar in your WEB-INF/lib
    directory and use the appropriate URI in your JSPs.
    Don't have a <taglib> entry in your web.xml. Tomcat
    will find the TLD in the JAR file by automatic
    discovery if you're using Tomcat 4.1 or later.
    %I dont know what is the TLD and how to use or download it ... please explaine priefly
    and please note that i'm using JDevloper 9i (9.0.3) not Tomcat
    Thank you

  • Install JSP Tag Library

    which library is missing now... i haven't seen this error before... i have included all the libraries: ADF,JSTL in the JSP Tag Libraries (in the project properties)... any suggestion pls?>

    i resolve the problem... i restarted the jdeveloper and the i dont have that error anymore.. maybe my jdeveloper is tired and need some rest :) thanks anyway :)

  • How to handle external tag-libraries in JSPs using Oracle Stellent?

    I have already started the execution of JSP engine in Oracle Stellent, and also could run the sample Tomcat web-application and basic JSPs in Oracle UCM. What I need to do, is to customize my JSP to be able to show/hide some content using Oracle Stellent.
    I have a JSP, from web application, which is using some some tag-libraries from spring, etc.
    +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>+
    +<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>+
    +<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>+
    +<%@ taglib prefix="security"+
    uri="http://www.springframework.org/security/tags"%>
    +<%@taglib uri="http://www.springframework.org/tags" prefix="s"%>+
    +<%@ page import = "idcserver.*" %>+
    +<jsp:useBean id="sb" class="idcserver.ServerBean" />+
    +<%+
    sb.init(request);
    ....and so on
    I have checked in the above file, and when trying to preview in Oracle UCM, I get the following error:
    Content Server Request Failed
    +!csStellentTomcatErrorWhileProcessing,/idca/groups/jsp/documents/pix/11.jspThe absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application:org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application+
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(Unknown Source)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(Unknown Source)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(Unknown Source)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(Unknown Source)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(Unknown Source)
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(Unknown Source)
    at org.apache.jasper.compiler.Parser.parseDirective(Unknown Source)
    at org.apache.jasper.compiler.Parser.parseElements(Unknown Source)
    at org.apache.jasper.compiler.Parser.parse(Unknown Source)
    at org.apache.jasper.compiler.ParserController.doParse(Unknown Source)
    at org.apache.jasper.compiler.ParserController.parse(Unknown Source)
    at org.apache.jasper.compiler.Compiler.generateJava(Unknown Source)
    at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
    at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
    at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
    at org.apache.jasper.JspCompilationContext.compile(Unknown Source)
    at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
    at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
    at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
    at org.apache.catalina.core.StandardValveContext.invokeNext(Unknown Source)
    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(Unknown Source)
    at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
    at org.apache.catalina.core.StandardValveContext.invokeNext(Unknown Source)
    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
    at org.apache.catalina.core.StandardValveContext.invokeNext(Unknown Source)
    at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
    at org.apache.catalina.core.StandardValveContext.invokeNext(Unknown Source)
    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
    at org.apache.catalina.core.StandardValveContext.invokeNext(Unknown Source)
    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
    at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Unknown Source)
    at tomcatprovider.StellentProtocol$StellentWorkThread.runIt(StellentProtocol.java:304)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:595)
    Edited by: 980473 on Jan 8, 2013 2:01 AM

    Hi ,
    Check if you have jstil.jar in WEB-INF/lib location , if missing manually add jstl.jar into WEB-INF/lib restart UCM Managed server .
    Hope this helps.
    Thanks,
    Srinath

  • Problems with JSP and Tag Libraries in JBoss using Tomcat 5.5.9

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

  • JSP programming with Tag Libraries like Struts.

    Hi friends,
    I've been programming in JSP, JavaBeans for the last 1 year. However, with the current popularity of Tag Libraries & concepts like MVC, Struts am thinking of using these in JSPs. Even though I am not totally convinced about the real advantages like "No Java code" in JSP pages bcoz normally anyway most of the Java Code is done in the Javabean where my Business Logic is present.
    If any of you have previously worked on Tag Libraries please would you advice me whether it's worth it and which books & material would be best for these.
    Thanking you in advacnce.
    Cheers
    Sanjiv

    Based on my experience with using JSP tags, I would definitely strongly recommend them. If nothing else, application/project specific custom tags go a long way in facilitating development-time productivity and code maintenance.
    And ofcourse, with JSP tags you get the added advantage of the JSP container maintaining pools of instantiated tag objects so even the runtime performance is helped.
    The book Web Development with Java Server Pages by Duane K. Fields, Mark A. Kolb from Manning Publications has helped me a lot about JSP tags.
    Sun's tutorial http://java.sun.com/j2ee/tutorial/doc/JSPTags.html is also good.

Maybe you are looking for

  • None of the comments...contained in structure tree and other errors

    1.  When running the "full check" accessibility report following creation of a PDF from MS Word, I get the following error for every page that has a header and footer:           None of the comments or other types of annotations on this page are cont

  • Datalog with time stamp in txt

    Hello, I'm new to this. I used to have a few lessons in Labview in school once, and now I have to make a labview program during my internship. On my previous internship I also had to log data, but that wasn't with labview, but with software from the

  • Inter-company configuration

    Hello All, I'm looking for inter-company configuration and there reporting, where two companies are in different country and legal reporting requirements. Can any one help me in this regards, It will be appreciated, For your help. thanks, supriya.

  • PARAMETERS of Multiple values

    ok i have a field called Country and a field called city. I have a function that calculates the total Population of the country based on the number of people in each city. But for the sake of testing the function i made country = America. But there a

  • Business Partner in SAP EHS

    Dear Friends How to create Business Partner (Health Centre, Physician, Authority, Laboratory etc) in SAP EHS. Is it created in SAP EHS or is it created in MM as a vendor/service provider. Please let me know the process of creating business partner fo