Solved

to fontaine!

Posted on 1998-07-02
13
177 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JList custom Cell Renderer refresh 15 57
object oriented programming comparison 5 72
map related example 6 48
by zero exception 10 41
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…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

777 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