answersLogoWhite

0


Best Answer

I have created a .jsp file, in which, I am calling a class.method() through TagLib. REQUIREMENT is, I want to call a servlet instead of a simple class. And Servlet will get the response, and request object from Jsp, and manipulate that, and produce the response object, and control is transfered back to JSP again.

User Avatar

Wiki User

โˆ™ 2010-07-01 15:08:01
This answer is:
User Avatar
Study guides

Add your answer:

Earn +20 pts
Q: How do you call a Servlet from JSP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you import jsp file in servlet?

I think the name of the jsp file is included in the web.xml of the servlet


How do you proove servlets are faster than JSP?

because JSP internally changes in servlet and then follow servlet life cycle, so it is slower than servlet


Why donot you have doget in jsp also?

Because the doGet is the work of the Servlet and not the JSP


How do you call servlet from java script?

You can do this if:The Java Script code is present inside a JSP pageThe JSP page is part of a J2EE applicationBy submitting the HTML Form the control would go back to the Servlet.


Can insert javascript coding in servlet?

No. Javascript code can be present inside a JSP but not inside a servlet. A Servlet is a pure java class.


How do JSP methods get translated to Servlet methods?

A JSP gets converted into a Servlet for execution and hence the methods in a JSP are similar to the ones in a Servlet.Scriptlets and Expressions will end up in the body of doGet or doPostDeclarations will end up as instance variablesjspInit() and jspDestroy() will get translated to Servlet's init() and destroy() methods


Which one is faster servlet OR jsp?

Servlet is more faster than JSP, but JSP is more convenient than Servlet and JSP is clearly superior, shorter, simple and easier to use. JSP can be perceived as Java in HTML code. JSP require no explicit compilation as like servlets and can keep in the web application server as HTML file. The web application server in turn compile the java code in JSP and load it in its library for future execution. Servlet can be perceived as HTML in Java code. The servlet is the class file, which would be loaded in the web application server as a program. The program output will be directed to the outstream object which in turn direct to the client as HTML elements.


What is the latest version of servlet specification?

Servlets 3.0 and JSP 2.1


What is the difference between requestgetattribute and requestgetParameter in JSP?

request.getAttribute() is used on the Server side Java code to get values submitted from the form onto the Servlet or other java classes request.getParameter() is used on the JSP page to get values sent by the servlet and display it in the jsp page


What is different between jsp and servlets?

A JSP is typically oriented more towards displaying information, and a servlet is more oriented towards processing information. For example, a JSP might display a report, while a servlet would process a user submitted form. These uses are not exclusive, but they are optimized more for performing tasks in this manner. It is much easier to incorporate HTML coding into a JSP than a Servlet. It is also easier to write more complex Java code in a servlet.


How do you get the image file from the database with JSP?

Follow the steps of this article: codejava.net/coding/upload-files-to-database-servlet-jsp-mysql.


How you can display servlet page in jsp page?

You cannot. You display JSP Pages using the help of Servlets. Servlets are of the background classes and you cannot display them

People also asked