Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we use servlets in JavaScript?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the disadvantages of storing session state in cookies?

1092


How can you use a servlet to generate a plain text instead of html?

1074


How do you invoke a servelt?

1062


What are all the advantages of servlet over cgi?

1018


What is a servlet engine?

968


What is string tokenizer?

1028


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

1156


What are the functions of Servlet container?

1058


Whether thread can be used in servlets?

1159


What is Client-Server Computing?

2351


How can a servlet be used to generate plain text instead of html?

903


Write the code to get the server information in servlet.

981


What is servlet initializer?

914


What is the directory structure of web application?

923


What is difference between cookies and httpsession?

1027