来讨论吧!!!关于servlet的生成期问题,烦啊!!!!请看以下程序!!!!!!!!!!!!!!!!!!!!!!!
我在servlet里用这样的代码转页面的,为什么在浏览器地址里总是显示为登陆时的servlet地址呢?一直不知道为什么?
代码如下:
this.getServletConfig().getServletContext().getRequestDispatcher(
"/index.jsp").forward(request, response);
我这样不是调转到index.jsp了吗?
浏览器应该显示为http://localhost:8080/web/index.jsp
为什么浏览器总是显示网址为http://localhost:8080/web/loginservlet
我的程序中好多地方都是这样写的.运行程序没问题。这样是什么原因,对以后有什么影响吗?