Can we use javascript in Servlets?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sanjeev
Yes, If we are able to write javascript in jsp then Obviously
we can write javascript in a servlet because internally jsp
will be converted to servlet.
| Is This Answer Correct ? | 14 Yes | 3 No |
What is the structure of the http response
Define context initialization parameters.
Differentiate between get and post?
What is the GenericServlet class?
How do cookies work in servlets?
What is httpservlet class?
What is the difference between doGet and doPost?
What must be implemented by all servlets?
What are some advantages of storing session state in cookies?
How the servlet is loaded?
How can an existing session be invalidated?
What are the jobs performed by servlets?