permaculture playing cards
The moose likes Servlets and the fly likes Post to Remote Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Post to Remote Servlet" Watch "Post to Remote Servlet" New topic

Post to Remote Servlet

Brendan Crisler

Joined: Feb 07, 2007
Posts: 19

I am curious if it is at all possible to POST from a .html page residing in a web server on workstation A, to a Servlet residing in Tomcat on workstation B?

Code: -------------------------------------------------------

<form action="http://hostname/servlet/fooServlet" method="POST">
<input type="submit" value="Submit">


End Code: ------------------------------------------------------

I'll understand if it isn't possible, so if it is, is there a way around it?

Thanks, B
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63221

Have you tried it?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Brendan Crisler

Joined: Feb 07, 2007
Posts: 19
Yeah, I've tried it, but all I seem to get back to the client (web page on host A) is HTTP Status 500 - Internal Server Error.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19728

So you're getting connected and you're getting a response. And the response is, there was an error on server B. The thing to do now is to go over to server B and look in its logs to find out what that error was.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Post to Remote Servlet
It's not a secret anymore!