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 MIME Type?
Explain jsessionid?
What is a generic servlet?
Explain the role of dispatcherservlet and contextloaderlistener.
What are the phases of servlet life cycle?
What do you mean by mime type?
How does java thread pool work?
Differentiate between get and post?
How can we include static files in the jsp page?
What do you mean by the servlet chaining?
Explain the steps involved in placing a servlet within a package?
Why session tracking is needed?
What are the types of servlet?
What are the different methods of session management in servlets?
What is the major difference between context parameter and context attribute?