历史版本24 :Tomcat下通过IP直接访问数据决策系统 返回文档
编辑时间: 内容长度:图片数:目录数: 修改原因:

目录:

1. 实现步骤编辑

1.1 修改端口号
如果没有启动其他占有端口号80的网络程序,可以将Tomcat服务器的端口号设置为80,因为80端口是默认端口,这样我们在访问报表页面时就不需要在加上Tomcat服务器的端口号,重启tomcat服务器访问http://localhost/webroot/decision就可以访问平台了。
修改端口号在配置文件%tomcat_home%\conf\server.xml文件中修改,如下:
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
222
1.2 欢迎界面
每个web服务器都有默认的欢迎界面,通过修改欢迎界面,以显示平台页面,然后再修改配置文件目录,就可以访问:http://localhost进入产品演示界面了。以%tomcat_home%/webapps/webroot/目录作为web服务器默认目录,在webroot中建一个a.jsp文件,该文件作为web服务器的默认主页。
a.jsp调用iframe集成平台产品演示界面,代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%> <html> <head> <title>FineReport报表</title> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <iframe id="reportFrame" src="decision" name="itemslist" frameborder="0" width="100%" height="100%"></iframe> </body> </html>
保存,重启tomcat服务器访http://localhost/webroot/a.jsp就可以显示产品演示界面了。效果如下:
222

2. 可能遇到的问题编辑

2.1 ie9下显示的问题

按照上述配置部署好后,假如ie9出现显示不完全的问题

尝试将a.jsp的demo代码修改为

<html> <head> <title>FineReport</title> <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge"/> <style type="text/css"> html, body { margin: 0px 0px; width: 100%; height: 100%; } iframe { margin: 0px 0px; width: 100%; height: 100%; } </style> </head> <body> <iframe id="reportFrame" src="ReportServer?op=fs" name="itemslist" frameborder="0"></iframe> </body> </html>

应该就可以解决。