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 java servlet?
Explain jsessionid and when is it created?
What are the different methods involved in generic servlet?
How to pass a requrest object of one servlet as a request object to another servlet?
How can you run a servlet program?
what are the way a client can be tracked?
What happens, when client requests for server object, which is not yet loaded into the memory?
Why do we need a constructor in a servlet if we use the init method?
Write a command to get actual path of a servlet to the server?
What is servlet and how it works?
What's the difference between authentication and authorization?
Can you call a jsp from the servlet?