Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to call servlet from jsp

 
Shiv Harsha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai all
I am having a javascript function which called in a jsp page when a link is clicked. In that fn iam calling a servlet.
The link is calling the servlet when clicked first time.
But if we click the link again the control s not going to the servlet but taking from the cached local page since the action s inside the javascript.

Now how to change this ??so that each time i click the link , it must go the servlet from the fn.
thanks
[ March 17, 2005: Message edited by: Bear Bibeault ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using javascript? Just use an anchor tag instead.
 
Shiv Harsha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah using Anchor fields only in the jsp. On clicking the anchor i need to check for certain validations after that only i will call servlet.
There are many anchors in the jsp page which will be assigned values from the Db while loading.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post that javascript method, then we might be able to say something.
[ March 17, 2005: Message edited by: Adeel Ansari ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!