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 |
What is the ServletConfig() and what is its use?
Is that servlet is pure java object or not?
How to work with Chinese login page (internationalization).if he enters user name and password in chinese, how is it converted to English and validate in db? And in reverse it should display welcome message in Chinese,if user is valid
How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255
When we don't write any constructor for the servlet, how does container create an instance of servlet?
What are the phases of the servlet life cycle?
What do you mean by httpservlet?
explain the advantages of servlet life cycle?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
Why servlet is faster than jsp?
What are the types of servlet?
Which is better jsp or servlet?