jsp»òÓÃjs»ñµÃ·þÎñÆ÷µÄIPµØÖ·
jsºÃÏñ±¾Éí²»ÄÜ»ñÈ¡·þÎñÆ÷µÄIP,µ«JSP¿ÉÒÔ£¬ËùÒÔÓøöÒþ²ØÓò£¬js¾Í¿ÉÒԽ輦ϵ°ÁË¡£
jsp´úÂëÈçÏ£º
<input type="hidden" id="serviceIp" name="serviceIp" value="<%=InetAddress.getLocalHost().getHostAddress()%>">
js´úÂëÈçÏ£º
function getServiceIP(){
var serviceIp = document.getElementById("serviceIp").value;
var href ='http://'+serviceIp+':8080/test/';
}
Ïà¹ØÎĵµ£º
ÐÞ¸ÄÁËcss ÑùʽÎļþºó£¬ÖØÐÂä¯ÀÀ¸ÃjspÒ³Ã棬·¢ÏÖÐÂÐ޸ĵÄÑùʽûÓÐÉúЧ¡£×ÜÒÔΪÊÇÏîÄ¿»º´æËùÒýÆðµÄ£¬ÓÚÊÇÇåÀíËùÓÐÏîÄ¿£¬ÖØй¹½¨ÏîÄ¿¡£²»ÐС£Ö´ÐÐserver µÄ publish »¹ÊDz»ÐС£ÓÃwindow µÄËÑË÷¹¦ÄÜ·¢ÏÖ³ýÁË WebContent Ŀ¼Óиà css ÎļþÍ⣬.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\ Ŀ¼ÏÂÒ²´æÔڸà c ......
1.request¶ÔÏó
¿Í»§¶ËµÄÇëÇóÐÅÏ¢±»·â×°ÔÚrequest¶ÔÏóÖУ¬Í¨¹ýËü²ÅÄÜÁ˽⵽¿Í»§µÄÐèÇó£¬È»ºó×ö³öÏìÓ¦¡£ËüÊÇHttpServletRequestÀàµÄʵÀý¡£
ÐòºÅ ·½ ·¨ & ......
Ö»Ðè´ÓÊý¾Ý¿â²é³öÀ´ºóÔÚÏÔʾµÄµØ·½ÓÃ<pre></pre>±êÇ©ÐÞÊΣ¬ÈçÏ£º
<!--
<div style="font-size:12px;color:green;text-align:left">
<pre>
<%=
&n ......
JSPÖÐfilter¹ýÂËÆ÷ÑéÖ¤Óû§µÇ¼
ÏÖÔÚJSPʹÓÃÔ½À´Ô½¹ã·ºÁË£¬ÓÈÆäÊǺܶàÕþ¸®µÄÍøÕ¾¶¼²ÉÓÃÁËJSP¼¼Êõ£¬Æ书ÄÜÇ¿´óÇÒ°²È«¡£
³õѧÕߺܶàÓÐÕâô¸öÎÊÌ⣬¾ÍÊÇ£¬ÍøÕ¾µÄÒ»¸öȨÏÞÉèÖ㬱ÈÈçµÇ¼Óû§¿ÉÒԲ鿴ÄÄЩҳÃ棬¶øÓοÍÓÖÓÐȨÏÞ¿ÉÒÔ¿´ÄÄЩÄÚÈÝÄØ£¿
JSPÊÇÇ¿´óµÄ£¬µ«Æä´úÂ뻹ÊÇÏà¶Ô·±ËöµÄ£¬ÆäʵÓÃÒ»¸ö¹ýÂËÆ÷(filter)¾Í¿ÉÒÔʵÏÖÕ ......
ÔÚjspÖÐÒýÓÃresponse.setContentType("application/msword");£¬´ò¿ªµÄÒ³Ãæ¾ÍÊÇwordÑùʽ¡£
1¡¢ÊµÏÖwordºá´ò£º
<style>
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:841.9pt 595.3pt;//Ö½ÕŵĴóС
mso-page-orientation:l ......