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

ÎÒ¿ª·¢Ò»¸öjspϵͳʱÅöµ½µÄÎÊÌâ

1.No getter method for property name problem(struts)
ÓÐÒ»ÖÖ¿ÉÄÜÊÇBeanûÓÐдÏàÓ¦µÄget·½·¨£¬ÀýÈç±äÁ¿userNameµÄget·½·¨ÊÇgetUserName£»
»¹ÓоÍÊÇÕâ¸öBeanΪ¿Õ£»
2.
MyEclipseµÄ×Ô¶¯Ìí¼ÓstrutsºÍhibernate¹¦Äܲ»ÄÜ·µ»Ø£¬Çë×¢Ò⣡
ËùÒÔÎÒÏÈʹÓÃMyEclipseµ¼ÈëstrutsºÍhibernate£¬È»ºó½«ËüÃǵÄjarµ¼Èëµ½ÁíÍâÒ»¸öн¨µÄ¹¤³Ì£¬ÕâÊÇÎҾͲ»ÐèÒªMyeclipseÀ´¸øÎÒ¹ÜÀíÒÀÀµÁË¡£
3
.ÔÚÔö¼Ó¶Ôstruts taglibÖ§³Öʱ£¬Ç뽫¶ÔÓ¦µÄtldÎļþ×·¼Óµ½web.xmlÎļþÖÐÈ¥£º
ÀýÈ磺
<jsp-config>
  <taglib>
    <taglib-uri>http://struts.apache.org/tags-bean </taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld </taglib-location>
    </taglib>
</jsp-config>
4.
Èç¹û³ö´í˵ij¸ötagÔÚtldÎļþÖÐûÓУ¬Ôò˵Ã÷×Ô¼ºÔÚjspÎļþÖÐʹÓõÄtagºÍʹÓõÄstruts taglib°æ±¾²»Ò»ÖÂ
ÀýÈ磺ÔÚstruts1.1ÖеÄhtml:locale£¬ÔÚstruts1.2ÖиÄΪhtml:lang
5.
struts tagÖпÉÒÔʹÓÃscriptlets£¬µ«ÊÇÔÚscriptletsÖв»ÄÜʹÓÃstruts tag¡£
Any Struts tag will work only if you place it directly in the JSP, not if you generate it through a scriptlet. To understand why it won't work to generate it in a scriptlet.
JSP life cycle:
    * The JSP interpreter reads the JSP file, including any custom tags such as Struts tags and converts everything to Java source code
    * It then compiles it into a class file
    * It executes the code, rendering a response in plain HTML and sending it back to the browser.
    * It is only at this point that the scriptlet code you inserted gets executed. It is now too late in the cycle to insert any custom tags, since they've already been interpreted by this point.
6. it is illegal according to JSP specification to nest one tag within another as an attribute.
There are two options:
1) You evaluate bean:write and then substitute it into html:text.
2) Use Struts-EL tags. They let you use expression language to get a bean value and substitute it in another tag.
Unless yo


Ïà¹ØÎĵµ£º

jsp×Ô¶¨Òå±êÇ©¿ª·¢

²»´¦ÀíÌåÄÚÈݵıêÇ©Àí½âÒ»ÏÂͼƬ1
´¦ÀíÌåÄÚÈݱêÇ©Àí½âÌáͼƬ2
1£ºJspWriter out = pageContext.getOut();
2£ºBodyContent bc = this.getBodyContent();
 3£ºString input = bc.getString();
 4£ºJspWriter out = bc.getEnclosingWriter();
²»´¦ÀíÌåÄÚÈÝ
µÚÒ»ÐдúÂëΪ²»´¦Àí±êÇ©ÌåÄÚÈÝʱÄõ½ÐèÒªµÄÊä³öµ½Ò³ ......

ÌáÉýJSPÓ¦ÓóÌÐòµÄÆß´ó¾øÕÐ


Äãʱ³£±»¿Í»§±§Ô¹JSPÒ³ÃæÏìÓ¦ËٶȺÜÂýÂð£¿ÄãÏë¹ýµ±¿Í»§·ÃÎÊ´ÎÊý¾çÔöʱ£¬ÄãµÄWEBÓ¦ÓÃÄܳÐÊÜÈÕÒæÔö¼ÓµÄ·ÃÎÊÁ¿Âð£¿
      ±¾ÎĽ²ÊöÁ˵÷ÕûJSPºÍservletµÄһЩ·Ç³£ÊµÓõķ½·¨£¬Ëü¿ÉʹÄãµÄservletºÍJSPÒ³ÃæÏìÓ¦¸ü¿ì£¬À©Õ¹ÐÔ¸üÇ¿¡£¶øÇÒÔÚÓû§ÊýÔö¼ÓµÄÇé¿öÏ£¬ÏµÍ³¸ºÔØ»á³ÊÏÖ³öƽ»¬Éϳ¤µÄÇ÷ÊÆ¡£ÔÚ±¾ÎÄÖ ......

JSPÁ¬½ÓÊý¾Ý¿âµÄ×ܽá

ÒòΪÊǸú×ÅÊÓÆµÑ§Ï°µÄ£¬ÓкܶàÓõĶ«Î÷²»Ò»Ñù£¬µ«ÊÇ»¹ÊÇÂýÂýµÄÃþË÷³öÀ´À²£¡
1.Microsoft JDBC Driver µÄÏÂÔØ°²×°
 Ö»ÒªÔÚÍøÉÏÕÒµ½×ÊÔ´Ò»²½²½À´¾Í¿ÉÒÔÁË¡£
2.ÅäÖû·¾³±äÁ¿
  ÎÒÓõÄÊÇtomcat6.0Ê×ÏÈÅäµÄÊÇ
classpathºÍpath£¬ÕâЩ¶¼ÊÇÔÚÅäjdkµÄʱºò¾ÍÅä¹ýÁË£¬ËùÒԾͲ»Ïêϸ˵Ã÷ÁË£¬Ö»Òª½«libºÍbinÎļþ¼ÓÈëµ½Ïà¹Ø ......

JSPÖÐ±íµ¥Êý¾Ý´æ´¢µÄͨÓ÷½·¨

ÀÊÎÖ½ÌÓý³É¶¼¼ÆËã»úÅàѵ-JSPƪ
J2EE(Java 2 Enterprise Edition)¼¼ÊõÒѹ㷺ӦÓÃÔÚWebÓ¦Óÿª·¢ÖУ¬ÆäÖеÄJavaBean¡¢Servlet¼¼ÊõΪ¿ª·¢ÕßÌṩÁ˸üΪÇåÎúµÄ¿ª·¢»·¾³£¬Ê¹ÓÃJSP¼¼Êõ±íÏÖÒ³Ãæ£¬Ê¹ÓÃServlet¼¼ÊõÍê³É´óÁ¿µÄÒµÎñ´¦Àí£¬Ê¹ÓÃBeanÀ´´æ´¢Êý¾Ý¼°Ò»Ð©ÒµÎñ´¦Àí¡£ÔÚWEBÓ¦ÓÃÖУ¬ÒµÎñÊý¾Ý´æ´¢µ½Êý¾Ý¿âÖеĴ¦Àí¹¤×÷¾­³£ºÜ·±ÖØ£¬ ......

JSPÒ³ÃæEL±í´ïʽÎÞЧµÄÎÊÌâ

 ÒÔǰÓÃWSAD wizard×öµÄ£¬¶¼¿ÉÒÔÔÚJSPÒ³ÃæÖнâÎöµ½EL±í´ïʽ£¬µ±È»Ç°ÌáÊÇJSP2.0µÄÇé¿öÏ¡£
½ñÌìÓöµ½ÁËÒ»¸öĪÃûÆäÃîµÄÎÊÌâ¡£¸ÕÏÂÔØEclipse3.3+MyEclipse6.0ÌåÑéµÄ¹ý³ÌÖУ¬ÓöÉÏÁ˽âÎö²»µ½EL±í´ïʽµÄÎÊÌâ¡£¾­¹ýºÃ¼¸¸öСʱµÄ×ÁÄ¥ÖÕÓÚ·¢ÏÖÁË£¬¸ø´ó¼Òshareһϣº
ÎÊÌâ¾Í³öÔÚ½¨Web ProjectµÄʱºòweb.xmlÉùÃ÷ÉÏ¡£
web.xml ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ