<%@ page contentType="text/html;charset=GB2312" %>
<HTML>
<BODY bgcolor=cyan><Font size=1 >
 <P>动态设置mime类型的例子
 <BR>setContentType方法
 <P>当你点击按钮时当前页面就会显示在word文档下
  <FORM action="" method="get" name=form>
     <INPUT TYPE="submit" value="yes" name="submit">
   </FORM>
 <% String str=request.getParameter("submit");
      if(str==null) 
         {str="";
         }
      if(str.equals("yes"))
         {response.setContentType("application/msword;charset=GB2312");
         }
%> 
</FONT>
</BODY>
</HTML>