MyEclipseÖÐÐÞ¸ÄĬÈÏJSP±à¼Æ÷µÄ·½·¨.txt
ÔÚMyEclipseÖпª·¢WEBÓ¦ÓÃʱ¾³£Òª´´½¨JSPÎļþ£¬µ«ÊÇÿ´ÎMyEclipse¶¼»áÓÃĬÈϵÄMyEclipse Visual JSP Designer£¬´ò¿ªËٶȷdz£Âý£¬¶øÇÒ»ù±¾ÉÏÒ²Óò»µ½Õâ¸ö¿ÉÊÓ»¯µÄJSP±à¼Æ÷£¬¶à°ë¶¼ÊÇʹÓÃMyEclipse JSP Editor£¬ËùÒÔ£¬ÓбØÒª°ÑĬÈϵÄJSPÎļþ±à¼Æ÷¸Ä³ÉMyEclipse JSP Editor£¬·½±ãʹÓã¬Ò²¿ÉÒÔ½ÚÊ¡´ò¿ªÊ±¼ä.
>>Ð޸ķ½·¨>>£º
ÒÀ´Î´ò¿ªÈçϲ˵¥ºÍÑ¡Ï
Windows->Preferences->General->Editors->File Associations.
ÔÚÎļþ¹ØÁª¶Ô»°¿òÖУ¬¿ÉÒÔ¿´µ½File TypesÎļþÀàÐÍÁÐ±í£¬Ñ¡ÖÐ*.jsp£¬È»ºóÔÚÏÂÃæµÄAssociated EditorsÁбí¿òÖÐÑ¡ÖÐMyEclipse JSP Editor£¬×îºó£¬µ¥»÷ÓұߵÄdefault°´Å¥¾ÍÐÐÁË¡£
Õâʱ£¬Äã¿ÉÒÔ¿´µ½MyEclipse JSP Editor±»ÒƵ½Á˵ÚÒ»¸öλÖã¬×îºóµ¥»÷OK°´Å¥¾Í¿ÉÒÔʹÓÃMyEclipse JSP Editor´ò¿ªJSPÒ³ÃæÁË¡£
ÆäËûµÄÎļþĬÈÏ±à¼Æ÷Ð޸ķ½Ê½¸úÕâ¸ö²Ù×÷ÊÇÒ»ÑùµÄ£¬±ÈÈ磬ÄãÒ²¿ÉÒÔÐÞ¸ÄĬÈϵÄHTMLÎļþµÄĬÈÏ´ò¿ª±à¼Æ÷¡£
Ïà¹ØÎĵµ£º
<html:html>
<HEAD>
<tiles:insert attribute="header" />
</HEAD>
<body>
<tiles:insert attribute="top" />
<table width="100%" height="400" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="178" ......
//ѧϰ±Ê¼Ç, ¿ÉÄÜÓÐЩµØ·½Àí½âÓÐÎó, »á±í´ï²»Çå³þ
v512_servlet+jsp
01 ÔÚÐÞ¸ÄÍêCookieºó,Ò»¶¨Òª¼ÓÉÏresponse.addCookie(c);
CookieÖÐÖ»Äܱ£´æ×Öĸ»òÊý×ÖÐÅÏ¢;
02 req.getSession()Óëreq.getSession(boolean create)
ÎÞ²ÎÊýµÄ == ÓвÎÊýµÄ²ÎÊýÎ ......
1¡¢Í¨¹ý<s:form
action="Ìø×ªÒ³Ãæ">Ìá½»Öµ£¬µ«ÊÇÔÚ<s:form>±êÇ©ÖеÄactionºóÃæÖÁ¶àÖ»ÄܸúÒ»¸ö²ÎÊý£¬²¢ÇÒ»¹»á±¨¾¯¸æ£¬ËùÒÔÈç¹û
Ïë´«µÝ²ÎÊý¿ÉÒÔÓÃ<s:hidden name=""
values="username"></s:hidden>À´´«Öµ£¬µ«ÊÇÕý¹æµÄд·¨ÐèÒªÅäºÏ<s:set>±êÇ©À´ÓÃ
È磺
......
Ò» ¡¢ ÓÃstruts2±êÇ©µÄ<s:selectÀ´ÏÔʾ
<s:select cssStyle="width: 84%" list="#application.officeList" headerKey="" headerValue="--ÇëÑ¡Ôñ--" listKey="#this.value" listValue="#this.key+'.'+#this.value" name="entity.officeName" value="entity.officeName"/>
ÆäÖÐ
1¡¢listÊǽÓÊÕjavaÀà»òÕßÔÚÆô¶¯Ê± ......
<script language="javascript">
function window.onunload(){
//ËùÓд°¿Ú¹Ø±Õ
if((window.screenLeft>=10000 && window.screenTop>=10000) || event.altKey)
{ //µã»÷ÓÒÉϽǵĴ°¿Ú¹Ø±Õ
alert("aaaaaaaaaaaaaaaaaa");
}
}
</s ......