css 文件加载不进的问题。 <link href = "./common/css/pageStyle.css" rel = "stylesheet" type = "text/css" />少一点试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <link href = "./common/css/pageStyle.css" rel = "stylesheet" type = "text/css" >后边那个斜杠是做什么的?去掉了 bu xing .still thanks. <link href = "./common/css/pageStyle.css" rel = "stylesheet" type = "text/css" >后边那个斜杠是做什么的?去掉了---------------后边的那个"/"你去掉试过了吗? 哦,知道了.我已经实验过了,<link href = "./common/css/pageStyle.css" rel = "stylesheet" type = "text/css" >这种方法可行.请检查路径以及文件名是否写错. 嗯,如果你认为多重路径下有问题,你可以把那个文件直接拿到login.jsp同目录下,然后<link href = "pageStyle.css" rel = "stylesheet" type = "text/css" >看看.你会是把这个文件写到JS里了吧>! 你不会是把这个<link>标签写到JS里了吧>! 我估计猜到了,你是不是把这个标签写到<style></style>里面了? 我现在都把他们拿到根目录下,也不行。太他妈的奇怪了。我用了2个filter[code]<%@ page contentType="text/html;charset=UTF-8" %><%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %><%@ taglib uri="/WEB-INF/tld/cemstag.tld" prefix="cemstag"%><html><head><link href = "pageStyle.css" rel = "stylesheet" type = "text/css" ><title>CEMS System Login</title><script language="javascript">function checkSubmit(){ if(document.all["operator.id"].value=="" || document.all["operator.password"].value=="" ) { alert('user name or password must be inputted.'); return ; } document.forms["LoginActionForm"].submit() ;}</script></head><body><h2>CEMS System Login</h2><p><font size = 2>By metaphy Begin from April 6,2007</font></p><html:form action="/LoginAction"><table> <tr> <td>User ID</td> <td><html:text property="operator.id" size="20" maxlength="20" value="admin"/></td> </tr> <tr> <td>User Password</td> <td><html:password property="operator.password" size="20" maxlength="20" value="admin"/></td> </tr> <tr> <td> </td> <td><input type="button" value="Submit" name="B1" onClick="checkSubmit()"> <input type="reset" value="Reset" name="B2"></td> </tr></table></html:form><cemstag:dispError /><p><%//destroy sessionsession.removeAttribute(develop.domain.CemsConstant.OPERATOR_SESSION_KEY);%></p></body></html>[/code]cssbody { background-color : #ddddff}/* The copyright infomation */p.copyright { font-size : 12 ; text-align : center ;} 我在我的设计器里是能看到效果的,没问题。这样写:<img src="./common/image/star3.gif" />似乎某个地方把context改了? 我不太明白你的客户端语言语法.但我实验了一个简单的.如下:---------CSS<html><head><link href = "pageStyle.css" rel = "stylesheet" type = "text/css" ></head><body></body></html>-------CSSbody { background-color : #ddddff}/* The copyright infomation */p.copyright { font-size : 12 ; text-align : center ;}你试着将其它东西删除,找找吧,你实在无能为力了.:) 能看明白。谢谢。找到问题了。确实是filter的问题,把2个filter删除之后就没问题了。<%System.out.println(request.getRequestURI()) ; %>那2filter把这句话打出了3遍。再研究一下 明白了。http://www.javaeye.com/topic/81955filter 将css文件给过滤掉了,因此只要在过滤器中加入:if(requesturi.endsWith("css") || requesturi.endsWith("js") || requesturi.endsWith("login.jsp") || requesturi.endsWith("login.action") || requesturi.endsWith("Logout.action") || session.getAttribute(Constants.USER_KEY) != null){ }这样的代码就可以了。 【分享】JavaScript播放MP3歌词同步显示 关于shortcut ico无法再ie中显示 关于div层 100分,求高手帮忙! 一个相当简单的问题。 梅花雨日历控件3.0版功能挺不错的,但是不能在框架下使,谁能告诉我修改javascript的那个地方可以解决这个问题? 怎样才能实现这个论坛界面上关闭左边菜单栏,右边自动填充? 一个看上去不是很难,但是困饶了我很久的问题,请各位大虾赐教 使用document.write()函数实现动态生成代码的问题 关于空<td>的显示问题 怎么把表格居于网页的最中间? javascript:scroll(0,400)
后边那个斜杠是做什么的?
去掉了
still thanks.
后边那个斜杠是做什么的?
去掉了---------------后边的那个"/"你去掉试过了吗?
我已经实验过了,
<link href = "./common/css/pageStyle.css" rel = "stylesheet" type = "text/css" >
这种方法可行.
请检查路径以及文件名是否写错.
同目录下,然后<link href = "pageStyle.css" rel = "stylesheet" type = "text/css" >
看看.你会是把这个文件写到JS里了吧>!
我用了2个filter[code]
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/cemstag.tld" prefix="cemstag"%>
<html>
<head>
<link href = "pageStyle.css" rel = "stylesheet" type = "text/css" >
<title>CEMS System Login</title>
<script language="javascript">
function checkSubmit(){
if(document.all["operator.id"].value=="" || document.all["operator.password"].value=="" ) {
alert('user name or password must be inputted.');
return ;
}
document.forms["LoginActionForm"].submit() ;
}</script></head><body>
<h2>CEMS System Login</h2>
<p><font size = 2>By metaphy Begin from April 6,2007</font></p>
<html:form action="/LoginAction">
<table>
<tr>
<td>User ID</td>
<td><html:text property="operator.id" size="20" maxlength="20" value="admin"/></td>
</tr>
<tr>
<td>User Password</td>
<td><html:password property="operator.password" size="20" maxlength="20" value="admin"/></td>
</tr>
<tr>
<td> </td>
<td><input type="button" value="Submit" name="B1" onClick="checkSubmit()">
<input type="reset" value="Reset" name="B2"></td>
</tr>
</table>
</html:form>
<cemstag:dispError />
<p>
<%
//destroy session
session.removeAttribute(develop.domain.CemsConstant.OPERATOR_SESSION_KEY);
%>
</p>
</body>
</html>
[/code]
css
body {
background-color : #ddddff
}/* The copyright infomation */
p.copyright {
font-size : 12 ;
text-align : center ;
}
似乎某个地方把context改了?
---------CSS
<html>
<head>
<link href = "pageStyle.css" rel = "stylesheet" type = "text/css" >
</head>
<body>
</body>
</html>
-------CSS
body {
background-color : #ddddff
}/* The copyright infomation */
p.copyright {
font-size : 12 ;
text-align : center ;
}你试着将其它东西删除,找找吧,你实在无能为力了.
:)
找到问题了。
确实是filter的问题,把2个filter删除之后就没问题了。
<%System.out.println(request.getRequestURI()) ;
%>
那2filter把这句话打出了3遍。再研究一下
http://www.javaeye.com/topic/81955filter 将css文件给过滤掉了,因此
只要在过滤器中加入:if(requesturi.endsWith("css")
|| requesturi.endsWith("js")
|| requesturi.endsWith("login.jsp")
|| requesturi.endsWith("login.action")
|| requesturi.endsWith("Logout.action")
|| session.getAttribute(Constants.USER_KEY) != null){
}这样的代码就可以了。