Solved

to fontaine!

Posted on 1998-07-02
13
178 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 123
javap not working 8 60
ejb on wildfly 5 30
junit as external jar or library 7 24
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

820 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