• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Absolute vs Relative paths

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm experiencing problems with paths in my JSP.
Look at this code below:
<%@taglib uri="/WEB-INF/lib/dbtags.jar" prefix="jdbc" %>
My Windows NT system doesn't find the file and doesn't compile unless I put the absolute path like so:
<%@taglib uri="file:c:\\forte4j\\Development\\cdshopcart\\WEB-INF\\lib\\dbtags.jar" prefix="jdbc" %>
Also...notice that I have to use back slashes because I'm running Windows. (This makes my code platform specific)
How do I fix this problem.
Do I have to set classpaths?
Will setting the classpath fix the problem?
Thanks,
Enrico
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That taglib location can go in your web.xml file.
In my web.xml file I have:
<taglib>
<taglib-uri>JSPbook/taglib</taglib-uri>
<taglib-location>
/WEB-INF/jsp/JSPbook-taglib.tld
</taglib-location>
</taglib>
In the JSP page:
<html><head>
<title>Student Signin</title></head>
<body>
<%@ taglib uri="JSPbook/taglib" prefix="ch11" %>

<ch11:signin studentId='<%= request.getParameter("stuid") %>'
studentPw='<%= request.getParameter("stupw") %>'
course='<%= request.getParameter("course") %>' >

------------------
author of:
 
reply
    Bookmark Topic Watch Topic
  • New Topic