ResinÏÂÅäÖÃJSPÐéÄâÖ÷»ú
1.Ìí¼Ó host ¿é
ÿһ¸öJSPÐéÄâÖ÷»úÓÐËü×Ô¼ºµÄ host ¿é¡£Ã¿Ò»¸öÖÁÉÙÒª¶¨ÒåidÀ´Ö¸¶¨ÐéÄâÖ÷»úµÄÃû×ÖºÍÒ»¸örootÓ¦ÓóÌÐò¡£Ò»¸ö <root-directory>ͨ³£ÓÃÀ´ÎªÖ÷»ú¶¨Ò»¸öĬÈϵÄwebÓ¦ÓóÌÐò¡£
ÅäÖÃÎļþƬ¶Î£º
<server>
<host id='gryffindor.caucho.com'>
<root-directory>/home/www/gryffindor</root-directory>
<web-app id="/">
<document-directory>webapps/ROOT</document-directory>
</web-app>
...
</host>
<host id='slytherin.caucho.com'>
<root-directory>/home/www/slytherin</root-directory>
<web-app id="/">
<document-directory>webapps/ROOT</document-directory>
</web-app>
</host>
ä¯ÀÀ http://gryffindor.caucho.com/test.jsp ·ÃÎÊ /home/www/gryffindor/webapps/ROOT/test.jsp.
ä¯ÀÀ http://slytherin.caucho.com/test.jsp ·ÃÎÊ /home/www/slytherin/webapps/ROOT/test.jsp.
2.¶¯Ì¬ÐéÄâÖ÷»ú
resin¿ÉÒÔÅäÖóÉÒ×ÓÚ²¿ÊðµÄ¶¯Ì¬JSPÐéÄâÖ÷»ú¡£²»ÊÇÌí¼Óhost¿é£¬¶øÊÇÖ¸¶¨Ò»¸öÎļþϵͳĿ¼£¬ÆäϵÄ×ÓĿ¼½«±ä³ÉÐéÄâÖ÷»ú¡£
ÅäÖÃÎļþƬ¶Î£º
<resin xmlns="http://caucho.com/ns/resin">
<host-deploy path="hosts">
<host-default>
<class-loader>
<compiling-loader path='classes' />
<library-loader path='lib' />
</class-loader>
<web-app-deploy path='webapps' />
<ear-deploy path='deploy' />
<resource-deploy path='deploy' />
<web-app-deploy path='deploy' />
</host-default>
</host-deploy>
</resin>
$RESIN_HOME/hostsÆäϵÄÈκÎĿ¼½«¶ÔÓ
Ïà¹ØÎĵµ£º
ÔÚMyEclipseÖпª·¢WEBÓ¦ÓÃʱ¾³£Òª´´½¨JSPÎļþ£¬µ«ÊÇÿ´ÎMyEclipse¶¼»áÓÃĬÈϵÄMyEclipse Visual JSP Designer£¬´ò¿ªËٶȷdz£Âý£¬¶øÇÒ»ù±¾ÉÏÒ²Óò»µ½Õâ¸ö¿ÉÊÓ»¯µÄJSP±à¼Æ÷£¬¶à°ë¶¼ÊÇʹÓÃMyEclipse JSP Editor£¬ËùÒÔ£¬ÓбØÒª°ÑĬÈϵÄJSPÎļþ±à¼Æ÷¸Ä³ÉMyEclipse JSP Editor£¬·½±ãʹÓã¬Ò²¿É ......
jspÂÒÂëÎÊÌ⣬ÇóÖú
ÏÂÁ˸ö¼¸ÄêÇ°µÄjspÔ´Â룬ÎÒ×°ÉϺóÒ»Ö±ÓÐÖÐÎÄÂÒÂëÎÊÌ⣬Êý¾Ý¿âÎÒÓÃmysql£¬
²¢ÓÃsql-front²Ù×÷£¬ÔÚÓÃsql-frontµÄʱºòÒÑ°Ñ×Ö·ûÉèÖÃΪgb2312£¬
¶øÇÒÔÚsql-frontÖÐÄÜÕýÈ·ÏÔʾÖÐÎÄ£¬µ«¾ÍÊÇÔÚjspÒ³ÃæÉÏÓÃgetstring·½·¨
µÃµ½ÂÒÂ룬ÎÒÒ²Óùýgetbytes£¨iso-8859-1£©µÈ·½·¨ÊÔ¹ý»¹ÊÇûÓÐ ......
jspÂÒÂë½â¾ö(תÔØ)
jspÂÒÂë½â¾ö(תÔØ)
JAVA֪ʶ 2009-04-14 08:49 ÔĶÁ935 ÆÀÂÛ5
GBK±àÂë
GBK±àÂëÊÇÖйúÖƶ©µÄ¡¢µÈͬÓÚUCSµÄеÄÖÐÎıàÂëÀ©Õ¹¹ú¼Ò±ê×¼¡£GBK¹¤×÷С×éÓÚ1995Äê10Ô£¬Í¬Äê12ÔÂÍê³ÉGBK¹æ·¶¡£¸Ã±àÂë±ê×¼¼æÈÝGB2312£¬¹²ÊÕ¼ºº×Ö21003¸ö¡¢·ûºÅ883¸ö£¬²¢Ìṩ1 ......
Ò»¡¢JSP¼ò½é
JSP (Java Server Pages)ÊÇ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ£¬ÊÇÒ»ÖÖÔÚHTMLÒ³ÃæÖмÓÈëJavaÓïÑÔ¶øÉú³É¶¯Ì¬Ò³ÃæµÄ¼¼Êõ£º¼ÓÈëÁËеıêÇ©£¨<%£¬%>£¬…£©¡£
JSPÊÇÒÔJavaºÍServletΪ»ù´¡¿ª·¢¶ø³ÉµÄ¶¯Ì¬ÍøÒ³Éú³É¼¼Êõ£¬ËüµÄµ×²ãʵÏÖÊÇJava Servlet¡£
JSPÒ³ÃæÓÉHTML´úÂëºÍǶÈëÆäÖеÄJava´úÂëËù×é³É¡£·þÎñÆ÷ÔÚÒ³Ãæ±»¿Í» ......
³¤¶ÈÏÞÖÆJavaScript´úÂë
CODE:
<script> function test() { if(document.a.b.value.length>50) { alert("²»Äܳ¬¹ý50¸ö×Ö·û£¡"); document.a.b.focus(); return
false; } } </script> <form. name=a nsubmit="return test()"> <textarea name="b" cols="40" wrap="VIRTUAL" rows="6"></te ......