Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
bhaskar de
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Difficult ones!
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)...
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the Job Discussions forum would be more appropriate for this question, so I'll move it there...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't been asked a servlet question in ages.
 
Sony Agrawal
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Besides--I actually walked out of the servlet question interview, and you wouldn't wanna make me mad ;)
 
Sony Agrawal
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David and kaustuv.
By the way where can i download the Spec of Servlets and Jsp
 
arulk pillai
Author
Ranch Hand
Posts: 3385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic