Re: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 06:03, Anto Paul wrote:
 On 8/29/05, Alan Chandler [EMAIL PROTECTED] wrote:
  Where can I find specs for all the tags in server.xml

 I use these pages. it explains the elements used in the server.xml.
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html

No it doesn't it only describes SOME of them.



I must admin not really searching 5.5 docs, because I am using 4.1, but I 
can't find the Resource tag described aywhere.  It is important to get it 
right (basically because blindly following someone's recipe has not worked - 
so I need to understand the reasoning behind their recipe and correct it for 
my situation).  In particular what do the attributes mean


I have a similar issue with web.xml although at least there is a dtd for that 
which is reasonably well commented.  Its just that some of the elements (like 
security-constraint are not well documented.








-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How do I map realm name to none memory database

2005-08-29 Thread Alan Chandler
I am totally failing to get form based security to work.

One thing that is bugging me is that under the security-constraint tag in 
the web.xml file there is the realm-name tag.

What should this be?

For the standard Realm provided by tomcat, it seems to have a name of 
UserDatabase, but if I want to use my own database how do I specify the 
Realm Name? 
-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 14:55, Caldarale, Charles R wrote:
  From: Alan Chandler [mailto:[EMAIL PROTECTED]
  Subject: Re: Where can I find specs for ALL the xml tags that
  can be used in server.xml.

 Then you certainly should be looking at the 4.1 docs, since 5.5
 configuration is noticeably different.  The pages of interest for 4.1
 include;

 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.htm

Thank you - I had scanned that document, but missed the reference to the 
resource tag.

Unfortunately, it still doesn't specify what the auth=Container attribute 
means.



-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Really struggling with DataSource'd Realm

2005-08-29 Thread Alan Chandler
I am try to to use FORM based authorisation to control access to part of my 
database application.  Consequently I have added the users and user_role 
tables to my database which is already been set up as 
java:/comp/env/jdbc/family_tree.

I then created a Realm which refers to it.


Realm className=org.apache.catalina.realm.DataSourceRealm debug=99
   dataSourceName=java:/comp/env/jdbc/family_tree
   userTable=users userNameCol=user_name userCredCol=user_pass
   userRoleTable=user_roles roleNameCol=role_name/

As per the docs

When I try and login I get a naming exception

2005-08-29 15:51:54 DataSourceRealm[/famtree]: Exception performing 
authentication
javax.naming.NameNotFoundException: Name java: is not bound in this Context
 

I have experimented with several strings for dataSourceName in the Realm tag 
above such as dropping the java: at the front, or removing the leading slash, 
or leaving out the frontf the string and just adding jdbc/family_tree, and 
even renaming the resource to just family_tree.

In every case it seems to stop passing the name at the first delimeter (':' or 
'/') and failing.

Is there something wrong with the DataSourceRealm in this version of tomcat 
(4.1.3) or am I doing something else wrong?

Can somebody guide me through this please.



-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Really struggling with DataSource'd Realm

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 16:16, Marc-Andre Blain wrote:
 Hello Alan,

   try removing the / in your jndi name

   java:comp/env/jdbc/family_tree.

Already tried that combination - this is the result - see how the name its 
looking for is just java:

Exception performing authentication
javax.naming.NameNotFoundException: Name java: is not bound in this Context
userRoleTable=user_roles roleNameCol=role_name/
-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Really struggling with DataSource'd Realm

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 16:25, Marc-Andre Blain wrote:
 Than, did you try putting only jdbc/family_tree.

 The java:comp/env should be the default.

Yes - then it failed saying it could not find jdbc

So I thought Ah! - and renamed the resource just family_tree.  But then it 
didn't actually find that either:-(

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem using FORM based authetication (Tomcat 4.1)

2005-08-28 Thread Alan Chandler
 can 
find and lots of them give examples of how to do it - which I think I have 
followed.  Nowhere can I find any formal reference for all the tags 
(particularly those security-constraint and related tags in my web.xml file 
so that I can check.

Of some puzzle is why the exception printout says only that java:comp can't be 
found rather than the full path to the database!


-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-28 Thread Alan Chandler
Where can I find specs for all the tags in server.xml

In particular, trying to find out why I used to be able to access a JNDI 
datasource and now can't.  All I did was move the resource ... tag from the 
local Context ... to the GlobalNamingResources.  Move it back and it 
starts working again.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to configure apache, tomcat and mod_jk

2005-07-11 Thread Alan Chandler
On Monday 11 July 2005 14:54, Matthew Strawbridge wrote:
 Hi

 After spending several days trying to set this up from the
 documentation, I've finally decided I need some expert help.

I am no expert, but I got it to work 

See my blog on

http://home.chandlerfamily.org.uk/archive/21/taking-the-java-plunge---setting-up-apache-and-tomcat

Just a quick look at your server.xml file seems to be missing the 

engine jvmroute= ...

that I have.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: control ports on windows

2005-07-08 Thread Alan Chandler
On Thursday 07 July 2005 17:25, Tony Smith wrote:
 Hi, I am running Tomcat 5.0 on Windows. But what I
 want to do it not link to Tomcat. I would like to know
 how to  control all those ports. For example, I would
 like to open 8080 but close 8089, etc...


 Thanks,

1) Don't hijack someone elses thread for your self (you even seemed to have 
asked the writer of the original thread directly rather than the list)

2) Be a bit clearer in what you are asking.  What does what I want to do it 
[is?] not link to Tomcat mean?  In particular what is the rather ambiguous 
word link meant to mean? Are you talking about connecting another web 
server, and if so which one?

3) Tell us what you have done to try and figure it out for yourself - Hint: 
have you looked at server.xml?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mapping everything to Tomcat? (mod_jk)

2005-07-08 Thread Alan Chandler
On Friday 08 July 2005 01:53, Luis Torres wrote:
 Hello Everyone, first post to the list  =)

 I have a test setup with Solaris 9, Apache 2.043, mod_jk and two tomcats
 (4.131  JDK 1.5.0)

 To have the Tomcats handling the applications, first I used the
 following lines but the problem was that my jsp's where taken by tomcat
 but my images, css and other elements where served by apache, hence my
 images, styles, etc where not found by the server since they are all
 inside /webapps/app_name/images

Use JkAutoAlias /.../webapps or just use a standard Apache Alias directive to 
map the Apache location around the webapps directory [Not sure what the 
different between JkAutoAlias and plain Alias - I just use the former]

Note also I had to jkmount /*.do to get struts to work.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat manager using mod_jk?

2005-07-08 Thread Alan Chandler
On Friday 08 July 2005 01:59, Luis Torres wrote:
 Hello again,

 Same setup: Solaris 9, Apache 2.043, mod_jk and two tomcats (4.131  JDK
 1.5.0)

 Any of you guys know if there's a way to access the tomcat manager
 application or something similar when using mod_jk??

 Right now the only way I have found is to leave tomcat accepting
 requests directly and calling http://server_name:port/manager/ for each
 tomcat.

See my comment above about jkmount of *.do to get struts to work.  The admin 
application (at least) seems to be struts based.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: apache and tomcat

2005-07-06 Thread Alan Chandler
On Wednesday 06 July 2005 08:25, Rajasekar wrote:
 Hello guys,
  Could you please give me the steps to making mod_jk for tomcat?
  Regards
  Raj



mod_jk is an apache module.  I am running apache2 and tomcat4 on linux and I 
downloaded the binary module from 

http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/


There seems to be instructions for building for several platforms from source 
at

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/install/apache2.html

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: apache and tomcat

2005-07-05 Thread Alan Chandler
ganesan malairaja writes: 

hi guys .. 

i am confused now.. i need help undeerstanding apache and tomcat .. 

what purpose each serve and how to link both them ... 



Apache is a web server - with lots of usage and good experience with in 
terms of security facing the internet.  You can get modules for it to run 
scripting languages (for instance php), but it doesn't run java 
applications. 

Tomcat is primarily an engine for running web based applications in java, 
but it also has the ability to serve static html.  In this latter process it 
does not have the security background of apache - so whilst it could be used 
as a web server and an application server, it is normal to separate the two 
(the web server may run in the dmz, the application server may run behind a 
second firewall). 

In order to link the two, you need to set up the mod_jk module. 




i want to know how to link html and applets   in tomcat htdoc folder to 
jsp codes in tomcat webapps folder ..



It is possible (if the two servers are running on the same machine) to map 
the apache location around the tomcat directory via an alias statement 

(I think there is a mod_jk directive - something like jkautoalias that does 
the same thing) 


--
Alan Chandler
[EMAIL PROTECTED] 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: intergrating with apache

2005-07-04 Thread Alan Chandler
On Monday 04 July 2005 05:14, ganesan malairaja wrote:
 i have setup tomcat 4.1.31 with j2sdk 1.4.2_08 ..

 now i need to know  how to integrate apache with tomcat .. as i came across
 examples for tomcat 3.x.x

 i am not sure the same procedures can be applied

 i am using linux enviroment .. i am planning to intergrate tomcat with
 apache 2.0.x..

 what connector i need to use ..  mod_jk ?

I have just set up this from debian - standard debian (sarge) apache2 and 
tomcat4.  mod_jk not supported in debian so downloaded the binary version 
from here (Seems to be a uk mirror - not sure why I got to this address)

http://apache.rmplc.co.uk/jakarta/tomcat-connectors/jk/binaries/


 any urls with example will help alot and ur coments is also welcomed

Then in apache2 config I am doing

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevelinfo
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

inside my virtualhost directive

JkMount /*.jsp tomcat
JkMount /servlet/* tomcat

and the workers.properties file has

worker.list=tomcat
worker.tomcat.type=ajp13
worker.tomcat.host=appserv.home
worker.tomcat.port=8009

then in tomcats server.xml

   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8009 minProcessors=5 maxProcessors=75
   enableLookups=true acceptCount=10 debug=0
   connectionTimeout=2 useURIValidationHack=false
   
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

!-- An Engine represents the entry point (within Catalina) that processes
 every request.  The Engine implementation for Tomcat stand alone
 analyzes the HTTP headers included with the request, and passes them
 on to the appropriate Host (virtual host). --

!-- Define the top level container in our container hierarchy --
Engine jvmRoute=tomcat name=Standalone defaultHost=appserv.home 
debug=0

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_ suffix=.log timestamp=true/

  !-- Because this Realm is here, an instance will be shared globally --
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/

  !-- Define the default virtual host --
  Host name=appserv.home debug=0 appBase=webapps
unpackWARs=true autoDeploy=true

!-- Logger shared by all Contexts related to this virtual host. --
Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=appserv_ suffix=.log
timestamp=true/

!-- Allow symlinks for the tomcat-docs webapp. This is required in
 the Debian packages to make the Servlet/JSP API docs work. --
 Context path=/tomcat-docs docBase=tomcat-docs debug=0
Resources className=org.apache.naming.resources.FileDirContext
   allowLinking=true /
 /Context

  /Host

/Engine






-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: howto on compiling mod_jk2 for windows

2005-06-26 Thread Alan Chandler
On Sunday 26 June 2005 14:53, Mark wrote:
 Can someone point me to a site that will describe how to compile
 mod_jk2 for windows?


Are you aware that mod_jk2 is depreciated in favour of an updated mod_jk.  
Binaries of mod_jk are available on the jakata.apache.org web site.
-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]