action listener for struts html tag

hi i am doing a project using sturts. I have used struts HTML Select tag with a collection of values in select box. now i want to write an actionlistner for that select...ie if i select any value from the select list it should do some action like take me to different page...can anyone tell me how can i do that...

Thanks

[334 byte] By [reddy2005a] at [2007-10-3 4:53:24]
# 1
I can't quite understand how so many of you people (apparently) made it through school and are now programming, but the one thing you didn't learn to do is READ A BOOK. Now go get a book on Struts and come back here when you have JAVA problems.
SoulTech2012a at 2007-7-14 22:58:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

hello mr.seoul thanks for your reply.....i dont know in which country you are working but in our country we need to learn and start programming at the same..time....so we get reallu frustrated with this.....anyway thats our problem, and its my fault to post such a simple question...

but mind u ......give an answer if u know that ......dont give these type of replies next time ......you are not the only person in this forum there are many guys to help us.....be careful

reddy2005a at 2007-7-14 22:58:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Soultech, I think you're being a bit harsh. Struts is a valid topic on this forum as it is a java framework related to JSP.

However having said that, the question does show a basic misunderstanding of JSP technology.

JSP = Java SERVER Pages. Java code only runs on the server.

All that gets sent to the client (browser) is an HTML file.

You can not write java action listeners to run and respond to events on the client.

For any client side interaction you will have to use javascript (which is NOT java) - probably an onclick/onchange event - the same as any other web page.

However you can only run javascript code from such events.

To run java again you have to submit a request to a server - normally done by submitting a form.

evnafetsa at 2007-7-14 22:58:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Thanks evnafets, your information was really helpful...
reddy2005a at 2007-7-14 22:58:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...