It's not a secret anymore!
The moose likes JSP and the fly likes Time interval for <jsp:include>..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Time interval for <jsp:include>..?" Watch "Time interval for <jsp:include>..?" New topic

Time interval for <jsp:include>..?

prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 147
Dear Members,

I have a jsp page in which im using <jsp:include src="support.jsp"/>.

This support.jsp has some javascript files to be loaded with it, from another machine that is a server machine.
My server is one machine and my testing location is another machine; but when i access this page and at that time if my server machine is kept 'shutdown' or my 'tomcat' has not started; I have to show an error message; instead of support.jsp page.

However in some case the server machine may take some time to respond; at that time we have to wait untill we receive the response.

Only when the server machine is totally down or 'shutdown' i have to show error message.

Please help me out in this how to deal with this issue.

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

prabhu rangan wrote: <jsp:include src="support.jsp"/>.

there is no such a jsp action tag . also if you want to access some page which is running different server,then you can go to <c:import url="http://ip:port/webapp/xxxx.jsp"/>
prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 147

Im using this tag in my main.jsp page:
<jsp:include page="/support.jsp"></jsp:include>

Content of support.jsp:

<script type='text/javascript' src=''></script>
<script type='text/javascript' src=''></script>


// my code comes here


In my above support.jsp page, as you can see the <script> tag loads some files from another IP: ''

In this case if the '' mentioned machine is at downtime, i have to show an error message titled as "Support site is at down time for maintanence'.

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Let the jsp:include url point to a servlet class where in you can easily write Java code to handle the timeout and the error.
I agree. Here's the link:
subject: Time interval for <jsp:include>..?
It's not a secret anymore!