how to communicate a jsp page with the servlet

hi frndz

I have a problem in communicating a jsp page with the servlet page

i have a o/p jsp file that is showaing some list of file like below

change of name .txt

registration file.txt

.....

..... so many

what actually i want , is that when i click on each file then the contents of that file should goes to an another servlet Page that is present inside the same diresctory.

and also tell me after passing the file how to retrieve it in servlet.

thanks for responses

[546 byte] By [kunwar@newgena] at [2007-11-27 7:37:22]
# 1
It doesn't work that way. You can pass the file name as a servlet parameter, that's all. Or maybe the (encoded) URL for the file, the servlet could then simply download it using an UrlConnection.
CeciNEstPasUnProgrammeura at 2007-7-12 19:17:57 > top of Java-index,Java Essentials,Java Programming...
# 2

thanks

but as i am new to java programing i dont know how to pass parameters from jsp to servlet.

<a href="/servlet/myservlet" target="_blank" onclick="convert(children);return false;"><%=children.substring(0,children.indexOf("."))%></a>

this is what i am doing. I want to send my file children to servlet and then want to acces children in servlet file

kunwar@newgena at 2007-7-12 19:17:57 > top of Java-index,Java Essentials,Java Programming...