About JSP

5 pts.
Tags:
Java Servlets
JSP
Web development
please anyone help me.... i want to translate a jsp file into servlet manually by coding any one help me ....
ASKED: October 12, 2008  1:58 PM
UPDATED: November 22, 2010  12:58 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following