difference between request.getSession(false) or
request.getSession() and request.getSession(true)
Answers were Sorted based on User's Feedback
Answer / msreekanth2004
request.getSession(true) or request.getSession():
If session is present it returns that session. Otherwise
it'll create a new session and return that.
request.getSession(false):
If session is present it returns that session. Otherwise it
return "null"
| Is This Answer Correct ? | 45 Yes | 2 No |
Why filter is used in servlet?
What are setComment and getComment methods in Cookies?
i have class files in class folder. but i have no java files. but i want to modify the java files which are related to class files . how ?
what are the different services provided by the web server?
What is called Session Tracking?
What are the types of protocols supported by httpservlet ?
can u give some realtime example in ploymorphism? and inheritance?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
How to notify an object in session when session is invalidated or timed-out?
If some new data has entered the database, explain how can a servlet refresh automatically?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
What is use of parseQueryString ?