File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes login page with different user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "login page with different user" Watch "login page with different user" New topic
Author

login page with different user

nishi kishore
Greenhorn

Joined: Jun 21, 2012
Posts: 26

Swastik Dey, here are the values which i am getting on the console :


user type= seller
user type= buyer
user type=admin
admin
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1397
    
    6

If these are the exact values you are getting from table, look carefully. There seems to be a leading and trailing space for usertype seller and buyer but not for admin
' seller '
' buyer '
'admin'

so while doing the check, you need to remove the spaces.



Swastik
sailaja usha
Greenhorn

Joined: Jun 23, 2012
Posts: 13

Mr.Nishi

try to remove the spaces in the user type.

i think in " seller" there is a space.

trim the string.


regards
Sailaja
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 751
nishi kishore wrote:kunal, it will take a lot of time to learn a new concept and implement it.


By now you would have learned MVC and solved the problem.


Jigar Naik


nishi kishore
Greenhorn

Joined: Jun 21, 2012
Posts: 26

Swastik Dey ,

wow.......!!! you have an eagle eye.

thank you very much, finally my problem is resolved because of you.
thank you very much for your assistance.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
NIshi, today MVC architecture is a must. That's separation of business logic, persistence logic, rendering logic. Its not a difficult concept. You just need to create different classes, like bean class, a separate class for servlet, persistence and jsp to render the view. Try, we are there to help you


kunal
nishi kishore
Greenhorn

Joined: Jun 21, 2012
Posts: 26

Kunal Lakhani, i have developed this project entirely in jsp. this project is 70% completed and 30% more to go.
how can i convert this whole project from jsp to MVC.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
If that's a college project, then its ok. But still, i recommend you to go for MVC next time, and avoid java codes in jsp.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: login page with different user
 
Similar Threads
How to invalidate user's session forcefully
Session Management Still weird
want to develop dynamic shopping cart
struts2 redirect from action login
filters in java