I am getting page cannot be displayed error if i submit multiple requests in my JSF application.
And this is not happening always !!. Its happeneing very rare. But still we need to avoid it.
Requirement is to do the server side validation.
Is there any way to do it ?
Eg : - if i give multiple search request in one page i should not get error. By the same time user should have the provision to go to another menu which is loading again from sever.
It's hard to be certain without more specific details, but it sounds like you are keeping some data in places that are shared between requesters and accessing it in a manner that is not thread-safe. The way to avoid that is to take care in the design and implementation of the webapp.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jun 16, 2011
Thanks Tim for the reply.
To be more speccfic , the issue is coming when we are doing a search . The search results are around 2000 records . Before we get the response back to UI , user cliking the search button again.
So, that time we are getting 'page cannot be displayed '. The actual exception is index out of bound of exception in the log.
doSearch method begin
jsf E com.sun.faces.lifecycle.InvokeApplicationPhase execute Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
And its not happening always.
I am thinking that , is it because of the view tree in server. Whether two view componenets are getting conflicted or not ? Is there any possiblity for this ?.
Well, as a practical matter, any search that attempts to dump more than about 100 records at a shot on my screen makes my eyes water and my vision go blurry. It would be a lot easier on the users (and on the network!) if you could limit how much comes back per request.
I've never actually looked at the the view tree processing mechanism closely enough to make absolute claims, but considering that there are a lot of reasons why multiple requests could be processed concurrently above and beyond itchy button fingers, I'd look at the app first, figuring that someone already allowed for JSF itself to deal with such things. There could be a problem there, but the odds are against it.