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

javabeanÏò´«jsp´«Öµ

struts-config:
<action path="/articleManage" name="articleManageForm"  scope="request" type="auction.action.ArticleManageAction" validate="false">
   <forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
   <forward name="registerGood" path="/WEB-INF/publish/articleManage/registerGood.jsp"/>
</action>
Action:
ArticleManageForm theForm = new ArticleManageForm ();
theForm = theOperation.getInfo(request.getParameter("noId"));
 request.setAttribute("articleManageForm", theForm);
 1¡¢ÅäÖõÄbeanµÄÃû³ÆÒªºÍstruts-configÖеÄÒ»Ñù
 2¡¢ÔÚbeanÖÐдһ¸ö·½·¨£¬½«È¡³öµÄÊý¾Ý·Åµ½ÏàÓ¦µÄbeanµÄ±äÁ¿ÖÐ


Ïà¹ØÎĵµ£º

JSPÎļþ

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......

jsp¿Í»§¶ËÈ¥»º´æºÍ·þÎñ¶ËÈ¥»º´æ

 
ÍøÒ³»º´æµÄ×÷ÓÃÊÇʲô£¿Ó¦¸ÃºÜÖØÒª¡£µ«ÊÇÎÒÃÇÔÚ¿ª·¢ÍøÂçÓ¦ÓõÄʱºò£¬ÍøÒ³»º´æ×ÜÊǸøÎÒÃÇÒ»ÖÖĪÃûµÄ·³ÄÕ¡£ÓÚÊǼ¸ºõÿһ¸ö¿ª·¢Õ߶¼ÊÔͼ½â¾ö¹ýÕâ¸öÎÊÌâ¡£µ±È»£¬ÎÒÒ²²»ÊǽñÌì²Å×ÅÊÖ½â¾öÕâ¸öÎÊÌâ¡£µ«ÊǽñÌìһʱÐÄѪÀ´³±£¬Ð´Ò»Æª£¬¼Ç¼һÏÂÓõ½µÄ·½·¨¡£
1.½ûÖ¹¿Í»§¶Ë»º´æÒªÔÚ<head>ÖмÓÈëÀàËÆÈçÏÂÄÚÈÝ(ÎÒµ±È»»¹Ã»Ó ......

JSPÇáËÉÈëÃÅ

»ù±¾ÄÚÈÝ
Ê×ÏÈÊÇÓÃJ2SE+TOMCAT´î½¨¿ª·¢Æ½Ì¨£¬È»ºó»áÓÃʵÀý·Ö±ð¶ÔjavabeanºÍservlet½øÐвâÊÔ£¬
ͬʱҲ»á̸µ½Ò»Ð©ÖÐÎÄ´¦ÀíÉϵÄÎÊÌâ¡£ÎÄÕÂÄÚÈÝ¿ÉÄÜ»áÓеãÔÓÂÒºÍÁãÉ¢£¬µ«ÕâÒ²ÊÇѧϰ
jsp×î»ù´¡µÄ֪ʶ£¬ÒªÏëѧºÃjsp»¹µÃ¿¿×Ô¼º¶àŬÁ¦Ñ§Ï°¡£

ΪʲôҪдÕâÑùһƪÎÄÕ£¿
ÈÏʶÎÒµÄÅóÓÑ¿ÉÄÜ»áÖªµÀ£¬ÎÒƽʱֻÊÇдºÍ·­ÒëһЩJ2ME· ......

jspÓÐÄÄЩ¶¯×÷?×÷Ó÷ֱðÊÇʲô?

JSP¹²ÓÐÒÔÏÂ6ÖÖ»ù±¾¶¯×÷£º
   1.jsp:include£ºÔÚÒ³Ãæ±»ÇëÇóµÄʱºòÒýÈëÒ»¸öÎļþ¡£
   2.jsp:useBean£ºÑ°ÕÒ»òÕßʵÀý»¯Ò»¸öJavaBean¡£
   3.jsp:setProperty£ºÉèÖÃJavaBeanµÄÊôÐÔ¡£
   4.jsp:getProperty£ºÊä³öij¸öJavaBeanµÄÊôÐÔ¡£
   5.jsp:forward£º°ÑÇëÇóתµ½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ