0

I need to show a message to users like : "The application will be down for two hours". Until now I rename my index.htm, my login.jsp and I uploaded another index.html with that message. Also I upload another html page pointing to my renamed login.jsp to let me in. Is there any other way to do that, more simple?

My application server is SunONE 6.1

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
J.F.
  • 307
  • 1
  • 4
  • 18

2 Answers2

1

Web Application contains a file named web.xml also called Deployment Descriptor.

It contains below tag which will be default executed.

<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>

You can change default wel-come file list for maintenance hours and restart Web Server.

Hardik Mishra
  • 14,779
  • 9
  • 61
  • 96
  • 1
    A filter denying access to any other resource is most likely also a good idea. – Thorbjørn Ravn Andersen Apr 18 '13 at 09:14
  • Yes, I know welcome page, but, if somebody tipe the URL www.xxx.com/index.html is going to enter on the application..... – J.F. Apr 18 '13 at 09:26
  • @ThorbjørnRavnAndersen: May Be Yes.. But I don't know if a Filter prevents `index.html` – Hardik Mishra Apr 18 '13 at 09:26
  • Also if I change the name of `index.html` on the `web.xml` and I type www.xxx.com still go to index.html. This must be defined in other place or it must be the default page anyway. – J.F. Apr 19 '13 at 07:50
  • @deimos1975: Have restart tomcat after change ? – Hardik Mishra Apr 19 '13 at 08:21
  • @deimos1975: Change `index.html` and `index.htm` to something like `maintenance.html` and `maintenance.htm`. Restart Tomcat will work – Hardik Mishra Apr 19 '13 at 08:30
  • @Hardik Mishra, Yes I did. And with Tomcat and SunONE. I working in another solution: To create another proyect only with the message (dinamic generated), and redirect users to this proyect when the maintenance is devepoping. Now I'm trying to know how configure SunONE to do that. – J.F. Apr 19 '13 at 09:35
0

Define a default landing page in deployment descriptor file. When any visitor visits your page it should land on that page. Don't provide any link to navigate to other pages.

If you want to achieve something like this question then you can follow the responses.

Community
  • 1
  • 1
Madhusudan Joshi
  • 4,438
  • 3
  • 26
  • 42