• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSAD implementation doubt

 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone tell me how to call a servlet from a JSP's JAVA SCRIPT functions(i.e the script tags)

I am breaking my head on this but could not find the solution.

Thanks in advance.
 
Paul Wong
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to call your servlet to retrieve a value or retrieve a page (replace a <div> or redirect entirely to that page?
Anyhow, check out AJAX. You can use it to retrieve a value, or even replace a <div> where the div is the content of your servlet.
I guess that to redirect your entire page to the servlet should not be a problem as you can use the javascript window.location=<servlet page>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic