Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have a header.jsp whose style keeps changing for different logins its a dynamic header

For example if admin logs in i need 2 tabs in header , and if a user logs in i need 1 tab. How to proceed with this? I have included and i want to know the javascript for this to work.

like image 761
Shaik Mujahid Ali Avatar asked Jun 30 '14 06:06

Shaik Mujahid Ali


2 Answers

You don't need a java Script for this. you have to get a Database connectivity. Create a Table in a DB that have Admin name and user's name. when Login, if it's admin it will prompt to the page that will have 2 headers if not it will re-direct to the page that will have one header. You can achieve this by using response.sendRedirect() function. in your JSP page

like image 143
Vibin Guevara Avatar answered Oct 22 '22 14:10

Vibin Guevara


first of all, you have to provide logged user type like admin or user at login time . if logged user type is admin then pass url parameter like userType='ADMIN' or userType='USER' and check in header.jsp page if userType='ADMIN' load 2 tabs otherwise one tab.

like image 29
Maulik Patel Avatar answered Oct 22 '22 15:10

Maulik Patel