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
Explain their methods? Tell me their parameter names also have you used threads in servlet?
Explain the difference between generic servlet and http servlet?
When should you prefer to use doget() over dopost()?
What is httpservlet and how it is different from genericservlet?
Why do we have servlet filters?
What is servlet mapping?
What are the difference between session and cookies in servlet? Explain
request parameter how to find whether a parameter exists in the request object?
How we can create war file in servlet?
How can you create a session in servlet?
Why are servlets used?
What are the functions of Servlet container?
What if you need to span your transaction across multiple servlet invocations?
What are the various ways of session supervision in servlets?
What are the types of servlet?