Skip to main content

JSF 2.0: MalformedURLException in FaceletTaglibConfigProcessor

4 replies [Last post]
arveds
Offline
Joined: 2008-12-31

The platform is Glassfish v2. I have Mojarra-2.0.0-PR set up (stuff done in https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html), changes made to web.xml and faces-config.xml as per the JSF 2.0 spec. I have tested the app, including my Facelets tags, fully under JSF 1.2; conversely, I'm satisfied that the JSF 2.0 JARs are being picked up because I am using stuff like @ManagedBean.

However, I am having a devil of a time figuring out where to put the taglib.xml when not using a JAR, and when I do use a JAR I get a MalformedURLEXception at line 382 of FaceletTaglibConfigProcessor, namely

URL url = new URL(new URL(docURI), s);

in method "processSource". Actually, I can make the exception go away by commenting out a tag which uses blahwhatever; once that's done the app deploys fine, and since I've now also modified one page to not use that tag, I know the taglib works in general because a function which is also defined in that taglib is working OK.

So presumably the problem here, when the taglib is in a JAR (the taglib.xml in the META-INF), has to do with the contents of the tag. I've tried pretty much everything known to man for the contents of that tag, and I still get MalformedURLException. For sake of argument, if I have a tag XML called blah.xml at the top-level of the JAR, what should be?

blah.xml
./blah.xml
/blah.xml
../blah.xml

I've tried 'em all...

The other issue is this. Let's say that with the Facelets taglib.xml that passes inspection (I've left the offending tag commented out) I now remove the JAR from my app libraries, and try the web.xml way of specifying where it is, with javax.faces.LIBRARIES. My understanding from the spec is that if my ahs.taglib.xml is at {WEBROOT}/facelets/ahs.taglib.xml, that for this configuration parameter I set

facelets/ahs.taglib.xml

Neither this nor any other location I've used so far has caused JSF 2.0 to locate the taglib.xml. It can deal with the JAR method but not with this.

Any suggestions welcome.

Arved Sandstrom

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
arveds
Offline
Joined: 2008-12-31

I might add, that the stuff I wanted to throw into a Facelets page as a Facelets tag worked out just fine as a composite tag, which I'm now using more or less in the way I intended. It just so happens that this tag is something that could be useful as a full-fledged UIComponent, so no harm done.

However, I'm still curious as to why the problems with


foo
foo.xhtml

Specifically, with the contents of . Did this get zapped in JSF 2.0? :-)

Arved Sandstrom

rlubke
Offline
Joined: 2003-08-21

No, this feature should still work. Could you please log an issue [1]?

[1] https://javaserverfaces.dev.java.net/issues/

arveds
Offline
Joined: 2008-12-31

Issue #909 created.

I'll continue to investigate myself. I have the Mojarra-2.0.0-PR source...I just need to set it up.

arveds
Offline
Joined: 2008-12-31

Issue 909 was fixed by Ryan, fix confirmed by myself.