jspÒ³Ãæ»ñÈ¡Action±äÁ¿Öµ(²»Í¨¹ý±êÇ©)
¹Ø¼ü×Ö: struts2 webwork
½ñÌìÓöµ½Ò»¸öÇé¿ö,ÒªÔÚjspÒ³ÃæÉÏ´¦Àí²éѯ³öÀ´listÒ³µÄһЩÊý¾Ý,¸Ä±äActionÀàÌ«Âé·³,ÓÚÊÇÏëµ½´ÓÒ³ÃæÉÏÖ±½Ó»ñÈ¡ActionÖеıäÁ¿Öµ,²¢½øÐвÙ×÷,ÏÖÔÚ°Ñ»ñÈ¡·½·¨¼Ç¼һÏÂ,ÒÔ±ãÒÔºó²éѯ.
Èç¹ûÔÚActionÀàÀïÓÐÒ»¸ö¼òµ¥µÄ±äÁ¿,²¢ÇÒÒѾдºÃÁËËüµÄgetºÍset·½·¨
private String test="jsp value test";
private String test="jsp value test";
ÄÇôÎÒÃǾͿÉÒÔÔÚÒ³ÃæÉÏÖ±½Ó»ñÈ¡,¶ø²»Í¨¹ýstruts2»òÕßwebworkµÄ±êÇ©.
Ê×Ò³jspÒ³ÃæÒªÒýÈëJAR°ü
webwork°ü com.opensymphony.webwork.ServletActionContext
struts2°üΪorg.apache.struts2.ServletActionContext
È»ºóÔÚÒ³ÃæÉ϶¨ÒåÒ»¸öServletActionContext±äÁ¿
<%
HttpServletRequest request1 = ServletActionContext.getRequest();
String test=request1.getAttribute("test");
%>
È»ºóÊä³ö¾Í¿ÉÒÔ¿´µ½½á¹û
<%=test%>
Ïà¹ØÎĵµ£º
//ת×Ôhttp://blog.csdn.net/zqhf8/archive/2007/07/09/1683938.aspx
1¡£ÔÀí¼ò½é
dtreeÊÇÒ»¸öÃâ·ÑµÄjavascript½Å±¾£¬Ö»Ð趨ÒåÓÐÏ޵ļ¸¸ö²ÎÊý£¬¾Í¿ÉÒÔ×ö³öƯÁÁµÄÊ÷ÐͲ˵¥¡£ÏÂÔØĿ¼£ºhttp://www.destroydrop.com/javascripts/tree/
ÒÔÏÂÊÇdtreeµÄÓ÷¨Ê¾Àý£º
1£©³õʼ»¯²Ëµ¥
<script t ......
×î½ü×öÁËÒ»¸ö×ʷѲéѯģ¿é£¬ÀïÃæÉæ¼°½«×Ê·ÑÐÅÏ¢µ¼³öWordÎĵµºÍExcelÎĵµ£¬
ÏÈ˵˵µ¼³öWordÎĵµ£º
Æäʵ¾ÍÊÇ°ÑÏìÓ¦µÄÀàÐÍÉèΪapplication/msword,È»ºó°ÑÄÚÈÝÊä³öµ½Õâ¸öÎļþ¾ÍÐÐÁË
µÚÒ»²½£º
ÏÈÔÚ×ÀÃæÉÏн¨Ò»¸öwordÎĵµ,Ë«»÷´ò¿ª£¬È»ºóÁí´æΪ.htmÎļþ£¬»á²úÉúÒ»¸öÒÔ.htm½áβµÄÎļþ
µÚ¶þ²½£º
°Ñ.htmÎļþÀ©Õ¹Ãû¸ÄΪ.jspÎļ ......
JSP/Servletת·¢ÓëÖض¨ÏòµÄÇø±ð
¾¡¹ÜHttpServletResponse.sendRedirect ·½·¨ºÍRequestDispatcher.forward ·½·¨¶¼¿ÉÒÔÈÃä¯ÀÀÆ÷»ñµÃÁíÍâÒ»¸öURLËùÖ¸ÏòµÄ×ÊÔ´£¬µ«Á½ÕßµÄÄÚ²¿ÔËÐлúÖÆÓÐןܴóµÄÇø±ð¡£
¡¡¡¡ÏÂÃæÊÇHttpServletResponse.sendRedirect ·½·¨ÊµÏÖµÄÇëÇóÖض¨ÏòÓëRequestDispatcher.forward ·½·¨ÊµÏÖµÄÇëÇó ......
1.½ûÖ¹¿Í»§¶Ë»º´æÒªÔÚ<head>ÖмÓÈëÀàËÆÈçÏÂÄÚÈÝ£º
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
2.ÔÚ·þÎñÆ÷µÄ¶¯Ì¬ÍøÒ³ÖнûÖ¹»º´æ£¬Òª¼ÓÈëÀàË ......