954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Servlet and socket client

hi
Is this possible to send a request to servlet from socket client?
I use request.getInputStream method to get client request. I got an error
HTTP/1.1 400 Bad Request
Server:Apache-Coyoyte/1.1
Transfer Encoding:chunked
Date:Fri,04 Nov 2011
Connection:close

How can I achieve my task??

syeda amna
Light Poster
28 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

Yes, if you provide Web Service

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Thanks for your reply. Is it possible on local host??

syeda amna
Light Poster
28 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

Yes, you either adjust your "hosts" file to fake domain on your pc or just query localhost

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Can you tell me the exact code for this?

syeda amna
Light Poster
28 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 
Can you tell me the exact code for this?


Code for what?
If you looking for "hosts" just google for hosts operating system name you use and add domain. If you want to know about Web Services then you should read either book or Oracle tutorial (there is no "silver bullet"/fast solution for this)

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

I want to know how a servlet accepts the socket client request.
What you have said is possible on localhost. Plzzz can you help me by suggesting a good tutorial. I have not found any. Thanks you once again.

syeda amna
Light Poster
28 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

I'm not aware of any "quick" tutorial. There is the official Oracle tutorial as linked above, there are some Eclipse based tutorials like this and then the long route of book reading

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Very nice :)

syeda amna
Light Poster
28 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You