At particular page in the project, I get output on the page.
When I refresh the page then also I get the same output. This is absolutely correct.
But when I refresh the page third time it shows busy browser and never return anything on the page. I am using tomcat server, hibernate, spring.
Due to busy browser and it never show anything ever, I have to restart the tomcat server.
Now history repeats. Third refresh make browser busy which doesn't fetch anything.
Is there any problem in hibernate ?
You first question would be like, what logs you are getting?
I see nothing in the log.
Related
I have a somewhat baffling issue running a webapp in Apache Tomcat.
After deploying the page works fine, but sometime during the day, a page inevitably fails to compile.
The issue is not with the page itself, the page changes daily, which page seems to be determined by the order/frequency of access.
If nobody has accessed the log page during the day, that's the page that will break down.
If the log page has been accessed, it will keep on working until the next deploy, but another page page will break down.
By break down i mean:
http://codepad.org/V1yosH8k (jsp, more prevailant)
Stacktrace: http://codepad.org/P9VpXBRW (java)
ClassNotFoundException/NoClassDefFoundError: Obviously the class does exist, it works fine if accessed early after deploy.
It happens on the live server, but am unable to reproduce it on my dev machine.
Running apache tomcat 6 with JAVA_OPTS "-Xms1024m -Xmx1900m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=768m -XX:MaxPermSize=768m"
Anyone able to give me a push in the right direction?
On my MVC spring application I send a form to a page using post method to perform a search with some parameters. The results of the search is a list and, for every entry is possible to navigate to a details page. It works fine but, when an user try to come back to result page with back browser button (or a Javascript), I get an "Expire page" error. Refreshing the page, it rexecutes the post submit and it works fine.
To prevent this error I added
response.setHeader("Cache-Control", "no-cache");
to the search controller and everything works fine with Safari and Firefox but I get the same "Expire page" error when I try to execute the web application with IE (8 and 9).
What's the right way to go to a detail page and come back without getting any error?
thanks for your time!Andrea
The right way is to use GET instead of POST: searching is an idempotent operation which doesn't cause any change on the server, and such operations should be done with a GET.
Not expiring a POST request seems to undermine the very idea of a POST:
Per RFC 2616, the POST method should be used for any context in which a request is non-idempotent: that is, it causes a change in server state each time it is performed, such as submitting a comment to a blog post or voting in an online poll.
Instead, I would restructure how you view the detail records, maybe with an overlay DIV that doesn't refresh the underlying page that shows the results. With many modern web apps, using the BACK button can cause issues with page flow.
I am really confused with this error and need some help.
When accessing my link the first time in IE I type in : https://something/other/test.jsp
and I'm presented with the FORBIDDEN-403 GlassFish Enterprise Server is now Presenting The Forbidden Page error page in GlassFish.
However, if I refresh this same page then I see the results of test.jsp.
I have filters in my java code and all filters are letting test.jsp let go through.
Why am I getting the GlassFish 403 error page in this scenario? and why does it go away after refresh?
Once I see results of test.jsp...If I close IE and open it again, then again this same thing happens.
IE is notorious for page-caching. I know this from my experiences with AJAX.so maybe when you refresh the page, it shows you the cached page.
Hello, it's really the first time for me to post.
I'am encountering a problem with my Web Apps and cannot find any answers on the web.
My problem is that i have a Java Web
App that works on parallel with
tomcat and apache using mod_jk.
Everything works fine, but after one
day of running in tomcat, the Ajax
request i do with Jquery dosn't come
back with the data. I'm using SQL
Base (phpMyAdmin).
I'm sending a request to the servlet
in charge of the sql using Jquery Ajax but i
never get the response. Wierd thing
is that it works for a day and then
stop the next one (i must than reload
my WebApps to make it work again).
Could you gentle developpers give me a hint or two please ? :)
I think whenever you are opening the connection to take data from database then probably you are not closing those connections.And every time your application is creating new connection with database without closing old one.As sql has limited number of connections so after one day or after some time your application is not able to connect with your database.So you are not getting data from database. And when you are reloading your application that time you are restarting tomcat so that time your all connections with database are being closed.So next time again you are able get data from database.
So check whether you are closing database connections properly after every transaction or not.Might be this is your problem.
Have you looked at any error messages in the log files? Especially, do you know if the corresponding Servlet gets called at all, or is the request blocked by apache / tomcat?
I need to implement SSO between a windows domain and a J2EE web appliction.
I've been thinking what the impact of this would be on the web application's session timeout. We have a 2 hour time out.
If we implement a seemless SSO, then I think it might become confusing for the user.
The SSO will make it appear that the web application is immediately available.
I'm worried that they will start filling in forms then go for lunch (or something) and come back after their session has timed out. However, it might not be immediately apparent that this has happened, since the SSO will just sign them on again (but now with a new session).
Has anyone any experience with anything like this and how to handle it? Do we just need to implement some form of extra messaging to tell the user that their previous session has timed out and their work has been lost?
I think you definitely need to pop-up an Alert box of some kind if the user's session is reset. Get them to click OK on the message and redirect them to the home page.
Also, I think a 2 hour timeout sounds like a bad idea if you're doing it how I think you are. Do you mean the user has 2 hours from when log in to work before their session times out? Wouldn't it make more sense to have something like 10 minute timeout but with the timer getting reset whenever the user sends a new request within that session.
The timeout is not a static fixed time measured from login but rather a dynamic measure of inactivity.
On sites we hav buit with this functionality after 10 minutes or so the web page goes back to the login page (JS used) and the user can start again if they want.
If they are busy with a long process where they are reviewing results or something then check the mouse move or some sublte key like that indicating they are still busy.
Old question, but in case anyone runs across it:
Try really hard to store no state in the server session. Client, fine; back-end server persistence (like a database), fine. Just nothing in between that would get lost. When the user is seamlessly re-authenticated, they don't notice the switch. Duration of timeout becomes irrelevant.
This answer is actually more feasible now, six years later, as there are several front-end frameworks that will store your data for you. You can still use Spring Security (say) on the server, as the authentication is still there with the new session; it should regenerate your security info (SecurityContext, UserDetails, etc.) on the fly. Whatever request gets or sends data should then "just work."