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
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
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
Joined: Jun 18, 2001
Hmm, Jagdeep u r a SCWCD also. Post answers to all these questions now. It will be your preparation ! Leena
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
Joined: Feb 09, 2002
Thank you Bhart. I understand beter now. If anyone has more information about my question, it would be appreciated.
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?
Joined: Jun 18, 2001
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
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 ]
What is the purpose of a "Front Controller?" Which of the following scopes are thread-safe? Application Session
Joined: Aug 12, 2002
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?
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.