SAStruts Extension Component (sastruts-extension) ã¨ã¯ï¼Seasarããã¸ã§ã¯ãã®Webãã¬ã¼ã ã¯ã¼ã¯ SAStruts (Super Agile Struts) ã®æ¡å¼µã³ã³ãã¼ãã³ãã§ãã ã¨ãã£ã¦ãã»ã»ã»ãããªå¤§è¢è£ãªæ©è½ã¯ããã¾ããã SAStruts ã§ã·ã¹ãã æ§ç¯ããéã®è¯ãæå³ã§ããã¾ãçãªåå¨ãã§ããããã¨æãã¾ãã ç¾å¨(0.1ç)ã®æ©è½ã¨ãã¦ã¯ä¸è¨ã®ã¿ã§ãã [対å¿æ¸ã¿æ©è½]Actionã¢ã¯ã»ã¹ã³ã³ããã¼ã«æ©è½ã¢ããã¼ã·ã§ã³ãç¨ãã¦ãActionã¯ã©ã¹(ã¾ãã¯å®è¡ã¡ã½ãã)æ¯ã«ã¢ã¯ã»ã¹ã³ã³ããã¼ã«(äºåå¦ç)ãè¨å®ã§ãã¾ãã ã¢ããªã±ã¼ã·ã§ã³æ¨æºã®äºåå¦ç㯠dicon ã«ããã©ã«ãè¨å®ãããã¨ãå¯è½ã§ãã public class IndexAction { @Auth(type = AuthType.APPEND, p
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
SAStrutsã¯éçºè ã®æè¡ã¹ãã«ããã®ã¾ã¾ç§»è¡ã§ããããã«ä½ããã¦ã¾ãã ã§ããæ®éã®Strutsã¯è¨å®ãã¦ãå ¨ãåããªãããã§ãã struts-config.xmlã¨ãæ®éã«æ¸ãã¦ãåããªãã ããã§SAStrutsã§Strutsã®è¨å®ã®ã¾ã¾æ®éã®Strutsãåãããã«ãã¦ã¿ã¾ããã ãã¦ã³ãã¼ãã¯ããâ sa-struts-aos.jar ã½ã¼ã¹ä»ã§ãã ã¡ãªã¿ã«SAStrutsAOS(sa-struts-aos)ã¨åã¥ãã¾ããã AOSã¯Additional Original Styleã®ç¥ã è±èªçã«æ£ãããã¯è±èªãå ¨ç¶åºæ¥ãªãã®ã§ãããã¾ããã Append Old Strutsã§ãããã§ãã â å¾®å¦ãªç¹ ã»Strutsã§è¨å®ãããé¨åã«ã¤ãã¦ã¯HotDeployåºæ¥ããªãã (SAStrutså®ç¾©é¨åã¯HotDeployåºæ¥ãã) Seasarã³ã³ããã«ãç»é²ããã¦ãã¾
Javaä»äºã§å種ãã¬ã¼ã ã¯ã¼ã¯ãæ¯è¼æ¤è¨ããã®ã§ãæ¯è¼ç¨ã«ä½ã£ãåèè³æãå ¬éãã¾ããã¡ãªã¿ã«ç¾å¨ç§ã¯ããã¯ã³ã´ããã®ç¤¾å ã·ã¹ãã éçºããæä¼ããã¦ã¾ãã¦ããã®ä¸ç°ã§èª¿ã¹ããã®ã§ããä¼ç¤¾è³æãããªããç§ã®è³æã¨ãããã¨ã§ããã°ã§å ¬éãã¦ãããããããã¨ããã¨ã®ãã¨ãªã®ã§å ¬éãã¨ãã¾ãã ä»åã®æ¡ä»¶åãã«ã¢ããªã±ã¼ã·ã§ã³ãç»é¢å±¤ã³ã³ãã層ãã¼ã¿ã¢ã¯ã»ã¹å±¤ã«åãã¦ããããããã¬ã¼ã ã¯ã¼ã¯ãé¸ã¶ã®ãç®çã§ããã³ã³ãã層ã¯DIã³ã³ããã®ãã¡ããããããã¼ã¿ã¢ã¯ã»ã¹å±¤ã¯O/Rãããã¼ãé¸ã¶ãã¨ã«ãªãã¾ãã 太æ ã®ç¯å²ãé¸å®å¯¾è±¡ã§ããããæ¬ã«åºã¦ããæåå®è¦ãªé層å³ã¨ã¯å¤ãã¦ããã¾ãã 次ã®ãã®ãæ¯è¼æ¤è¨ãã¾ãããç»é¢å±¤SAStrutsApache Wicketï¼ã»ãã«ãTeedaã¨ãClick Frameworkã¨ãããã¨ãã¨ã¯åè£ã«ãã£ããã調æ»ã追ãã¤ããªãã®ã§äºã¤ã«çµã£ãï¼ã³ã³ããSeasa
ãã ã®åå¿é²ã§ããJDK 1.5 ç°å¢ã«ã¦ SAStruts ãå©ç¨ãããã¨ã«ãªã£ãã®ã§ã S2 ã Spring ãªã©ãjavax.annotationãããµãã¼ãããã³ã³ããã jdk-1-5-0_xx ã§å©ç¨ããå ´åãjdk-1-5-0_xx ç°å¢ã§ S2 ã® @Resource ãå©ç¨ããå ´åãMaven2 ãªã pom.xml ã«ä»¥ä¸ã®è¨è¿°ã§okã org.apache.geronimo.specs geronimo-annotation_1.0_spec 1.1.1 ãã¦ã³ãã¼ãã¯ãã¡ãâããâhttp://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jarhttp://repo1.ma
SAStrutsã§ç°¡åã«Ajaxãæ±ããããã«ãã¾ããããµã³ãã«ã¯ãããªæãã package tutorial.action; import org.seasar.struts.annotation.Execute; import org.seasar.struts.util.ResponseUtil; public class AjaxAction { @Execute(validator = false) public String index() { return "index.jsp"; } @Execute(validator = false) public String hello() { ResponseUtil.write("ããã«ã¡ã"); return null; } } ã¢ã¯ã·ã§ã³ã§ãResponseUtil#write()ã使ã£ã¦ã¬ã¹ãã³ã¹ã«æååãæ¸ãåºãã ãã
趣æ¨ã¨ããã¾ãé¢ä¿ãªãã§ãããServiceã»Logicãã¨ãã¾ãã3é層ã«ãããªãã°ãã¨ã³ãã£ãã£ã«ãã£ããã®ãServiceãã¢ã¯ã·ã§ã³ã«ãã£ããã®ã¯Logicã¨å¼ãã æ¹ãããã¬ã¼ã ã¯ã¼ã¯å´ã®å¼ã³æ¹ã¨ã®è¦ªåæ§ã¯é«ãããã«æãã¾ãã ã¡ãªã¿ã«ãä»ã¯ãããªæãã®è¨è¨ã¯ã©ããã¨æã£ã¦ãã¾ãã Serviceã¯ã©ã¹ï¼ã¨ã³ãã£ãã£ã¨å¯¾ã«ã¤ããããã¡ã¤ã³ã¢ãã«çãªèãæ¹ãããã¸ã§ã¯ãå ã§ã¤ãã¦ãããªããªãã°ãã£ãã®ãã¨å°å ¥ããªãã Logicã¯ã©ã¹ ã»ã¦ã¼ã¹ã±ã¼ã¹ãè·¨ããç»é¢ã¾ããã®å¶å¾¡å¦çããã¦ã¼ã¹ã±ã¼ã¹ãã¾ããããã¸ãã¹ãã¸ãã¯ç¹æã®å¦çãæ¸ããããããããµãã·ã¹ãã éå ±éé¢æ°ã®ã¤ã¡ã¼ã¸ããã¨ãã°è¤æ°ã¦ã¼ã¹ã±ã¼ã¹ã§ããã±ã¼ã¹ã§ã¯æ²¢å±±ã®è¡¨ã«ã¤ã³ãµã¼ãããããããã±ã¼ã¹ã§ã¯ã¢ãããã¼ãã®ã¿ãããããªãã®ã使ãã ã»ãã ããServiceã¯ã©ã¹çè¨è¨ãé£ããå ´åã«ã¯ãç»é¢å¶å¾¡çãªã¯ã©ã¹ Servic
æ¨æ¥ãFirefox3ãæ£å¼ãªãªã¼ã¹ãããã®ã§ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ããã æ¿éã§ãããç´ æ´ãããï¼ãããããã¾ããã§ãã 次ä¸ä»£ãã©ã¦ã¶ Firefox http://mozilla.jp/firefox/ ä»ã¾ã§ãWebãã©ã¦ã¶ã¯Safariã使ã£ã¦ããã®ã§ãéãã§ã¯æºè¶³ãã¦ãã¾ãããã§ããGoogleãã¼ã«ãã¼ãã¨ãã¯ã¦ãªãã¼ããããã¦ã¹ã¼ã¹ãã£ã®ãã©ã°ã¤ã³ãã使ããªããã¨ãããä¸æºã§ããããGoogleãã¼ã«ãã¼ãã§è±åèªã«ãã¦ã¹ãã©ã¼ã«ã¹ããã¨ãããã¢ããã§æ¥æ¬èªã®æå³ãæãã¦ãããæ©è½ããªãã¨ãä½æ°ã«è±èªã®æç« ãèªãã®ãè¾ãã£ããã§ããããã SafariããFirefox3ã¸ã®ç§»è¡ã«ããã¦å¿æ®ããªã®ã¯ãSafariã®ç¾ãããã©ã³ãããé¢ãã¦ãã¾ããã¨ã§ãã ãGoogleãã¼ã«ãã¼ã以å¤ã®ãã©ã°ã¤ã³ã¯ãã¾ã 確ããã¦ãã¾ãããããããæ©ã«ã¡ã¤ã³ã§ä½¿ãWebãã©ã¦ã¶ã¯Firefox
Release Notes - SAStruts - Version 1.0.4-sp9 Bug [SASTRUTS-126] - SizeLimitExceededException çºçæã«ãã©ã¦ã¶ãçã£ç½ã«ãªã [SASTRUTS-129] - /action/methodã§ãªã¯ã¨ã¹ãããã¨ãæ¤è¨¼ã¨ã©ã¼ã§jspã§ã¯ãªãactionã«forwardããã¨ç¡éã«ã¼ããã [SASTRUTS-130] - S2Link Tagã§transaction=trueã«ããã¨ãã«?ãäºéã«åºåããã¦ãã¾ã Release Notes - SAStruts - Version 1.0.4-sp8 Bug [SASTRUTS-125] - BeanWrapperãindexed propertyã«å¯¾å¿ãã¦ããªã Release Notes - SAStruts - Version 1.0.4-sp7
SAStruts 㨠S2JDBC ã使ã£ã¦å°ãè¤éãªã±ã¼ã¹ã®Webã¢ããªãéçºããéã«ããã¦ãç¾æç¹ã§èªåãä¸çªè¯ãã¨èãã¦ããã¢ã¼ããã¯ãã£ãå³ç¤ºãã¦ã¿ã¾ããã ãªããªãè¯ãæãã§ããããã¦ã課é¡ãããããªãã°ã次ã®ï¼ç¹ã§ãã ã¢ã¯ã·ã§ã³ãã©ã¼ã ã®å é¨ã¯ã©ã¹ã« @Component(instance = InstanceType.SESSION) ãä»ãã¦ãã¹ã³ã¼ããã»ãã·ã§ã³ã«ããããã§ããªããã¨ï¼ããæ¹ãåãããªãã ãã ã¨æããï¼âã§ããªããã¨ãå¤æãã¾ãã ã¦ã¼ã¹ã±ã¼ã¹ãã¾ããã§ã¢ã¯ã·ã§ã³ãã©ã¼ã ã使ç¨ããªãæ¹éã¨ããå ´åãæ¤è¨¼ã¡ã½ãããã¢ã¯ã·ã§ã³ãã©ã¼ã ã«æ¸ããããªããç¾ç¶ã§ã¯ã¢ã¯ã·ã§ã³ã«ããæ¸ããªããã¨ã 追è¨ï¼ 1.0.3-rc1 ããæ¤è¨¼ã¡ã½ããã¯ã¢ã¯ã·ã§ã³ãã©ã¼ã ã«æ¸ããã¨ãã§ããããã«ãªãã¾ãã ãã£ã¦ãæ¤è¨¼ã¡ã½ããã¯ã¢ã¯ã·ã§ã³ããã¢ã¯ã·ã§ã³ãã©ã¼ã ã¸ç§»ããã¨ããªã¹ã¹
æ©è½ãªãã¡ã¬ã³ã¹ SAStrutsã§ä½¿ããã¦ããæ©è½ã®èª¬æããã¾ãã ããã¸ã§ã¯ãæ§æ SAStrutsã§ã¯ãã«ã¼ãããã±ã¼ã¸ã®é ä¸ã«actionãªã©ã®ããã±ã¼ã¸ãä½ã£ã¦ã ããã«å¿ è¦ãªãã¡ã¤ã«ãæ ¼ç´ãã¾ãã ã«ã¼ãããã±ã¼ã¸åã¯ãä»»æã®ååãæå®ãããã¨ãã§ãã¾ãã ä¾ãã°ãsa-struts-tutorialããã¸ã§ã¯ãã§ã¯ãã«ã¼ãããã±ã¼ã¸åã¯ãtutorialã«ãªã£ã¦ãã¾ãã ã«ã¼ãããã±ã¼ã¸åã¯ãconvention.diconã§æå®ãã¾ãã sa-struts-tutorialããã¸ã§ã¯ãã§ã¯ãsrc/main/resourcesã§æ¬¡ã®ããã«æå®ããã¦ãã¾ãã convention.dicon <components> <component class="org.seasar.framework.convention.impl.NamingConventionImpl"> <i
追è¨ï¼ 以åã«ä»¥ä¸ã®ãããªã¨ã³ããªãæ¸ãã¦ãã¾ãã¾ãããã transient ãä»ããããããã£ã¯ãHOT deployã¨COOL deploy 㧠æåãéããã¨ãå¤æããããã使ããªããã¨å¼·ããæ¨å¥¨ãã¾ãã æ··ä¹±ããã¦ãã¾ã£ã¦ãã¹ããã»ã³ã æåããå¤æããã«ãHOT deployã®æã¯ãHogeDtoãã·ãªã¢ã©ã¤ãº ãã¦ä½å¦ãã«éé¿ãã¦ãããã¯ã©ã¹ãã¼ããå·®ãæ¿ãã£ãå¾ã«ã¯ ã·ãªã¢ã©ã¤ãºãããã®ã使ã£ã¦HogeDtoã復å ãã¦ããããã«æãã¾ãã transient ãä»ããããããã£ã¯ãã·ãªã¢ã©ã¤ãºã®å¯¾è±¡ããå¤ããããã çµæçã«ã»ãã·ã§ã³ã¹ã³ã¼ãã§ã¯ãªããªãã¾ãã ããããããããCOOL deploy ã§ã¯ã·ãªã¢ã©ã¤ãºãã¯ã©ã¹ãã¼ãã®å·®ãæ¿ã㯠è¡ãããªãã®ã§ãtransient ãä»ããããããã£ãã»ãã·ã§ã³ã¹ã³ã¼ã㨠ãªã£ã¦ãã¾ã訳ã§ãã 次ã®ã¨ã³ããªã®ã³ã¡ã³ãæ¬ã§ãã®è¨
SAStrutsã¨Strutsã¯ã¢ã¯ã·ã§ã³ã®ã³ã³ãã¼ãã³ãã® ã¹ã³ã¼ããç°ãªã£ã¦ããã®ã§æ³¨æããªããã°ãªããªãã ã¢ã¯ã·ã§ã³ã®ã¹ã³ã¼ãã®éã Struts singleton SAStruts request çStrutsã®ã¢ã¯ã·ã§ã³ãæã¤ãã£ã¼ã«ã è¤æ°ã®ã¹ã¬ããéã§å ±æãããä¸æ¹ã åé·åæ§æã®ãã·ã³éã§ã¯å ±æãããªãã ãã®ãããªã¯ã»ãããããã«ã使ç¨ãé¿ããã ãããã¯ãæ éã«ä½¿ãå¿ è¦ãããã¾ããã ï¼ä½¿ç¨ç¦æ¢ã«ãã¦ããããã¸ã§ã¯ããå¤ãã¨æãããï¼ SAStrutsã®ã¢ã¯ã·ã§ã³ã®ãã£ã¼ã«ã ä»ã®ã¹ã¬ããã«å½±é¿ãåã¼ããªãrequestã¹ã³ã¼ããªã®ã§ã æ°è»½ã«ã©ãã©ã使ç¨ãããã¨ãã§ããã ã¡ãªã¿ã«ãã¢ã¯ã·ã§ã³ã®ãã£ã¼ã«ããpublicãã£ã¼ã«ãã¨ã㦠宣è¨ãã¦ããã¨ã次ã®ããã«JSPå´ã®ELå¼ã§ç°¡åã«å¼ã³åºããã¨ãã§ããã HogeAction.java package tut
1ã¤ã¦ã¼ã¹ã±ã¼ã¹ã«éãã¦ãããã¨ã¯ããã¹ã¦Actionã«è¨è¿°ããè¤æ°ã®ã¦ã¼ã¹ã±ã¼ã¹ã§ä½¿ããããã®ãLogicã«åå²ããã®ãã·ã³ãã«ã§ããããããã®ã§ã¯ãªããã¨ãããæã£ãããã§ãã ï¼ï¼ä¸ç¥ï¼ï¼ 追è¨2:ã³ã¡ã³ãã¸ã®åçã§ãããã¦ã¼ãã£ãªãã£ã¯ãstaticã¡ã½ããã§æ§æããããã¤ã¯ãutilã®ããã±ã¼ã¸ãActionã«DIãããã¤ã¯ãlogicããã±ã¼ã¸ã§ããã¨æãã¾ããã©ã£ã¡ã§ããªãã¦ã¼ãã£ãªãã£ãutilããã±ã¼ã¸ã§ããã Entityã«ã¤ãã¦ã¯ãSAStrutsã®ããã¥ã¡ã³ãã«ããã®blogã§ãæ¸ãã¦ãã¾ããã1ã¤ã®Entityã«éãããã¸ãã¯ãªãEntityã«è¨è¿°ããã¨ãããã¨ã§ããã¨æãã¾ããè¤æ°ã®ã¦ã¼ã¹ã±ã¼ã¹ã§ä½¿ããããããEntityã«æ¸ãæå³ãããã¾ãããåå¥ã®ã¦ã¼ã¹ã±ã¼ã¹ã§ãã使ããªããªããActionã«æ¸ããã»ããããã¨æãã¾ãã ä¸è¨ã®ã²ãããã®ã¨ã³ããªã¼ãå ã«ãã©
Welcome to the "Super Agile Struts" project. Super Agile Struts(以éSAStrutsã¨çç¥)ã¯ãStrutsã使ã£ãéçºãSuper Agileã«è¡ãªãããã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãã Strutsã§éçºããå ´åã«å°ããã¨ã¯ãè¨å®ãã¡ã¤ã«ãããããæ¸ãå¿ è¦ããã£ããã è¨å®ãã¡ã¤ã«ãJavaã®ã³ã¼ããä¿®æ£ãããã³ã«ã¢ããªã±ã¼ã·ã§ã³ãµã¼ããåèµ·åããå¿ è¦ããããã¨ã§ãããã SAStrutsã使ãã°ãè¨å®ãã¡ã¤ã«ãæ¸ãå¿ è¦ã¯ãªãã ã¹ã¯ãªããè¨èªã®ããã«ãã¡ã¤ã«ãä¿åãã(ä¿åã¨åæã«ã³ã³ãã¤ã«ãããããªè¨å®ã«ãªã£ã¦ããå ´å)ã¨ã ããã«ãã®å 容ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®åèµ·åãªãã§èªèãããã¨ãã§ãã¾ãã ã¹ã¯ãªããè¨èªã®ããã«ãããããéçºããã§ãã Eclipseãªã©ã®IDEã«ããã³ã¼ãã®èªåè£å®ãªã©ã§ã ããã«çç£æ§ãé«ããã
æ¬å½ã¯ãRails風ã«ãããã¨æã£ãããã§ã¯ãªãããµããããããCubbyãããã£ã¦ãã£ã¦ãã®ã§ãã¤ã³ã¹ãã¤ã¤ããã¦ä½ã£ããRails風ã«ãªã£ã¡ãã£ãã£ã¦æãã http://locahost:8080/sa-struts-tutorial/loginã«ã¢ã¯ã»ã¹ããã¨ãtutorial.action.LoginAction#index()ãå¼ã³åºããã¾ãã index()ã®æ»ãå¤ãlogin.jspã ã¨ã/login/login.jspã«ãã©ã¯ã¼ãããã¾ãã ã¾ãã/employee/list.jspã表示ããã¦ããã¨ãã«ãªã³ã¯ã¿ã°ã <a href="edit/${e.id}">...</a>ã ã¨ã/employee/edit/idã®å¤ã«é·ç§»ããidãActionã«ã»ãããããedit()ãå¼ã³åºããã¾ãã edit()ã¯ä»¥ä¸ã®ã¨ããã @Execute(urlPattern = "ed
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}