Win a copy of Terraform in Action this week in the Cloud forum!

Ravi Majety

Ranch Hand
+ Follow
since Feb 26, 2009
Ravi likes ...
Eclipse IDE Oracle Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ravi Majety

Hi Arun,

The code given by you can only restrict the user to press the "F5" button to Refresh, yet the user can refresh the page in the following ways.

1. Right Click on page > click on Reload page/Refresh
2. Click on Refresh button in the web browser.

so please verify indepth to solve the above issues in a single solution.
9 years ago
Do you mean to block the Refresh option in your jsp?
9 years ago
Calling DB Connection in the JSP is a bad practice. Instead you need to write your own exception handling technique where you can define your own words for different exceptions raised in Business Logic.

More over . You have commented the closed brace in the jsp file at line no. 9
9 years ago
Please post some StacTrace . It would help others to resolve the issue.

Let us know Is this statement failed even though you set the input and output parameters to CallableStatement using indexing as below.

Hi Arun

Please check this code.

Note :
1. Also make use of component level of validation to restrict the user to enter only numerics and characters "+" and "-"
2. If the application is india based then you can proceed with 91 as country code or keep an array of all country codes and change the validation accordingly.

Hope it solves your problem..

Hi Jeanne

Jeanne Boyarsky wrote:Also, 5 minutes seems like a very short timeout.

I had given 5 mintues as an example. Here we are configuring session Timeout as 60 mins. So Warning window would display after 55 idle minutes.

Jeanne Boyarsky wrote:
You can't. If the browser doesn't have focus, you can't bring it to the front. That is for the user's protection. If I went to a webpage that could constantly interrupt other apps, that would be bad.

What you mentioned is absolutely right. It looks good for some public websites,but here the user is expecting the immediate attention .

In C# i had come across a function SetForegroundWindow which forces the window to move to foreground. Are we not having similar functions in javscript?


i had written a javascript code in my application , if the user is idle for 5 mintues then it opens a warning window where the user will be informed that session will be expired in another 4 mintues. The issue is as follows

1. The user opens the my web application in the browser.
2. minimizes the browser and works on excel or notepad or any other application.
3. As the user is not operating on my web application, after 5 idle mintues a popup will be opened with session warning message.
4. Here as the focus is on another application other than browser the popup is not coming to foreground, it just getting blinked in the taskbar.

So i need to bring the popup window to foreground , so that user will get noticed and saves his work in my application.

I tried using the focus method on popup window ,but still facing the same issue....

Please suggest me the best approach way. .....
Hi John,

Just check this weblink which might be useful your requirement.

The above project useful to make use of windows authentication for webapplications.
9 years ago
Hi Krishnan,

You can make use of ajax and servlets in this context. You can create a servlet which responds to the ajax request and returns the htmlcontent of the related keyword. At browser side, when the search button is clicked then in the background , send a request to the servlet using ajax with keyword as input parameter.

After you receieve the response you can
1. open an new window with responseText.
2. include the responseText as div innerHTML.

Hope it solves your problem.

9 years ago

Bear Bibeault wrote:Thank goodness you are not able to annoy the population with such nonsense. Please read InterfaceDesignersRule1.

Hi Bear,

I know this question looks like nonsense as you said. But my requirement comes like that..we need to process logout request even when the user closes the window, because the useridentification is completely based on cookies and need to clear the cookies before closing the browser. Though the request is sent to server, the response is not captured by browser as it is been closed immediately .

So i thought of cancelling the close event and closing the browser after logoff process is completed which led me to post this request.

Finally we come out with an another approach which was processed successfully.

Thanks for sharing the DesignerRules....

Hi Friends,

I got an application where If the user tries to close the browser by clicking on the RedCross button , then the browser shouldn't get closed. So can anyone suggest me how to cancel that close event. I tried googling but i cant find any onclose event. The only event which captures is "onbeforeunload" and "onunload" events.

I assigned a function for onbeforeunload event , where i am returning the false but it is showing a dialog box with false as message with ok and cancel buttons.

Please suggest me the way to cancel the close event.

I want this as i want to call the logOff Process before closing the browser.

Is there any way to access the list of child windows opened in the javascript. So at time of logout , i can close all child windows.
i think you can perform this by making use of itext.jar
hi Jeanne,

Yes you are right. My main objective is to provide an alert message for the user just 5 minutes before session timeout occurred. Here my approaches goes like these

1. I need either jsp as you said which refreshes for every request or included in every jsp , in which i will write a javascript method to perform the same.
2. As the code given before i like to monitor the activity of the frame so that i can give the alert message if no activity is performed for some predefined time.

Can you please provide me the suggestions if any regarding either of the above techniques to implement the process.
10 years ago