It's not a secret anymore!
The moose likes Struts and the fly likes JavaScript in JSPs using struts tag libraries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JavaScript in JSPs using struts tag libraries" Watch "JavaScript in JSPs using struts tag libraries" New topic

JavaScript in JSPs using struts tag libraries

Gaurav Saxena

Joined: May 28, 2002
Posts: 29
Hi all
I am new to struts and i am finding it very difficult to use javascript elements in JSPs.I have a strict requirement that there should be no scriptlet in the page at all.Can some one suggest some book/links where in i can find some stuff on how to use Javascripting element in JSPs? .
pls help

Gaurav Saxena<br />Programmer Analyst<br />Portland, Oregon
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Struts Tutorial

And Struts Resource :

Java Developer, Thailand
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
I fail to see what a constraint of not having scriptlets on JavaServer Pages and embedding JavaScript in the JavaServer Pages have to do with each other?

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
I concur Lasse. In the Struts html tags, they allow you to insert javascript function as well as standard html tags.
Abhijit Kulkarni

Joined: Dec 03, 2000
Posts: 23
I understand, and I am facig a similar situation where I have to use struts tags only (i18n). If any one reaches a solution on passing value of java variable as an argument to a javascript function within a struts tag, Please let me know!

<b><i>Abhijit</i></b> <br />---------------------------------<br />Give me my share of smile!
I agree. Here's the link:
subject: JavaScript in JSPs using struts tag libraries
It's not a secret anymore!