• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get confused of scripting inside standard action

 
shan xiao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on page 357 of HFS, it said:
"we can even do it with scripting....
<jsp: setProperty name="person" property="name"
value="<%= request.getParameter("userName") %>" />
..."

I am just wondering why we should use expression here, is it true that all the stuff inside <%= %> will go into out.print()? can we just use scripting and put it into <% %>?
 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question

Please refer to work directory and see the generated java code for the corresponding jsp page and may be you will come out with solution

Regards
Rohit
 
shan xiao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still don't get it. I know that if i use <% > instead of <%= >, it will probably treat the stuff inside as the plain java code. But i just cannot convince myself, anyone kindly clarify this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic