First, if anybody replies to this, would they please also cc my personal address? Mail does not seem to be reaching me otherwise..thanks! Also, if anybody is willing to share their working web.xml and resin.conf, that would be a great help too..
I am trying to get "standard security" to work and am running into problems. I think i followed all the instructions (both in the lab and the docs) regarding changing the resin.conf and web.xml but obviously something is wrong because resin does not even start up: I get an error as follows:
conf/resin.conf:101: com.caucho.config.BeanBuilderException:
Can't find
setter for attribute `url' in bean class `com.caucho.sql.DBPool'.
and I get the usual "Application closing" "Application
.. starting", "Application .. closing", "Application .. starting",....
error..
Line 101 is the beginning of the <resource-ref> block in resin.conf, shown below..
//////////////////////////////////////////////////////////////////////////////////////////////////////////
Here's what i have in my resin.conf:
//////////////////////////////////////////////////////////////////////////////////////////////////////////
<host id=''>
<document-directory>webapps/myCMS2</document-directory>
<resource-ref>
<res-ref-name>jdbc/basicportal</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param
driver-name="org.sourceforge.jxdbcon.JXDBConDriver"/>
<init-param
url=""/>
<init-param
user="bpuser"/>
<init-param
password="password"/>
</resource-ref>
<!--
configures the root web-app -->
<web-app id='/'>
<!--
adds xsl to the search path -->
<class-loader>
<simple-loader path="$host-root/xsl"/>
</class-loader>
<servlet-mapping
url-pattern="/servlet/*" servlet-name="invoker"/>
<authenticator id='com.caucho.server.http.JdbcAuthenticator'>
<db-pool>jdbc/basicportal</db-pool>
<password-query>
select password from base_user where username=?
</password-query>
<role-query>
select r.role from sec_role r, sec_xuser_role x, sec_user u where u.username=?
and x.userID=u.id and r.id=x.roleID
</role-query>
</authenticator>
</web-app>
</host>
//////////////////////////////////////////////////////////////////////////////////////////////////////////
Here's what i have in my web.xml:
//////////////////////////////////////////////////////////////////////////////////////////////////////////
</taglib>
<security-constraint>
<display-name>Example
Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<!--
Define the context-relative URL(s) to be protected -->
<url-pattern>/*.do</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>manager</role-name>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>default</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginBad.jsp</form-error-page>
</form-login-config>
</login-config>
</web-app>