锘??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亚洲欧洲aⅴ| 久视频精品免费观看99| 日本在线看片免费人成视频1000| 91香蕉国产线观看免费全集| 免费一级毛片不卡在线播放| 亚洲精品午夜国产VA久久成人| 乱爱性全过程免费视频| 91大神在线免费观看| 亚洲国产精品自在在线观看| 精品视频一区二区三区免费| 亚洲人成电影在在线观看网色| 一级毛片免费观看| 四虎永久免费地址在线网站| 久久久久久亚洲精品成人| 青柠影视在线观看免费高清 | 亚洲免费人成在线视频观看| 亚洲最新黄色网址| 国产免费黄色无码视频| 中文字幕亚洲第一| 免费一级毛片在线播放视频免费观看永久 | 偷自拍亚洲视频在线观看99| 亚洲国产成人VA在线观看| 成人免费网站久久久| 亚洲第一区在线观看| 青青操免费在线视频| 亚洲精品中文字幕无码AV| 亚洲AV第一成肉网| 狼群影院在线观看免费观看直播| 亚洲小说图片视频| 尤物永久免费AV无码网站| 一个人看的www视频免费在线观看 一个人看的免费观看日本视频www | 亚洲av综合av一区二区三区| 日本免费A级毛一片| 久久夜色精品国产噜噜亚洲AV| aⅴ在线免费观看| 亚洲国产精品久久66| 国产成人精品久久免费动漫| 亚洲av中文无码字幕色不卡| 国产精品亚洲视频| 亚洲精品视频免费看|