connecting J2SE application to a servlet

M

Mahesh S

Hi

I am writing a stand-alone java application. I would like the
application to invoke a servlet which in turn would do some database
operation. I have the servlet working. How do I make the stand-alone
application talk to the servlet? Any pointers will be very helpful.

Thanks
Mahesh
 
O

Oliver Wong

Mahesh S said:
Hi

I am writing a stand-alone java application. I would like the
application to invoke a servlet which in turn would do some database
operation. I have the servlet working. How do I make the stand-alone
application talk to the servlet? Any pointers will be very helpful.

How about via an HTTP request to your webserver or application server?

- Oliver
 
N

Nigel Wade

Mahesh said:
Hi

I am writing a stand-alone java application. I would like the
application to invoke a servlet which in turn would do some database
operation. I have the servlet working. How do I make the stand-alone
application talk to the servlet? Any pointers will be very helpful.

Thanks
Mahesh

You can use URL.openConnection() to establish a connection to a servlet. The URL
would be the URL of your servlet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top