• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Error happen when using <c:if>

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having an error like this:

<h3>Validation error messages from TagLibraryValidator for f in /user/ace/branch/activeComments.jsp</h3>

null: Validation error. The following JSF tags are required to contain IDs:"h:outputLink h:outputText "





The error happens when I place this code to the page. Please help. Thanks.
 
Saloon Keeper
Posts: 28404
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why JSF is insisting on putting IDs on those tags. It doesn't normally do that. You should be able to satisfy it by coding 'id="xxxxxx"' attributes on the indicated elements, where "xxxxxx" is a different and unique ID for each element so identified.

But you're not using JSF very gracefully. JSTL should almost never be mixed with JSF. In most cases, JSF has a better-integrated way of doing the same thing. Likewise, you should avoid raw HTML, which, depending on the version of JSF you're using may disappear or get relocated to the wrong part of the display.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
edited: I'll leave this here though i totally missed the point or was replying to something else with the wrong page open at the time.

<c:if test="${param.something == true}"....

is JSTL Java Standard Tag Library.

you nees this
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
at the top of the page and the JSTL .jar files for the
WEB-INF/lib
in your application.
And you can hot fix it too if you want by using e.g. winrar archiver that shows folders not a list
and take all the .tld files out of the .jar files that have any in there META-INF and put them(.tld) in
the /WEB-INF of your app.
 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys. I found it's working after I put id attributes inside those tags
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic