wood burning stoves 2.0*
The moose likes Servlets and the fly likes using servlets here?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "using servlets here??" Watch "using servlets here??" New topic
Author

using servlets here??

Yell Srik
Ranch Hand

Joined: Mar 10, 2004
Posts: 61
Hi,
i just wanted to know if the following is possible using Servlets.
i have two text files containing some data about the states in USA
ie say data file1 (area.txt) has data in the format: name of the state
followed by a tab and then the data value ie
New York 12000
New jersey 15000
........
and data file2 (den.txt) has New York 100
New Jersey 200
..............

now i extract the values "12000,15000 etc" from file 1 and
"100,200 etc" from file 2 and do a calculation like dividing "12000" with
"100","15000" by "200" etc. i have finished this part.
now is it possible to use servlet/JSP to map the results into a new
file. the new file should be as follows ie the name of the state with
the corresponding result value)
New York 120
New jersey 150
.......
ie the results obtained from the above calculations are to be mapped
onto their respective state names?
i need ur guidance in proceeding with the above functionality.
thanks in advance
eammon bannon
Ranch Hand

Joined: Mar 16, 2004
Posts: 140
Yes it is possible. Give or take some restrictions, a servlet behaves pretty much like an ordinary java class. All you should be asking is if Servlets are the right choice of technology to use - in this case they would be you need to provide this functionality remotely through a web client.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using servlets here??
 
Similar Threads
calculations using JSP
How to automatically classify data in a large database
javascript, servlets and SVG
Re : Look Up Table
Serializing Records Into Individual Object Files or…