Guys any suggestions about questions interviewer might ask on servlets. Thanks in advance
Jagdeep Singh<br />SCJP;SCWCD;IBM Certified XML Solution Developer;SCBCD1.3
Malhar Barai
Author
Ranch Hand
Joined: Aug 17, 2001
Posts: 399
posted
0
hey...where are those SHERIFFs...this question has to be transferred to JOBs DISCUSSION... anyway...well jagdeep...many of them do ask the basic questions first..like.. 1. Diff. between GET & POST. 2. Diff. Form methods like doGet, doPost, service, doPut, doTrace... 3. Adv. of Servlet over CGI. 4. Database connectivity... n many more...depends on wat level you are being interviewed for..as in advanced level they may ask you questions related to j2ee... hth MB
Leena Diwan
Ranch Hand
Joined: Jun 18, 2001
Posts: 351
posted
0
Recently one of my friend got these also.. Can u call a, 1. servlet from a servlet 2. a jsp from a servlet 3. a jsp from a jsp 4. a servlet from a jsp well, I feel all combinations are possible. any comments from anyone ? Leena
[SCJP2, SCWCD1.3, SCBCD]
bharat nagpal
Ranch Hand
Joined: Oct 26, 2002
Posts: 76
posted
0
The most common question : 1) servlet life cycle ...and based on this...what do u do in init method, and something about service method These are my favorites , I ask people these days 2) when to use servlet, when to use jsp 3) singleThread model others 4) sharing beans between servlet and JSP
Leena Diwan
Ranch Hand
Joined: Jun 18, 2001
Posts: 351
posted
0
Hmm, Jagdeep u r a SCWCD also. Post answers to all these questions now. It will be your preparation ! Leena
Engin Okucu
Ranch Hand
Joined: Feb 09, 2002
Posts: 174
posted
0
hi Bhart ... Then can you tell me when use servlet and when use jsp ? thank you
Jagdeep Singh
Ranch Hand
Joined: Oct 14, 2002
Posts: 106
posted
0
Leena, I have to interview couple of people in next week. I don't want to be a terminator but just looking for some latest questions!! ((:- Thanks for your help guys...
hie Engin I'm very much sure about the use of JSP: JSP is used (rather essential) in multi-tier environment...it clearly seperates the Presentation from business logic , designers can easily modify prsentation layer, and developers need not to worry about presentation... what I understand is that , JSP will become servlet in the end. so 1) there is some extra (compilation) time , first time or whenever page is modified 2) Container may add some code, that could otherwise be avoided so we use Servlets where its not related to presentation , and the part is handled by java development team only not by the designers, like the controllers in MVC architecture. please guide me if there is something else? thanx
Engin Okucu
Ranch Hand
Joined: Feb 09, 2002
Posts: 174
posted
0
Thank you Bhart. I understand beter now. If anyone has more information about my question, it would be appreciated.
Rufus BugleWeed
Ranch Hand
Joined: Feb 22, 2002
Posts: 1551
posted
0
What is model 1 vs model 2. Which do you like better Struts or JSTL? Which do you like better and why: Tomcat or Jetty?
Leena Diwan
Ranch Hand
Joined: Jun 18, 2001
Posts: 351
posted
0
Gosh ! Rufus, I donno anything about model1 or model2. What are they ? And jetty and JSTL also ! If you know, pls share it. JagDeep, if you are to take interviews, take it on what is important to your projects, if any. Do not end up discarding a person who might have a capacity to grasp things during the course of the project, but know a lil less at this time. Did I make sense here ? Thanks and Regards, Kirti
Model 1 and Model 2 simply refer to the absence or presence (respectively) of a controller servlet that dispatches requests from the client tier and selects views.
Model 2 is better because you can put all your entitlements/security code in one place. In my opinion MVC != Model 1 since MVC is a term for a pattern. People sometimes call Model 2 'MVC2' it's not right or wrong to do that (IMO) but it does make things quite confusing. As for interview tips: Don't get onto subjects that your not 100% confident with! Simon
Steve Chernyak
Ranch Hand
Joined: Oct 19, 2000
Posts: 113
posted
0
Isn't there such a thing as MVC and MVC2? I thought the difference between the two was that in MVC2 the model did not notify the presentation layer after state changes? [ November 07, 2002: Message edited by: Steve Chernyak ]
George Lawniczak
Greenhorn
Joined: Aug 12, 2002
Posts: 27
posted
0
What is the purpose of a "Front Controller?" Which of the following scopes are thread-safe? Application Session
George Lawniczak
Greenhorn
Joined: Aug 12, 2002
Posts: 27
posted
0
Oops, accidently hit submit. Which scopes are considered thread-safe? What happens when you implement the SingleThreadModel interface on a servlet? Can a ServletContext be shared between multiple JVMs? What's the difference between the javax.servlet.SevletContext.getRequestDispatcher and the javax.servlet.ServletRequest.getRequestDispatcher methods?
Garann Means
Ranch Hand
Joined: Jan 28, 2002
Posts: 214
posted
0
Originally posted by Rufus BugleWeed: Which do you like better Struts or JSTL?
Is that supposed to be a trick question? I understood Struts and JSTL to address entirely different needs (Struts is an MVC architecture and JSTL is a collection of useful tags for speeding up development?).. is that wrong? Why would someone like one better than the other - what parts of their usefulness dovetail? Thanks, g.
Peewee Kochs
Greenhorn
Joined: Nov 26, 2002
Posts: 2
posted
0
Garann I think I prefer break dancing over struts.