Skip to Content
avatar image
Former Member



Would anyone please be able to shed light on the following:

When a web-application uses "j_security_check" , where does it store the name of the original page requested by the user (the one to which user should be redirected after a successful login ) ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 17, 2011 at 04:47 AM


    I am not 100% about SAP but application server usually creates a HTTP session object and stores it there. Check this non SAP [example|].


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      I have literally just set this up myself and it is working.

      What I did was to create a redirect.jsp that contains the path that wanted to redirect to eg.

      <%@ page language="java" %>
      <%@ page import = "" %>
      	String redirectURL = "";
      	// Check if GET Parameter "redirectURL" is availabel
      	redirectURL = request.getParameter ("redirectURL");
      	if (redirectURL != null) {
      				response.sendRedirect ("http://" + redirectURL);
      	} else {
      				response.sendRedirect ("/irj/portal/HR/HR");

      In my web.xml I created a "Servlet Mapping" to "redirect.jsp" with URL pattern "/"

      Logon form as follows:

      <%@ page language = "java"%>
      			Login Redirect
      	<TABLE WIDTH=500>
      		<FORM name="logonForm" method="post" action="j_security_check">  
      		  <input name="login_submit" type="hidden" value="on">
      		  <input type="hidden" name="login_do_redirect" value="1"/>
      		  <input name="j_authscheme" type="hidden" value="default">
      				<p>Please enter Username and Password:</p>
      				<table border="0">
      						<td><input type="text" name="j_username" id="j_username"</td>
      						<td><input type="password" name="j_password" id="j_password"</td>
      						<td> </td>
      						<td><input type="submit" name="submit" value="Login" </td>