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 is MIME Type?

1144


Explain jsessionid?

1041


What is a generic servlet?

958


Explain the role of dispatcherservlet and contextloaderlistener.

1197


What are the phases of servlet life cycle?

1114


What do you mean by mime type?

977


How does java thread pool work?

1116


Differentiate between get and post?

1163


How can we include static files in the jsp page?

1064


What do you mean by the servlet chaining?

1085


Explain the steps involved in placing a servlet within a package?

1059


Why session tracking is needed?

1030


What are the types of servlet?

1302


What are the different methods of session management in servlets?

1030


What is the major difference between context parameter and context attribute?

1116