|
INTERVIEW QUESTIONS
J2EE
STRUTS
DETAILS
Question: How you will save the data across different pages for a particular client request usingStruts
Answer: Several ways. The similar to the ways session tracking is enabled. Using cookies, URL-rewriting, SSLSession, and possibilty threw in the database.
|
|
|
Category |
Struts Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8601 users |
Added on |
7/17/2011 |
Views |
69446 |
Rate it! |
|
|
Question:
How you will save the data across different pages for a particular client request usingStruts
Answer:
Several ways. The similar to the ways session tracking is enabled. Using cookies, URL-rewriting, SSLSession, and possibilty threw in the database. Source: CoolInterview.com
1)URL Rewriting: Send data in query string as url?name1=value1&name2=value2
2) Hidden field: set the hidden field to form <input type="hidden" name="testField"> and get value of this using request.getParameter(parameterName)
3) Cookie: set the cookies to the header of response and get from request
javax.servlet.http.Cookie c1 = new Cookie("cookieName", "value");
response.addCookie(c1);
Cookie c1[] = response.getCookies();
4) Session: When session is created, then for each user there is a unique number is generated by the web container for session and this unique number is send back to user using cookie and when same user makes the request again, sends back this number and then session object is retrieved javax.servlet.http.Session session = request.getSession(); Source: CoolInterview.com
Answered by: Dipti | Date: 5/15/2008
| Contact Dipti
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Is there any way to put my custom name to LIB folder which i am going to place in WEB-INF folder of struts application?
|
View Answer
|
|
Can i use bc4j with spring framwork
|
View Answer
|
|
Does Struts provide support for Validator & Tiles by default ?
|
View Answer
|
|
In struts, if any changes are made to before the request reaches to actionservlet, where you do the changes?
|
View Answer
|
|
In struts what happens if made any changes in actionservlet?
|
View Answer
|
|
In struts why we use jsp as presentation layer? can we use servlet as presentation layer?
|
View Answer
|
|
In struts how can i validate the values filled into the text boxes or else using DynaValidatorForm,without using javascript. Actually with javascript it is working perfect but not without javascript, and i want without javascript?
|
View Answer
|
|
What is the use of ActionForm class, Describe it's Life Cycle
|
View Answer
|
|
What is the difference between strsuts 1.0 and struts 1.1 ?
|
View Answer
|
|
How can we work struts on Eclipse? What is the best plugin for this?
|
View Answer
|
|
What are the drawbacks of Struts
|
View Answer
|
|
What is the difference between a normal servlet and action servlet?
|
View Answer
|
|
What is Struts?
|
View Answer
|
|
What is the difference between Struts 1.0 and Struts 1.1?
|
View Answer
|
|
Explain Struts navigation flow?
|
View Answer
|
|
What is the difference between ActionForm and DynaActionForm
|
View Answer
|
|
What is DispatchAction?
|
View Answer
|
|
How to call ejb from Struts?
|
View Answer
|
|
What are the various Struts tag libraries?
|
View Answer
|
|
What is the difference between ActionErrors and ActionMessages?
|
View Answer
|