我的登录界面的form类容为:<form action="http://localhost:8080/servlet/Webbeans.Director" method="post">
<input type="hidden" name="action" value="Login">
<p>
User name:
<input type="text" name="userName">
</p>
<p>Password:
<input type="PASSWORD" name="password">
</p>
<p>
<input type="submit" value="Login">
<input type="Reset" value="reset">
</p>
</form>当输入用户名和密码时就转到Director执行
我的Director里的一段代码为:
[code=Java]
if("Login".equalsIgnoreCase(action))
{
UserAuth userAuth;
userAuth=(Webbeans.UserAuth)request.getSession().getAttribute("userAuth");
userAuth.setUserName(request.getParameter("userName"));
userAuth.setPassword(request.getParameter("password"));
if(!userAuth.isValidUser())
{
myForward("http://localhost:8080/Login.jsp",request,response);
return;
}
else action="SearchesWithJavaScript";
}
}
catch(SQLException ee)
{
ee.printStackTrace();
}
if("SearchesWithJavaScript".equalsIgnoreCase(action))
{
myForward ("http://localhost:8080/SearchesWithJavaScript.jsp",request,response);
return;
}
[/code输入错误的密码后,按理应该转到]http://localhost:8080/Login.jsp重新输入
可就是老是提示错误的URL,
type Status reportmessage /servlet/http:/localhost:8080/Login.jspdescription The requested resource (/servlet/http:/localhost:8080/Login.jsp) is not available.
/servlet/http:/localhost:8080/Login.jsp地址前面总有个/servlet/很烦人。怎么会出现这个啊?郁闷!
忘高手指教!急等!我的JSP的目录在E:\Tomcat\Tomcat 6.0\webapps\ROOT
Director目录在E:\Tomcat\Tomcat 6.0\webapps\ROOT
急求啊!!!!!郁闷!!!!
<input type="hidden" name="action" value="Login">
<p>
User name:
<input type="text" name="userName">
</p>
<p>Password:
<input type="PASSWORD" name="password">
</p>
<p>
<input type="submit" value="Login">
<input type="Reset" value="reset">
</p>
</form>当输入用户名和密码时就转到Director执行
我的Director里的一段代码为:
[code=Java]
if("Login".equalsIgnoreCase(action))
{
UserAuth userAuth;
userAuth=(Webbeans.UserAuth)request.getSession().getAttribute("userAuth");
userAuth.setUserName(request.getParameter("userName"));
userAuth.setPassword(request.getParameter("password"));
if(!userAuth.isValidUser())
{
myForward("http://localhost:8080/Login.jsp",request,response);
return;
}
else action="SearchesWithJavaScript";
}
}
catch(SQLException ee)
{
ee.printStackTrace();
}
if("SearchesWithJavaScript".equalsIgnoreCase(action))
{
myForward ("http://localhost:8080/SearchesWithJavaScript.jsp",request,response);
return;
}
[/code输入错误的密码后,按理应该转到]http://localhost:8080/Login.jsp重新输入
可就是老是提示错误的URL,
type Status reportmessage /servlet/http:/localhost:8080/Login.jspdescription The requested resource (/servlet/http:/localhost:8080/Login.jsp) is not available.
/servlet/http:/localhost:8080/Login.jsp地址前面总有个/servlet/很烦人。怎么会出现这个啊?郁闷!
忘高手指教!急等!我的JSP的目录在E:\Tomcat\Tomcat 6.0\webapps\ROOT
Director目录在E:\Tomcat\Tomcat 6.0\webapps\ROOT
急求啊!!!!!郁闷!!!!
解决方案 »
- jsp中设置超链接跳转到servlet实例-在线等
- struts1 validator 进行验证表单两个密码是否相等
- FckEditor服务器图片预览问题,百分求助,解决立给分
- 如何在java中书写http协议,或其他的方式,以达到得到自己向其发送用户名及密码后并得到相应的Cookie?
- 数据截取的问题
- jbuilder9+jdk1.5的问题 急!!!
- 关于jsp中返回到页面记录集条数的问题
- 关于一个判断的问题?
- JSP嵌套访问数据库的问题,急,高手请进!
- 急,......关于JSP文件浏览器中文显示
- 我想要在JSP中统计本页超链接被点击的次数怎么弄?
- 关于IE不能显示ActiveX控件的问题(急急急急)
E:\Tomcat\Tomcat 6.0\webapps\ROOT\WEB-INF\classes\Webbeans