scope « API « JSP-Servlet Q&A





1. JSP EL and scope attribute confusion    stackoverflow.com

I would like to ask you some help in clarifying a few issues. But, before anything, some code is inbound first - it's a really simple login example I've constructed. Container ...

2. Infinate loop between JSP and Servlet - getParameter scope appears to be indefinate    coderanch.com

In closly following the strategy recommended at the following website for implementing validation: http://javaalmanac.com/egs/javax.servlet.jsp/myform.jsp.html , I am running into problems when a servlet redirects the request/response back to a JSP. The exact details are basically, I have a JSP page containing 3 fields which when the user clicks on the submit button, the form forwards to itself (the same JSP page): ...

5. scope attributes forwarding problem    coderanch.com

6. Use of a page-scoped attribute    coderanch.com

9. scriptlet works, scoped variable does not    coderanch.com

I have a JSP page that I can make work using evil scriptlets and can not get to work using modern JSTL EL expressions. I'm sure its a trivial cockpit error, but I can't figure it out. <%@ page import="com.pfarrell.beans.struct.SimpleStruct" %> No clue why this ugly code works: <% SimpleStruct ss = (SimpleStruct) session.getAttribute("struct"); %> <%= ss.getFee() ...





12. Are page scope attributes thread-safe?    coderanch.com

Thanks for the quick reply. The book "Head First Servlets and JSP 2nd edition" page 199 explicitly says that session attributes are not thread-safe, because a user may open multiple browser windows. It seems to me that the article states that there is a similar problem with page scope. How do you interpret this (taken from the article/book page linked to ...

13. setting a dynamically named scope attribute    coderanch.com

Hi! I want to set a session scope attribute in my jsp, but I will only know the name of the attribute to set at runtime (long story). I first tried something like this... ...but alas does not accept expressions for the var attribute (which I knew but ...