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 the life cycle methods of the servlet?
How do cookies work in servlets?
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
What are the types of Session Tracking ?
What are the uses of servlet
What's the use of servletcontext?
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?
Which event is fired at the time of setting, getting or removing attribute from application scope?
What is load-on-startup in servlet?
What are the jobs performed by servlets?
List some life cycle methods of a servlet.
What is Request Dispatcher?