Create a class which implements ActionListener, with the path as a private field (most likely in the form of a String, or just maybe a java.io.File). You can use the path in the actionPerformed() method.
Originally posted by Campbell Ritchie: Sounds llike something which would sit better in the Swing Forum.
Moving . . .
I think you missed the "jsp page" part
Moving once more.
As for a solution, do JSP pages get the button that was pressed in the request like PHP does? In PHP, if you have a button called "button1" with value (and label) "First" and a button called "button2" with value "Second", the POST / GET data will contain a key-value pair of button1-First if the first button is pressed, and button2-Second if the second button is pressed. You can use this to find the difference, but you will have to do it in the same page. As far as I know, you cannot have one form go to two different pages.