• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet with file text

 
alona ariel
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please somebody can help me
when I try to run program that contained file text ( on servlet) the server can not run it .it writes: this program cannot display the webpage. why its happen?
what can I do?
when I wrote programm that does not contain file text, the server works well
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what you mean by "file text".
 
alona ariel
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its mean that the progrram contains file.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will find that the number and quality of your answers greatly depends upon the quality of your questions. Yours isn't faring well so far.

I still don't know what you mean. All programs "contain files". If you are not going to take the time to explain what you mean by that, why should anyone volunteer their time to try and help you?
 
alona ariel
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope that now you will understand me bettet my programm have to read file
I attached the code:
BufferedReader in = new BufferedReader(new FileReader(
"C:\\Documents and Settings\\Owner\\workspace\\example9\\user.txt"));
String str;
while ((str = in.readLine()) != null) {

StringTokenizer st = new StringTokenizer(str);
while(st.hasMoreTokens()){

if(command.equals("current")){
and I think this code make the problem to the server so its cannot display
the website. if I didnt attach this code the program works well.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then I expect there is something wrong with that code. Does it throw any exceptions? And what happens on the client side? Do you see nothing, or some HTTP error code?
 
alona ariel
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the code that make the problem to the server

if(command.equals("current")){
key=st.nextToken();

(if I dont write this code the server works well)
the server stuck in and after long time it say this program cannot display the webpage.
is it something wrong with it
what I can do?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic