Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning JavaServer Pages
|
BOOK: Beginning JavaServer Pages
This is the forum to discuss the Wrox book Beginning JavaServer Pages by Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell; ISBN: 9780764574856
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaServer Pages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2006, 10:27 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 web.xml missing taglib

Hi,

       <taglib>
        <taglib-uri>
           http://www.wrox.com/begjsp/el-functions-taglib
        </taglib-uri>
        <taglib-location>
           /WEB-INF/jsp/function-taglib.tld
        </taglib-location>
    </taglib>

I can't get to the URL above to use the taglib. :( Any suggestions?

Tyler

 
Old May 3rd, 2006, 05:49 PM
Registered User
 
Join Date: Feb 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try the following and see if it works:

in web.xml:

  <taglib>
    <taglib-uri>/WEB-INF/tld/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
  </taglib>

in your .jsp:

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>

my directory structure:

WEB-INF
   tld
     = struts-bean.tld

I understand this isn't the file you are working with, but the principle is the same.

If I understand it correctly, the uri is an alias anyway to which you refer and the location is where to find the file. In the jsp you will refer to the alias. Reason being that you can change the location and you then modify your web.xml file and not the jsp file, unless you change the alias of course (as is my understanding).

Now if your .tld file is where your location claims it is, then I'm guessing here that the http://... is somehow causing a problem.

Note that my uri is named the same as the location, but that is not required.

So you might try the following then:

in web.xml:

  <taglib>
    <taglib-uri>/WEB-INF/jsp/el-function-taglib</taglib-uri>
    <taglib-location>/WEB-INF/jsp/el-function-taglib.tld</taglib-location>
  </taglib>

and in your .jsp make sure to use:

<%@ taglib prefix="wf" uri="/WEB-INF/jsp/el-function-taglib" %>

I'm no expert, but I think I've got this right. Hope this helps. Give it a shot.





Similar Threads
Thread Thread Starter Forum Replies Last Post
taglib question??? winsonkkp Pro JSP 0 March 4th, 2008 04:53 AM
Missing control in Chapter 17 for Bill Evjen Web P ishim BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 October 25th, 2007 10:38 AM
Chapter 26 XML Web Services - error handing? RichDiaz BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 August 20th, 2007 04:47 PM
Missing Web.config rogererickson BOOK: Professional DotNetNuke ASP.NET Portals ISBN: 0-7645-9563-6 3 August 29th, 2005 03:41 PM
Taglib question jorgen BOOK: Expert One-on-One J2EE Design and Development 3 May 12th, 2004 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.