- 博客(13)
- 收藏
- 关注
原创 EL expression
Remember in the original MVC beer app,the Servlet controller talked to the model (Java class with business logic),the set an attribute in request scope before forwarding to the JSP view.The JSP ha...
2014-04-15 14:21:11 170
原创 PageContext Reference
Using a PageContext reference to get attributes from any scope,including the page scope for attributes bound to the PageContext.The methods that work with other scopes take an int argument to indicate...
2014-04-12 13:16:02 79
原创 Aplication Request Session Page scopes
The most of the time you'll be using one of the four implicit objects to get and set attributes corresponding to the four attribute scopes available in a jsp. Remember ,in addition to the standard ser...
2014-04-12 12:08:44 122
原创 jsb scriptlet directive expression
scriptlet: directive: expression: declaration:
2014-04-12 11:44:46 79
原创 Session lifecycle events
The sesssin was created:when the Container first creates a session,At this point ,the session is still considered new(in other words ,the client has not yet sent a request with the session ID)the ...
2014-04-12 10:31:47 116
原创 implicit object
When a Container translates the JSP into a servlet,the beginning of the service method is a pile of implicit object declarations and assignments.All of the implicit objects map to something from t...
2014-04-09 14:15:39 143
原创 Setting session timeout
Two ways to set session timeout:1.Configuring session timeout in the DD:... 152.Setting session timeout for a specific session: session.setMaxInactiveInterval(20*60);3.se...
2014-04-08 19:56:43 177
原创 Key HttpSession method
getCreationTime() //returns the time the session was first createdgetLastAccessedTime() //returns the last time the container got a request with this session IDsetMaxInactiveInterval() //spec...
2014-04-08 19:16:07 93
原创 what if I want to know whether the session already existed or was just created?
Put the following code into you java code : HttpSession session = request.getSession();/*getSession()returns a session no matter what...but you can't tell if it is a new session unless you ask the...
2014-04-08 11:54:13 94
原创 How session work and how the Container know who the client is
[size=x-large]How session work[/size]1.when Diane selects "Dark" and hits the submit button.The Container sends the request to a new thread of the BeerApp servlet.The BeerApp thread finds the sess...
2014-04-08 09:44:49 122
原创 How can we track the client's answers?
We have serveral options:1.Use a stateful session enterprise javabean. ----Your hosting provider should have a full J2EE server with an EJB Container.2.Use a database-----Your hosting provide...
2014-04-08 08:28:09 111
原创 encodeURL and encodeRedirectURL
If the client doesn't accept cookies,we can use URL rewriting as a backup. URL rewriting will always work.URL rewriting takes the session ID that is in the cookie and sticks it right onto the end of e...
2014-04-06 19:45:25 180
原创 What if you only want a pre-existing session?
HttpSession session = request.getSession(false);if(session == null){ session = request.getSession();}
2014-04-06 18:51:35 87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人