Solved

to fontaine!

Posted on 1998-07-02
13
181 Views
Last Modified: 2010-03-30
You told me my applet was running on your machine.
What did it do?
I load my applet from the server, here it's ok.
But the word which is enter is not reversed.
The answer in the textarea is (I use pause method for read):
        http/1.0 400 Mauvaise demande
then  Content-Type : text/html
then  nothing
then  <body><h1>http/1.0 400 Mauvaise demande
then  </h1><body>
the end.
I don't no where it find these marks because I don't have <h1> but <hr>.
I submit this question one time again:
"The server program is running on the server. Is it enough?
Is it necessary for the server program to be from the same directory as the loaded applet?".
I don't have any good answer for this question.
And you, how do you make this program running?

It is no more necessary to turn the applet in an application.
Thank you for your help.
0
Comment
Question by:joac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 4
13 Comments
 

Author Comment

by:joac
ID: 1224440
Edited text of question
0
 

Author Comment

by:joac
ID: 1224441
Edited text of question
0
 
LVL 5

Expert Comment

by:fontaine
ID: 1224442
Could you give me the link to the previous question, so that I can refresh my mind?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:joac
ID: 1224443
today I am joac, tomorow i will be thibal...
I want to test a program that i found in "Java in a nutshell"
0
 

Author Comment

by:joac
ID: 1224444
My questions where "Couldn't connect to 195.221.155.146"
I work on a LAN with an NT server.
0
 

Author Comment

by:joac
ID: 1224445
Edited text of question
0
 
LVL 5

Accepted Solution

by:
fontaine earned 50 total points
ID: 1224446
I think that I see what happens. HTTP 400 means that the HTTP server has received a
request that it couldn't understand due to a malformed syntax. If you have it in the applet,
this means that...you are connecting to the HTTP server from within the applet and not to
the server you wrote. Assuming you are using the code of the last question, here is how
to set up the whole stuff to work:

- on your NT server machine, start the "reverse string" server. It is listening on port 1548.
- put the applet in the "pages" directory of the Web server (that part seems ok).

The Web server serves the HTML page and starts the applet. The applet deduces the host
name of the server machine using the host name of the Web server that served it and
connects to the "reverse string" server listening on port 1548. I have the feeling that in your
applet, you are using the port dedicated to the Web service (80, probably). That's the
mistake: it has to be port of the "reverse string" server, not the one of the Web server.
0
 

Author Comment

by:joac
ID: 1224447
When I run the server, there is not any information like
"Server:listening on port XX". there is a system.out.println with this sentence. Is it normal?


 
0
 

Author Comment

by:joac
ID: 1224448
I have choose 1548 at random for the port number.
Could it be a reserved port number for a specific service?
0
 
LVL 5

Expert Comment

by:fontaine
ID: 1224449
I have it, here. Be sure that you can use the port 1548. Shut down your server and see
if another server is already on that port using a telnet:

telnet www.server.com 1548

if the connection succeeds, the port is already in use.


0
 

Author Comment

by:joac
ID: 1224450
My applet is in the pages directory of the Web server (I can load it on the client machine).The port number is 1548 in the code.
You said that you think my applet is served by the HTTP server?
It could be due to an operation of the applet which make port=0?

0
 
LVL 5

Expert Comment

by:fontaine
ID: 1224451
Your applet has to be served by the HTTP server, but the request sent from within the applet
has to be sent to the server you wrote, i.e on www.machine.com, port 1548. Just after
having created the socket, output socket.toString() and post the result here. I think that could
be useful.
0
 

Author Comment

by:joac
ID: 1224452
I try running the server with the jview.exe and then it is running. I am very happy! thank you for your fast help since three weeks. No I will try to adapt this program to my own project.
I will be happy to find you on the Net answering my question!
     
     joac le francophone.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question