1

I would like to know if there is some way to set the timeout for a POST request(I guess it is a POST request) from a JSP using JSF tags.

I usually work with ExtJS and do this kinda stuff through AJAX(it's easy to configure the timeout) and don't know almost anything of JSF.

Anyway I'm maintaining a legacy system and when the request is done the interface stops listening about 3 minutes after, I would like the interface to wait until there is a response of the server, it doesn't matter if it takes 10 or 15 minutes.

Here is the action method which I guess is a standard POST

<div style="position:absolute; top:-100">
    <h:commandLink action="#{ReporteSeguros.buscarRegistros}" id="buscarRegistros" target="fraGridPagos">
    </h:commandLink>
    <h:inputHidden id="sucursal" value="#{ReporteSeguros.sucursal}"/>
    <h:inputHidden id="region" value="#{ReporteSeguros.region}"/>
</div>

Any help is appreciated.

Aritz
  • 30,971
  • 16
  • 136
  • 217
code4jhon
  • 5,725
  • 9
  • 40
  • 60
  • Are you saying that the buscarRegistros() method of the ReporteSeguros bean takes up to 15 min to complete?? – elbuild Jan 18 '14 at 00:15
  • Takes about 4 or 5 sometimes but as I said it's a legacy system, do you know something about the question? – code4jhon Jan 18 '14 at 00:20
  • The answer they gave you is correct. There's no way of managing the client side timeout. I would suggest you to deeply revise your strategy, maybe using a DB based handshake for task that has an unpredictably long duration. Making an user wait 4 or 5 minutes in front af a spinning browser is not acceptable. – elbuild Jan 18 '14 at 17:00

1 Answers1

3

There are two kind of timeouts, one is client specific and the other is set by the server. You can configure the server one, properly configuring your application/servlet container. However, there's no way to control the client timeout which will be browser specific.

In short words, you'll need to change your control/persistence layer sooner or later in order to make the method perform faster.

See also:

Community
  • 1
  • 1
Aritz
  • 30,971
  • 16
  • 136
  • 217
  • The default keep alive timeout option can be changed in IE. Please, see link: https://support.microsoft.com/en-us/help/813827/how-to-change-the-default-keep-alive-time-out-value-in-internet-explorer – BustedSanta May 02 '17 at 00:26
  • @Busted, sure you can. I meant there's no way to instruct your browser doing that, from the server. It would be a pain to tell all users to follow that instructions (or the ones relative to their browsers). Anyway, there are some clients you can control: mobile apps ;-) – Aritz May 02 '17 at 04:51