Win a copy of Head First Android this week in the Android forum!

Vishwas Shashidhar

Greenhorn
+ Follow
since Oct 20, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vishwas Shashidhar

Hi guys,

I am developing a web application which uses Hibernate. And i am storing the "Hibernate Session" object in a "Http Session" object. However, i have come across a problem when there are multiple users who update the data. In that case, since the "Hibernate Session" is in "Http Session", data will get updated only for the user who has updated the data unless the other users log out and a new session is created for them.

I am a bit stuck here. I thought of storing the "Hibernate Session" in the application context instead of the session context. However, i have a feeling that the data might become stale with just one hibernate session for the entire application. So, please help me out and guide me through. Will be really grateful.


Regards,
Vishwas
Thanks a lot for the input Paul.

Yes, i am pretty much clear now. I will mostly use the form based authentication.

The part where you say only authorized people(admin) should access the page, i've implemented that as well.

Its just that i want to give double security for a "DELETE" operation as the consequences would be severe if the admin does it mistakenly and all the data is lost. Which is why i am including a second password for the same purpose to make sure the admin is aware of the thing.

Your input was really helpful. Cheers
11 years ago
Thanks for the suggestion Paul.

But the kind of design we have done is pretty sophisticated.

We don't do any logical operations in a JSP, everything is taken care by Servlets and traditional Java classes.

Let me explain the exact logic I'm looking to implement.

There is a JSP called "home.jsp". And there are links to navigate to different pages from this page. Certain operations can be performed only by an administrator. For example, if i want to delete the data of a student, I click on the "DeleteStudent.jsp" link. Our initial approach was to pass the Student name to the servlet, keep it in a session, redirect the user to the authentication page, authenticate him and then delete the data. But i thought this involved too many operations and pages.

Since I've seen so many sites in which if i hit a URL, a pop-up appears and once i'm authenticated, i can access the page.

I didn't get to know how to implement this using a Javascript as in a JS Popup, the password is not masked which is a huge concern.

So, please let me know how i can take this further.

Hope you have understood the scenario.

Thanks in advance again.
11 years ago
Hi,

I need to know how a URL can be authenticated using Javascript/html with a pop up appearing.

For example, if there is a page called "abc.jsp" and i click on the link that takes to "abc.jsp", i should get a pop up asking the username/password which then is sent to the server to authenticate the user. If the user is authenticated, "abc.jsp" is displayed. Else, he is redirected to the Error page with a message stating he is not authorized.

How can i achieve this?? Please help me.


Thanks in advance.
11 years ago