用FineRepor搭建的數(shù)據(jù)決策系統(tǒng),系統(tǒng)自動生成的地址一般都比較長,比如原來的登陸地址:http://196.128.1.2/WebReport/ReportServer?op=fs,地址太長不易記憶,這就產(chǎn)生了一個問題:如何實現(xiàn)直接在在瀏覽器輸http://196.128.1.2就能訪問數(shù)據(jù)決策系統(tǒng)?
對于這個問題,一般有兩個解決思路:
一、設(shè)置跳轉(zhuǎn)
在FineReport服務(wù)器的初始加載頁面進行跳轉(zhuǎn),這個方法技術(shù)上比較容易實現(xiàn),具體實現(xiàn)方法也多樣,就不贅述了。
二、iframe嵌入
修改 tomcat\conf下的web。xml 設(shè)置加載的引導(dǎo)頁 <welcome-file>index.jsp</welcome-file>
把root目錄下
index。jsp里的代碼修改為以下,
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>數(shù)據(jù)決策系統(tǒng)</title>
</head>
<body>
<iframe id="reportFrame" src="/WebReport/ReportServer?op=fs"
name="itemslist" frameborder="0" width=100% height="100%"></iframe>
</body>
</html>