SSH ÏîÄ¿ÖУ¬action»ñÈ¡jspÒ³Ãæ´«¹ýÀ´µÄselectÖµ
ÏîÄ¿¿ò¼ÜS2SH,jspÒ³ÃæÈçÏ£¬selectÁбíÉèΪmultiple¡£ÎªÁËÄÜÔÚactionÀïÈ¡µ½Ç°Ì¨½çÃæselectÁбíµÄ¶àѡֵ£¬Ï¹¸ãÁËÁ½Ì죬½ñÌìÖÕÓڳɹ¦¡£Æäʵºǫ́actionȡǰ̨jspÒ³ÃæµÄÖµºÜ¼òµ¥£¬·Ï»°²»¶à˵£¬ÏÈÌù´úÂ룺
<body>
<form action="sendMsg.action?senderId=${users.id }&username=${users.username}" method="post"
id="form" name="form" onsubmit="getIdValue()">
<input type="hidden" value="" name="" id="ids" />
<table width="500" height="220" border="1" align="center">
<tr>
<td colspan="2">
¡¾»¶ÓʹÓá¿
</td>
</tr>
<tr>
<td width="88">
±êÌ⣺
</td>
<td width="396">
<input type="text" name="title" id="title" />
</td>
</tr>
<tr>
<td>
ÄÚÈÝ£º
</td>
<td>
<textarea name="content" id="content" cols="45" rows="5">
½ÓÊÕÕߣº
${t}
action´úÂ룺
...
//¶¨ÒåÒ»¸öÓëjspÒ³ÃæÏàͬµÄ±äÁ¿
private String userId; //setter getter·½·¨ÂÔ
...
public String sendMsg() throws Exception{
String username = ServletActionContext.getRequest().getParameter("username"); //»ñÈ¡Óû§Ãû
String t[] = ServletActionContext.getRequest().getParameterValues("userId"); //ÕâÀï»ñȡʱ£¬±äÁ¿Ãû¾ÍÖ±½ÓдjspÒ³ÃæµÄ¾ÍÐС£
System.out.println(t[0]); //²âÊÔÊä³ö³É¹¦
System.out.println(t[1]);
Ïà¹ØÎĵµ£º
1.FCKeditor ½éÉÜ
FCKeditor Õâ¸ö¿ªÔ´µÄHTML Îı¾±à¼Æ÷¿ÉÒÔÈÃweb ³ÌÐòÓµÓÐÈçMS Word ÕâÑùÇ¿´óµÄ±à¼¹¦ÄÜ£¬.FCKeditor Ö§³Öµ±Ç°Á÷ÐеÄä¯ÀÀÆ÷¡£
2£®×¼±¸¹¤×÷£º
»·¾³£ºwinddows XP¡¢tomcat6.0¡¢JDK1.6
ÏÂÔØ£º
1)£ºFCKeditor_2.6.4.zip
µØÖ·£ºhttp://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip ......
ÔÚÏßÍøÒ³±à¼Æ÷ÖÐ×îÖøÃûµÄÊÇfckEditor£¬µ«ËûµÄ¹¦ÄÜÌ«È«ÃæÁË£¬¶øÇÒʹÓÃÆðÀ´Ò²²»ÊǺܷ½±ã¡£Ïà¶Ô¶øÑÔÐÂÀËhtmleditor¾Í±È½ÏÇåˬ£¬¶øÇÒʹÓüòµ¥¡£ÐÂÀ˲©¿ÍºÍÈËÈËÍøÈÕÖ¾Ó¦¸Ã¶¼ÊÇÓõÄÕâ¸ö¿Ø¼þ¡£µ«ÊÇhtmleditor×î¶àµÄÊÇasp°æ±¾£¬ÔÚÍøÕ¾jsp°æ±¾Ê®·ÖÏ¡ÉÙ¡£Í¨¹ý²éÕÒÎÒÕÒµ½Ò»¸ö¿ÉÒÔʹÓõÄÐÂÀËhtmleditor jsp°æ±¾¡£ÏÂÔØµØÖ·Îªhttp://down ......
1.°²×°jdk(°æ±¾6u7);
¡¡¡¡2.ÅäÖÃjdk»·¾³±äÁ¿(°²×°Ä¿Â¼:D:\tools\java\jdk1.6.0_07):
¡¡¡¡1). JAVA_HOME = D:\tools\java\jdk1.6.0_07;
¡¡¡¡2). PathµÄ×îÇ°Ãæ×·¼Ó"D:\tools\java\jdk1.6.0_07\bin;D:\tools\java\jre1.6.0_07\bin";
¡¡¡¡3). CLASSPATH = D:\tools\java\jdk1.6.0_07\lib;D:\tools\java\jdk1.6.0_07\lib\too ......
ʵÏÖJSP×Ô¶¨Òå±êÇ©µÄÒ»ÖÖ·½·¨£º
1.дһ¸öÀà¼Ì³ÐTagSupport»òÆäËûTagµÄʵÏÖÀà¡£
public class AllTag extends TagSupport {
@Override
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
try {
out.append("Hello World.");
} catch (IOException e) {
e.pri ......
java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾
2008-12-10 09:00
ÎÒÃÇÔÚjava web¿ª·¢µÄ¹ý³ÌÖУ¬ÓÐʱÔÚ×ÊÁÏÉÏ¿ÉÄÜ»áÌáµ½»·¾³ËùÒªÖ§³ÖµÄJSP£¬Servlet°æ±¾¡£Èç¹û°æ±¾µÍ¾Í¿ÉÄܳöÏÖ²âÊÔ´íÎó¡£
·½·¨£º´ò¿ªtomcatµÄcommon\lib Ŀ¼Ï£¬ÓÐÁ½¸öJARÎļþ£º jsp-api.jar servlet-api.jar ¡£Èç¹ûûÓУ¬ÄÇ¿ÉÄÜÊÇÄãûÓÐÌí¼Ó½øÀ´¡£½âѹÕâÁ½¸ ......