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

ÔÚstruts2ÖдÓjspÒ³Ãæ´«Öµµ½actionÖÐ

1¡¢Í¨¹ý<s:form action="Ìø×ªÒ³Ãæ">Ìá½»Öµ£¬µ«ÊÇÔÚ<s:form>±êÇ©ÖеÄactionºóÃæÖÁ¶àÖ»ÄܸúÒ»¸ö²ÎÊý£¬²¢ÇÒ»¹»á±¨¾¯¸æ£¬ËùÒÔÈç¹ûÏë´«µÝ²ÎÊý¿ÉÒÔÓÃ<s:hidden name="" values="username"></s:hidden>À´´«Öµ£¬µ«ÊÇÕý¹æµÄд·¨ÐèÒªÅäºÏ<s:set>±êÇ©À´Óà È磺
<s:set name="temp" value="¶¯Ì¬Öµ"></s:set>»òÕß<s:set name="temp">¾²Ì¬Öµ£¨Ï൱ÓÚÒ»¸ö×Ö·û´®£©</s:temp>
<s:hidden name="username" value="%{temp}"></s:hidden>
×¢Ò⣺Èç¹ûÏëÔÚvalueÊôÐÔÖÐд¾²Ì¬ÖµÐèÒªÈçÏÂд·¨£º<s:set name="temp" value="%{ ' ¾²Ì¬Öµ ' }"></s:set>   ÀïÃæµÄµ¥ÒýºÅ²»¿ÉºöÂÔ¡£
2¡¢Í¨¹ý<s:a href="µØÖ·?parame1=***&parame2=***&parame3=***">ÎÄ×Ö˵Ã÷</s:a>
»òÕßÅäºÏ<s:url>À´Ê¹Óà ÈçÏ£º
<s:url action="Login" id="Logincd">
    <s:param name="year">2009</s:param>
    <s:param name="month">12</s:param>
    <s:param name="day">09</s:param>
    <s:param name="infer">test</s:param>
    <s:param name="username">yue</s:param>
    <s:param name="password">yue</s:param>
   </s:url>
   <s:a href="%{Logincd}">´«µÝ²ÎÊý</s:a>
×¢Ò⣺<s:a>Á¬½ÓµØÖ·ºóÃæ¿ÉÒÔ¸ú¶à¸ö²ÎÊý£¬µ«ÊÇ<s:form action="'>ÖеÄactionºóÃæÈ´²»ÄÜ¡£
 ÔÚactionÖнÓÊÜÕâЩ²ÎÊýÖµµÄʱºò¿ÉÒÔʹÓÃset·½·¨ÈÃaction×Ô¶¯½ÓÊÜ£¬Ò²¿ÉÒÔÊÖ¶¯Ê¹ÓÃrequest.getParameter("name");µÄ·½·¨¡£


Ïà¹ØÎĵµ£º

LinuxÏÂÅäÖÃJSP¿ª·¢»·¾³µÄ·½·¨

¡¡¡¡ÏµÍ³»·¾³£ºLinux 5.0 AS 64λ
¡¡¡¡²½Ö裺
¡¡¡¡1¡¢ÏÂÔØapache-tomcat-5.5.23.tarºÍjdk-1_5_0_12-linux-i586.bin²¢´æ·ÅÔÚ/usr/localÎļþ¼ÐÏ£»
¡¡¡¡2¡¢°²×°jdk
¡¡¡¡[root@localhost local]#chmod 775 jdk-1_5_0_12-linux-i586.bin '·Ç±ØÐ룬ҪÊÇÖ±½ÓÔËÐÐʱÌáʾȨÏÞ²»¹»Ê±¸Ä±äȨÏÞ£»
¡¡¡¡[root@localhost local]#./jd ......

jspÖÐÈÕÆÚ´¦Àí

ÈÕÆÚÎÊÌâ
1¡¢»ñÈ¡·þÎñÆ÷¶Ëµ±Ç°ÈÕÆÚ£º
<%@ page import="java.util.Date"%>
<%
Date myDate = new Date();
%>
2¡¢»ñÈ¡µ±Ç°Äê¡¢Ô¡¢ÈÕ£º
<%@ page import="java.util.Date"%>
<%
Date myDate = new Date();
int thisYear = myDate.getYear() + 1900;//thisYear = 2003
int thisMonth = myDat ......

jsp£¬java¼ÓͼƬˮӡ,ÎÄ×Öˮӡ

Õâ¸öÊǼÓͼƬˮӡµÄ!
package com.pic;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.awt.image.*;
import org.w3c.dom.*;
import com.sun.image.codec.jpeg.*;
import javax.imageio.*;
public class ImgBean_i{
public void ImgBean_i(){
}
public void ImgYin(S ......

´«ÖDz¥¿Í 2010 1 7 Ê®¡¢JSP(2)_JavaBeanºÍJsp¿ª·¢


JavaBeanÊÇSun¹«Ë¾ÃæÏò»ùÓÚ×é¼þµÄ¿ª·¢¶øÖƶ¨µÄÒ»Ì׹淶£¬µ«ÔÚʵ¼ÊµÄJ2EE¿ª·¢ÖУ¬Í¨³£Ö»Ðè·ûºÏÈçÏÂÌØµã£º
(1)Õâ¸öJavaÀà±ØÐë¾ßÓÐÒ»¸öÎ޲εĹ¹Ô캯Êý£»
(2)ÊôÐÔ±ØÐë˽Óл¯£»
(3)˽Óл¯µÄÊôÐÔ±ØÐëͨ¹ýpublicÀàÐ͵ķ½·¨±©Â¶¸øÆäËü³ÌÐò£¬²¢ÇÒ·½·¨µÄÃüÃûÒ²±ØÐë×ñÊØÒ»¶¨µÄÃüÃû¹æ·¶¡£
JavaBeanÔÚJ2EE¿ª·¢ÖУ¬Í¨³£ÓÃÓÚ·â×°Êý¾Ý ......

´«ÖDz¥¿Í 2010 1 11 Ê®¶þ¡¢JSP(4)_EL JSTL I18N


Ò»¡¢Expression Language
EL±í´ïʽÓÃÓÚ»ñÈ¡²¢ÏÔÊ¾Ò³ÃæÊý¾Ý£¬²¢Ìæ»»JSPÒ³ÃæÖеĽű¾±í´ïʽ¡£ËüÊÇJSP 2.0¹æ·¶ÖеÄÒ»Ãż¼Êõ ¡£Òò´Ë£¬ÈôÏëÕýÈ·½âÎöEL±í´ïʽ£¬ÐèʹÓÃÖ§³ÖServlet2.4/JSP2.0¼¼ÊõµÄWEB·þÎñÆ÷¡£
1¡¢  EL±í´ïʽÒþʽ¶ÔÏó
Òþº¬¶ÔÏóÃû³Æ
Ãè       Êö
pageContext
¶ÔÓ¦ÓÚJSPÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ