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

struts2,struts1,jspʵÏÖ¹ú¼Ê»¯µÄ·½·¨Ê¾Àý

struts2µÄʵÏÖ·½·¨
LangSelector.jsp
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
    <head>
        <script type="text/javascript">
<!--
    function langSelecter_onChanged() {
        document.langForm.submit();
    }
//-->
</script>
    </head>
    <body>
        <s:set name="SESSION_LOCALE" value="#session['WW_TRANS_I18N_LOCALE']" />
        <s:bean id="locales" name="tutorial.Locales" />
        <form action="<s:url includeParams="get" encode="true"/>"
            name="langForm"
            style="background-color: powderblue; padding-top: 4px; padding-bottom: 4px;">
            Language:
            <s:select label="Language" list="#locales.locales" listKey="value"
                listValue="key"
                value="#SESSION_LOCALE == null ? locale : #SESSION_LOCALE"
                name="request_locale" id="langSelecter"
                onchange="langSelecter_onChanged()" theme="simple" />
        </form>
    </body>
</html>
HelloWorld.jsp
<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
    <head>
        <title>Hello Wor


Ïà¹ØÎĵµ£º

JSPÖÐÉú³É¶¯Ì¬XMLʵÀý

<?xml version="1.0" encoding="gb2312" ?>
<?xml-stylesheet type="tet/css" href="mystyle.css" ?>
<%@ page errorPage="error.jap" %>
<%@ page contentType="text/xml" %>
<realmarid>
»ÊÂí»¨Ãû²á
<athlete>
<name>Æë´ïÄÚ</name>
<country> ......

ServletÓëJSPÖÐÒ³ÃæÌøתµÄÇø±ð

Ò»Ö±¶ÔServletµÄ¼¸ÖÖÒ³ÃæÌøת·½Ê½£¬Àí½âµÄºýÀïºýÍ¿µÄ£¬½ñÌìÔÚÍøÉÏËÑÁËÒ»°Ñ£¬ÕÒµ½Ò»±é±È½ÏºÃµÄ£¬¼ÇÏÂÀ´£¬ÒÔºó¿´¿´¡£
  Ìøת·ÖÁ½²¿·Ö£¬Ò»ÊÇ·¢ÉúÔÚservlet£¬Ò»ÊÇÔÚJSP£¬ÆäʵJSPÒ²¾ÍÊÇservlet£¬²»¹ý»¹ÊÇÓеã²îÒìµÎ¡£
Servlet£º
µ±È»£¬ÔÚservletÖУ¬Ò»°ãÌøת¶¼·¢ÉúÔÚdoGet, doPostµÈ·½·¨ÀïÃæ¡£
1)  redirect · ......

JSPÖÐÎÄÁ´½Ó/tomcatÖÐÎÄ·¾¶


WEB½øÐÐÉÏ´«ÖÐÎÄÎļþÃûµÄÎļþʱûÎÊÌ⣬µ«ÏÂÔصÄʱºò³öÏÖÎÊÌ⣬¾­¹ýÒ»·¬²éÕÒÖ®ºóÔ­À´ÊÇTOMCATĬÈϲ»Ö§³ÖÖÐÎÄ·¾¶ºÍÖÐÎÄÎļþ£¬Èç¹ûÖ±½Ó´ÓApacheÕ¾µãÖÐÏÂÔØTomcat£¬ÎÞÂÛÊÇ°²×°°æµÄexeÎļþ£¬»¹ÊÇ
½âѹËõµÄZIPÎļþ£¬ÄÚÖõĶÔÓÚgetЭÒéÖеÄURL±àÂ붼ÊÇISO-8859-1,Õâ¸ö×Ö·û¼¯²»ÄÜÖ±½ÓÖ§³ÖÖÐÎĵÈË«×Ö½ÚµÄÐÅÏ¢£¬¶øÖÐÎÄÎļþµÄÏÂÔØ ......

oracleÖÐClob×Ö¶ÎÖеĻسµ»»ÐÐÔÚjspÖÐչʾµÄÎÊÌâ

ÔÚ¿ª·¢¹ý³Ì³öÏÖÕâôһ¸öÎÊÌ⣺
   ±ÈÈ磺һ¸ö×Ö¶Îcontent ÀàÐÍCLOB£¬ÕâÆäÖдæµÄÓпÉÄܸ´ÖÆÕ³Ìù¹ýÀ´µÄword excel htmlÖеÄÄÚÈÝ£¬ÓÃjava½«ÕâЩÄÚÈÝ´æÈ룬´æÈëºóÓÐÌØÊâµÄ·ûºÅ ±ÈÈç»Ø³µ»»Ðеȡ£ÄÇô²»ÄÜÕý³£Õ¹Ê¾µÄÊý¾Ý¡£
   ½â¾ö·½°¸£º
   ´æÈëÊý¾ÝµÄÊǽ«Õâ¸öÊý¾ÝcontentdataÔÚjsÖнøÐÐ ......

jsp·Åµ½WEB INFϺóÒýÓò»Í¬Ä¿Â¼µÄÎļþ,ÔõôҲÕÒ²»µ½

ÎÒ°Ñindex.jspÎļþ·Åµ½WEB-INFÏ£¬ÓÖÔÚWEB-INFϽ¨Á¢Ò»¸öĿ¼jsÓÃÀ´·ÅjavascriptÎļþ£¬Ò²¾ÍÊÇ˵index.jspºÍjsĿ¼ÊÇƽ¼¶µÄ£¬µ«ÊÇÔÚindex.jspÏÂÒýÓÃjavascriptÎļþʱÔõôҲÕÒ²»µ½¡£
WEB-INF¶ÔÓÚÓû§£¨Ò²¾ÍÊÇIE£©²»¿É¼û¡£
¶Ô²ß£¬°Ñjs·Åµ½WEB-INFÍ⣬»òÕßͨ¹ýרÃŵÄjsp/servlet/actionµÈforwardµ½ÏàÓ¦µÄ×ÊÔ´¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ