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 process for chaining servlet?

0 Answers  


what is the difference between?when we write the code in following manner? class One extends httpservlet { } and class One extends genericservlet { }

4 Answers  


What do you mean by filter in servlet?

0 Answers  


What are the features added in Servlet 2.5?

0 Answers  


How do you create a cookie using servlet?

0 Answers  


What are the phases of servlet life cycle?

0 Answers  


How to set a cookie that is persisted only for the duration fo the clients session?

1 Answers  


What is ServletConfig object?

0 Answers  


What mechanisms are used by a Servlet Container to maintain session information?

0 Answers  


What is Request Dispatcher?

1 Answers  


Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?

0 Answers  


What is the difference between genericservlet and httpservlet

0 Answers  


Categories