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 a cookie What is the difference between session and cookie
how do you maintain sessions in servlets?
What are sessions in servlets?
Difference between Include, Forward and sendRedirect in Servlet?
Explain the difference between a web server and a web container?
When the methods init() and Distroy() will be called?
What is the difference between ExecuteUpdate and ExecuteQuery?
What are the different ways we can maintain state between requests?
What advantages do servlets have over CGI programs?
What is war file?
What do you mean by scope object and what are its types?
Hi guys.. Well can u tell me that why there is need of "init()" , i mean why can not we initialize the servlet object with the help of constructors? Thank you.