Java Servlets, JSP, and MVC Architecture
Quiz covering Java web development technologies including Servlets, JSP pages, MVC design patterns, and the Struts framework. Tests knowledge of Java EE web components and architectural concepts.
Questions
Which of these has highest performance?
- Servlets
- Jsp
- Perl pages
- Html
How will you pass values from HTML page to the Servlet?
- response.setparameter () method
- response.getparameter () method
- request.setparameter () method
- request.getparameter () method
If i put a Servlet on each servers, and there is a static variable in thisServlet. Do all the instances on these servers share the same static variable?
- True
- False
How do I get authentication with myServlet?
- HTTPRequest.setUserName()
- HttpServletRequest.getUserName()
- HTTPResponse.setUserName()
- HTTPResponse.getUserName()
What does controllers do?
- acts as an interface between view and model
- does not interact with view
- does not interact with controller
- nothing but view
core class of the Struts Framework
- ActionServlet
- ActionJsp
- ActionClass
- Action
What are the drawbacks of Struts?
- backword overflow
- forward overflow
- Single controller servlet
- no forward overflow
A controller is the link between a user and the system.
- True
- False
Expansion of MVC architecture
- Model,Vision,Controller
- Medium,Vision,controller
- Model,View,Controller
- Model,View,Concept
Struts framework is based on ---- architeture
- MVS
- MVC1
- MVC
- MVC2
MVC1 architecture is
- loosely coupled
- not coupled
- tightly coupled
- coupled
The model component includes
- Bean
- HTML
- servlet
- jsp
The View part of MVC includes
- bean
- EJB
- JSP
- Servlet
The controller part includes
- Html
- jsp
- Servlet
- Bean
In MVC2 flow is controlled by single servlet
- True
- False
Advantages of MVC
- Reusable
- Expressive
- not easy to use
- Easier support
What are Cookies
- information sent by web server
- information sent by servlet
- information sent by browser
- information sent by jsp
Method by which sensitive data is sent?
- doPost
- doGet
- Get
- Post
How do I send email from my Servlet?
- Mail Service
- Simple Mail Protocol
- Java Mail Service
- Mail Protocol
Which of these has highest performance?
- Servlets
- Jsp
- Perl pages
- Html