This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Mixing Scripting Variables and Local Scopes in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Mixing Scripting Variables and Local Scopes in JSP" Watch "Mixing Scripting Variables and Local Scopes in JSP" New topic
Author

Mixing Scripting Variables and Local Scopes in JSP

Milano Doshi
Greenhorn

Joined: Mar 17, 2001
Posts: 3
Hello,

I am using scripting elements (in JSP )to create objects that I then want to let actions access, I want to place them in the appropriate scope, which I am doing as under:

...
<%
userInfo = new Member1();
pageContext.setAttribute("userInfo", userInfo);
%>
<jsp:getProperty name="userInfo"
property="firstName" />

I want to ask the following qtns:
1) What will be the scope of this Object userInfo?
2) If a bean object with the same name already exists, what will
happen?
All suggestion\answers are welcome,
Thanx,

Milan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mixing Scripting Variables and Local Scopes in JSP