Loading...

java .net

前两天初步认识了一下struts2
今儿看来教程的第二三讲,搞清了一些前面的一些猜测或是疑问
1、struts2是不用<html:...>标签了,统一成了<s:...>
如下这样:
<s:form action="Converter">
<s:textfield name="point" label="Point"></s:textfield>
<s:submit label="submit"></s:submit>
</s:form>
显示效果:

注意到<s:textfield name="point" label="Point"></s:textfield>
中的label属性,它指定了文本框前面显示的内容,还自动加了冒号,哈哈,挺聪明的嘛,但是担心这样在复杂的页面设计中是不是好使。

哦对了,要想这么写,要在页面上方加上这个:<%@ taglib prefix="s" uri="/struts-tags" %>

2、Action
前面说的Action不再需要继承任何struts类,现在看来要失望了,为了方便起见还是建议集成ActionSupport类,目前觉得有用的是ActionSupport中定义了几个static的result name,比如SUCCESS、ERROR,原来的return "success";现在可以写成return super.SUCCESS;,将标识用的字符串常量定义成static的是一直提倡的,还有就是validate()方法,验证有错误可以调用addFieldError()方法,好像就是struts1 ActionForm里的东西,有所改进的是super.addFieldError("username", "username is null");将在页面中显示的效果为:错误信息"username is null"将在名字为"username"文本框的上面显示,这些如果能用ajax实现就好了。
对于Action解耦,可能在于它不再需要HttpServletRequest 、HttpServletResponse这样的容器运行时参数吧

Powered by Zoundry Raven

posted @ 2009-01-05 10:47 猪 阅读(280) | 评论 (0)编辑 收藏
今天第一次感觉到经济危机在我身边了,部门现在没有在做的项目了
经济危机中,赶紧为自己充充电,好到时候柳暗花明又一村,哈哈
学struts2
据说struts2基于webwork,基本上跟struts1没啥关系,如果有webwork的经验上手会很迅速
我没接触过webwork,就知道有这么个东西
今儿开始第一个struts
见过好多blog写有struts2的入门步骤,俺也写一个,为自己造个轮子,加深印象。
首先下载struts2的jar包,到http://struts.apache.org/,右上角有个struts2的链接,今天下到的是
struts2的2.0.14,昨天在javaeye上看到发布Struts2.1.3 发布了,只是主页还没看到,不止一次听大拿们说过不要追求新版本,哈哈
下载后的目录:app--struts的例子
              docs-doc文档
              lib-struts的jar包或依赖包
              src-源码
HelloWorld:

1、index.jsp
  耳目一新的是,不需要用到struts html标签,这只是猜测,或许例子过于简单?今天工作中还感觉struts1的html标签真是不好用,想加个class、maxlength、size都不好使,让我很是郁闷。希望在继续学习中真的能耳目一新。
struts的action惯例后缀名改成了.action,不再像struts1的.do了,说是延续到webwork的惯例。
下面的页面代码submit的时候将提交到login.action
index.jsp
<body>
  <form action="login.action" method="post">
      username:<input type="text" name="username"/>
      password:<input type="password" name="password"/>
      <input type="submit" value="submit"/>
  </form>
</body>
2、Action类
struts2的Action可是大进步,不用再继承任何类,实现了松耦合,它好像将struts1的ActionForm融合了进来,据说struts2不再用ActionForm,页面上对应的字段写在了Action中,struts2框架会自动调用get/set方法,在我印象里struts1中的Action对象不是线程安全的,会在不同线程间重用,所以谨慎在里面定义字段,在这看来struts2的Action不是这样的,只是猜测
package com.mystart.action;

public class LoginAction {

    private String username;
    private String password;
  
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
  
    public String execute() throws Exception{
        return "success";
    }
}

3、jsp、java类都定义了,现在要它们联系起来-struts配置文件
新的struts配置文件有个package包的概念,还没闹明白这个package的详细用法,有待继续深入
<action>标签有变化,type变成了class,path变成了name,struts1中name属性是制定ActionForm的,现在ActionForm没有了
forward变成了result,result的默认name=success

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">


<struts>
    <package name="struts" extends="struts-default">
        <action name="login" class="com.mystart.action.LoginAction">
            <result name="success">/result.jsp</result>
        </action>
    </package>

</struts>

4、最后启动struts2,配置web.xml
struts1的web.xml配置是放在<servlet>中,也就是是一个servlet
struts2变成了一个过滤器Filter
struts1中<url-pattern>被配置成拦截.do的链接
struts2变成了拦截所有链接 /*

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  
  <filter>
      <filter-name>struts2</filter-name>
      <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
  </filter>
  <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

以上是驴了个struts的视频教程,今儿看了第一节课,看完后做了一下总结,里面有一些自己的理解,有不对的地方请兄弟们指正,别光光说我是猪,猪也要进步啊,嘿嘿,每一步都有疑问,明天带着问题接着看下一节,睡觉去。
posted @ 2008-12-29 23:06 猪 阅读(2215) | 评论 (6)编辑 收藏
自定义Annotation
早就知道jdk5加了新特性Annotation,但是没研究过,前几天公司培训,有一部分是介绍jdk5新特性的,一个是注解一个泛型
今儿复习一下注解
    //用@Deprecated声明该方法不建议使用
    @Deprecated public void doSomething1(){
        Map map = new HashMap();
        map.put("some", "thing");
        System.out.println(map);
    }
   
    //用@SuppressWarnings声明不再进行类型检查
    @SuppressWarnings(value={"unchecked"})
    public void doSomething2(){
        Map map = new HashMap();
        map.put("some", "thing");
    }


写一个自定义注解先
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
//要在运行时使用这个注解,必须声明成RUNTIME
Annotation分为三种级别:RUNTIME、CLASS、SOURCE
@Retention(RetentionPolicy.RUNTIME)
public @interface SomeAnnotation{
    String value();
    String name();
}

下面来使用这个自定义注解:
import java.lang.reflect.Method;
public class AnnotationTest {
   
    @SomeAnnotation(value="value1",name="name1")
    public void doSomething3(){
       
    }
   
    public static void main(String[] args){
   
        Class<AnnotationTest> c = AnnotationTest.class;
        try {
            //利用反射得到方法doSomething3
            Method method = c.getMethod("doSomething3");
            //查找doSomething3方法是否有SomeAnnotation的Annotation
            if(method.isAnnotationPresent(SomeAnnotation.class)){
                System.out.println("找到SomeAnnotation");
                //得到SomeAnnotation
                SomeAnnotation annotation = method.getAnnotation(SomeAnnotation.class);
                System.out.println("annotation.value="+annotation.value());
                System.out.println("annotation.name="+annotation.name());
            }else{
                System.out.println("没有找到omeAnnotation");
            }
        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
    }
}

输出结果:
找到SomeAnnotation
annotation.value=value1
annotation.name=name1
posted @ 2008-12-28 16:47 猪 阅读(3805) | 评论 (6)编辑 收藏

遇到一个郁闷的问题 ,百思不得其解
到这里请大家分析分析

outtable 表中有四条记录 如下图

我按out_scrpno排序,为什么2008-1000不在第一行呢???

同样的问题,如下图

为什么会是2008-999呢 为啥不是2008-1000???

请大家帮忙是啥子原因,多谢,多谢


Powered by Zoundry Raven

ps:问题基本解决,感谢各位提示:

SELECT TOP 1 OUT_SCRPNO FROM OUTTABLE WHERE CHARINDEX('-',OUT_SCRPNO,6) = 0 ORDER BY CONVERT(int,REPLACE(out_scrpno,'-','')) DESC 另好像不该发到首页,请管理员包含,心切
posted @ 2008-12-19 22:00 猪 阅读(1080) | 评论 (7)编辑 收藏

因为要修改一个以前的老项目,老项目用的jdk是1.4版本,遂在项目右键Properties-Java Compiler中将Compiler compliance level 设成了1.4

以为万事大吉了呢,昨晚上因为Integer的一个方法发现了问题

Integer中有个方法valueOf

static Integer valueOf(int i)
返回一个表示指定的 int 值的 Integer 实例。
static Integer valueOf(String s)
返回保持指定的 String 的值的 Integer 对象。
static Integer valueOf(String s, int radix)
返回一个 Integer 对象,该对象中保持了用第二个参数提供的基数进行分析时从指定的 String 中提取的值。

其中valueOf(int i)

从以下版本开始:
1.5

也就是在1.5之前没有这个方法,但是在eclipse中却有这个方法的提示

找了半天,原来问题出在这,在Java Build Path 中Libraries 中jdk是1.5的,把它remove掉,添加一个1.4的就OK了

还是功力不够啊 充电 充电ing

posted @ 2008-12-04 15:02 猪 阅读(4404) | 评论 (1)编辑 收藏

下了个Hibernate视频教程听,虽然一年多以前跟老师学过Hibernate,但现在听听还是有很多收获的,发现自己的知识知道的都是些皮毛,用了很久的东西,知道怎么操作怎么用,但要说说它的所以然,摇摇头,呵呵

根据主键Id得到一个持久对象,Hibernate中有两个方法,一个get,一个load,他们两个参数相同,都返回一个Object

它们的区别:
执行get方法即时生成查询sql去查询数据库得到相应的pojo,如果数据库中没有相应记录,则返回null
执行load方法不会即时产生sql语句,而是在用到返回的对象时采取查询数据库,也就是load方法有默认的延迟加载,在执行load方法后返回的不是一个pojo对象,是pojo对象的一个代理(据说Hibernate是用代理的方式实现延迟加载的,这块还迷糊),如果数据库中没有相应记录,load方法会抛出异常ObjectNotFoundException
看了一下我们用MyEclipse hibernate工具通过数据库生成的DAO类,它的findById方法是用的session.get()方法,这是即时获得pojo对象,如果是load方法,在执行完load后如果关闭了session,那在接下来用到这个pojo对象时恐怕会报session已关闭的错误。
还有就是这两个方法的第二个参数id,它必须是实现了java.io.Serializable接口,也就是可序列化的。

今天好像是立冬,冬天到了,抓紧时间充充电,明天接着学...

posted @ 2008-11-07 10:15 猪 阅读(1962) | 评论 (2)编辑 收藏

学习Linux,装了个VMware,在上面装了个红帽4
前辈建议用host-only连接方式,好处是与host建立一个私有的网络,跟外界没有关系,A private network shared with the host
在这种方式下Linux如何上网呢

1、首先,安装VMware后windows下会多出两块虚拟网卡,VMware Network Adapter VMnet1(为host-only方式用)和VMware Network Adapter VMnet8(为NAT方式用),将这两块网卡的IP都设为自动获取。

2、将window上自己的网卡设为共享

3、进入Linux,应用程序-系统设置-网络

选中eth0,点编辑,做如下配置

完成后点确定,然后点击激活,OK,打开firefox试试看

posted @ 2008-11-06 15:19 猪 阅读(906) | 评论 (0)编辑 收藏

下了个Linux的视频教程

学了几个命令记录下来

其中对于Linux名字的解释挺有意思,Linux is not unix,:-D

Linux中认为所有的硬件,所有的设备都是文件,文件分为字符文件,和块设备(就是二进制的),它将所有的设备都放在dev目录中

cd / 访问根目录
ls 显示目录中的文件列表
cd dev 访问dev目录
mkdir my 创建目录my
rmdir my 删除目录my
mount /dev/cdrom /mnt/my 将cdrom挂载到my目录
nmount /dev/cdrom 解除挂载
whoami  显示当前用户
pwd     显示当前所在目录

posted @ 2008-11-05 17:00 猪 阅读(211) | 评论 (0)编辑 收藏
     摘要: 原文:http://bbs.80nian.net/thread-428-1-1.html 百度的popup.js这个文件中的弹出层方法挺好用的,但是,有些时候,发现在Mozilla Firefox浏览器下弹出层不能正常使用,具体表现为:层不能移动,一起停在页面左下角,遮罩层不能完全遮罩页面。     解决方案:删除被调用页面中的“<!DOCTY...  阅读全文
posted @ 2008-10-28 13:20 猪 阅读(1067) | 评论 (0)编辑 收藏
//将给定日期增加NumDay个月
    function addDate(dtDate,NumDay){
        var date = new Date(dtDate);
        var lIntval = parseInt(NumDay);
        date.setMonth(date.getMonth() + lIntval);
        return date.getYear() +'-' + (date.getMonth()+1) + '-' +date.getDate();
    }

addDate("2008-01-01".replace(/-/g, "\/"),2);


=======================================
// addDate("5",5,"2004/12/1 00:00:00")
function addDate(type,NumDay,dtDate){
   var date = new Date(dtDate)
type = parseInt(type) //类型
lIntval = parseInt(NumDay)//间隔
switch(type){
   case 6 ://年
date.setYear(date.getYear() + lIntval)
break;
case 7 ://季度
date.setMonth(date.getMonth() + (lIntval * 3) )
break;
case 5 ://月
date.setMonth(date.getMonth() + lIntval)
break;
case 4 ://天
date.setDate(date.getDate() + lIntval)
break
case 3 ://时
date.setHours(date.getHours() + lIntval)
break
case 2 ://分
date.setMinutes(date.getMinutes() + lIntval)
break
case 1 ://秒
date.setSeconds(date.getSeconds() + lIntval)
break;
default:
   
}
return date.getYear() +'-' + (date.getMonth()+1) + '-' +date.getDate()+ ' '+ date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()
}
posted @ 2008-10-26 18:37 猪 阅读(1210) | 评论 (0)编辑 收藏
DWR不能识别以
Class c = Class.forName(ClassName);
方式产生的对象,
它被是别为java.lang.Class
posted @ 2008-10-23 17:34 猪 阅读(591) | 评论 (0)编辑 收藏
随机快速排序算法:
还没怎么整明白,有点晕
Java语言:
import java.util.*;
public class Test {


    int[] x = {3,7,5,6,4,9,8,1};
    int comps = 0;
    void quicksort(int l, int u)
    {
        int i, m;
        if (l >= u) return;
        swap(l, getRandom(l, u));
        m = l;
       
        comps += u - 1;
        for (i = l+1; i <= u; i++){
            //comps++;
            if (x[i] < x[l])
                swap(++m, i);
        }
        swap(l, m);
        quicksort(l, m-1);
        quicksort(m+1, u);
    }
   
    void swap(int a,int b){
        int temp = x[a];
        x[a] = x[b];
        x[b] = temp;
    }
   
    int getRandom(int min,int max){ 
          return (int)(Math.random()*(max-min+1)) + min;
          //Math.round(Math.random()*(Max-Min)+Min);
    }
   
    public static void main(String[] args) {
        Test t = new Test();
        System.out.println(Arrays.toString(t.x));
        t.quicksort(0,t.x.length - 1);
        System.out.println(t.comps);
        System.out.println(Arrays.toString(t.x));
    }
   

}


posted @ 2008-10-23 17:24 猪 阅读(1700) | 评论 (4)编辑 收藏

好久没写了
中间过了个十一,在家混沌过了好几天

回来转眼上了一星期班了,忙的屁滚尿流
一年前的系统要增加两个大功能,200多个报表要挨个修改,报表校验的页面效果客户又提出了新建议,一个字 改

从昨天晚上开始捣鼓到现在终于解决了一个问题,心情好了些,上来写写,哈哈

这两天用了baidu 百度空间中的弹出窗口js,感觉不错,很强大,很好很简单的解决了好几个问题,界面友好度以及美化也好多了,以前都是硬邦邦window.open();

有兴趣的朋友搜索"百度 popup"就好了,已经有人给出了注释,强大。

最有意思的是用javascript获取和设置style

DOM标准引入了覆盖样式表的概念,当我们用document.getElementById("id").style.backgroundColor 获取样式时 获取的只是id中style属性中设置的背景色,如果id中的style属性中没有设置background-color那么就会返回空,也就是说如果id用class属性引用了一个外部样式表,在这个外部样式表中设置的背景色,那么不好意思document.getElementById("id").style.backgroundColor 这种写法不好使,如果要获取外部样式表中的设置,需要用到window对象的getComputedStyle()方法,代码这样写window.getComputedStyle(id,null).backgroundColor
但是兼容问题又来了,这么写在firefox中好使,但在IE中不好使
两者兼容的方式写成
window.getComputedStyle?window.getComputedStyle(id,null).backgroundColor:id.currentStyle["backgroundColor"];
如果是获取背景色,这种方法在firefox和IE中的返回值还是不一样的,IE中是返回"#ffff99"样子的,而firefox中返回"rgb(238, 44, 34) "
值得注意的是:window.getComputedStyle(id,null)这种方式不能设置样式,只能获取,要设置还得写成类似这样id.style.background="#EE2C21";

参考:
JavaScript权威指南
http://bokee.shinylife.net/blog/article.asp?id=817
http://book.csdn.net/bookfiles/679/10067921329.shtml

posted @ 2008-10-10 14:49 猪 阅读(4314) | 评论 (1)编辑 收藏

早上,
上班,
公司楼下等电梯,
旁边站一男子,
微微发福,
个不高,
遂俯视,
手拿车钥匙(大大的那种带遥控的那种明显汽车钥匙),
另一手拿一大块手机(智能的手写的那种),摆弄着
肩背笔记本,
崭新崭新的,
顿生羡慕,
羡慕ing,
往上看,
面色红润,
一看就是吃了早饭了,
再往上,
短发,
1/3白色,
遂心想:嗯,等我也这些白头发了,
我也背这些装备,
呵呵,咧嘴......

posted @ 2008-09-25 19:20 猪 阅读(1227) | 评论 (4)编辑 收藏

今天发现一个好东西

Url Rewrite Filter

它可以实现url重写,从而隐藏实际的url,同时使url看起来更美观,简单

最令人兴奋的是它一下解决了一值在寻找的blog用户访问自己的空间的问题

比如http://hi.baidu.com/liuspring 就显示我的空间

1、下载Url Rewrite Filter

2、在项目的web.xml配置过滤器

XML语言:
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>logLevel</param-name>
<param-value>debug</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


3、将urlrewrite-2.6.0.jar放入lib文件夹
4、新建urlrewrite.xml文件置于WEB-INF目录
5、配置urlrewrite.xml

XML语言: 临时自用代码@代码发芽网
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
"http://tuckey.org/res/dtds/urlrewrite2.6.dtd">

<!--

Configuration file for UrlRewriteFilter
http://tuckey.org/urlrewrite/

-->
<urlrewrite>
<rule>
<from>^/([a-z]+)/?$</from>
<to type= "forward" >/blogView.do?go=$1</to>
</rule>

<rule>
<note> 这是一个通用请求url rewrite</note>
<from>^/([a-z0-9A-Z_]+)/([a-z0-9A-Z_]+)/?$</from>
<to type= "forward" >/$2.do?go=$1</to>
</rule>


<outbound-rule>
<note>
The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url)
the url /rewrite-status will be rewritten to /test/status/.

The above rule and this outbound-rule means that end users should never see the
url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
in your pages.
</note>
<from>/rewrite-status</from>
<to>/test/status/</to>
</outbound-rule>

</urlrewrite>




url匹配使用正则表达式的规则,
实验中发现一个问题,就是必须把里面的正则表达式用小括号括起来,在正则表达式中叫分组
不然会报异常:
java.lang.IndexOutOfBoundsException: No group 2
哈哈,前几日还费劲的自己写Servlet重写url呢,原来这有现成的,更加觉得自己现在的水平遇到的问题网上的前辈们早都遇到过了,一定要站在巨人的肩膀上,少走弯路啊。


把我的servlet贴在这,呵呵,参考自blojsom

Java语言: 临时自用代码@代码发芽网
package com.capinfo.servlet;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.capinfo.util.PageConstraint;
import com.capinfo.util.PigBlogUtil;


import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
*
* @author Administrator
*
*/
public class PigBlogServlet extends HttpServlet {

protected Log _logger = LogFactory.getLog(PigBlogServlet.class);



/**
* Initialize
*
* @param servletConfig {@link ServletConfig}
* @throws ServletException If there is an error initializing
*/
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
}

/**
* Handle requests made to
*
* @param httpServletRequest {@link HttpServletRequest} request
* @param httpServletResponse {@link HttpServletResponse} response
* @throws ServletException If there is an error serving the request
* @throws IOException If there is an error serving the request
*/
protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {


// Make sure that we have a request URI ending with a / otherwise we need to
// redirect so that the browser can handle relative link generation
// if (!httpServletRequest.getRequestURI().endsWith("/")) {
// StringBuffer redirectURL = new StringBuffer();
// redirectURL.append(httpServletRequest.getRequestURI());
// redirectURL.append("/");
// if (httpServletRequest.getParameterMap().size() > 0) {
// redirectURL.append("?");
// redirectURL.append(PigBlogUtil.convertRequestParams(httpServletRequest));
// }
//
// if (_logger.isDebugEnabled()) {
// _logger.debug("Redirecting the user to: " + redirectURL.toString());
// }
//
// httpServletResponse.sendRedirect(redirectURL.toString());
//
// return;
// }



// Check for an overriding id
String blogId = httpServletRequest.getParameter(PageConstraint.GO);
if (PigBlogUtil.checkNullOrBlank(blogId)) {
String blogIdFromPath = PigBlogUtil.getBlogFromPath(httpServletRequest.getPathInfo());
if (blogIdFromPath == null) {
blogId = PageConstraint.GO1;
} else {
blogId = blogIdFromPath;
}
}

if (PigBlogUtil.checkNullOrBlank(blogId)) {
httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, "Blog ID not specified");

return;
}
StringBuffer redirectURL = new StringBuffer();

//redirectURL.append(httpServletRequest.getContextPath());
System.out.println(httpServletRequest.getRequestURI());
if(httpServletRequest.getRequestURI().indexOf("/blog/") > -1 && httpServletRequest.getRequestURI().indexOf(".jsp") == -1 ){
if(!httpServletRequest.getRequestURI().endsWith("/") && httpServletRequest.getRequestURI().indexOf(".do") > -1){
redirectURL.append(httpServletRequest.getRequestURI().substring(httpServletRequest.getRequestURI().lastIndexOf("/"), httpServletRequest.getRequestURI().length()));

}else if(httpServletRequest.getRequestURI().indexOf("/blog/") == -1){

}else{
redirectURL.append("/blogView.do");

}
redirectURL.append("?go=");
redirectURL.append(blogId);

httpServletRequest.getRequestDispatcher(redirectURL.toString())
.forward((ServletRequest)httpServletRequest, (ServletResponse)httpServletResponse);
//httpServletResponse.sendRedirect(redirectURL.toString());
}else{
httpServletRequest.getRequestDispatcher(httpServletRequest.getRequestURI())
.forward((ServletRequest)httpServletRequest, (ServletResponse)httpServletResponse);
//httpServletResponse.sendRedirect(httpServletRequest.getRequestURI());
}
System.out.println(redirectURL.toString());
return;


}

/**
* Take out of service
*/
public void destroy() {
super.destroy();

if (_logger.isDebugEnabled()) {
_logger.debug(" destroyed");
}
}
}






 

posted @ 2008-09-24 18:04 猪 阅读(4719) | 评论 (4)编辑 收藏
仅列出标题
共27页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last 

公告

希望有一天

我能用鼠标双击我的钱包

然后选中一张100元

按住“ctrl+c”

接着不停的“ctrl+v”

嘻嘻~~~笑醒~~~



导航

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

统计

常用链接

留言簿(6)

随笔分类(102)

随笔档案(398)

文章分类

文章档案(10)

有趣网络

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜