Recently i attended an interview with a MNC. I was asked few questions as below which made me to confuse and think
Question 1: How do you get the db connection and in what way you communicate to database from your project
I said, am using datasource that is registered with JNDI service and hence on look up i am getting the connection. However for the second part in the question, i was confused.
Please let me know how should be the good and professional answer for this question. I am also using
EJB 2.0 in the application.
Question 2: In
struts 1.x can i call the controller from model
I said, the action
servlet will invoked on user request and hence the servlet will decide the forward path, form to be used, relative beans etc and also i drew a diagram representing the architecture of struts mvc model.
The diagram i drew was as similar in the below link
http://www.ibm.com/developerworks/websphere/techjournal/0304_barosa/images/image002.jpg
Please let me know by asking the above question, what does the interviewer expecting and how should my answer be more convincing
Question 3: What is the difference between doget and dopost request
I said, in
doget: user entered data is appended to the URL as query
String. It can send only limited amount of data.
dopost: the user entered is not appended to the URL.It can send any amount of data.
The interviewer said that he wants more good answer and professional answer. Also asked me to think answer based on JVM.
I was confused. Please let me know how should i have convinced him.
Thanks in advance