<P>jsp:</P><BR clear=all>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_1.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图一)" width="11" height="16" />
<IMG src="http://www.qqread.com/ArtImage/20070706/pu27_2.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图二)" width="11" height="16" /><%...@ page language="java" contentType="text/html; charset=GB18030"<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_3.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图三)" width="11" height="16" /> pageEncoding="GB18030"%><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><html><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><head><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><meta http-equiv="Content-Type" content="text/html; charset=GB18030"><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><title>Insert title here</title><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /></head><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><body><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><a href="/test/test.do">1322</a><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /></body><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /></html></DIV></DIV>
<P> action:</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />package action;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import java.io.FileOutputStream;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import javax.servlet.http.HttpServletRequest;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import javax.servlet.http.HttpServletResponse;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import org.apache.struts.action.Action;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import org.apache.struts.action.ActionForm;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import org.apache.struts.action.ActionForward;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" />import org.apache.struts.action.ActionMapping;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_4.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图四)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_1.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图一)" width="11" height="16" /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_2.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图二)" width="11" height="16" />public class TeAction extends Action ...{<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> public ActionForward execute(ActionMapping mapping, ActionForm form,<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_6.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图六)" width="11" height="16" /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_7.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图七)" width="11" height="16" /> HttpServletRequest request, HttpServletResponse response) throws Exception ...{<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> // TODO Auto-generated method stub<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> <br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> StringBuilder sb = new StringBuilder();<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> sb.append("1");<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> response.addHeader("Content-Disposition", "attachment; filename=test.txt"); <br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> response.setContentType("application/octet-stream"); <br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> response.setCharacterEncoding("GB2312"); <br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> response.getWriter().write(sb.toString()); <br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> response.flushBuffer();<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /><br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_5.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图五)" width="11" height="16" /> return null;<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_8.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图八)" width="11" height="16" /> }<br /><IMG src="http://www.qqread.com/ArtImage/20070706/pu27_3.gif" border="0" align="top" alt="jsp用超级链接方式实现“目标另存为”功能(图三)" width="11" height="16" />}</DIV></DIV>
</div>
</div>