Can we use servlets in JavaScript?
Answers were Sorted based on User's Feedback
Answer / balu
we cant use servlets in javascript but we can call a
servlet by retrieving the form and setting the action as
the url.
ex:if our html has a from named 'XXX'
var formName = document.getElementById('XXX');
var url = contextPath + '/desiredServlet';
formName.action = url;
formName.submit();
| Is This Answer Correct ? | 7 Yes | 1 No |
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?
How multiple simultaneous requests can be handled by servlets?
can we use more than one controller in web application
Why don't we write a constructor in a servlet?
Why the container loads server at the application startup and how?
Difference between forward() method and sendredirect() method ?
How to commuincate between an applet and a servlet?
What is a servlet engine?
Hi Friends, Can we make any method thread safe withour synchronized keyword?
what is servlet and what you get when we use servlets?
Which java application server is the best?
How to prevent browser from caching the page content?