You can use scriptlets with Struts tags, but the rule is "all or nothing", meaning that the entire contents of the attribute must be a scriptlet, or none of it must be a scriptlet. So, something like the following would work:
thank you for guidance, Merrill Higginson , i will try it later, what if if i use struts-el? how it should be ? in fact, i confuse what is struts-el ?
Joined: Apr 13, 2005
hi Merrill Higginson, i have try it , ans it work , thank you
but somehow, i need to add more script into it
new addon script
test1 is from scriptlet , where it initialise as follow
note : onMouseeover and onMouseeOut word have been modified in order to allow save in this thread
in source ,
when i run it, it doesn't show the img anymore
[ October 28, 2006: Message edited by: Nakata kokuyo ]
[ October 28, 2006: Message edited by: Nakata kokuyo ] [ October 28, 2006: Message edited by: Nakata kokuyo ]
Joined: Feb 15, 2005
I think you've misunderstood what I was trying to get across with the "all or nothing" comment. What I mean is that in a single attribute it's either all a scriptlet or not a scriptlet. onmouseover and onmouseout are each separate attributes of the tag, so they can each have their own scriplets. Since they don't appear to have variable information in them, just code them as part of the tag. Example:
Originally posted by Nakata kokuyo: what if if i use struts-el? how it should be ? in fact, i confuse what is struts-el ?
When the Java Standard Tag Library (JSTL) was introduced a few years ago, it also introduced an Expression Language (EL) which was a way of referring to JavaBeans and their properties on a JSP page, along with some simple string and numeric expressions.
Struts has a separate tag library called html-el that has all the same tags as the <html:xxx> tags. The only difference being that these tags will allow EL expressions to be used in attributes of the tags instead of scriptlets.
To use these tags, the struts-el.jar file must be in the WEB-INF/lib directory, and you must have the following taglib definition:
thank you Merrill Higginson again, you are simply too good
how to become struts expert like you , do you mind to share your secret recipe to become struts guru
Joined: Feb 15, 2005
I'm no "Guru". I've just worked with Struts for quite a while -- nearly since it was first released. One thing I've found that has increased my knowledge is answering others' questions, especially when I have to do a little research before answering. I'd suggest you join in this forum and others on JavaRanch. See if there are questions you can answer, or might be able to answer with a little research. You'll be amazed at how fast your knowledge of the subject grows.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com