Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 4th, 2006, 12:43 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form-based Authentication Error

Hi,all

I got the attraction example with SQLServer, and everything is fine except
WARNING: Security role name attraction used in an <auth-constraint> without being defined in a <security-role>

and When I logon

I got this

message /attraction/j_secruity_check
description The requested resource (/attraction/j_secruity_check) is not available.

Before I came here, I had gone around these resources:

http://tomcat.apache.org/tomcat-3.3-...alm-howto.html
http://www.onjava.com/pub/a/onjava/2002/06/12/form.html
http://p2p.wrox.com/topic.asp?TOPIC_...Authentication

and the Context in server.xml lies below:

    <Context path="/attraction" docBase="attraction" debug="0" reloadable="true">
        <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
            driverName="com.microsoft.jdbc.sqlserver.SQLServer Driver"
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MK;"
            connectionPassword=""
            connectionName="mk"
            userTable="attraction"
            userNameCol="user_id"
            userCredCol="password"
            userRoleTable="user_role"
            roleNameCol="role_name"
        />
    </Context>

In the Web.xml:
<security-constraint>
    <auth-constraint>
        <role-name>attraction</role-name>
    </auth-constraint>
</security-constraint>

And I am sure about the basic environment is ok, such as struts.jar,connectionPool,struts-config.xml, Tomcat5.5.16,etc.

Please Help me out, or just communicate here.
I saw so much people come around this problem, but none get answered in this forum.
And Actually I surfing around the websites, maybe this is the last one I can do.

Any useful information on above is appreciated
Reply With Quote
  #2 (permalink)  
Old August 4th, 2006, 02:12 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default


the current status of the problem
13:24:46 8/4/2006
after modified as below, no warn again, but the link is Wrong
     <security-constraint>
<!--
      <auth-constraint>
          <role-name>attraction</role-name>
      </auth-constraint>
       -->
  </security-constraint>
  <security-role>
      <role-name>attraction</role-name>
  </security-role>

14:04 8/4/2006
Modified the Action and struts-config.xml, we got this:
Now we got the gut:
HTTP Status 404 - /attraction/j_secruity_check
message /attraction/j_secruity_check
description The requested resource (/attraction/j_secruity_check) is not available.



Reply With Quote
  #3 (permalink)  
Old August 4th, 2006, 10:05 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

18:08:12 8/4/06
޸ԴΪ
<form action="<%= response.encodeURL("j_security_check") %>" focus="j_username" method="post">


dzֲЧݿĴ:
Can't start a cloned connection while in manual transaction mode.ȵ
ַмĺ
connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MK;SelectMethod=cursor "
עֻjdbcRealmӾͿ,DBInitServle tʼʱҲ.

ֵǵ֤ͨ,
HTTP Status 400 - Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).

ֱõ¼ҳ,Ϊactionд˸ת( )
ݺ,Զת¼ҳ.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Form based Authentication shujamughal ASP.NET 2.0 Professional 3 May 25th, 2007 06:34 AM
Form based authentication.... avanishp General .NET 2 June 17th, 2005 04:11 AM
Form based authentication with WLS7 jcgarciap J2EE 1 March 9th, 2005 01:15 PM
form-based authentication using a database waru BOOK: Beginning ASP.NET 1.0 2 May 28th, 2004 11:37 PM



All times are GMT -4. The time now is 06:38 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.