注意JQuery的引用的src,這里我采用絕對路徑,css文件夾在WebContext下
<script type="text/javascript" src="<%=request.getContextPath() %>/css/jquery-2.1.4.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/css/jquery-2.1.4.js" charset="utf-8"></script>
2016-11-28
我擦 我用 notpad++看請求內(nèi)容 請求內(nèi)容尾部有7行,然后上傳的圖片只有一半,簡直了?。。。 ?。。改為2就好了
2016-11-24
出錯 strust Can not find a java.io.InputStream with the name [InputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
2016-11-11
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
老師的源碼中有這樣的幾句話,大家看一下,對應位置加進去就可以使用像老師使用那樣的圖片路徑了。
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
老師的源碼中有這樣的幾句話,大家看一下,對應位置加進去就可以使用像老師使用那樣的圖片路徑了。
2016-11-06
上傳的文件要去找發(fā)布項目的路徑,比如說在tomcat下發(fā)布,就去找tomcat所在的目錄下找到相應工程
2016-11-05
ServletActionContext.getServletContext().getResourceAsStream("..")
2016-11-05