j_security_check is part of the Servlet Specification section
"SRV.12.5.3.1 Login Form Notes" (at least for version 2.5).  It did
exist in earlier versions but I've only quoted the latest.

On Sun, Feb 1, 2009 at 5:03 PM, Philipp Daumke <dau...@averbis.de> wrote:
> Hi all,
>
> I followed the Servlet Container authentication as described in
> http://cwiki.apache.org/WICKET/servlet-container-authentication.html, but I
> do not get it working.
>
> At the moment I get an error in firefox when invoking the
> redirectToSecurityCheck() method:
>
> http://localhost:5080/j_security_check?j_username=test&j_password=test
> _The requested resource () is not available.
>
> _I don't even know exactly what "j_security_check" is and don't find too
> much on the web. Do I have to configure Tomcat properly?
>
> Below is my full src. MyApp.java and web.xml look like in the example (see
> link aboe). Thank you for your help!
> Philipp
>
>
> public final class LoginPage extends WebPage
> {
>   private String username;
>   private String password;
>   public LoginPage()
>   {
>       redirectToSecurityCheck();
>       /*if( ( ( MySession )getSession() ).isUserLoggedIn())
>       {
>           // redirect to hide username and password from URL after user is
> logged in
>           setRedirect( true );
>           setResponsePage( Index.class );
>       }
>       else
>       {
>           redirectToSecurityCheck();
>       }*/
>   }
>
>   /**
>    * Common servlet login workaround
>    */
>   private void redirectToSecurityCheck()
>   {
>       final Map parametersMap = ( ( WebRequestCycle )RequestCycle.get()
> ).getWebRequest().getHttpServletRequest().getParameterMap();
>       if( parametersMap.containsKey( "username" ) &&
> parametersMap.containsKey( "password" ) )
>       {
>           // getting parameters from POST request
>           final String userName = ( ( String[] )parametersMap.get(
> "username" ) )[ 0 ];
>           final String userPassword = ( ( String[] )parametersMap.get(
> "password" ) )[ 0 ];
>
>           // if POST parameters are ok, redirect them to j_security_check
>           if( ( userName != null ) && ( userPassword != null ) )
>           {
>               getRequestCycle().setRedirect( false );
>               getRequestCycle().setRequestTarget(
> EmptyRequestTarget.getInstance() );
>
>               getResponse().redirect(
>                       "/j_security_check?j_username=" + userName +
> "&j_password=" + userPassword );
>           }
>       }
>   }
>
>   public String getUsername() {
>       return username;
>   }
>
>   public void setUsername(String username) {
>       this.username = username;
>   }
>
>   public String getPassword() {
>       return password;
>   }
>
>   public void setPassword(String password) {
>       this.password = password;
>   }
> }
> --
>
> Averbis GmbH
> c/o Klinikum der Albert-Ludwigs-Universität
> Stefan-Meier-Strasse 26
> D-79104 Freiburg
>
> Fon: +49 (0) 761 - 203 6707
> Fax: +49 (0) 761 - 203 6800
> E-Mail: dau...@averbis.de
>
> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
> Sitz der Gesellschaft: Freiburg i. Br.
> AG Freiburg i. Br., HRB 701080
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to