Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

event listeners in jsp  RSS feed

 
Ramu Karnati
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is there is any way to implement event listeners in jsp , like ValueChangeListener in jsf facelets? Here I would like avoid Js or Ajax code in my jsp.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are a little mixed up. JSP simply create a HTML page sent to the user's browser. Any events the user causes will first be interpreted by the browser - typically with JavaScript or as editing/form submitting, etc. events.

On the server/servlet/JSP side you only see requests from the browser, not user events directly.

Bill
 
Aditya Narayan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramu Karnati,
Your question seems apt .

Hi William Brogden ,
Just consider a scenario where this event listener is not about the client based event(browser events), but may be because of the servlet events. Think , as jsp is eventually converted to servlets. Since servlets support the various event listeners like session, servlet context etc events. So the question is correctly asked whether a jsp(which converts to servlet) may also act as an event listener like servlets do for the aforesaid events.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No not that is not what the original question was. The context of the question shows that the OP was interested in user events; not server-side events.

In any case, the fact that a JSP is converted to a servlet is an implementation detail. Authors of JSP should limit themselves to mechanisms that are appropriate and defined for JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!