我在web.xml中配置信息如下:<welcome-file-list>
<welcome-file>Admin/login.jsp</welcome-file>
</welcome-file-list>login.jsp中有图片,但我直接输入项目名称,图片路径出现错误。
我在login.jsp的<head></head>中加入了<html:base/>,但是依然不行。
请问哪里可能出错?下边是顶部内容<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><HTML>
<HEAD>
<html:base />
<title>test </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<welcome-file>Admin/login.jsp</welcome-file>
</welcome-file-list>login.jsp中有图片,但我直接输入项目名称,图片路径出现错误。
我在login.jsp的<head></head>中加入了<html:base/>,但是依然不行。
请问哪里可能出错?下边是顶部内容<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><HTML>
<HEAD>
<html:base />
<title>test </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
base 元素可规定页面中所有链接的基准 URL,其必须输入的属性有:href ---- URL 规定页面中所有链接的基准 URL。可选属性:target
_blank
_parent
_self
_top
在何处打开页面中所有的链接。可通过在每个链接中使用 target 属性来覆盖此属性。_blank - 在一个新的未命名的窗口载入文档
_self - 在相同的框架或窗口中载入目标文档
_parent - 把文档载入父窗口或包含了超链接引用的框架的框架集
_top - 把文档载入包含该超链接的窗口,取代任何当前正在窗口中显示的框架