jsp - Java Beans: Getting value of bean property which has application scope into the scriplets? -
how value of bean property has application scope scriplets? here tv1
bean instance , getnum()
returns integer.
<% for(int j=1; j<=${applicationscope.tv1.getnum()}; j++) { //code execute } %>
this not working.. el works outside scriplets not within it.
have tried this?
type type of tv1 bean
<% type tv1 = (type)application.getattribute("tv1"); //or type tv1 = (type)servletcontext.getattribute("tv1"); for(int j=1; j<=tv1.getnum(); j++) { //code execute } %>
java jsp javabeans scriplets
No comments:
Post a Comment