Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL: problem

 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've got following code in my jsp:


when this page is generated, i get the following result:



why i get both times the constant value "${zoektype.waarde}" and not the dynamic value retrieved by calling zoektype.getWaarde() ???
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either

1. Use the EL-enabled Struts tag libraries

or

2. Use

<input type="radio" value="<cut value="${zoektype.waarde}" />" name="zoekType">
<cut value="${zoektype.label}"
[ October 20, 2004: Message edited by: Junilu Lacar ]
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the EL-enabled struts tag libraries ?
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did see this, but i don't get a clue how to implement this. has anyone a good example of the use of these struts-el tags ?

Thanks
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To use the Struts-EL tags, you need to use the following files from the Struts distribution:

struts.jar
struts-el.jar
struts-*-el.tld

As explained in the contrib/struts-el/README.txt file, the struts.jar is still needed because the struts-el tag library classes are subclasses of the struts tag library classes.

There are a number of examples you can find for using these tags in the strutsel-exercise-taglib.war found in the current Struts distribution.
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works fine.
Thanks!

Can you explain why it works with struts-el tags and not with the usual struts tags. And do you have to use struts or struts-el or doesn't it matter?
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The struts.jar is still required by the struts-el.jar because struts-el classes extend struts classes. The struts-el tag library classes have the added capability of knowing how to evaluate EL expressions, e.g. "${zoektype.waarde}". The regular struts tag library classes do not evaluate EL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic