wood burning stoves 2.0*
The moose likes JSP and the fly likes Using Scriptlets in Custon Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using Scriptlets in Custon Tags" Watch "Using Scriptlets in Custon Tags" New topic
Author

Using Scriptlets in Custon Tags

dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
Hi folks!

Need help with my custom tag. I am able to pass in the first parameter to my custom tag using jstl-like code (see below). However, I can never get the second parameter to work if I pass it in using jsp scriptlet.



Am I missing something?

Thanks.
[ November 14, 2004: Message edited by: dennis zined ]

SCJP 1.4<br />SCWCD 1.4
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Have you enabled run-time expressions for that attribute in the tld?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
Thank you for your reply.

Yep. In my tld file, both parameters have the runtime expressions turned on.
dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
Is it even possible to pass parameters from a JSP scriplet to a custom tag?

Thanks

- Custom Tag newbie
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Yes, I used to do it all the time. (I no longer use scriplets or sciptlet expressions on my pages in favor of the JSTL and EL ).
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

By the way "I never get it to work" is not a very good description of the problem you are having. Some detail might help.

One thought: should



perhaps be



?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Scriptlets in Custon Tags
 
Similar Threads
Tomcat Connection To the Oracle Database
if conditions that change HTML
How to use Meta Refresh Tag
Testing if the parameter passed is empty..Help pls!
<c:forEach> to iterate a collection