Doing a post to a different domain...
Hi,
I have swing application, which talks to JBoss app server. We used to launch web browser to different pages. All these pages requires authentication and most of the authentication can done via both GET and POST. So we simply append the required request parameter in the URL and call showDocument(URL), which launches browser.
Now the problem is I need to launch a similar page, but this time it doesn't support GET. I have to do a HTTPS post message and make the browser directly go the main page.
For example: think like google uses post instead of get for sending search keyword. So you give a input in a swing and I need to open the output page in browser, such that it directly goes to search results page..
Hope I have made myself clear on this...
# 4
but how would I launch it in a browser.
more details:
There is a website, for which username and password were already stored in our database. so the user need not give username and password every time. By just clicking a button, I have to launch a browser which take directly to the page without logging in. This uses https post.
If it uses http get method, then I can just form the url and launch it in a browser simple ! but how about for post?
# 6
may be i haven't explained my requirement clear enough..
I have found a solution to this problem.
It goes like this, It is a kind of a proxy server.
1. My Client talks to web server 1, do all the talkings to this server.
2. This server in turn will talk to a different server, opening aHttpUrlConnection
3. I will parse the html and rewrite action, so that all the action comes to my servlet in server 1 (because url pattern in server 2 will be different)
4. Copy the response from server 2's httpurlconnection to server 1, response outputstream
yeah, It's bit complicated, but I have to do it like this.
Thanks for your help..