• 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

Missing tag library?

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This represents some progress beyond a "why doesn't it render" question I asked some time ago.

My attempted Facelets project uses these libraries that I've been using very successfully to do .jsp sorts of JSF applications:

commons-beanutils-1.8.3.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-digester-2.1.jar
commons-discovery-0.4.jar
commons-logging-1.1.1.jar
jsf-facelets-1.1.15.B1.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
myfaces-api-2.0.3.jar
myfaces-impl-2.0.3.jar
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar



I have added...

...to faces-config.xml, which I had not been doing and my .xhtml files were not being rendered, but showing the page sources always resulted in nothing (blank pages). After adding this element to faces-config.xml, I began to get a crash instead of no rendering. (I think this is an improvement?) The exception is

com.sun.facelets.tag.TagException: /guessnumber.xhtml @11,9 <h:head> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: head



I'm guessing I'm missing a (tag) library? I'm also concerned about mixing the wrong libraries together. (The example I'm sort of following is using Sun RI whereas I'm using MyFaces/RealFaces.

I'm trying to make the leap to using .xhtml and Facelets. I need some guidance here and would greatly appreciate any help anyone can offer.

Much thanks for any help,

Russ Bateman
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i don't think there is a tag <h:head> ( Don't assume anything )
I would say first take any sample example code and try modifying and building new on that code

And remove below 2 jar files
jstl-api-1.2.jar
jstl-impl-1.2.jar

I don't know anything about MyFaces. I am following SUN RI implementation and using same jar files


To make your life easier, use MyEclipse or for regular Eclispe download WTP that is tools for building and Enable JSF Capabilitues that way when you type it will prompt all the tags and attributes you jar files supports will show up

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

Yes, I'm using Eclipse Java for JEE (so, Eclipse WTP). And, yes, my Dynamic Web Project is configured for JSF 1.2--nothing else relevant is possible.

Sadly, examples of <h:head> ... </h:head> abound all over throughout many tutorials I've played with. In fact, the reason I have these elements in there is precisely because I copied and pasted them from a tutorial. This mixing of JARs is a big problem since tutorials use MyFaces or SunRI or RichFaces (and MyFaces), or PrimeFaces, or... lots of chaos.

Anyway, I excised the jstl libraries. I read somewhere that their contents were in JSF 2.0 or something like that, so they're not needed (but in the past, not having them has given me grief, maybe because I was working with pre-JSF 2.0?).

Now it's crashing more properly as it attempts to find a resource I've got (or not, as it appears).

Can you tell me...

If I have a reference

where, in fact, is this GIF really supposed to go?

I'm missing some permutations, but you probably understand where I'm going with this question. It's one of best practice as well as where it will work--where should it really go?
 
naveen gupta
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also only with 4 months JSF experience. Coming to your question, i have as below

<h:graphicImage url="/images/xxxxxx.png"

and xxxxxx.png image in under /WebContent/images/xxxxx.png ( and this works fine to me )


------


In the past i have also tried to implement sample examples code and never could succeed and gave up. In fact, i tried so many different example source codes, that i gave up forever and never will attempt

All the examples code will be very outdated. Even if we use the same jar files that examples code used, Jar files will also be used outdated one in the examples

If you want to use examples code.............i would say use only MyEclipse source codes


---


i said to remove jstl libraries because, JSF came up with all these new components. we don't need those old jstl libraries and shouldn't be using those libraries when developing JSF applications

----

Last, before you start on the application decided on the technologies and there version and the required jar files. There are so many inter dependencies on each of them, so you can't just randomly go with your guts



>
 
Russell Bateman
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I completely hear you. I started Facelets nearly 3 years ago and couldn't ever get anything to work, so I gave up too. However, now I need them for work, so I'm starting again. And, I've succeeded in getting my first example to work which is a great relief.

Of late, I have been working hard on defining JAR sets for JSF and Facelet work--another problem you point out. I've bettered the set of JARs I've long been using for JSF work (where I've only been doing .jsp stuff). Now, however, I need Facelets, hence beating my head against the wall (and I can't give up).

I'm not the sharpest pencil in the box, so when I am able to knock down a brick wall, I write about it. You can see what I'm doing right now if you like at http://www.javahotchocolate.com/tutorials/rf-facelets.html. I'll be cleaning this document up, making a proper tutorial of it (since, as you point out, no one else's tutorial actually works). But first, I've got to master the whole templating thing and some other stuff.

Thanks for your suggestions and help.

Best regards,

Russ
 
naveen gupta
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case if you are still struggling with JAR files to include.

SUN RI and MyFaces provide different jar files. So based upon what you are using you have to download respective jar files. I THINK SO...........

As you might know JSF is just specification.
Whereas SUN RI and MyFaces are implementations.

So once you decided whether you are going with SUN RI or MyFaces, then you can download the respective jar files by googling
 
A tiny monkey bit me and I got tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic