struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kennedy" <j...@gigaheads.com>
Subject Re: Error while accessing the application
Date Sun, 30 Nov 2003 14:51:57 GMT
Hi Melanie,

don't really see anything wrong right off the bat, but let's walk through what has to be configured:

Place all your tlds in the WEB-INF directory (looks good here)
Place all required struts library JARs in the lib directory of your web appl
Configure your web.xml to include the TLDs, here's an example of one of my projects:

  <welcome-file-list>
  <welcome-file>index.html</welcome-file>
  <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <taglib>
  <taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
  <taglib-location>/WEB-INF/c-rt.tld</taglib-location>
  </taglib>
  <taglib>
  <taglib-uri>/WEB-INF/c.tld</taglib-uri>
  <taglib-location>/WEB-INF/c.tld</taglib-location>
  </taglib>
  <taglib>
  <taglib-uri>/WEB-INF/fmt-rt.tld</taglib-uri>
  <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
  </taglib>
  <taglib>
  <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
  <taglib-location>/WEB-INF/fmt.tld</taglib-location>
  </taglib>
  <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>
  <taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>
Finally configure the JSP to include (or point) to the proper tag definition, here's an example:

  <%@ page import="java.util.*"%>
  <%@taglib uri="/WEB-INF/c.tld" prefix="c" %>
  <%@taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
  <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@taglib uri="/WEB-INF/pager-taglib.tld" prefix="pg" %>
  <%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>
  <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>

I always reference tlds from the /WEB-INF directory, not from within the library JAR.


Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-----------------------------------------------------


----- Original Message ----- 
From: "Melanie Pfefer" <melanie_pfefer@yahoo.co.uk>
To: <struts-user@jakarta.apache.org>
Sent: Sunday, November 30, 2003 7:30 AM
Subject: Error while accessing the application


> Hi,
> 
> My application is not able to find the tag libraries.
> The tag libraries lie in the WEB-INF directory of the
> application and refer to a directory on another
> server.  These two servers are able to connect with
> one another.
> 
> I am getting exceptions like 
> info ( 5840): JSP: JSP1x compiler threw exception
> org.apache.jasper.compiler.CompileException:
> /Mydocs/sun/web/docs/jvNET/Login.jsp(1,0) Unable to
> open taglibrary
> /WEB-INF/struts-bean.tld : Could not locate TLD
> /WEB-INF/struts-bean.tld
> at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
> eEventListener.java:707)
> at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
> Listener.java:110)
> at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
> at
> com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.jav
> a:252)
> at
> com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.j
> ava:173)
> at
> com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.
> java:416)
> [16/Nov/2003:14:54:22] warning ( 5840): Internal
> error: Failed to get
> GenericServlet.
> (uri=/jvNET/Login.jsp,SCRIPT_NAME=/jvNET/Login.jsp)
> [16/Nov/2003:14:56:02] info ( 5840): Internal Info:
> loading servlet
> /jvNET/Login.jsp
> [16/Nov/2003:14:56:02] info ( 5840): JSP: JSP1x
> compiler threw exception
> org.apache.jasper.compiler.CompileException:
> /Mydocs/sun/web/docs/jvNET/Login.jsp(1,0) Unable to
> open taglibrary
> /WEB-INF/struts-bean.tld : Could not locate TLD
> /WEB-INF/struts-bean.tld
> at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars
> eEventListener.java:707)
> at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating
> Listener.java:110)
> at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> at
> org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
> at
> com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.jav
> a:252)
> at
> com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.j
> ava:173)
> at
> com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.
> java:416)
> [16/Nov/2003:14:56:02] warning ( 5840): Internal
> error: Failed to get
> GenericServlet. (uri=/jvNET/Login.jsp,SCRIPT_NAME=/jvNET/Login.jsp)
> 
> ________________________________________________________________________
> Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs
> http://www.yahoo.co.uk/robbiewilliams
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message