aspose file tools*
The moose likes Jobs Discussion and the fly likes 3yrs experience want to know about questions asked on interviews on servlet and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Careers » Jobs Discussion
Bookmark "3yrs experience want to know about questions asked on interviews on servlet and jsp" Watch "3yrs experience want to know about questions asked on interviews on servlet and jsp" New topic
Author

3yrs experience want to know about questions asked on interviews on servlet and jsp

bhaskar de
Greenhorn

Joined: Jan 16, 2010
Posts: 1
Hi everybody,
I want to know what types of questions are asked in the interviews for an experienced guy on servlet and jsp
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Difficult ones!


OCJP 6 (93%)
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

After 3 years I think you should expect questions more on writing optimized and manageable code. Also if I were the interviewer, I would expect you to know a lot of other things in addition to servlets and JSP like Hibernate, sitemesh, tiles (if your 3 years experience is in web development)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

I think the Job Discussions forum would be more appropriate for this question, so I'll move it there...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I haven't been asked a servlet question in ages.
Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
David Newton wrote:I haven't been asked a servlet question in ages.

I am surprised,shocked and curious to know on what basis you are telling this??
I am learning Servlets and Jsp now and i dont know anything other than these in Java platform . i mean to say i dont know things like EJB or structs or hibernate or... . And i am expecting to move to java platform by learning servlets and jsp....
So your statement is kind of discouraging my plans :(

Can you explain me what you mean to say???
kaustuv saha
Greenhorn

Joined: Dec 14, 2009
Posts: 27
If Web Technologies (Servlets, JSPs etc) are all that you worked on then interviewer would expect you to be very proficient at it.

Forget about the sample questions. Do the following and you'd clear probably 90 % of interviews on web technologies :
1. If you havent already done it, then do consider an SCWCD. The certification would add little value but you'd read up about a lot of stuff that you'd rarely work on.
2. Download and read Servlet spec(2.4 would be fine), JSP Spec (2.0), EL spec etc
3. Check out the DTD for web.xml and explore each of the tags
4. Be familiar with JSTL tag library - esp core and format
5. If you arent familiar with custom tags yet, its time to learn writing custom tags
6. Brush up HTTP protocol basics, standard headers, standard eror codes etc - I have come across some candidates who do web development but dont understand basics of HTTP

reading up all this would barely take a month or so and once you are thoroughly done, you'd crack most of mid level positions for web developers


Certifications: SCJP (2005), SCWCD (2006), OCA (2006), WAS Admin (2007), SCBCD (2008), SCJD (2009), SCDJWS(2009)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@sony: I didn't mean to discourage you--if you're planning on doing Java-based web development you *do* need to understand servlets and JSPs, no matter what web framework (if any) you're using.

I just meant that I literally haven't been asked a question about servlets for a long time (except for one place where they were looking for a canned set of answers, which meant I wouldn't want to work there). The questions I'm most often asked are about specific frameworks ("How does Struts process a request?" and that kind of thing) rather than at such a low level.

That may also be influenced by my relative seniority and the kinds of positions I've interviewed for.

So don't be discouraged--you definitely need to understand how servlets, JSPs, and the basic request cycle works. You might be asked questions about some of the low-level objects (like what represents a request from a web browser, where do you store application- and session-specific data, and so on).

Anything built on top of the low-level web app components still requires an understanding of what's going on "under the covers".
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30957
    
158

David Newton wrote:I haven't been asked a servlet question in ages.

There's a difference based on the type of position. I would be less likely to ask Dave a servlet question directly because I could use it as an assumption in ask a more advanced question. If I am interviewing a college student, I am going to ask the basics. For three years, it depends on what one has done during that three years.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(Besides--I actually walked out of the servlet question interview, and you wouldn't wanna make me mad ;)
Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
Thanks David and kaustuv.
By the way where can i download the Spec of Servlets and Jsp
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3263
Here are some questions on Servlet.

--What is the difference between CGI and Servlet?

-- HTTP is a stateless protocol, so, how do you maintain state? How do you store user data between requests? (FAQ)

-- Explain the life cycle methods of a servlet?

-- Q. Which protocol is used to communicate between a browser and a servlet?


-- Q. What is the difference between forwarding a request and redirecting a request?


-- Q. What are the considerations for servlet clustering?
-- Q. How would you get the browser to request for an updated page in 10 seconds from the server?

-- Q. What can you do in your Servlet/JSP code to tell browser not to cache the pages?

-- Q. What are the different scopes or places where a servlet can save data for its processing?

-- Q. Which code line should be set in a response object before using the PrintWriter or the OutputStream?

-- Q. Session tracking uses cookies by default. What would you do if the cookies are turned off?

-- Q. What is the difference between using getSession(true) and getSession(false) methods?

-- Q. How can you set a cookie and delete a cookie from within a Servlet?

-- Q. What would be an effective use of the Servlet init() method?

-- Q. How does an HTTP Servlet handle client requests?

-- Q. Is it possible to share an HttpSession between a Servlet/JSP and EJB?

-- Explain the directory structure of a Web application?

-- What is the difference between doGet () and doPost () or GET and POST?

-- What are the ServletContext and ServletConfig objects? What are Servlet environment objects?


-- Q. What are servlet lifecycle events?

-- Q. What is the difference between HttpServlet and
GenericServlet?


-- Q. How do you make a Servlet thread safe? What do you need to be concerned about with storing data in Servlet instance fields?


-- Q. How do you get your servlet to stop timing out on a really long database query?

-- Q. What is pre-initialization of a Servlet?


-- Q. What is a RequestDispatcher? What object do you use to forward a request?


500+ Java Interview Questions and Answers | Java job hunting know how & Java resumes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 3yrs experience want to know about questions asked on interviews on servlet and jsp