Forums Register Login

Secure and unsecure info on same page

+Pie Number of slices to send: Send
I have a jsp page where I want to show different information based on whether the user is logged in or not.
I won't be able to add to security-constraint as everything on the page will be secure.

How do I have secure and not secure information on the same page?

+Pie Number of slices to send: Send
What do you mean by "secure" in this context? It looks as if you are referring to the browser warning which looks something like that. Is that what you are asking about? If that's the case then "secure" is equivalent to "served via HTTPS" and has nothing to do with the web application's concept of application security.
+Pie Number of slices to send: Send
no by secure I mean certain extra information will be shown on the page when the user is logged in. If the user is not logged in then I want to not show all information.
So the same page will show secure and unsecured information.
+Pie Number of slices to send: Send
Hi, anjali

I believe you have to define certain roles in your application at top of your application which will take care of it for you.

For, Example

A employee have access to certain pages or certain area on the page. Whereas, a manager have access to the pages that an employee can't access. if you are designing a simple application you can check the method isUserInRole method that you can fetch from the ExternalContext.

I Hope this Helps!
+Pie Number of slices to send: Send
If you're using J2EE Container Managed Security, the page rendering code can look to see if the HttpServletRequest user Id property is null. If so, the user is not logged in, and thus "insecure". Otherwise, the user is "secure".

If you're using a Do-It-Yourself security system, you're on your own.
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1381 times.
Similar Threads
User authentication from database
ssl and non-secure items
AJAX, JSF and security
SSL and Applet
Image will not display using FORM-based security
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:39:51.