Solved

to fontaine!

Posted on 1998-07-02
13
174 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
  • 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now