This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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: 67618
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: 67618
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.
 
Sheriff
Posts: 26950
83
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?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic