Aw: Re: HTTP traffic over a custom proxy server?

K

Knorpi

Ok, but how can I then realize this:

- open a web page on a server x with a submit form
- enter a web address into the form and press submit
- the wanted web page is fetched by server x and served to client

Meaning: The client only communicates with server x.

Magnus
 
S

Stefan Ram

Knorpi said:
Ok, but how can I then realize this:
- open a web page on a server x with a submit form

In HTTP, web pages are not »opened«. There are HTTP requests
sent and HTTP responses received (or sent, depending on the
point of view).
- enter a web address into the form and press submit

Your description is worded in terms of the browser's
user experience. You need to understand how this is
realized using HTML and HTTP, to properly implement
it in Java by reading RFC 2616 and the HTML 4.01
recommendation or use a library such as

http://htmlunit.sourceforge.net/

. I do not know JEE that well, so maybe I miss something,
but to write an HTTP proxy, I would not use servlets, but

proxyServerSocket = new java.net.ServerSocket( proxyPort );
while( true )method( proxyServerSocket.accept() );
 
L

Lars Enderin

2011-06-24 13:02, Knorpi skrev:
Ok, but how can I then realize this:

- open a web page on a server x with a submit form
- enter a web address into the form and press submit
- the wanted web page is fetched by server x and served to client

Meaning: The client only communicates with server x.

Please don't use the new Google Groups interface. It breaks Usenet threads.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top