webServerStr + "?" + URLEncoder.encode("UserOption") + "=" + URLEncoder.encode("AppletDisplay");
得到的结果如:http://localhost:8080/servlet/myServlet?attributeName=attributeValue
问号是将地址跟参数分隔的分割符,前面的是地址,后面跟的自然就是参数
得到的结果如:http://localhost:8080/servlet/myServlet?attributeName=attributeValue
问号是将地址跟参数分隔的分割符,前面的是地址,后面跟的自然就是参数
一、用setAttribute,然后用getAttribute获取
二、通过url,就是上面的形式设置传递的参数,然后通过getParameter来获取