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

JSPÒ³Ãæ±íµ¥Ìá½»ÎÊÌ⣿

<script language="javaScript">
function select()
{
document.selectpages.selectnum.value=document.selectpages.selectpage.value;
document.selectpages.submit();
}
</script>
       
<form name="selectpages"  action="index.jsp" >
  µÚ
<select name="selcetpage"  onChange="select()">
    <%
      for(int m=1;m <=pagebean.TotalPage();m++)
      {
    %>
      <option value=" <%=m %>" <%=pagebean.getCurrentPage()==m?"selected":""%>> <%=m %> </option>
  <%
  }
  %>
</select>
 
Ò³
<input type="hidden" name="selectnum" value="">
</form>

ÇëÎÊÒ»ÏÂ
ÎÒÏ뵱ѡÔñÁËÏÂÀ­ÁбíÖеÄij¸öÖµµÄʱºò °ÑÕâ¸öÖµ´øµ½servletÀïÈ¥´¦Àí
¿ÉΪʲôÕâ¸ö±íµ¥²»Äܱ»Ìá½»£¿

ÄǸöindex.jspÊÇÎҷŵ½±¾ÒµÈ¥²âÊԵģ¬ÔÚ±¾ÒµÒ²²»ÄÜÌá½»
Õâ¸öÊÇÎÒÏëÒªÌá½»µÄÄ¿µÄµØ£ºaction=" <%=request.getContextPath() %>/StuServlet?method£½ifseleced"

ÐÖµÜÄãÖ¸¶¨Ìá½»·½·¨ÁËÂ𣿠<form name="selectpages"  action="index.jsp" method="post"


Ïà¹ØÎÊ´ð£º

jspÒ³Ãæ»ñÈ¡sessionµÄÎÊÌâ - Java / Java EE

ÎÒÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ã滹¿ÉÒÔÈ¡³öÖµÀ´.
µ«ÊÇһˢÐÂ,»òÕß´ò¿ªÐµÄÒ³Ãæ¾ÍÈ¡²»³öÖµÀ´ÁË.
Ææ¹ÖµÄÊÇ,ÎÒ²âÊÔÁíÒ»¸ö³ÌÐòʱºò
ÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ãæ¿ÉÒÔÈ¡³öÖµÀ´,ˢлò´ò¿ªÐÂÒ³ÃæÖµÄÜÈ¡³öÀ´ÁË.
......

jspÔõô»ñµÃÒ³ÃæµÄÍêÕûµØÖ·

°üÀ¨²ÎÊý
String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"; ......

jsp ÖÐÂÒÂëµÄ - Java / Web ¿ª·¢

ÎҵĿª·¢µÄƽ̨ÊÇMyeclipes6.0 + tomcat5.x + mysql
ÎÒËùÓеıàÂ뷽ʽ¶¼ÊÇÓõÄUTF-8 
ÎÒÖ»ÓÃÁËStrtus¿ò¼Ü
ÔÚÒ»¸öformÖÐÈçÏÂÓõÄÊÇpostµÄÌá½»·½Ê½£º
 <form class="form" action=&quo ......

JSPÖÐÔËÐÐJavabean³ö´íÎÊÌâ

ÎÒ°ÑjavabeanµÄÔ´´úÂëSetGetPropertytest.Java·ÅÔÚC:\tomcat\webapps\mywork\WEB-

INF\classes\comÖÐ ÊDz»ÊÇÎҵİü´´½¨´íÁË»¹ÊÇ£¿ÒªÊǽ¨´íÁË,Ë­ÄܸæËßÎÒÔõô½¨Âð? лл´ó¼Ò

Ç°À´°ï棬ͬʱף´ó¼ÒÖÐÇï¿ ......

ÇóÒ»¸öjspºÍservletµÄ½â¾ö·½·¨

´ó¼ÒºÃ£¡ÎÒÏÖÔÚÔÚ×öÒ»¸öÍøÉÏÊéµê£¬Óöµ½Ò»Ð©ÎÊÌ⣬ÇóÖúÏ£º

ÒªÇóÊÇÕâÑùµÄ£º

°ÑÒ»±¾ÊéÍϽøÒ»¸ö¹ºÎï³µ£¬¹ºÎï³µ¾Í¶àÁËÕâ±¾Ê飬

´Ó¹ºÎï³µÍϳöÒ»±¾Ê飬Ȼºó¹ºÎï³µ¾ÍÉÙÁËÕâ±¾Ê飻

¸ßÊÖÇëÖ¸µãÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ