1. String in="………";
   String out=in.replaceAll(oldstr,newstr);//可以用正则表达式2. 有两个函数doPost()、doGet(),重写它们即可(具体写法自己看吧)。3. 见java.util.Calendar

解决方案 »

  1.   

    1、use replaceAllreplaceAll
    public String replaceAll(String regex,
                             String replacement)
    Replaces each substring of this string that matches the given regular expression with the given replacement. 
    An invocation of this method of the form str.replaceAll(regex, repl) yields exactly the same result as the expression Pattern.compile(regex).matcher(str).replaceAll(repl)Parameters:
    regex - the regular expression to which this string is to be matched 
    Returns:
    The resulting String 
    Throws: 
    PatternSyntaxException - if the regular expression's syntax is invalid 
    NullPointerException - if regex is null
    Since: 
    1.4 
    See Also:
    Pattern2、没看懂你的意思3、用substring
      

  2.   

    1.
    public static String replace(String str, String vbcrlf, String newString) {
      String result = "";
      result = sourceString;
      for(int i = 0; (i = result.indexOf(vbcrlf, i)) != -1; i += newString.length()) {
         result = result.substring(0,i) + newString + result.substring(i + vbcrlf.length());
      }//for// return result;
    }
    2.request.getMethod() 
    3.2003-3-6肯定是3月
      

  3.   

    moumouren(某某人)
    不一定啊,也许是6月
      

  4.   

    1、写个替换方法
    2、JSP不必区分直接用request.getParameter("")来取得就可以了~    如果真要判断是什么方法提交的, 就用request.getMethod() 
    3、先进行格式转换,再tt.getMonth()