Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

eliminating java scriplets in JSP  RSS feed

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <cut> 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!