2005-09-01ãã1ã¶æéã®è¨äºä¸è¦§
wikiroom.com éé ãèªãã§åå¼·ããã·ãªã¼ãºç¬¬7å¼¾ æ¥åãã¸ãã¯è¨è¨ DIContainerã®ãªãæ代ã«ã¯ãç»å ´äººç©ãå¢ããã¨ãããã管çããã³ã¹ããã°ãã«ã§ããªããã®ã«ãªãã¾ããå¾¹åºçã«å½¹å²ã«å¿ãã¦ã¯ã©ã¹ãåå²ããã¨ããææ³ãç¾å®çã«ãªã£ãã®ã¯ããã¯ãDâ¦
ãã¹ã®åé¡ã解決ãã¦ãã£ããããã®ã§ãå°ããµã³ãã«ããã¼ã¹ã«éãã§ã¿ãã ãã¼ããªããã±ã¼ã¸æ§æã«ãã¦ã¿ãããmanaged beanãActionã¨DTOã«åãã¦ã¿ããã ç´ ã®JSFãªã®ã§ãFacesContextç¨ã®FacesUtilsãä½ã£ã¦ã¿ããã¨ã Classãªãã¸ã§ã¯ããkey代ããâ¦
wikiroom.com éé ãèªãã§åå¼·ããã·ãªã¼ãºç¬¬6å¼¾ æ¥åãã¸ãã¯å±¤ Statelessã§ããå ´åã¯ãå®è£ ã¯ã©ã¹ã®çæãDIã¯ãDIContainerããã¹ã¦é¢åãè¦ã¦ããã¾ãã ããèãã¦ããã¨ããã¬ã¼ã³ãã¼ã·ã§ã³å±¤ããæåã«å¼ã³åºãããã¯ã©ã¹ã¯ãStatelessã«ãã¹ãã â¦
wikiroom.com éé ãèªãã§åå¼·ããã·ãªã¼ãºç¬¬5å¼¾ä»æ¥ã¯çãã«ã TransactionScript (by Fowler) ãã¼ãã§ã¯ãæ¥åãã¨ã«ãã¼ãºãªããéããã ãããããããã®æ¥åãã¨ã«ãSELECTæã¯ãæé©åãããã®ã使ãã¾ããããæå³ãSQLã«ãã¸ãã¯ãåãè¾¼ã¾ãã¦ãâ¦
JSFã§ã¯ãªã¯ã¨ã¹ãã¯èªåèªèº«ã®URLã«å¯¾ãã¦è¡ãã ããã¯ç¾å¨ã®ãã¼ã¸ã«å¯¾å¿ããã¢ãã«ã«ãã©ã¡ã¼ã¿ãåæ ããããã«å¿ è¦ãã¨ãããã¨ãããã ã§ãããã©ã¦ã¶ã®ã¢ãã¬ã¹ãã¼ã«è¡¨ç¤ºãããURLããããããã¨ã«ãªãã¾ãããï¼ ãã¨ãã°ãâã index.jsp (ã¢ãã¬â¦
é·ãã£ãâ¦ãâã®ãµã¤ãã®Getting Startedã®PDFã®P.19ã®ãããã§ãã£ã¨ããã£ã¦ãããã¼ã Core JavaServer Facesããããå ·ä½ä¾ã交ãã説æãæ¥æ¬èªãµã¤ãã«ã¯é常ã«å°ãªãããã«æãããã©ãã¿ããªç解ãã¦ãã®ããªï¼ããããã¦ãFAQï¼ ã¨ã«ãããããã£ãâ¦
ä»æ¥ã¯ãã¼ãã®ãåå¼·ã¯ãä¼ã¿ã
ç¡éã«ã¼ãã®åå ã¯ç¸å¤ãããããããã£ã¦ãªããã©ãservlet-mappingã®æåã¯ããã£ã¦ããã ãã¨ãã°ã <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>ã¨ããã¦ã http://localhost:8080/test/faces/test.jspã¨ã¢ã¯ã»ã¹ããã(webappã®ã«ã¼ãURLã¯/test)ãã®ã¨ãã«ãã®URLã«å¯¾å¿â¦
ã¬ã³ã¿ã«ã§ããã¼ããããåãã¦ããã ãã©ããããã3ã¶æã§ã¬ã³ã¿ã«æéãåãã¦ãã¾ãã ç¥ãåãããããã¼ã©ãã¯ã便å©ã ããã¨æãã¦ããã£ãã®ã§ã次ã¯ããã¼ã©ãã¯ãã¬ã³ã¿ã«ãããã¨ã«ããã ã·ã¼ããã«ãã¨ãã¤ãã¦ã¦ãæ¼ãã¨ç¸¦æ¹åã«ããããããâ¦
ãªããæè¿ããã¼ã¯ã¼ããèªåãªã³ã¯ããã¦ãããã¤ã®ã¾ã«ï¼ ã¾ã ãã®è¾ºãã®ä»çµã¿ãããããã£ã¦ãªãâ¦ã
è¿ãã®LAOXã§ã大人ã®ç§å¦vol.09ããå¹³ç©ã¿ã«ãªã£ã¦ããã§ãè¡åè²·ãã ãã®ã¡ã¬ã¹ã¿ã¼ã®å¤ªå¹³è²´ä¹ããã¨å ±åã§ä½ã£ãä»é²ã究極ã®ãã³ãã¼ã«å¼ãã©ãã¿ãªã¦ã ãã«é£ããã¦ãã¾ã£ãã ææåç¤ã®çµã¿ç«ã¦ã«æéåã£ããã©ä½ã¨ãå®æã æãä¸ãã«ãããã¨æ¯ãâ¦
ç»é¢é·ç§» 2004-08-28 - ã²ãããã blog ç»é¢ã®ã¢ãã¯ã使ã£ã¦æ©ã段éãã顧客ã«å ·ä½çãªã¤ã¡ã¼ã¸ãæ±ããã¦ãæèéããã§ããã ãæ¸ãããã¨ã ç»é¢ã¢ãã¯âç»é¢é·ç§»å³ã¨è½ã¨ãè¾¼ãã§ãã¤ã¡ã¼ã¸ããããç»é¢é·ç§»å³ãä½ãã¨ã¨ãã«ãç»é¢ã¢ãã¯èªä½ã§å®éã®â¦
wikiroom.com éé ãèªãã§åå¼·ããã·ãªã¼ãºç¬¬3å¼¾ã è¨è¨ ã³ã³ããã¼ã«åæ 2004-07-29 - ã²ãããã blog ãã¼ãã§ãããã¹ããã¹åæããã³ã³ããã¼ã«ã¯ã©ã¹ãæ½åºããæ¹æ³ã 以åããã¡ãã£ã¨æç´ããå ¥ã£ã¦ãããã ã¦ã¼ã¶æ©è½åæ 2004-07-31 - ã²ããâ¦
ã¨ã¡ã ãããããããã²ãããæµãã«ãªã£ã¦ãã¾ã£ããåçã ä½ããã¡ã®ä¼ç¤¾ã§ãS2ãã¡ããªã¼ä½¿ã£ã¦ãã£ã¦ãããããã°è¦ã£ããããã¾ããããããã¡ã®ãã¼ã ã§ã絶対å°å ¥ãããã£ã¨ã
(ç¶ã)AOP ã¤ã³ã¿ã¼ã»ãã¿ã¯ãèªåèªèº«ã®åä½ãã¹ããè¡ãã ã¢ã¹ãã¯ããçµã¿è¾¼ã¾ããã¯ã©ã¹ã¯ãã¢ã¹ãã¯ããçµã¿è¾¼ã¾ãªãç¶æ ã§åä½ãã¹ããè¡ãã çµåãã¹ãã§ã¯ãã¢ã¹ãã¯ãããã¡ãã¨çµã¿è¾¼ã¾ãã¦ãããã¨ãæ¤è¨¼ããã ã¤ã³ã¿ã¼ã»ãã¿ã®ç´°ãããã¹ãã¯â¦
ãããªãã°ãããã¾ã¨ããµã¤ãããã¾ã ãã¤ã¦ãã£ãã ãããã ã¨ããæåã®æ¸¦ã®ä¸ãä¸æ°èªã¿ãwikiroom.com ééèªåç¨ã«ãæéãåããã¨ãããçåç¹ãªã©ãã¤ã³ããããã¯ã¢ãããã¦ã¾ã¨ãã¦ãããã¨ãå¼ç¨å ã®æ¹è¡ã¨ãã¹ã¿ã¤ã«ã¨ãã¯é©å®ä¿®æ£ãã¦ã¾ããâ¦
èªåã®ä¸ã§ã®ä»ã®ã¨ããã®ãã¹ããã©ã¯ãã£ã¹ãè¨è¿°ãã¦ã¿ããã¨ã èªè¨¼ã¨æ¿èª 主ä½ãç¹å®ããèªè¨¼ããå¦çã¨ããã®ä¸»ä½ãããæä½ãå®è¡ãã¦ãããã©ãããæ¿èªããå¦çã¯åãã¦èããã èªè¨¼(Authentication) ãªã¯ã¨ã¹ãå ã®ä¸»ä½ã®IDã¨ãã¹ã¯ã¼ãã使ç¨ãâ¦
MyFacesã使ã£ã¦ãã¦ãä¸ã®ããã«web.xmlã§ãããã³ã°ããã¦ã web.xml <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>/hoge.jsp</url-pattern> </servlet-mapping>ã¢ããªã±ã¼ã·ã§ã³ã«ã¼ãã«é ç½®ããhoge.jspã« http://localhost:8080/hoge/hoge.jspã¨ã¢ã¯ã»ã¹ããã¨ã [ERROR] 2005-09-22 02:07:10 ApplicationContext#log(â¦
æ£ã æ¢åºã ãã©ãã¾ãå¿ãã¦ã¦è»½ãã¯ã¾ã£ã¦ãã¾ã£ãã®ã§ããã2度ã¨å¿ããªãããã«ã¡ã¢ã JSFãTomcat5.xã§ä½¿ãå ´åã¯ã jsp2.0.jar commons-el.jar ã®2ã¤ãWEB-INF/libã«ããã¦ã¯ãããªãã å ¥ããå ´åã®çç¶ã¯âã ã©ããªã«JSPã表示ããããã¨ããã°ã£ã¦ãâ¦
3æ¥éåºç¤¾ãããã¾ã3æ¥éä¼ã¿ã£ã¦ããçæ´»ã ããªãã æãåã£ã¦7æ¥éåä½ãããã¦ã3æ¥éåä½ã§ç¤¾ä¼å ¨ä½ãã¾ããã¦ã¿ããã©ããªããã ãããã
ããã¡ãªã³ã®ãããããããªãæ¹ã®ååã®ãããã§ã ãã¶ã©ã¯ã«ãªã£ãã
ã¨ãããã®ãä½ã£ã¦ã¿ãã ã¯ã©ã¹ãã¡ã½ããã« @AccessDeny("") @AccessAllow("hoge.foo") public class Hoge() { //... } ã¨ããã¢ããã¼ã·ã§ã³ãæ¸ãã¨ãpublic/protected/(ç¡å°)/privateããããã£ã¨ç´°ããã¬ãã«ã§ã¢ã¯ã»ã¹å¶å¾¡ãã§ãããã¨ãããã®ã ãâ¦
JSFããã¾ããããªãã®ã§ã¡ãã£ã¨ã¢ããã¼ã·ã§ã³ã§éã¶ãã¨ã«ãã¢ããã¼ã·ã§ã³ï¼javassist+javaagentã§ã¡ãã£ã¨ã¯ã©ã¹ã®ã¢ã¯ã»ã¹å¶éã¿ãããªãã¨ã試ãã¦ã¿ããé¢ä¿ãªããã©ãjava + assist ãã¨æã£ããéããã ãªãaã¯1ã¤ã§javassist(ã¸ã£ãã·ã¹ãï¼)ãã§â¦
JSFãã©ã°ã¤ã³ãå ¥ããã®ã«ã©ããã¦ãåä½ããªãã ãã°ãè¦ãããã©ãããGEFãå¿ è¦ã ã£ããããã ã¨ããããã§ã[ãã«ãã¡ãã¥ã¼]ãããã«ããã¤ã³ã¹ãã¼ã«æ©è½ã使ã£ã¦EMF,GEF,JEF,J2EEã»ãã»ããã¨ããè²ã å ¥ãã¦ã¿ãããã¨ããããå ¥ãããã¨ããããâ¦
ãªãã風éªãããã®ã©ã¡ãããã¶ãã¼ãã¶ãã¼ããã¦ããå½ç¤¾æ¯1.5åã
ä»æ¥ã¯æ¯é±ã®ã«ã¼ãã£ã¼ã³ãªç¨äºããã£ã¦åºããããã ãã©ããªããªãã¨ãä¼ã¿ã ã£ãããã®ã¾ã¾å¸°ãã®ã¯æããã®ã§ãä¸è¨ã®æ¬ãè²·ã£ã¦ãã©ã¼ã¡ã³ãé£ã¹ã¦å¸°ã£ã¦ãããã ãã©ããã®ã©ã¼ã¡ã³ãã¾ããã¾ãã¦ãªããæºè¶³ã
ã©ãã«ãç´å¾ã®ãããªãåä½ãããJSFã JSPãã¡ã¤ã«ããµã³ãã«ã¨ã¯ã¡ãã£ã¨å¤ãã£ãé ç½®ã«ãããã¨ããã¨ãã¨ããã«ãã¹ã®è§£æ±ºããã¾ããããªããªããã¨ããããã«ã¼ããã£ã¬ã¯ããªç´ä¸ããè¦ã¦ãããªãã web.xmlã¨faces-config.xmlã®æå®ã®æ¹æ³ãæªããã â¦
Sergeã«ãã¦ããSpamAssasinã®ãã¤ã¸ã¢ã³ãã£ã«ã¿ã®å¦ç¿ããããã¨ããã¨ã Cannot open bayes databases /home/***/.spamassassin/bayes_* R/O: tie failed ã®ãããªã¨ã©ã¼ãåºã¦ãã¾ããæè¿info@xxxxã®ãããªã¢ãã¬ã¹ããã®åºä¼ãç³»SPAMãæ¯æ¥æ¯æ¥ã¨ãã§â¦
ä½ã§ãããªã«é£ããã®ãã ç°¡åãªãµã³ãã«ã確èªãããã ããªã®ã«ã Tomcat5.5ã¨Myfaces1.0.9ã®ç¸æ§åé¡âWEB-INF/libããcommons-el.jar, jsp2.0.jarãåé¤ web.xmlã®url-patternãééãã¦ãããããFacesServletçµç±ã§ç¡éã«ã¼ãããâæªè§£æ±º ãããããJSFâ¦
âã®ããã«ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ããã§ãã public class RequestContextImpl implements RequestContext { private static ThreadLocal userThl = new ThreadLocal() { @Override protected User initialValue() { return new User(); } }; public User getUser(â¦