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

JSPÖеÄpage,request,session,application

application£ºÈ«¾Ö×÷Ó÷¶Î§£¬Õû¸öÓ¦ÓóÌÐò¹²Ïí£¬¾ÍÊÇÔÚ²¿ÊðÎļþÖеÄͬһ¸öwebApp¹²Ïí£¬ÉúÃüÖÜÆÚΪ£ºÓ¦ÓóÌÐòÆô¶¯µ½Í£Ö¹¡£
session£º»á»°×÷ÓÃÓò£¬µ±Óû§Ê״ηÃÎÊʱ£¬²úÉúÒ»¸öеĻỰ£¬ÒÔºó·þÎñÆ÷¾Í¿ÉÒÔ¼ÇסÕâ¸ö»á»°×´Ì¬¡£ÉúÃüÖÜÆÚ£º»á»°³¬Ê±£¬»òÕß·þÎñÆ÷¶ËÇ¿ÖÆʹ»á»°Ê§Ð§¡£
sessionÊÇÕë¶Ôµ¥¸ö¿Í»§ºÍ·þÎñÆ÷½øÐлỰµÄ   
 aaplicationÊÇ·þÎñÆ÷ËùÓпͻ§ºÍ·þÎñÆ÷»á»°µÄ  
Óû§¶À×ÔµÄÐÅÏ¢£ºSession  
  Õû¸öÍøÕ¾¹²Ïí£º   Applicatinon
request£ºÇëÇó×÷ÓÃÓò£¬¾ÍÊÇ¿Í»§¶ËµÄÒ»´ÎÇëÇó¡£
page£ºÒ»¸öjsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)Ò³Ãæ¡£
ÒÔÉÏ×÷Ó÷¶Î§Ê¹Ô½À´Ô½Ð¡£¬ requestºÍpageµÄÉúÃüÖÜÆÚ¶¼ÊǶÌÔݵģ¬ËûÃÇÖ®¼äµÄÇø±ð¾ÍÊÇ£ºÒ»¸örequest¿ÉÒÔ°üº¬¶à¸öpageÒ³(include£¬forwardÒÔ¼°filter)¡£¾Ù¸ö¼òµ¥µÄÀý×Ó£º
jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)1.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)
<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):useBean id="beanID" class£½"xxx .xxx.BeanClass" scope="request" />
<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):include page="jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)2.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)" />           
jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)2.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)
<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):getProperty name="beanID" property="sample" />
ÔËÐÐjsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)1.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)¿ÉÒÔÕý³£ÏÔʾÊý¾Ý£¬ÒòΪ×÷Ó÷¶Î§ÊÇrequest£¬Ï൱ÓÚµ÷ÓÃÁËrequest.setAttribute()·½·¨£¬
jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)2ҳͨ¹ýrequest.getAttributeÀ´»ñµÃÕâ¸öbean.Èç¹û°Ñrequest¸ÄΪpage,¾Í»áÅ׳öNullPointerExceptioin.
Ò»¸öÇëÇó¿ÉÒÔ¿çºÃ¼¸¸öjsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)(includeºÍforword)ºÍServlet(Èçfilter).²»¹ýÕâÀïÓÐÒ»¸öÐèҪעÒâµÄ¾ÍÊÇÇø±ð
<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):include> ºÍ<%@ include %>.Èç¹ûÉÏÃæµÄ<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):include page="jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)2.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)" />¸ÄΪ<%@ include file="jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)2.jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡)" %>,¼´Ê¹scopeΪpageÒ²ÊÇÕýÈ·µÄ,<%@ include %>ÊDZàÒëʱ°üº¬,<jsp(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):include>ÊÇÔËÐÐʱ°üº¬.Ç°Õß¾ÍÏ൱ÓÚºê,±àÒëʱÌæ´ú,ºóÕßÏ൱ÓÚº¯Êý,ÔËÐÐʱ·µ»Ø.(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):include>(SUNÆóÒµ¼¶Ó¦ÓõÄÊ×Ñ¡):i


Ïà¹ØÎĵµ£º

½«jspÒ³ÃæÖÐtableµ¼³öµ½doc

<SCRIPT LANGUAGE="javascript">
       //Ö¸¶¨Ò³ÃæÇøÓòÄÚÈݵ¼ÈëWord
       function AllAreaWord() {
       var oWD = new ActiveXObject("Word.Application");
       var oDC = ......

jsp visit spring


<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="ccp.suddenattack.service.news.*"%> ......

flexǶÈëjspÖÐÓöµ½µÄÄÑÌ⣿

ÒѾ­×öºÃµÄÒ»¸öJ2EEÏîÄ¿£¬ÏëÓ¦ÓÃflexÖеÄͼ±í£¬ËùÒÔÏÖÔÚµÄÊ×ÒªÎÊÌâ¾ÍÊÇÈçºÎ°ÑflexǶÈëµ½jspÖУ¬°´ÕÕÍøÉϽéÉܵĽâ¾ö·½°¸×öÁ˸öС²âÊÔ£º
<%@ taglib uri="FlexTagLib" prefix="mm"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
  &nbs ......

JSPÌøתµÄ¼¸ÖÖ·½Ê½|Struts¶¯Ì¬Ìøת

String url="http://www.baidu.com";
   ActionForward gotourl = new ActionForward(url);
   gotourl.setPath(url);
   gotourl.setRedirect(true);
   return gotourl;
  1.RequestDispatcher.forward()
¡¡¡¡ ÊÇÔÚ·þÎñÆ÷¶ËÆð×÷ÓÃ,µ±Ê¹ÓÃforward()ʱ,Servlet engine´ ......

MyEclipseÖÐÐÞ¸ÄĬÈÏJSP±à¼­Æ÷µÄ·½·¨.txt

      ÔÚMyEclipseÖпª·¢WEBÓ¦ÓÃʱ¾­³£Òª´´½¨JSPÎļþ£¬µ«ÊÇÿ´ÎMyEclipse¶¼»áÓÃĬÈϵÄMyEclipse Visual JSP Designer£¬´ò¿ªËٶȷdz£Âý£¬¶øÇÒ»ù±¾ÉÏÒ²Óò»µ½Õâ¸ö¿ÉÊÓ»¯µÄJSP±à¼­Æ÷£¬¶à°ë¶¼ÊÇʹÓÃMyEclipse JSP Editor£¬ËùÒÔ£¬ÓбØÒª°ÑĬÈϵÄJSPÎļþ±à¼­Æ÷¸Ä³ÉMyEclipse JSP Editor£¬·½±ãʹÓã¬Ò²¿É ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ