1. #1

    Registered
    30/12/10
    Location
    Antwerpen
    Posts
    37
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0

    login voor webpagina

    hi,

    ik ben een webapp aan het maken waar enkele pagina's in steken die je pas kan zien na het invoeren van een wachtwoord.
    ik gebruik een datasourcerealm die ik in mijn context.xml heb gezet en een security constraint in mijn web.xml

    context.xml
    Code:
    <Contex path="/fileupload">
        <Resource     name="jdbc/fileupload" auth="Container"
                    maxActive="10" maxIdle="3" maxWait="300"
                    username="root" password=""
                    driverClassName="com.mysql.jdbc.Driver"
                    url="jdbc:mysql://localhost:3306/fileupload?autoReconnect=true"
                    logAbandoned="true" removeAbandoned="true"
                    removeAbandonedTimeout="60" type="javax.sql.DataSource" />
    
        <Realm     className="org.apache.catalina.realm.DataSourceRealm" debug="99"
        dataSourceName="jdbc/fileupload" localDataSource="true"
        userTable="userpass" userNameCol="username" userCredCol="password"
        userRoleTable="userrole" roleNameCol="role" />
    </Contex>
    web.xml

    Code:
    <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>Please login to acces the fileuploader</realm-name>
      </login-config>
      <security-role>
          <description>Test</description>
          <role-name>test</role-name>
      </security-role>
      <security-constraint>
          <web-resource-collection>
              <web-resource-name>Protected Area</web-resource-name>
              <url-pattern>/JSP/*</url-pattern>
          </web-resource-collection>
          <auth-constraint>
              <role-name>test</role-name>
          </auth-constraint>
      </security-constraint>
    als ik inlog met de correcte gegevens zoals die in mijn db staan dan geraak ik niet ingelogd.

    iemand die mij kan helpen?

    thx
    no votes  

  2. #2

    Registered
    30/12/10
    Location
    Antwerpen
    Posts
    37
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0
    hier is nog wat info over de mysqlserver

    Server version 5.1.52
    Protocol version 10
    Connection Localhost via UNIX socket
    UNIX socket /var/lib/mysql/mysql.sock
    no votes  

  3. #3

    Registered
    30/12/10
    Location
    Antwerpen
    Posts
    37
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0
    opgelost...
    stomme typo in begin van de contexT file niet de contex file : doh:
    no votes  

  4. #4
    Pudmeister's Avatar
    Registered
    20/08/11
    Location
    DS
    Posts
    853
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/1
    Toch bedankt om ons dit mee te delen, nu ben je weer een ervaring rijker zou ik zeggen
    no votes  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in