网站发布问题!! 如果直接访问域名的话默认是直接访问你的index.html或是index.jsp,想请教怎么跟我的action联系起来啊?意思就是访问域名是同时是可以访问我的action的,因为要把后台的数据导出到前台来!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在web.xml里面配置,貌似是这样 如果你的we.xml有默认访问的JSP/HLMT,直接访问项目名,就会显示该页面! 你可以做个过滤器,在用户发送请求时,init里面初始化! we.xml文件中index.jsp与index.html放的位置有关,哪个放前面,那个先访问 web.xml<welcome-file-list> <welcome-file>index.action</welcome-file> <welcome-file>index.jsp</welcome-file><welcome-file>index.html</welcome-file> </welcome-file-list>如是你是index.do或其它可以把index.action换成其它选后决定优先权. web.xml文件中把welcome-file标签中的index。jsp改成你要的action的名字就可以了 你不是直接就访问到了index.jsp页面吗?你在index.jsp页面里面写一个跳转。让他跳到你的action中去比如:在index.jsp中可以这样做:<% response.sendRedirect("introductionAction!finAll.action"); %> <welcome-file-list> <welcome-file>index.action</welcome-file> <welcome-file>index.jsp</welcome-file><welcome-file>index.html</welcome-file> </welcome-file-list>先写的先选,第一个没有选第二个,前面选了,后面就不执行了。 直接在页面中onload事件中给一个javascript函数来处理(AJAX),这个函数传一个url的参数在index.action中查询数据库,并将结果集返回到页面就可以了(XmlHttpRequest.responseText)。 struts自定义标签的问题 hibernate 1对1关联 多层 关于实现在线客服系统需要哪些技术? 下载的一个源代码打不开,大家帮我看看这是怎么回事啊 Struts2中 s:url如何携带多个参数。 如何设置ireport第二列第一行的位置 Hibernate入门问题请帮助我~~ 怎么在struts中实现多国语言转换? 急!!若解决百分相送! struts2上传下载文件不重命名中文名不乱码 登录问题 讨论就给分,对于中小型系统数据持久化工作使用什么性价比较高
你可以做个过滤器,在用户发送请求时,init里面初始化!
index.jsp
与
index.html
放的位置有关,
哪个放前面,那个先访问
<welcome-file>index.action</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>如是你是index.do或其它可以把index.action换成其它
选后决定优先权.
比如:
在index.jsp中可以这样做:
<% response.sendRedirect("introductionAction!finAll.action"); %>
<welcome-file>index.action</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>先写的先选,第一个没有选第二个,前面选了,后面就不执行了。