|
楼主 |
发表于 2014-11-4 13:05:15
|
显示全部楼层
本帖最后由 xuanywn 于 2014-11-4 13:10 编辑
您说的第一种方案我已经清楚怎么解决,但是可能不太适合我们的应用场景;我现在想把获取用户名密码的实现放在x5里面。所以想通过.j实现,但是我写了一个DLogin.j的文件,放在portal下面,然后在地址栏输入http://localhost:8080/x5/portal/DLogin.j无法实现跳转到百度,是需要什么配置吗?还是我的做法是错误的?
代码如下
public class DLogin extends com.justep.ui.impl.JProcessor{
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
System.out.println("1111");
response.sendRedirect("http://www.baidu.com");
}
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
System.out.println("2222");
doPost(request,response);
}
}不清楚怎么使用.J
|
|