This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes File parser application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "File parser application" Watch "File parser application" New topic
Author

File parser application

Siddhesh Khedekar
Ranch Hand

Joined: Nov 09, 2009
Posts: 41
How to pass filepath from JSP to Servlet?
Then I want to parse the file in servlet (parsing logic I have) then I want to display the list in another JSP?
Please give me guidelines and code if possible.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9307
    
  17

How to pass filepath from JSP to Servlet?

You mean after a JSP page is shown to the user in the browser then?? Also when you said "parse the file", is there anything specific that you want to do while parsing the file or just read it from start to end??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Siddhesh Khedekar
Ranch Hand

Joined: Nov 09, 2009
Posts: 41
Parsing logic I have.My problem is how to pass a file path to servlet and then parse the file using the file path.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
Where is the file? Client side or server side? You can't address files on the client's computer from the servlet for obvious security reasons.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: File parser application