JSP项目默认打开默认是http://localhost:8080/webNAME
在web.xml里面<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>但是我现在网站打开是就要去访问数据库显示很多数据在首页上面,我现在的做法是在index.jsp里面的head里面加入
<meta http-equiv="refresh" content="0;url=front/show">这句代码刷新去请求Action,所以打开网站就变成了
http://localhost:8080/webNAME/front/show
我该怎么去让去掉后面的请求呢?<welcome-file-list>里面不能写动态请求路径
在web.xml里面<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>但是我现在网站打开是就要去访问数据库显示很多数据在首页上面,我现在的做法是在index.jsp里面的head里面加入
<meta http-equiv="refresh" content="0;url=front/show">这句代码刷新去请求Action,所以打开网站就变成了
http://localhost:8080/webNAME/front/show
我该怎么去让去掉后面的请求呢?<welcome-file-list>里面不能写动态请求路径
解决方案 »
- Java Web学习怎么找不到一个好的学习教程?
- com.jspsmart.upload.File 如何获得转换成Blob大字段
- 如何在Action方法中将Bean对象放入ActionFrom中
- jsp页面问题,麻烦帮忙看看!
- java.lang.NoSuchMethodError:
- 菜鸟问题,jsp
- dwr数据显示
- 求助:servlet运行时出现的问题 HTTP method GET is not supported by this URL
- 送100分,求助:谁能帮我找一个包appserv-jstl.jar,是用于标签库的,找到发给我.
- junit 测试报错
- 【急,高分请教】关于Double类型四舍五入的问题
- zk中我嵌入flash,zk组件事件响应会很慢
<welcome-file>front/show</welcome-file>
</welcome-file-list>
这样写 打开 http://localhost:8080/webNAME这个url应该就可以了
<jsp:forward page='front/show'/>
<%@ page contentType="text/html;charset=gb2312" import="java.util.*"language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<TITLE>title</TITLE>
</head>
<frameset cols="0,*" frameborder="NO" border="0" framespacing="0">
<frame scrolling="NO" noresize>
<frame src="http://cyfy.bjchyedu.cn/cyfy/portal.do?act=indexList">//SRC改成自己的就可以了!
</frameset>
</html>用这个就可以。
比如Velocity 就可以啊。
这个可以实现静态化。