Hi,

        You can use the getQueryString() fn to retrieve the string which you pass 
after the ?. in your request. ( HTTP calls the string after the ? as :Query String)

        Your code would be something like

        public class Test extends HttpServlet {

                public void doGet(HttpServletRequest req, HttpServletResponse res) {

                        String strParam = req.getQueryString(); //returns for eg. the 
string 123456789
                        ...
                }
                ...
        }

NOTE: you should override the GET method for this to work.

Hope it helps,
Regards,
Sathya

*********** REPLY SEPARATOR  ***********

On 6/11/99 at 1:32 PM #YANG YUE XIANG# wrote:

Hi, Everyone,

I know the reques or response of http/1.1 protocal. But when I write the
servlets program, I donot know which method corresponds to getting the
elements of the request or response.

I mean,in the following request,

ht tp://155.69.92.21:8080/chat/chat?123456789

how to get string 123456789, and so on.

Thanks very much!

yang yuexiang


___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to