This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

Time interval for <jsp:include>..?

prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 120
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.


regards,
Prabhu.
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: 120
@Seetharaman

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

Content of support.jsp:


<head>
<title></title>
<script type='text/javascript' src='https://192.xx.xx.xxx/engine.js'></script>
<script type='text/javascript' src='https://192.xx.xx.xxx/util.js'></script>
</head>

<body>

// my code comes here
</body>

Note:
------

In my above support.jsp page, as you can see the <script> tag loads some files from another IP: 'https://192.xx.xx.xxx/engine.js'

In this case if the '192.xx.xx.xxx' 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.
 
GeeCON Prague 2014
 
subject: Time interval for <jsp:include>..?