Vidar Langberget

Greenhorn
+ Follow
since May 31, 2001
Merit badge: grant badges
For More
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 Vidar Langberget

Hi!
I'm having some trouble with sendRedirect. I check the session object to see if a user have access rights to a certain page.
If not, I try to redirect the user with sendRedirect. The problem is that on some pages, the browser renders the page he shouldn't have access to first, then a part of a html header, then it renders the page the user should be redirected to. If I reload the same page once more, the user is redirected correctly.
Anyone have a clue what's wrong?
This is the page I include in all my pages to limit access:

<%
if(session.getAttribute("SITEADM") == null){

response.sendRedirect("site_admin.jsp");
}else{
String adm = "";
adm = (String)session.getAttribute("SITEADM");
if(adm.equals("Ok")){

}else{
response.sendRedirect("site_admin.jsp");
}
}
%>

22 years ago
Hi!
I've developed a JSP application without using any JavaBeans or Servlets. Is such a solution much slower? Will scalability suffer?
Vidar
22 years ago