• 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

Include remote file, problems in setting up JSTL

 
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to have a jsp include directive that can bring in a file outside of the web app.
Searching the forums suggested the usage of <c:import> from JSTL.

I am using WSAD 5.1.1, and I enabled the project to use JSTL (from project>properties>web project features), and WSAD automatically added some jar files that included jstl.jar, standard.jar.

I modified my jsp to include this



But when I type <c:import> its not even recognised. I see an Unknown Tag error.

Is there anything else that I ought to do? Googling tells me that I don't need to modify my web.xml file ... Does anyone know what I am missing?

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of the JSTL? Your URI may not be correct.
 
kayal cox
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was using jstl 1.0.
I tried updating it to 1.1. No luck.

I tried changing the uri to "http://java.sun.com/jsp/jstl/core". Still does not work!
 
kayal cox
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I had this uri: http://java.sun.com/jstl/core

I get this message, when I run it inspite of those yellow lines

No such tag import in the tag library imported with prefix c'



If the uri is changed to : http://java.sun.com/jsp/jstl/core

I see this message

This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application'

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, ok so it does sound like the container is finding the TLD based upon your URI. But for some reason it's not finding the import tag def. Odd.

Whose JSTL implementation are you using? I'd open the standard.jar file and find the TLD to make sure that the import tag is properly defined.
 
kayal cox
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is fixed Bear! Thanks for your help.

I am not sure what the problem is, but today morning, all I did was restart my WSAD application, and it started working automatically with no code change at all..
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kayal,

I don't know if this would answer your problem, but if your app server has JSTL examples, use the JAR files and URI from the examples in your application. For example, I had the same error that you did when I was working with Tomcat. I had inadvertently used the wrong JAR directory (standard-1.0/lib rather than standard/lib ) when referencing the Jakarta JSTL libraries.

Don't know why a re-start would solve the issue, but at least you're off and running !!
reply
    Bookmark Topic Watch Topic
  • New Topic