• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

How to call a Servlet from href tag?  RSS feed

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know that how do we write the url in href tag for calling a Servlet...
also does the url-pattern in web.xml file help in making the url for href...if yes then how ??
Please help guys...
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


In web.xml

 
Alpesh Rathod
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i did it somehow...

By the way thanks for your answer....
 
Alpesh Rathod
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey i atlast i got it myself....

Well thanks for your answer though..
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Alpesh Rathod wrote:Hi got it myself....


Good


Alpesh Rathod wrote:
Well thanks for your answer though..



You are welcome
 
Greenhorn
Posts: 5
Android Java jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this code to call servlet from the href tag
in web.xml file
 
Saloon Keeper
Posts: 20655
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you don't "call" servlets. You make URL requests to the webapp server. The server then dissects the request, routes it, and eventually calls methods in the appropriate servlet class. I know it sounds pedantic, but how you talk influences how you think. Servlets aren't called, they're invoked.

And you generally should NOT have a "login servlet". The technical term for apps that do that is "hacked". Use the JEE built-in security system whenever possible. It blocks many attacks before they can get routed to, much less exploit, a webapp.
 
Do you pee on your compost? Does this tiny ad?
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!