<%@ page contentType="text/html; charset=gb2312"  %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÏÔÊ¾ÇëÇóURL</title>
<script language="javascript" >
function changeMethod()
{
	document.form1.method=document.form1.requestMethod.value;
}
</script>
</head>

<body>
<% 
out.println("Protocol: " + request.getProtocol() + " <br>"); 
out.println("Host: " + request.getHeader("Host") + " <br>"); 
out.println("Server Name: " + request.getServerName() + " <br>" ); 
out.println("Server Port: " + request.getServerPort() + "<br> ");  
out.println("HTTP Method: " + request.getMethod() + " <br>"); 
out.println("Path Info: " + request.getPathInfo() + " <br>"); 
out.println("Path Trans: " + request.getPathTranslated() + "<br> "); 
out.println("Context Path: " + request.getContextPath() + "<br> "); 
out.println("Request URI: " + request.getRequestURI() + "<br> "); 
out.println("Request URL: " + request.getRequestURL() + "<br> ");
out.println("Servlet Path: " + request.getServletPath() + " <br>");
out.println("Query String: " + request.getQueryString() + "<br> "); 
%>
<form name="form1" method="GET" action="showURLInfo.jsp">
  <select name="favorite" id="favorite">
    <option value="cat" selected>²¨Ë¹Ã¨</option>
    <option value="dog">ºÚ±³¹·</option>
    <option value="parrot">ðÐðÄ</option>
    <option value="cabrite">òáòæ</option>
  </select>
  &nbsp;
  <select name="food" id="food">
    <option value="fish" selected>Óã</option>
    <option value="bone">¹ÇÍ·</option>
    <option value="corn">ÓñÃ×</option>
    <option value="ant">ÂìÒÏ</option>
  </select>
  &nbsp;
  <select name="requestMethod" id="requestMethod" onChange="javascript:changeMethod();">
    <option value="POST">POST</option>
    <option value="GET" selected>GET</option>
  </select>
  &nbsp;
  <input type="submit" value="Ìá½»">
</form>
</body>
</html>
