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 the life cycle methods of the servlet?

0 Answers  


How do cookies work in servlets?

0 Answers  


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

0 Answers  


What are the types of Session Tracking ?

0 Answers  


What are the uses of servlet

0 Answers  






What's the use of servletcontext?

0 Answers  


How ThreadSafe page attribute will be working in Servlet as well as in JSP?Automatically ThresdSafe is true in JSP so service method will be destroy in each and every request or not?so how thresd will handle srevice method?

1 Answers   AZTEC,


Which event is fired at the time of setting, getting or removing attribute from application scope?

0 Answers  


What is load-on-startup in servlet?

0 Answers  


What are the jobs performed by servlets?

0 Answers  


List some life cycle methods of a servlet.

0 Answers  


What is Request Dispatcher?

1 Answers  


Categories