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 are important features of Servlet 3?
What does the term localization refer to?
What is lazy loading and what is Generic Servlet Class?
What are common tasks performed by Servlet Container?
If my browser does not support cookie, and my server sends a cookie instance what will happen?
How session tracking can be achieved, if your browser doesn't support cookies (or) if cookies are disabled?
Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?
How to notify an object in session when session is invalidated or timed-out?
Why jsp is better than servlet?
What is the procedure of invoking different servlet in a different application?
What is servlet used for?
What is the major difference between context parameter and context attribute?