• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Time interval for <jsp:include>..?

 
prabhu pandurangan
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic