Can we use servlets in JavaScript?
Answers were Sorted based on User's Feedback
Answer / 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 |
Difference between java beans & servlets?
How to generate the server side programming and the advantages of it over the other languages?
When servlet object is created?
Why do we have servlet filters?
What do you mean by web applications?
How can we invoke another servlet in a different application?
How the JSP file will be executed on the Server side?
What is java servlet session?
What is the difference between 2 types of servlets?
How printwriter is different from servletoutputstream?
How can a servlet be used to generate plain text instead of html?
What is the first statement in jsp page.