I am working on struts. I have total three requirements.
1. Depending the user who logged in ( will be getting from session scope) i need to make "save" button invisible.
I am getting the userid from session scope varibale called ID_BEAN. and i have the following code
in my jsp
I need to make this button invisble when ID_BEAN is "USER" and visible when ID_BEAN is "ADMIN".
2. In the same jsp i have lot of fields for editing. I need to make entire screen disabled (only "view" mode) if the ID_BEAN is "USER' and edit access to "ADMIN" user.
3. i have a checkbox option in the jsp. I need to enable the checkbox only when ID_BEAN is "ADMIN" and disable it when ID_BEAN is "USER"
can anyone please provide the sample code for the above three requirements.
you can do it by ckecking the sesion value in your jsp page
just enclose your struts tags with session conditions
to display submit button when only IDBEAN is ADMIN do as below
The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.
This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…