5 pts.
 About JSP
please anyone help me.... i want to translate a jsp file into servlet manually by coding any one help me ....

Software/Hardware used:
ASKED: October 12, 2008  1:58 PM
UPDATED: November 22, 2010  12:58 PM

Answer Wiki:
The JSP is translated into the appropriate Servlet code, which is a .java file. Many application servers provide the option of keeping the generated .java files. Once it is translated into the .java file it is compiled into the bytecode file (.class). The .class file is executed and the output HTML document is generated and sent back to the client. To translate code bewteen JSP to Servlet: 1. JSP scriptlet (i.e., <% scriptlet %>) and experssion (i.e., <%= expression%>), when translated into a servlet, will end up in the body of doGet or doPost method. 2. JSP declaration (i.e., <%! declaration %>), when translated into a servlet, will end up being instance variables or methods in the servlet class. 3. A variable defined inside of a JSP declaration could translate to an instance variable and a variable defined inside of a JSP scriptlet could translate to a local variable in doGet or doPost method. 4. U may have jspInit() or jspDestroy() methods defined in the JSP declaration. They are equivalent to Servlet's init() and destory() methods.
Last Wiki Answer Submitted:  November 22, 2010  12:58 pm  by  Subhendu Sen   22,035 pts.
All Answer Wiki Contributors:  Subhendu Sen   22,035 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _