I need some details about an employee. i have only the
employee id in my presentation layer(JSP).I entered that ID
and click "Show Details" Button. Question is how the JSP
pass that id to Controller layer and DAO and what mechanism
we are using to retrive data from DB and how the data
passed to JSP as a Output. Please explain in detail.
Answer / yagnik
Your jsp form action id when u press submit it will call
the action which is in html form action(some jsp,or
servlet) that jsp will able to get employee id throuh
req.getparameter('employee_id'); and then tht JSP use bean
class for connection to DB using JDBC and then it will
return result to the calling jsp and tht jsp will print
responce (employee details) and tht generated out put will
be sent to the client.
| Is This Answer Correct ? | 3 Yes | 0 No |
Why java applets are more useful for intranets as compared to internet?
What is the size of int?
How do you sort arrays in java?
We can write any Java Logics in our JSP. Then why we are using servlets(Controller Layer) to interact with the DAO ?
When to use runnable interface vs thread class in java?
What is arrays fill in java?
What are different types of states exist for a thread?
why Runnable interface is preferable than extending the Thread class?
7 Answers Aizza, College School Exams Tests, Sybrant Technologies, Wipro,
What are the features in java?
What are the approaches that you will follow for making a program very efficient?
Can we have two methods in a class with the same name?
what is ststic with example