• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP variables and Thread problem  RSS feed

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see this code
<%!
String sessionkey;
%>
<%
sessionkey=request.getParameter("sid");
%>
can i make sure that sessionkey will always return me the same value in the request ?
or
should i follow something like this
<%
String sessionkey=request.getParameter("sid");
%>
In this case does it uses more memory by creatting a new String object each time ?
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain a bit more about your issue and what you are doing. I'm a bit confused about your question. Oh, btw, I usually set and get my session in my servlet.
Servlet.service(...)
{
get my session variables out
do my processing
set my session variables
}
-Dale

------------------
What's this H2SO4 doing in my fridge?? ( thud )
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!