Can we use servlets in JavaScript?

Answers were Sorted based on User's Feedback



Can we use servlets in JavaScript?..

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

Can we use servlets in JavaScript?..

Answer / subrahmanyam

NO

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Servlets Interview Questions

What is the ServletConfig() and what is its use?

4 Answers   Google,


Is that servlet is pure java object or not?

0 Answers  


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

4 Answers   Bosch,


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

0 Answers   Bosch, EF,


When we don't write any constructor for the servlet, how does container create an instance of servlet?

2 Answers   Godrej, TATA,






What are the phases of the servlet life cycle?

0 Answers  


What do you mean by httpservlet?

0 Answers  


explain the advantages of servlet life cycle?

0 Answers  


Are Servlets Thread Safe? How to achieve thread safety in servlets?

0 Answers  


Why servlet is faster than jsp?

0 Answers  


What are the types of servlet?

0 Answers  


Which is better jsp or servlet?

0 Answers  


Categories