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 |
How httpservlet is different from the genericservlet?
Can you call a jsp from the servlet?
How native code can be used in a servlet?
Life Cycle of servlets?
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
What are the Internal servlets maintained by the web server?
How servlet is created?
Is that servlet is pure java object or not?
Given the request path below, which are context path, servlet path and path info?
What is setattribute in servlet?
What is cookie? Why is cookie used?
If my browser does not support cookie, and my server sends a cookie instance what will happen?