Arduino mega+ethernet shield web server

I am using Arduino Mega 2560 + ethernet shield. I can access web server and receive analog input values on the server. Now, I want to know how can I get values from the server and send it to the serial port. I want the user to input some value through the web server and then that value is send to the serial1 port of arduino.

I can access web server and receive analog input values on the server.

Do you mean that you start a browser, pointing it at the Arduino as server, and can see the analog values that the Arduino sent?

Now, I want to know how can I get values from the server and send it to the serial port.

You need to be clear about which end is the server and which end is the client, and which end has the serial port.

I want the user to input some value through the web server

A user can not input some value through the server. If the server serves a form, and that form contains text input fields, submit buttons, and an action field, a GET request will be made. If the Arduino is the server, it can deal with that GET request, and make use of the extra information in the GET request.

Thanks for the help. Yes, Arduino is the server. Now, can you give an example of a small code using GET command to send a string from the form to serial port of arduino.