• Post Reply Bookmark Topic Watch Topic
  • New Topic

wrong redirection from j_security_check when user in different role  RSS feed

 
dany yacoub
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i'm using j_security check with weblogic,
with <wls:principal-name>Administrators</wls:principal-name>
to let only administrators access.
the strange thing is that :
if i enter an administrator user/password -> it sends me to the correct page
if i enter a username that does not exist -> it sends me to the error page
if i enter a wrong password -> it sends me to the error page

but if i enter a username/password that exists but that is not an administrator it throws an error (sending me to the default error page of the application), with all relative path images and links broken. and looking at the URL, it is the URL that i should get when entering as an administrator.

thank you for your help, i'm very new to this so sorry if there is something obvious that i didn't see
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"dyyyy yacoub", please check your private messages for an important administrative matter.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to javaranch dany.

What causes the links to be broken ? Configure a WL audit provider to verify if the person is really being authenticated or not
 
dany yacoub
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thank you for telling me there is smthg called a WL audit provider

in the audit log file, the person's role is being known and i'm getting a failure

this is a part of the log, when logging in a wrong role


/faces/page/sampleList.jsp is the page where the user should be redirected if he was an administrator
the error is here
/faces/page/images/error/image.png does not exist, in my code i have a relative path '/images/error/image.png' that shouldn't come from '/faces/page/' (the path for a right login) but from '/common/pages/' (the path where error-page.jsp exists)

thank you for your help
 
dany yacoub
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , i really need your ideas
if anyone can please share with me how are you handling the error pages with form page authentication,
is using absolute path in the error page a good solution?
please any idea would be useful
thank you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!