Easy Question - If you know the answer.

G

gwoodhouse

Hello everyone,

All im trying to do is set up a small app right now. Very simple jsp
page.

My problem is the project refuses to use the taglib files that in jars
in my build path!

"org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html
cannot be resolved in either web.xml or the jar files deployed with
thi"

This is annoying me because i have struts.jar in my projects buildpath
and it explicitly contains both the tld's in its META-INF folder and
everything these tags need.

Has anyone had this problem before? Please help! >.<
 
G

GArlington

Hello everyone,

All im trying to do is set up a small app right now. Very simple jsp
page.

My problem is the project refuses to use the taglib files that in jars
in my build path!

"org.apache.jasper.JasperException: The absolute uri:http://struts.apache.org/tags-html
cannot be resolved in either web.xml or the jar files deployed with
thi"

This is annoying me because i have struts.jar in my projects buildpath
and it explicitly contains both the tld's in its META-INF folder and
everything these tags need.

Has anyone had this problem before? Please help! >.<

The path you show (uri:http://struts.apache.org/tags-html) gets 404
response, so, what is your question?
 
L

Lew

GArlington said:
The path you show (uri:http://struts.apache.org/tags-html) gets 404
response, so, what is your question?

That is completely irrelevant. It's a URI, not a URL. Even as a URL you'd
have to strip the leading "uri:" off the string.

The question is why the namespace is not recognized. I am no expert but it
usually takes no more than putting the Struts JAR in the WEB-INF/lib/ for the
taglib descriptors and all just to snap into place.

It's not the build class path that counts as much as the run class path. Make
sure the Struts libs are either in the Tomcat shared libs, or equivalent for
your app server, or in the app libs, the WEB-INF/lib/ directory of the
*deployed* application.
 
G

gwoodhouse

That is completely irrelevant. It's a URI, not a URL. Even as a URLyou'd
have to strip the leading "uri:" off the string.

The question is why the namespace is not recognized. I am no expert but it
usually takes no more than putting the Struts JAR in the WEB-INF/lib/ for the
taglib descriptors and all just to snap into place.

It's not the build class path that counts as much as the run class path. Make
sure the Struts libs are either in the Tomcat shared libs, or equivalent for
your app server, or in the app libs, the WEB-INF/lib/ directory of the
*deployed* application.

Thanks Lew,

Again your advice is very much appreciated. Unfortunatly i already
double checked all of those things before posting the question (I'm
using the tomcat-server-in-eclipse setup).

The JAR files deffinatly have to be in the deployed applications WEB-
INF/lib as opposed to the Tomcat/lib directory - Im working from a
working product where this is true.

After not figuring it out i gave up and wrote normal HTML in there for
now - im going to go back if i have time at the end of the project
(seeing as ive got 2 days left i very much doubt it! :D)

I guess ill check on this thread now and again hoping that someone
else has the problem in future (how evil of me) and also hope they
come up with a solution which they can post here for us to see.

Again, Thanks Lew, this isnt the first time you have helped me out!

Graeme
 
G

Godofredo

Guess this answer is as silly as it looks, but I had problems using
TagLibs when they weren't inside a package. The JSP files using the
tags failed to locate those. After including the Tag Library classes
inside a package, everything worked fine.
 
L

Lew

Godofredo said:
Guess this answer is as silly as it looks, but I had problems using
TagLibs when they weren't inside a package. The JSP files using the
tags failed to locate those. After including the Tag Library classes
inside a package, everything worked fine.

Never make production code in the default package. There are all kinds of
limitations to its use, and it is even mentioned in the JLS that the default
package is only intended for throwaway code.

Never put code in the default package in production.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top