• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

eliminating java scriplets in JSP

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm writing the code using JSTL..

our chief objective is to eliminate java
code(scriptlet,expressions etc)

but while getting the scoped variable for the bean
object we are using the scriptlets..like
<%
pageContext.setAttribute("var",beanobj);
%>

i tried to eliminate this scriptlet by using "out" tag
of JSTL core , i'm not successful..

please help me to avoid this scriptlet in my JSP
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The <c:out> tag is used to emit output to the response. You would certainly not use it to "set" anything.

For that, there is <c:set>.

Without knowing what beanobj is, I can't help any further.

I'd highly suggest getting a copy of the JSTL Specification and keep it open on your desk.
 
reply
    Bookmark Topic Watch Topic
  • New Topic