File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Removing scriplets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Removing scriplets" Watch "Removing scriplets" New topic

Removing scriplets

Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Here is my code.

Can you please suggest me how to avoid scriplets here.

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
John Simpson

Joined: Sep 10, 2007
Posts: 25
write a <script> tag.
in a function write something along the lines of:

I know its basically the same thing, but you asked...

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just substitute:

for your assignments to the variable "s". If the type is not specified in a bean:define, it defaults to String. When you want to display "s", you can do so with either the EL expression ${s} or a bean:write tag.

Consultant, Sima Solutions
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Thanks for your response.
I agree. Here's the link:
subject: Removing scriplets
It's not a secret anymore!