Can we use javascript in Servlets?

Answers were Sorted based on User's Feedback



Can we use javascript in Servlets?..

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

Can we use javascript in Servlets?..

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

Post New Answer

More Servlets Interview Questions

What are important features of Servlet 3?

0 Answers  


What does the term localization refer to?

0 Answers  


What is lazy loading and what is Generic Servlet Class?

0 Answers  


What are common tasks performed by Servlet Container?

0 Answers  


If my browser does not support cookie, and my server sends a cookie instance what will happen?

0 Answers  






How session tracking can be achieved, if your browser doesn't support cookies (or) if cookies are disabled?

2 Answers  


Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?

7 Answers  


How to notify an object in session when session is invalidated or timed-out?

0 Answers  


Why jsp is better than servlet?

0 Answers  


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

0 Answers  


What is servlet used for?

0 Answers  


What is the major difference between context parameter and context attribute?

0 Answers  


Categories