锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久亚洲美女精品国产精品,亚洲AV无码成人精品区天堂,亚洲人成精品久久久久http://m.tkk7.com/lmsun/category/3301.htmlzh-cnWed, 28 Feb 2007 20:14:02 GMTWed, 28 Feb 2007 20:14:02 GMT60Java鐜鍙橀噺璁劇疆http://m.tkk7.com/lmsun/articles/17670.htmlmy javamy javaTue, 01 Nov 2005 06:04:00 GMThttp://m.tkk7.com/lmsun/articles/17670.htmlhttp://m.tkk7.com/lmsun/comments/17670.htmlhttp://m.tkk7.com/lmsun/articles/17670.html#Feedback0http://m.tkk7.com/lmsun/comments/commentRss/17670.htmlhttp://m.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://m.tkk7.com/lmsun/articles/12537.htmlmy javamy javaFri, 09 Sep 2005 05:53:00 GMThttp://m.tkk7.com/lmsun/articles/12537.htmlhttp://m.tkk7.com/lmsun/comments/12537.htmlhttp://m.tkk7.com/lmsun/articles/12537.html#Feedback0http://m.tkk7.com/lmsun/comments/commentRss/12537.htmlhttp://m.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 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 国产AV无码专区亚洲AV手机麻豆| 免费无码又爽又刺激聊天APP| 免费观看亚洲人成网站| 亚洲kkk4444在线观看| 最近免费中文字幕大全免费版视频| 亚洲精品无码专区在线在线播放| 国产免费播放一区二区| 中文字幕不卡亚洲 | 国产亚洲精品成人AA片新蒲金| 特级毛片aaaa级毛片免费| 鲁死你资源站亚洲av| 成人黄网站片免费视频| 中文字幕亚洲无线码a| 久久精品成人免费看| 亚洲国产精品一区二区久久| 日本一卡精品视频免费| 亚洲AV成人无码天堂| 18禁超污无遮挡无码免费网站国产| 亚洲youjizz| 国产免费观看a大片的网站| 永久免费无码日韩视频| 亚洲精品你懂的在线观看| 日本高清免费观看| 久久精品国产99国产精品亚洲| 日韩毛片免费无码无毒视频观看| 亚洲AV无码精品国产成人| 亚洲人成色7777在线观看不卡 | 亚洲国产精品第一区二区三区| yellow免费网站| 亚洲色欲色欲综合网站| 天天操夜夜操免费视频| rh男男车车的车车免费网站| 久久精品7亚洲午夜a| 动漫黄网站免费永久在线观看| 亚洲av永久无码天堂网| 亚洲日韩乱码中文无码蜜桃臀网站| 99免费视频观看| 美女裸免费观看网站| 亚洲欧洲在线观看| 四虎影库久免费视频| 一级毛片**不卡免费播|