Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to specify j_uri  RSS feed

 
Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I specify the j_uri using FORM-based authentication.

I have created my own servlet which does check if the user is authenticated and forwards to the main page.

500 Servlet Exception
javax.servlet.ServletException: No forwarding URI for form authentication.
Either the login form must specify j_uri or the session must have a saved

Login form (login.jsp):
<form name="form1" action="j_security_check" method="post">
...
</form>

web.xml:
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Default Realm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like either the forum needs to have a hidden "j_uri" field that tells the login form where to go after the login, or there must be a seesion attribute of some kind that does the same. This discussion seems to be relevant.

Be aware that j_uri is a Resin-specifc extension, and not part of the servlet specification (i.e., it won't work on other servlet containers). The Resin documentation should describe how this works in detail.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!