Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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%>


Ïà¹ØÎĵµ£º

JSPʵÏÖÊ÷Ðνṹ

//ת×Ôhttp://blog.csdn.net/zqhf8/archive/2007/07/09/1683938.aspx 
1¡£Ô­Àí¼ò½é
 dtreeÊÇÒ»¸öÃâ·ÑµÄjavascript½Å±¾£¬Ö»Ð趨ÒåÓÐÏ޵ļ¸¸ö²ÎÊý£¬¾Í¿ÉÒÔ×ö³öƯÁÁµÄÊ÷ÐͲ˵¥¡£ÏÂÔØĿ¼£ºhttp://www.destroydrop.com/javascripts/tree/
 ÒÔÏÂÊÇdtreeµÄÓ÷¨Ê¾Àý£º
 1£©³õʼ»¯²Ëµ¥
 <script t ......

jspµ¼³öword ¼°mht תÂëÎÊÌâ

×î½ü×öÁËÒ»¸ö×ʷѲéѯģ¿é£¬ÀïÃæÉæ¼°½«×Ê·ÑÐÅÏ¢µ¼³öWordÎĵµºÍExcelÎĵµ£¬
ÏÈ˵˵µ¼³öWordÎĵµ£º
Æäʵ¾ÍÊÇ°ÑÏìÓ¦µÄÀàÐÍÉèΪapplication/msword,È»ºó°ÑÄÚÈÝÊä³öµ½Õâ¸öÎļþ¾ÍÐÐÁË
µÚÒ»²½£º
ÏÈÔÚ×ÀÃæÉÏн¨Ò»¸öwordÎĵµ,Ë«»÷´ò¿ª£¬È»ºóÁí´æΪ.htmÎļþ£¬»á²úÉúÒ»¸öÒÔ.htm½áβµÄÎļþ
µÚ¶þ²½£º
°Ñ.htmÎļþÀ©Õ¹Ãû¸ÄΪ.jspÎļ ......

JSP/Servletת·¢ÓëÖض¨ÏòµÄÇø±ð

JSP/Servletת·¢ÓëÖض¨ÏòµÄÇø±ð
¾¡¹ÜHttpServletResponse.sendRedirect ·½·¨ºÍRequestDispatcher.forward ·½·¨¶¼¿ÉÒÔÈÃä¯ÀÀÆ÷»ñµÃÁíÍâÒ»¸öURLËùÖ¸ÏòµÄ×ÊÔ´£¬µ«Á½ÕßµÄÄÚ²¿ÔËÐлúÖÆÓÐןܴóµÄÇø±ð¡£
 
¡¡¡¡ÏÂÃæÊÇHttpServletResponse.sendRedirect ·½·¨ÊµÏÖµÄÇëÇóÖض¨ÏòÓëRequestDispatcher.forward ·½·¨ÊµÏÖµÄÇëÇó ......

jsp½ûÖ¹Ò³Ã滺´æ

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.ÔÚ·þÎñÆ÷µÄ¶¯Ì¬ÍøÒ³ÖнûÖ¹»º´æ£¬Òª¼ÓÈëÀàË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ