Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在维护期间更改Java EE应用程序的欢迎页面_Java_Jsp_Jakarta Ee_Webserver_Sunone - Fatal编程技术网

在维护期间更改Java EE应用程序的欢迎页面

在维护期间更改Java EE应用程序的欢迎页面,java,jsp,jakarta-ee,webserver,sunone,Java,Jsp,Jakarta Ee,Webserver,Sunone,我需要向用户显示一条消息,如:“应用程序将关闭两个小时”。到目前为止,我重命名了我的index.htm、我的login.jsp,并上传了另一条带有该消息的index.html。我还上传了另一个html页面,指向我重命名的login.jsp,让我进去。 还有其他更简单的方法吗 我的应用服务器是SunONE 6.1Web应用程序包含一个名为Web.xml的文件,也称为部署描述符 它包含以下标记,默认情况下将执行这些标记 <welcome-file-list> <we

我需要向用户显示一条消息,如:“应用程序将关闭两个小时”。到目前为止,我重命名了我的
index.htm
、我的
login.jsp
,并上传了另一条带有该消息的
index.html
。我还上传了另一个html页面,指向我重命名的
login.jsp
,让我进去。 还有其他更简单的方法吗


我的应用服务器是SunONE 6.1

Web应用程序包含一个名为
Web.xml
的文件,也称为部署描述符

它包含以下标记,默认情况下将执行这些标记

<welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
</welcome-file-list>

index.html
index.htm
index.jsp
default.html
default.htm
default.jsp

您可以更改维护时间的默认wel-come文件列表并重新启动Web服务器。

在部署描述符文件中定义默认登录页。当任何访问者访问您的页面时,它都应该落在该页面上。不要提供任何链接来导航到其他页面


如果你想达到类似的效果,那么你可以按照响应进行操作。

一个拒绝访问任何其他资源的过滤器很可能也是一个好主意。是的,我知道欢迎页面,但是,如果有人提示URL www.xxx.com/index.html将进入应用程序……@Thorbjørnravandersen:可能是。。但是我不知道如果我在
web.xml
上更改
index.html
的名称,并且键入www.xxx.com仍然转到index.html,过滤器是否会阻止
index.html
。这必须在其他地方定义,否则它必须是默认页面。@deimos1975:更改后是否重新启动tomcat?