Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning JavaServer Pages
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 3rd, 2006, 10:27 AM
Registered User
 
Join Date: May 2006
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old May 3rd, 2006, 05:49 PM
Registered User
 
Join Date: Feb 2006
Location: , Ohio, .
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.