Can we use javascript in Servlets?

Answer Posted / gsrgsrgsr

Yes you can,
In
PrintWriter out=response.getWriter();
out.println("<script langauage='javaScript'>");
out.println("your code here");
out.println("</script>");

Is This Answer Correct ?    42 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between get and post method?

652


What is the GenericServlet class?

713


What is the major difference between servlet and applet?

609


What do you understand by mime type?

664


What are the life-cycle methods for a servlet?

628






What is the disadvantage of cookies?

655


Describe the phases of servlet lifecycle?

714


What is the web server used for running the Servlets?

647


What is the procedure of invoking different servlet in a different application?

646


What is the use of attribute in servlets?

622


What is servlet and its life cycle?

659


Explain the lifecycle of a servlet?

608


Why the container loads server at the application startup and how?

661


What is the structure of the http response

784


What is the functionality of actionservlet and requestprocessor?

681