You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kevin Passey <kp...@kdpsoftware.co.uk> on 2002/12/17 12:46:51 UTC

Connection Pooling - additions to server.xml crashes 4.1.12

Can anybody shed any light on this.

If I add this to my server XML file :-

- <Context path="/shilton" docBase="shilton" debug="5" reloadable="true"
crossContext="true">
  <Resource name="jdbc/shiltonDB" auth="Container"
type="javax.sql.DataSource" /> 
- <ResourceParams name="jdbc/shiltonDB">
- <parameter>
  <name>factory</name> 
  <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> 
  </parameter>
- <parameter>
  <name>maxActive</name> 
  <value>100</value> 
  </parameter>
- <parameter>
  <name>maxIdle</name> 
  <value>5</value> 
  </parameter>
- <parameter>
  <name>maxWait</name> 
  <value>100</value> 
  </parameter>
- <parameter>
  <name>username</name> 
  <value>INTERNET</value> 
  </parameter>
- <parameter>
  <name>password</name> 
  <value>INTERNET</value> 
  </parameter>
- <parameter>
  <name>driverClassName</name> 
  <value>com.ibm.as400.access.AS400JDBCDriver</value> 
  </parameter>
- <parameter>
  <name>url</name> 
  <value>jdbc:as400://NORBERT</value> 
  </parameter>
  </ResourceParams>
  </Context>

When I try to publish via a war file Tomcat will not start. If I delete the
war file and publish the folder manually Tomcat starts - have I done
something wrong.

Some notes - I have my test server installed on a WIN2K box and it works ok
- I am using IBM's WSAD 4.0.3 so I presume the files are not published via a
war.

My production box is Linux RH7.2.

Thanks for any input.

Kevin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple organisations in one realm with unique logins per organisations?

Posted by Ben Jessel <be...@morpheme.co.uk>.
Sounds like you're going to need to create a custom realm in order do do
that extra select on the organisation.
Though, if you're going to have unique usernames throughout the system (
regardless of organisation ), then you could
work around this by having the organisations mapped to the user in the
user_role table. eg,

user     password
userA  passA
userB  passB
userC  passC

user      role
userA   OrganisationA
userB   OrganisationA
userC   OrganisationC

Then you could restrict access to the different organisational areas of the
sites based on roles. Not the nicest solution, I think creating a custom
realm would be much more up your street. It's in the documentation.

Thanks

Ben

----- Original Message -----
From: "Marc van de Geijn" <mv...@xs4all.nl>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, December 17, 2002 12:12 PM
Subject: Multiple organisations in one realm with unique logins per
organisations?


> Hi there,
>
> I'm developing an application which will support multiple organisations
> within one realm and one MySQL database.
>
> When users log into the application, I would like to make them enter their
> organisation name, their login and their password. Combining the login and
> the organisation name identifies the user unique in the realm/database.
>
> Is this possible with the standard authentication in Tomcat? Or are there
> other ways to do this?
>
> Thanks,
> Marc
>
> P.S. I hope I explained this problem correctly. Otherwise, just ask for
more
> information.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Multiple organisations in one realm with unique logins per organisations?

Posted by Marc van de Geijn <mv...@xs4all.nl>.
Hi there,

I'm developing an application which will support multiple organisations
within one realm and one MySQL database.

When users log into the application, I would like to make them enter their
organisation name, their login and their password. Combining the login and
the organisation name identifies the user unique in the realm/database.

Is this possible with the standard authentication in Tomcat? Or are there
other ways to do this?

Thanks,
Marc

P.S. I hope I explained this problem correctly. Otherwise, just ask for more
information.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Connection Pooling - additions to server.xml crashes 4.1.12

Posted by Jacob Kjome <ho...@visi.com>.
If you name a context in server.xml, your .war file will *not* be expanded 
automatically.  What you will need to do is stop Tomcat, manually expand 
the .war file to a directory named "shilton" and then 
restart.  alternatively, you can avoid editing the server.xml and put this 
in a context configuration file.  See the admin.xml and manager.xml files 
in "webapps" for examples.  Basically, you just copy your entire <Context 
...> entry to a separate .xml file.  I'd name it the same thing as your 
webapp to make it clear what that file if for, but I don't think that is a 
requirement.  Either way, you need to manually expand your .war file 
*before* tomcat is restarted.

Alternatively, you can start Tomcat (making sure to have removed the 
<Context ...> entry from server.xml), create your context configuration 
file and name it "context.xml".  Put that in META-INF of your .war file, 
and then use the Tomcat manager app's "deploy" command to deploy your .war 
file.  Modify your context to have a docbase with the name of the .war file 
(I believe).  The easiest way to do this is to use the catalina ant manager 
tasks.

Jake

At 11:46 AM 12/17/2002 +0000, you wrote:
>Can anybody shed any light on this.
>
>If I add this to my server XML file :-
>
>- <Context path="/shilton" docBase="shilton" debug="5" reloadable="true"
>crossContext="true">
>   <Resource name="jdbc/shiltonDB" auth="Container"
>type="javax.sql.DataSource" />
>- <ResourceParams name="jdbc/shiltonDB">
>- <parameter>
>   <name>factory</name>
>   <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>   </parameter>
>- <parameter>
>   <name>maxActive</name>
>   <value>100</value>
>   </parameter>
>- <parameter>
>   <name>maxIdle</name>
>   <value>5</value>
>   </parameter>
>- <parameter>
>   <name>maxWait</name>
>   <value>100</value>
>   </parameter>
>- <parameter>
>   <name>username</name>
>   <value>INTERNET</value>
>   </parameter>
>- <parameter>
>   <name>password</name>
>   <value>INTERNET</value>
>   </parameter>
>- <parameter>
>   <name>driverClassName</name>
>   <value>com.ibm.as400.access.AS400JDBCDriver</value>
>   </parameter>
>- <parameter>
>   <name>url</name>
>   <value>jdbc:as400://NORBERT</value>
>   </parameter>
>   </ResourceParams>
>   </Context>
>
>When I try to publish via a war file Tomcat will not start. If I delete the
>war file and publish the folder manually Tomcat starts - have I done
>something wrong.
>
>Some notes - I have my test server installed on a WIN2K box and it works ok
>- I am using IBM's WSAD 4.0.3 so I presume the files are not published via a
>war.
>
>My production box is Linux RH7.2.
>
>Thanks for any input.
>
>Kevin
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>