• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about sending request

 
sunanda kadam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I am doing one appliocation for sending one messege from my tomcat to other tomcat in LAN.
can i do this ?
please give me some hint .
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. HTTP would seem simplest since both servers are obviously equipped to handle it, but many other options exist: Mail, JMS, shared file system, database, sockets, web service, ...
 
sunanda kadam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you tell me the link from where i'll get these details with examples ?
Through webservice how we can do ?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you have specific reasons to use WS, I'd resort to HTTP or raw sockets. Code examples for both can be found here. The Sun Java Tutorial also has an extensive chapter on networking.
 
sunanda kadam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ulf.
 
sunanda kadam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through mail how can we do this ?
My application is client-server(request-response) type.
if suppose there 3 machines in network ,then they should communicate with each other ,having inbox(mail saved ) on their machines.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously, there would need to be a mail server that all machines can access. The client access to that server can be handled using the JavaMail API.

I think that HTTP would be far easier to implement, though, and have other advantages (like synchronicity).
[ August 07, 2008: Message edited by: Ulf Dittmer ]
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is the Java Mail API for mail communication, but if you need to communicate among two servers (or a client and a server), then I think that HTTP is the best way

[edit]
Well Ulf said it before me although his post was not visible the time I posted.And since we both are saying the same thing then it must be right
[/edit]
[ August 07, 2008: Message edited by: Amit Ghorpade ]
 
sunanda kadam
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through http get & post methods we have to do it or other methods are used.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sunanda kadam:
Through http get & post methods we have to do it or other methods are used.


I'm not sure what you are saying/asking here.
Was there something in an earlier post that you didn't understand?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sunanda kadam:
Through http get & post methods we have to do it or other methods are used.


There are many methods, like Ulf and the others have pointed out. You need to decide which one you want. What is it that you are trying to send ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic