• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet with file text

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its mean that the progrram contains file.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28175
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic