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

jspµÄת»»form action java´úÂë

ÕâÖÖÒ³Ã淽ʽÈçºÎÔÚstrutsÀïʵÏÖ

<form id="form1" name="form1" method="post" action="a.jsp" >
  <% String myscore = request.getParameter("score");%>
  <table width="950" height="574" border="1">
    <tr>
      <td colspan="2"> <p>
        <label>score
        <select name="score">
        <option value="20"  <%= null != myscore && myscore.equals("20") ? " selected" :"" %>>
20 </option>
        <option value="30" <%=null != myscore&& myscore.equals("30")?"selected":""%>>
30 </option> 
<option value="40" <%=null != myscore &&myscore.equals("40")?"selected":""%>>
40 </option>
        <option value="50" <%=null != myscore &&myscore.equals("50")?"selected":""%>>
50 </option> 
<option value="60" <%=null != myscore &&myscore.equals("60")?"selected":&


Ïà¹ØÎÊ´ð£º

jspÌøת

ÎÒµãºóÍËʱÊÇ¿Õ°×Ò³Ãæ
ÐèˢвÅÄÜÏÔʾ
Õâ¸öÔõô´¦Àí°¡
Çë´ó¼Ò°ï°ïæ
°ÑÎÊÌâ˵µÄÏêϸһЩ£¬ÕâÑùÓÐÖúÓÚÎÊÌâµÄ»Ø¸´£¬¼°´ð°¸µÄ׼ȷÐÔ£¡

ÎÒ¾õµÃÊÇÄãµÄä¯ÀÀÆ÷Æ÷µÄÎÊÌâ°É£¬ÎÒÒÔÇ°Óöµ½¹ýÕâÑùµÄÎÊÌ⣬°ÑIEµÄËùÓÐÊôÐÔÖ ......

jsp ¼òµ¥µÄsessionÎÊÌâ¡£

±¾ÈË×öÁËÒ»¸öÄ£Ä⹺ÎïÍøÕ¾£¬Óöµ½Ò»Ð©ÎÊÌâ¡£
µÚÒ»¸öÓû§Ñ¡ÔñÁËA¡¢B¡¢CÉÌÆ·
È»ºóµÚ¶þ¸öÓû§Ö»Ñ¡ÔñDÉÌÆ·¡£
µã»÷²é¿´µÄʱºò£¬¹ºÎï³µÁгöA¡¢B¡¢C¡¢DËÄÖÖÉÌÆ·£¬ÇëÎÊÄÄÀï³öÁËÎÊÌ⣿
Java code:

<%@ page content ......

Unable to compile class for JSP - Java / Web ¿ª·¢

<%@page language="java" contentType="text/html;charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="wang.connectDB"/>
< ......

jspÒ³Ãæ¿ØÖƵÄÎÊÌâ

Óм¸ÖÖÓû§£¬ÆäȨÏÞ²»Í¬¡£Ö»ÓÐÌض¨È¨ÏÞµÄÓû§²ÅÄܽøÐÐÏàÓ¦²Ù×÷¡£ÎÒÏëÔÚjspÒ³ÃæÀï½øÐÐÕâ¸öÉèÖÃ
<input type="submit" value="ÐÞ¸Ä"/> ,ÎÒÏëÈÃÖ»ÓÐÌض¨È¨ÏÞµÄÓû§²ÅÄÜ°´Õâ¸ö°´Å¥£¬·ñÔò±¨ ......

ÔÚjspÖÐÓÃsessionÔõôʵÏÖ¹ºÂò¹¦ÄÜ - Java / Web ¿ª·¢

ÎÒÏë×ö¹»¹ºÎï³µÓÃsession µ«ÊDz»ÖªµÀÔõô»ñÈ¡¹ºÂòÊýÁ¿ Ë­ÓоßÌåµÄ´úÂëÂð Ï£ÍûÄܸîÉá

ÏÂÃæÊǹºÎï³µµÄºËÐÄ´úÂë 
ÓÐÁËÕâ¸ö ¾ÍÓ¦¸ÃÄܹ»×ö³öÀ´°É
Java code:

public void doPost(HttpServletRequest reque ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ