锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久亚洲美女精品国产精品,亚洲AV无码成人精品区天堂,亚洲人成精品久久久久http://www.tkk7.com/lmsun/category/3301.htmlzh-cnWed, 28 Feb 2007 20:14:02 GMTWed, 28 Feb 2007 20:14:02 GMT60Java鐜鍙橀噺璁劇疆http://www.tkk7.com/lmsun/articles/17670.htmlmy javamy javaTue, 01 Nov 2005 06:04:00 GMThttp://www.tkk7.com/lmsun/articles/17670.htmlhttp://www.tkk7.com/lmsun/comments/17670.htmlhttp://www.tkk7.com/lmsun/articles/17670.html#Feedback0http://www.tkk7.com/lmsun/comments/commentRss/17670.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/17670.htmlJAVA_HOME=D:\j2sdk1.4.2_03
Path=D:\j2sdk1.4.2_03;D:\j2sdk1.4.2_03\bin
CLASSPATH=.;D:\j2sdk1.4.2_03\lib\tools.jar;D:\j2sdk1.4.2_03\lib\dt.jar;D:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;D:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\jsp-api.jar



my java 2005-11-01 14:04 鍙戣〃璇勮
]]>
struts in action 涓殑register-complete.war閮ㄧ講澶辮觸闂http://www.tkk7.com/lmsun/articles/12537.htmlmy javamy javaFri, 09 Sep 2005 05:53:00 GMThttp://www.tkk7.com/lmsun/articles/12537.htmlhttp://www.tkk7.com/lmsun/comments/12537.htmlhttp://www.tkk7.com/lmsun/articles/12537.html#Feedback0http://www.tkk7.com/lmsun/comments/commentRss/12537.htmlhttp://www.tkk7.com/lmsun/services/trackbacks/12537.htmlstruts in action 涓殑register-complete.war,鍦╰omcat涓儴緗插悗,褰撹緭鍏ョ敤鎴峰悕鍜屽瘑鐮佸悗鎬繪槸緇欏嚭failure欏甸潰鐨勮В鍐蟲柟娉?BR>
1銆侀鍏堝皢紼嬪簭鏀懼湪涓涓嬫病鏈夌┖鏍肩殑鐩綍涓紙涓嶈兘鏀懼湪濡侾rogram Files涓級
渚嬪鍦―鐩樼殑鏍圭洰褰曚笅鏂板緩鐩綍錛歮yregister.
鍦?server.xml涓姞鍏ワ細
<Context path="/myregister"
docBase="d:\myregister\"
crossContext="false"
debug="0"
reloadable="true" >

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_dbtest_log." suffix=".txt"
timestamp="true"/>

</Context>


2銆佹壘鍒癠serDirectory.java涓笅闈唬鐮侊細
    public void setUser(String userId, String password) throws
            UserDirectoryException {

        // no nulls
        if ((null==userId) || (null==password)) {
         System.out.print("userid is null");
            throw new UserDirectoryException();
        }


        try {

            // conform userId to uppercase when stored
            p.put(fixId(userId), password);
            String o = this.getClass().getClassLoader().getResource(UserDirectoryFile).getFile();
            p.store(new FileOutputStream(o), UserDirectoryHeader);

           
        }

        catch (IOException e) {
            throw new UserDirectoryException();

       }
    }


淇敼涓猴細
    public void setUser(String userId, String password) throws
            UserDirectoryException {

        // no nulls
        if ((null==userId) || (null==password)) {
         System.out.print("userid is null");
            throw new UserDirectoryException();
        }


        try {

            // conform userId to uppercase when stored
            p.put(fixId(userId), password);
            String o = this.getClass().getClassLoader().getResource(UserDirectoryFile).getFile();
     System.out.println(o); //o is /D:/myregister/WEB-INF/classes/resources/users.properties
     String ostr=o.substring(1); // the  line must be add is to use to remove the "/" in  String o
     System.out.println(ostr); //ostr is D:/myregister/WEB-INF/classes/resources/users.properties
            p.store(new FileOutputStream(ostr), UserDirectoryHeader);//modify o as ostr

           
        }

        catch (IOException e) {
            throw new UserDirectoryException();

       }
    }

娉ㄦ剰鏈鍏抽敭鐨勬槸灝嗭細this.getClass().getClassLoader().getResource(UserDirectoryFile).getFile();鎵鑾峰緱鐨勫瓧絎︿覆榪涜澶勭悊鍥犱負瀹冨墠闈㈠浜嗕竴涓?/"銆傞渶瑕佸幓鎺夈?BR>


鑻辨枃錛?BR>
I found a solution to your problem

first step:
you must deploy the application build a folder  make sure you don't use
a directory which has any spaces in the path (such as the Program Files directory on Windows)as this may
cause the UserDirectoryException.
such as build a folder "myregister"  in Driver D and copy the program in it.

add the following codes to server.xml:

<Context path="/myregister"
docBase="d:\myregister\"
crossContext="false"
debug="0"
reloadable="true" >

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_dbtest_log." suffix=".txt"
timestamp="true"/>

</Context>

    

second step:
just find the following code within the 'UserDirectory.java'
    public void setUser(String userId, String password) throws
            UserDirectoryException {

        // no nulls
        if ((null==userId) || (null==password)) {
         System.out.print("userid is null");
            throw new UserDirectoryException();
        }


        try {

            // conform userId to uppercase when stored
            p.put(fixId(userId), password);
            String o = this.getClass().getClassLoader().getResource(UserDirectoryFile).getFile();
            p.store(new FileOutputStream(o), UserDirectoryHeader);

           
        }

        catch (IOException e) {
            throw new UserDirectoryException();

       }
    }


modify as follow:
    public void setUser(String userId, String password) throws
            UserDirectoryException {

        // no nulls
        if ((null==userId) || (null==password)) {
         System.out.print("userid is null");
            throw new UserDirectoryException();
        }


        try {

            // conform userId to uppercase when stored
            p.put(fixId(userId), password);
            String o = this.getClass().getClassLoader().getResource(UserDirectoryFile).getFile();
     System.out.println(o); //o is /D:/myregister/WEB-INF/classes/resources/users.properties
     String ostr=o.substring(1); // the  line must be add is to use to remove the "/" in  String o
     System.out.println(ostr); //ostr is D:/myregister/WEB-INF/classes/resources/users.properties
            p.store(new FileOutputStream(ostr), UserDirectoryHeader);//modify o as ostr

           
        }

        catch (IOException e) {
            throw new UserDirectoryException();

       }
    }


by the way,the String o is /D:/myregister/WEB-INF/classes/resources/users.properties
the String ostr is D:/myregister/WEB-INF/classes/resources/users.properties



my java 2005-09-09 13:53 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲国产成人精品女人久久久 | 国产免费爽爽视频在线观看| 免费a级毛片无码av| 亚洲第一成年免费网站| 男男AV纯肉无码免费播放无码| 亚洲精品国产成人| 13一14周岁毛片免费| 亚洲精品福利在线观看| 久久精品国产免费观看| 亚洲成a人片在线观| 97视频免费在线| 久久亚洲国产最新网站| 免费毛片网站在线观看| 国产亚洲精品国产福利在线观看 | 日韩精品免费视频| 亚洲码在线中文在线观看| 最近2019免费中文字幕视频三| 亚洲视频免费播放| 妞干网手机免费视频| 视频一区二区三区免费观看| 亚洲男人av香蕉爽爽爽爽| a级成人免费毛片完整版| 亚洲日本一区二区| 日韩欧美一区二区三区免费观看| 亚洲欧洲无码一区二区三区| 免费永久国产在线视频| 十八禁在线观看视频播放免费| 亚洲精品综合一二三区在线| 免费无码AV电影在线观看| 草久免费在线观看网站| 亚洲AV无码专区国产乱码电影| 免费不卡视频一卡二卡| 亚洲av无码成人精品区一本二本 | 亚洲激情视频在线观看| 成年女人色毛片免费看| 美女露隐私全部免费直播| 国产精品亚洲аv无码播放| 99久久久国产精品免费无卡顿| 亚洲国产精品自在自线观看| 亚洲香蕉成人AV网站在线观看| 亚洲成人一区二区|