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 do you mean by deployment descriptor?
Explain how to improve Servlet Performance?
How to generate the server side programming and the advantages of it over the other languages?
What are the ways to handle multi-threading in servlets?
Tell us something about servletconfig interface.
Explain session tracking and its importance?
Can we fetch the attributes related to a servlet on a different servlet?
Should I override the service() method?
What is session tracking?
What do you understand by mime type?
What is servlet initializer?
How can we create deadlock situation in servlet?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
Whether thread can be used in servlets?
How do you create a cookie using servlet?