dcsimg
Interview questions on servlets and jsp...?
7 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Srikanth_B
Posted On:   Tuesday, June 15, 2004 03:16 AM

Can some one let me know the links where I can get the interview questions for servlets and jsp...?

Re: Interview questions on servlets and jsp...?

Posted By:   Baburaj_Nair  
Posted On:   Friday, July 23, 2004 10:33 AM

You can try at http://www.evalguru.com

It's a pre-recruitment testing site. It also provides practice tests to individuals who want to better their employability. Multiple choice objective questions and answers with calibrated difficulty levels for Technical Tests [Java (JSP, Servlet, EJB), VB, VC+, .Net, Oracle DBA, AS/400 (Systems Admin, OS/400, RPG/400, CL/400, DB2/400), Main Frame, Quality Testing) are also available from the said site.

what are the implicit objects?

Posted By:   amina_anjum  
Posted On:   Friday, July 9, 2004 04:20 AM

request object
response object
pagecontext object
page object
session object
out object

Re: Interview questions on servlets and jsp...?

Posted By:   sampathkumar_garapati  
Posted On:   Wednesday, July 7, 2004 03:16 AM


What is the use of Servlets?

How do you communicate in between Applets & Servlets?

What is JDBC? How do you connect to the Database?

In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that?

How will you initialize an Applet?

How will you pass values from HTML page to the Servlet?

How will you communicate between two Applets?

How can you push data from an Applet to Servlet ?

What is the webserver used for running the Servlets ?

What is Servlet API used for connecting database ?

What is the difference between CGI and Servlet ?

In servlets, we are having a web page that is invoking servlets username and password which is checks in the database ? Suppose the second page also If we want to
verify the same information whether it will connect to the database or it will be used previous information?

What are session variable in Servlets ?

What is client server computing ?

I want to store more than 10 objects in a remote server ?which methodology will follow?

What is meant by Servlet?

What are the parameters of the service method ?

What is meant by Session ? Tell me something about HTTPSession Class ?

How do you invoke a Servlet?

What is the difference in between doPost and doGet methods?

What is the difference in between the HTTPServlet and Generic Servlet ?

Why do you go for servlet rather than CGI?

Re: Interview questions on servlets and jsp...?

Posted By:   ramdas_sawant  
Posted On:   Tuesday, June 22, 2004 03:10 AM

Visit javaworld . There are lot of useful tips on servlets
which are useful for interviews.

Re: Interview questions on servlets and jsp...?

Posted By:   Sheikh_Azad  
Posted On:   Friday, June 18, 2004 04:54 AM

==================JSP-Servlets===============

Q:Seesion Tracking, URL Re-Writing , URL Encoding ?

Ans:
URL Encoding is a process of transforming user input to a CGI form so
it is fit for travel across the
network -- basically, stripping spaces and punctuation and replacing
with escape characters. URL Decoding
is the reverse process. To perform these operations, call
java.net.URLEncoder.encode() and
java.net.URLDecoder.decode() (the latter was (finally!) added to JDK
1.2, aka Java 2).

Example: changing "We're #1!" into "We%27re+%231%21"

URL Rewriting is a technique for saving state information on the user's
browser between page hits.
It's sort of like cookies, only the information gets stored inside the
URL, as an additional parameter.
The HttpSession API, which is part of the Servlet API, sometimes uses
URL Rewriting when cookies are unavailable.

Example: changing into
(or whatever the
actual syntax is)

(Unfortunately, the method in the Servlet API for doing URL rewriting
for session management is
called encodeURL().

There's also a feature of the Apache web server called URL Rewriting;
it is enabled by the mod_rewrite module.
It rewrites URLs on their way in to the server, allowing you to do
things like automatically add a trailing
slash to a directory name, or to map old file names to new file names.
This has nothing to do with servlets.



Q:What is Servlet Chaining ?


Q:what is the role of SingleThreadModel in servlet ?
Ans:It makes servlet thread safe, It restrict multiple threads to
access service() method.Only one thread
at a time can enter into the service method if servlet implements
SingleThreadModel.

Q:difference in JSP Include Directive & Action

Ans:
Directive:Static include - compile time include,no mechanism to notify
change in included file.
Action:Dynamic Include - request time include, in case of any change in
included file, server recompiles
the included file.

Q:what is the difference between JSP and Servlet ?

Ans:

Q:Servlet API - GenericServlet, HttpServlet, Servlet


Q:what are the different forward mechanism mechanism is available in
servlet ?

Ans:
1.PageContext
pageContext.forward(java.lang.String relativeUrlPath)
This method is used to re-direct, or "forward" the current
ServletRequest and ServletResponse
to another active component in the application.

2.HttpServletResponse
response.sendRedirect(java.lang.String location)
Sends a temporary redirect response to the client using the specified
redirect location URL.

3.RequestDispatcher
requestDispatcher.forward(ServletRequest request, ServletResponse
response)
Forwards a request from a servlet to another resource (servlet, JSP
file, or HTML file) on the server.


Q:What is the difference between doGet() and doPost() ?

Ans:1
When you invoke a Servlet, the servlet engine passes the information on
to the Servlets service() method.
This method determines the type of request made (GET, POST, HEAD, ...)
and calls the function doTYPE,
like doGet, doPost. GET and POST just differ in the way form data is
sent from the browser to the server.
The method doGet handles data that has been attached to the url in the
form
url questionmark (name=value ampersand)+. Typically in a CGI you would
have to read the environment
variable QUERY_STRING to get this string of concatenated parameternames
and values. With the doPost
method, form data comes in through standard input stream, a cgi would
just need to open the input
stream and read until EOF to get the form data.

With Servlets, you don't need to read in the concatenated string of
parameternames and values.
The parsing is all done behind the scenes. You just need to call
getParameter regardless of how
the form data is actually sent in.

Ans:2
POST:The post method will cause the web browser to send the form values
in two steps.The browser first
contacts the server specified in the 'Action' attribute and once
contact is made, sends the form
values to the server in a separate transmission.The server is expected
to read the parameters from
a standard location.

GET:The get method will cause the web browser to contact the server and
send the form values
to the 'Action' URL (as command - line arguments) separating the values
by a question mark.
Limitation of parameter is 2kb , 1024 characters.


Q:What are implicit objects ?

Ans:

Q:How do we handle Exception in JSP ?

Re: Interview questions on servlets and jsp...?

Posted By:   tech_tech  
Posted On:   Tuesday, June 15, 2004 10:30 PM

if u need to prepare for an interview - u dont know the basics - so there goes ur interview and if by mistake u get selected - there goes that company

Re: Interview questions on servlets and jsp...?

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, June 15, 2004 06:18 AM

which interview?
About | Sitemap | Contact