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 is multiple server?
What is the life cycle of a servlet?
What is generic servlet class?
Can we use the constructor, instead of init(), to initialize servlet?
What is the process for chaining servlet?
Describe the phases of servlet lifecycle?
What is the difference between context parameter and context attribute?
What is the servlet?
What is cookie in servlet?
What is servlet instance?
Explain is servlet mapping?
Which is better jsp or servlet?
Describe some assignments that are executed by servlet container?
What is the difference between get and post methods?
Write the code to get the server information in servlet.