Click here to Skip to main content
12,448,720 members (53,546 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript JSP
i am currently developing a login page for a web site which has 3 different homepages 1 for customers, 2 for employees 3 for the administrator, the code is supposed to decide the webpage that it is supposed to redirect to the correct homepage based on the role variable. i am facing a logical error, the code always ends up opening the home3 page. here is my code


--%>
<%@page import="java.sql.*"%>
Posted 25-Nov-12 6:27am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Replace "==" sign with .equals(Object).

Like if(role.equals("Customer"))
  Permalink  
Comments
Nelek 25-Nov-12 14:20pm
   
OP's comment moved from non-solution below
coolloud13 thnx for the reply, i did as you sugested but there is no change in to the output. is is still the same

OP's comment moved from non-solution below (2)
FINALLY IT IS WORKING. I REARRANGED THE IF STATEMENT. THANK YOU coolloud13

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100