Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
- Login for Web-Application

- Login for Web-Application

2007-08-13       - By fermat42

 Back
Hi,

I want to build a web-application using JBoss. The Application should only be
usable for authorized users. So I have build a protected Webside called
protected/test.jsp. Then I used the following web.xml:


<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http:
//www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com
/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

   <session-config>
       <session-timeout>
           30
       </session-timeout>
   </session-config>
   
   <welcome-file-list>
       <welcome-file>
           index.jsp
       </welcome-file>
   </welcome-file-list>
   
   <security-constraint>
       <display-name>VDrive Protected</display-name>
       <web-resource-collection>
           <web-resource-name>VDrive</web-resource-name>
           VDrive Configuration Pages
           <url-pattern>/vdrive/test.jsp</url-pattern>
           <http-method>GET</http-method>
           <http-method>POST</http-method>
           <http-method>HEAD</http-method>
           <http-method>PUT</http-method>
           <http-method>OPTIONS</http-method>
           <http-method>TRACE</http-method>
           <http-method>DELETE</http-method>
       </web-resource-collection>
       <auth-constraint>
           <role-name>administrator</role-name>
       </auth-constraint>
   </security-constraint>
   
   <login-config>
       <auth-method>BASIC</auth-method>
   </login-config>
</web-app>


In the directory server/default/conf I put the following users.properties:

fermat=test


and roles.properties:

fermat=administrator


This is based on http://www.techienuggets.com/Detail?tx=2, but I used basic
authentication instead of form. But anyway (if using Form or Basic) I am asked
for a login and password and after entering I get an empty page and the
following exception:


14:41:39,763 ERROR [CoyoteAdapter] An exception or error occurred in the
container during the request processing
java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast
to org.jboss.security.SubjectSecurityManager
       at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate
(JBossSecurityMgrRealm.java:488)
       at org.apache.catalina.authenticator.BasicAuthenticator.authenticate
(BasicAuthenticator.java:181)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:491)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke
(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve
.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve
.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke
(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter
.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor
.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler
.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
:447)
       at java.lang.Thread.run(Thread.java:619)


Can anyone tell me what is going wrong? Is there a usable tutorial for this?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4073530#4073530

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4073530
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.