Am Donnerstag, 11. September 2003 08:27 schrieb Manoj Kansal: Hi,
I think I don't really understand what you're heading for. Generally, it's sufficient to download the JSTL jars (note: JSTL consists of more than just standard.jar; you may want to consult the Apache Jakarta site for details), put those .jars into the /lib directory (the one underneath WEB-INF) of your server, and that's it. Basically, there's no additional configuration required, as the .tld files are already contained in the .jars. If you want to have them separately, you may put the .tld files in WEB-INF or some other directory (WEB-INF/tld, for example, as recommended by the specification) and declare them in web.xml, but that's not a requirement. One thing to note might be that your taglib references should look somewhat different in the first case, resembling something like <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> This won't really result in a call to the Sun site, but just tell the resolver that's built into you container how to map the references in your JSP to a certain taglib. Considering the CLASSPATH, there generally is no need for manually including these files the system classpath in any kind. Taglibs were designed to be as easy to use as possible for the consumer, and with JSP 1.2, it became even possible to include more than one taglib into a single .jar file, but the specifics are mere details. Microsoft .NET named his 'xcopy install' and makes a great fuss about that. In Java, it's just already there. And AFAIK, even BEA WebLogic is standards-compliant at this (specification) level. HTH, -- Chris (SCPJ2) > Hi all, > I am using weblogic 7.0 on NT 4.0 machine. > I have downloaded standard.jar file required for JSTL. > I have unzip standard.jar file and retireve all the tld files. I have > placed tld files in WEB-INF/tld folder. I have added standard.jar > file in classpath. I have verified that standard.jar file is my > classpath of startWLS.cmd file and is fine. > > following is a sample code where I am using JSTL. > <html> > <body> > <%-- Declare the core library --%> > <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> > > <c:choose> > <c:when test="${empty param.name}"> > Please enter your name. > </c:when> > <c:otherwise> > Hello <b><c:out value="${param.name}" /></b>! > </c:otherwise> > </c:choose> > <% out.println("test"); %> > </body> > </html> > > It gives error mentioned below. It could not locate cannot find tag > class: 'org.apache.taglibs.standard.tag.common.core.CatchTag' which > is already there in my standard.jar file. that is already in my > classpath. Can anyone tell me where I am doing mistake. What else I > need. I have downloaded standard.jar file from apache site. Do I need > any other jar file. > > > <11-Sep-2003 11:46:09 IST> <Error> <HTTP> <101020> > <[ServletContext(id=16733562, name=DefaultWebApp,context-path=)] > Servlet failed with Exception weblogic.servlet.jsp.JspException: > (line 4): Error in using tag library uri='/WE B-INF/tld/c.tld' > prefix='c': cannot find tag class: 'org.apache.taglibs.standard > .tag.common.core.CatchTag' > at > weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.j > ava:1135) > at > weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:12 > 19) > at > weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1161) > > at > weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:221) > at > weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:315) > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:144) at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:49 > 82) > at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4820) > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4666) at > weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2086) at > weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1872) at > weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1745) at > weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:959) at > weblogic.servlet.jsp.JspParser.doit(JspParser.java:90) at > weblogic.servlet.jsp.JspParser.parse(JspParser.java:213) at > weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119) at > weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258 > ) > at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:353) > at > weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:211) at > weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164) at > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl. > java:517) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm > pl.java:351) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm > pl.java:445) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm > pl.java:306) > at > weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio > n.run(WebAppServletContext.java:5445) > at > weblogic.security.service.SecurityServiceManager.runAs(SecurityServic > eManager.java:780) > at > weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe > rvletContext.java:3105) > at > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm > pl.java:2588) > at > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189) > > > Thanks in advance. > Manoj > > ===================================================================== >====== To unsubscribe: mailto [EMAIL PROTECTED] with body: > "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with > body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
