Answer Posted / 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 |
Post New Answer View All Answers
What exactly is a servlet?
What is a servlet context object?
What are the objects involved when a servlet receives a call from client?
What is api in servlet?
How we can call a jsp from the servlet?
Is servlet a server side scripting language?
Which application server is best for java?
What is the difference between Servlets and Applets?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
Differentiate between the print writer and servlet output stream?
List out the difference between ServletConfig and ServletContext?
How does Cookies work in Servlets?
What are the life cycle methods of a servlet?
What are all the protocols supported by httpservlet?
What is httpservlet class?