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

How httpservlet is different from the genericservlet?

560


What are different methods of session management in servlets?

773


Which method of the httpservletrequest object is used?

561


What are the kinds of http requests?

606


Tell us something about servletcontext interface.

626






Can you send an authentication error from a servlet?

517


Write a servlet to upload file on server.

593


What is meant by servlet? What are the parameters of the service method?

570


How many objects of a servlet is created?

788


What are the supporting protocol by HttpServlet ?

652


When servlet object is created?

600


Can servlet have a constructor ?

595


How to get the IP address of client in servlet?

623


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

607


Is servlet thread safe?

519