-
-
Pass Control from one JSP page to another
Write Sample Code to pass control from one JSP page to another?
Under JSP 1.0 , the implicit object which can be used for reference is “this”. It is used to refer to the ______________
Skill/Topic: FundamentalsA) Servlet generated by the JSP page B) Servlet called by the jsp page C) Calling the previous JSP page D) None of the above
Fill in the blanks -- The two types of cookies in java are Permanent cookie and _________ cookie
Skill/Topic: Session HandlingA) Session
Java Server Pages technology commonly called JSP technology offers the following advantages(Multiple choice) :-
Skill/Topic: FundamentalsA) Separation of dynamic and static content. B) Support for scripting and tags C) Reuse of components and tags. D) Web access layer for N-tier enterprise application architecture
Fill in the blanks -- The maximum age of the cookie in JSP can be set by _________________
Skill/Topic: JSP Life CycleA) cookie.setMaxAge(int seconds)B) cookie.setMaxAge(float seconds)C) cookie.setAgeMax (float seconds)D) cookie.setAgeMax (int seconds)
These ______________listeners are notified when attributes are added to, removed from, or replaced in any session.
Skill/Topic: JSP Thread ModelA) Session AttributeB) Servlet context attributeC) Session ListenersD) Servlet context listeners
Why we need web container to Deploy the servlet or jsp ?
i.e Why we can not run the application like simple java program
Calling of which of the following method causes unpredictable results in the Servlet.
Skill/Topic: ServletsA) doPost()B) doGet()C) System.out.println()D) System.exit(0);Explanation: Might close down the entire Server.
What is the role played by JSP in the MVC architecture
Skill/Topic: JSP Thread ModelA) ModelB) ViewC) ControllerD) None of the above
Which of the following statement is true about Servlet chaining (Multiple choice)
Skill/Topic: ServletsA) It is the process of chaining the output of one Servlet to the anotherB) Need to do special configuration in the Java Web servers for this process to run.C) This concept has been removed from the standard application for servlets.D) None of the above
Share data in two different projects
How to share the data in two different projects in jsp or servlets
How to maintain values inside form field while uploading image using jsp?
The problem I am facing is that whenever I fill details in the form and then click on upload link then request go to upload.jsp and when after uploading the form the request comes back to registration page(1st page) then the values from all fields disappear
What information that the ServletResponse interface gives the servlet methods for replying to the client?
It Allows the servlet to set the content length and MIME type of the reply. Provides an output stream, ServletOutputStream and a Writer through which the servlet can send the reply data.
What is the servlet life cycle?
Each servlet has the same life cycle:A server loads and initializes the servlet (init())The servlet handles zero or more client requests (service())The server removes the servlet (destroy()) (some servers do this step only when they shut down)
JSP Comments
What are the ways to write comments in the JSP page? Give example.
Which of the following statements is true about JSP tag library?
Skill/Topic: Programming ConstructsA) It defines the standard tag that works the same everywhere B) It is a single library and we can use it in multiple jsp containers C) It has support for the common structural tasks like iteration and condition. D) All of the above
Ans