我用的是tomcat 6.0.26
HTTP Status 404 - /struts2/login.jsp--------------------------------------------------------------------------------type Status reportmessage /struts2/login.jspdescription The requested resource (/struts2/login.jsp) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.26
我这边加了路径的,是从properties直接复制过来的路径,应该没问题,可是……
HTTP Status 404 - /struts2/login.jsp--------------------------------------------------------------------------------type Status reportmessage /struts2/login.jspdescription The requested resource (/struts2/login.jsp) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.26
我这边加了路径的,是从properties直接复制过来的路径,应该没问题,可是……
解决方案 »
- 向数据库里插入新的数据id号为什么不是从头算起??
- javax.servlet.UnavailableException: Parsing error processing resource path报错
- 网页播放视频问题
- IE和firefox下的Session问题
- 大神~~救命!Hibernate异常太诡异了,我见识少,望大侠帮忙!
- 当上传三个图片的时候,为什么输出的第一个图片的描述是"上传"
- java中两个事物,怎么设置,能让一个事物出现异常,另一个也回滚?哪位大神给帮个忙啊
- 一个SQL问题update,在线等待,(不知为什么,进不去数据库开发版,只好在这里发)
- 定义的DynaActionForm是否能使用数组来定义某个属性?如能,如何使用?
- 哪位大侠在jsp中用过基于form验证模式
- 有关服务器的困惑
- Ibatis的不理解
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
在页面开始
然后再head中加上<base href="<%=basePath%>">貌似就ok了
是这样的
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<form action="login.action" method="post">
username: <input type="text" name="uesrname"/><br/>
passsword: <input type="password" name="password"/><br/>
<input type="submit" value="submit"/>
</form>
</body>
</html>