0

I have a PHP page on one server, which asks for some login details from a user.

I then have a Java application on another server.

I am trying to POST the results from the login form to the Java application, then respond with a yes/no as to whether the details were correct.

Whats the simplest way of going about this? I have read plenty on using sockets to post from Java, not I can't seem to find a good tutorial that explains how to post from a form, process it and return the results pack to the user.

1
  • 1
    send to server post, server responds json? Commented Dec 2, 2011 at 11:11

2 Answers 2

2

The best way is to use web services. Implement a web service on Java application and call him from another application.

Best Regards.

Sign up to request clarification or add additional context in comments.

Comments

0

Change the form that posts to PHP to post to your Java application. If that workaround is acceptable in your situation. Definitely simpler than implementing web services - but otherwise I am afraid you will have to go for WS if you just can't change the url of the form's action

1 Comment

I can change the URL of the forms action. How would I read in the post in Java, using sockets? How would the form receive the output from the Java app?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.