Query Regarding Tomcat 4.0.4

2002-08-12 Thread Taral Shah

Hi,

First of all thanks for providing cgi support in Tomcat. I was waiting for
it since long.

I am using tomcat 4.0.4, the latest and stable version as specified by site.


I am facing some problem while handling the CGI with tomcat and I am unsure
about whom to ask the question so I am mailing you.
I hope I 'll get reply soon regarding this, as this is very crucial point
for our project.

Let me explain my problem first:

I am using tomcat 4.0.4. Here I have created my context and in it I have
mapped cgi. I am able to execute the cgi easily so no problem with
configuration. My small cgi scripts are getting executed easily so I dont
have problem with any type of configuration.

But it gets hang when the cgi response is very large(Not so much large but
just above 15-20 lines)

I am using tomcat in solaris and windows-nt both.
In windows-nt my cgi script is an exe file, It opens an socket with servlet
and reads all data supplied by that servlet. When data is small (i.e of
around 5 lines) It works fine and all response gets printed on browser, but
when data gets big(here around of 30 lines) it waits and waits and nothing
is being printed out on browser.
I executed the exe stand alone, it gets all response back so no problem with
exe(Actually that exe was working fine with other CGI server, VQ Server).
We decided to migrate to tomcat as now its supporting cgi, and We came
across this problem.

I changed the request time out to 1 mins-5 mins(i.e. 6,30 ms)  like
that but response didnt change.(same old waiting game)

While for solaris it can print up to 100-150 lines but when case comes of
300 or more lines it gets hang.

You mentioned in the help file
Can you please help me regarding this issue or give me email address or
forum name from where I can get the answer.

Waiting for your reply,
Thanks

Taral Shah
Software Engineer,
Contech Software Ltd.
[EMAIL PROTECTED]

Experience is what you get when you were expecting something else.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jsp in packages

2002-08-12 Thread D Bamud

Q1. Can I declare my jsp files in packages? How?

Q2. I have written a static method in one jsp page. I want to call  this
method in another jsp page. How to do it? I do not want to take this method
out from the jsp and put into a class (.java) and use it in both the jsp
files.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Block a dir to not display its content

2002-08-12 Thread D Bamud

Tomcat4.0.4 / J2SDK1.4.0/W2K

My application is webapps/bbc. It works just fine. The dirs inside it are
"jsp" and "WEB-INF". Inside the jsp dir I have my *.jsp files and also some
directories like "doc", "src", "images" etc. These are the directories that
the end user should not see content of via the browser. If someone make a
URL like /bbc/jsp/doc the contents are displayed on the browser and the user
could see/save them. I want to prevent them IN THE SAME WAY AS "WEB-INF" dir
is now (Tomcat4.x onwards). How to do it.

One way is of-course put default file like index.html (based on the
configuration). But I am looking for more better way (WEB-INF way). Where
and what I need to delcare.

--Thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




deploying apps simply (simply deploying apps)

2002-08-12 Thread Daniel Kehoe

On Fri, 9 Aug 2002 21:53:52 -0700 (PDT), "Craig R. McClanahan"
<[EMAIL PROTECTED]> said
(on the roller-development and struts-dev lists):
> PS:  In Tomcat 4.1.x, the "deploy" command of the manager app lets you
> include a context configuration file in the WAR, at location
> "META-INF/context.xml".  So it might still be possible to configure a
> single WAR that works correctly in Tomcat 4.1.x and still works in
> other servers (that would obviously ignore such a file).

I'd like a user to download a war file that has a
"META-INF/context.xml" that defines 
a default JNDI data source (an HSQLDB database), drop the war file into
/webapps/, 
restart Tomcat, and test the app. Then, if they want to use a different
datasource, I'd like 
them to use the Tomcat admin tool to change the JDBC driver and URL for
the database, 
overriding the "META-INF/context.xml" setting. This is the simplest
install procedure I can 
imagine. However, that doesn't seem possible currently. What are the
alternatives?

I can tell the user to unzip an archive that contains myapp.xml and
myapp.war, copy the myapp.xml 
into /webapps/, unjar the myapp.war into /webapps/, and
restart Tomcat, then use 
the Tomcat admin tool to change the JDBC driver and URL for the
database. But that seems to be as 
simple as I can make it currently. Can I do better?
-- 
  Daniel
  [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSP vs. Servlet Paths

2002-08-12 Thread Adam W. Montville

Hi all,

I'm new to this list and really need some help.  Let me frame the scenario:

I have CATALINA_HOME set to C:\jakarta-tomcat-4.0.4\jakarta-tomcat-4.0.4.
The rest of the directory structure (and file locations) is as follows:

CATALINA_HOME
  |
  +-- webapps
 |
 +-- demo
   |
   +-- jsp
   |
   +-- WEB-INF
  |
  +-- classes

The "classes" directory contains MyServlet.class, WEB-INF contains web.xml,
"jsp" contains both SourceJsp.jsp and TargetJsp.jsp.

SourceJsp.jsp displays a submit button, which then calls TargetJsp.jsp,
i.e., it contains the line "".  I then have a Servlet, MyServlet.java
that also calls TargetJsp.jsp.  MyServlet.java contains the line
"this.getServletContext().getRequestDispatcher("/jsp/TargetJsp.jsp").forward
(req, resp)".

Please pay attention to the path difference between these two calls.
SourceJsp.jsp and MyServlet.java both "invoke" the same TargetJsp.jsp,
however, the paths are different: SourceJsp.jsp = /demo/jsp/TargetJsp.jsp;
MyServlet.java = /jsp/TargetJsp.jsp.

I need to understand why this must be the case.  What is the difference
between a JSP invoking a JSP and a Servlet invoking a JSP with regard to the
paths required for such invocation?

Thank you for your help!  I appreciate it!

Regards,

Adam



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




installing with web app mgr, failing on getRealPath("")

2002-08-12 Thread Daniel Kehoe

When i install my app as an exploded war file in webapps it runs fine
but when I install it using Tomcat Web Application Manager it fails on
getServletContext().getRealPath("");

What's the deal? I want to set a path to a log file by obtaining the
app realpath and then subtracting "/webapps/" and substituting
"/logs/". Is there a better way to do that?

Daniel
[EMAIL PROTECTED]

On Tue, 13 Aug 2002 03:25:30 UT, "Daniel Kehoe" <[EMAIL PROTECTED]>
said:
> > Here's how to install a web app using the Tomcat Web Application
> > Manager After trial and error, here's what works for files in a local Windows
> > file system:
> > Path: "/crossbar"
> Config URL: "file:///C:/Projects/Crossbar/dist/crossbar.xml"
> WAR URL: "file:///C:/Projects/Crossbar/dist/crossbar.war"
> > 
> > The "Path" is the context name you want for the web app, like
> > http://localhost:8080/crossbar/.
> > 
> > The "Config URL" is a path to a file that contains the parameters you
> > would otherwise add to the server.xml file (or add to the webapps
> > directory as a file "crossbar.xml" under the new TC4.1 scheme).
> > 
> > The "WAR URL" is the path to the war file. 
> It COULD begin with "jar:file://" and end with "!/" but it doesn't have
> to.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help Please... Mod_jk +Manager App

2002-08-12 Thread Jack Galo

Hi,
 I have tomcat 4.03 and apache 1.3, installed and
running fine. My issue, is when I deploy a web
application using tomcat's manager service, then the
conf/auto/mod_jk.conf is not regenerated.

How do I configure tomcat to regenerate the
mod_jk.conf file when the manager service deploys a
new web application?

Thanks


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: please help! hard returns in TOMCAT what the heck?!

2002-08-12 Thread Richard Diaz

duh, use out.print

sorry about that =)

Rich


--- Richard Diaz <[EMAIL PROTECTED]> wrote:
> the following jsp code:
> 
> out.println(" value='");
> out.println(MyArray[i].getScope());
> out.println("'>");
> out.println(" value='0'>");
> 
> results in this output:
> 
> 
> 
> 
> 
> Is there a way to STOP the hardreturns that are
> being
> inserted?
> 
> thanks a bunch =)
> 
> Rich
> 
> 
> 
> =
> 
> 
> __
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


=


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




please help! hard returns in TOMCAT what the heck?!

2002-08-12 Thread Richard Diaz

the following jsp code:

out.println("");
out.println("");

results in this output:





Is there a way to STOP the hardreturns that are being
inserted?

thanks a bunch =)

Rich



=


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: StandardWrapperFacade?!

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Maia Zaharieva wrote:

> Date: Mon, 12 Aug 2002 14:25:45 +0200
> From: Maia Zaharieva <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: StandardWrapperFacade?!
>
> hi all,
> i am using tomcat 4.0.1. and i keep getting the following exception while
> starting my servlet:
>  StandardManager[/templateconfig] Exception loading sessions from persistent
> storage java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException:
> org.apache.catalina.core.StandardWrapperFacade
> .
> Caused by: java.io.NotSerializableException:
> org.apache.catalina.core.StandardWrapperFacade
>
> does anyone know why it happens?
>

The only reason I can think of that this might happen is if someone tried
to store a reference to a ServletConfig object (which Tomcat implements as
o.a.c.c.StandardWrapperFacade) in a session.  That's not a good idea.

> thanks,
> maia
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Jacob Hookom


Again, you are the man.

Thanks for the quick responses,
Jake

| Loading all the roles into GenericPrincipal is just the way that the
| existing Realm implementations do it.  Nothing stops you from using a
| Principal implementation that doesn't contain the roles, and make your
| Realm.hasRole() implementation do database lookups for the particular
role
| in question.  Note that your Realm implementation acts as a Factory
for
| the Principal -- you can override RealmBase.authenticate() to return
| whatever kind of Principal you want, as long as you override hasRole()
| also.  For example, it would be straightforward to create a Realm
| implementation that implemented every call to hasRole() as a database
| lookup -- although this will be slower than the current approach, it
won't
| have the memory overhead of storing all the roles (or the
computational
| overhead of looking all of them up).
|
| 
| > Much Appreciated,
| > Jake Hookom
| >
| 
| Craig
| 
| 
| --
| To unsubscribe, e-mail:   
| For additional commands, e-mail: 
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan

Oops ... one correction below.

On Mon, 12 Aug 2002, Craig R. McClanahan wrote:

> Date: Mon, 12 Aug 2002 20:42:48 -0700 (PDT)
> From: Craig R. McClanahan <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: [Q] Realms, Principals, et al...
>
> See below.
>
> On Mon, 12 Aug 2002, Jacob Hookom wrote:
>
> > Date: Mon, 12 Aug 2002 22:09:11 -0500
> > From: Jacob Hookom <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: [Q] Realms, Principals, et al...
> >
> >
> >
> > | -Original Message-
> > | From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > | Sent: Monday, August 12, 2002 9:27 PM
> > | To: Tomcat Users List
> > | Subject: RE: [Q] Realms, Principals, et al...
> > |
> > |
> > |
> > | On Mon, 12 Aug 2002, Jacob Hookom wrote:
> > |
> > | > Date: Mon, 12 Aug 2002 21:02:15 -0500
> > | > From: Jacob Hookom <[EMAIL PROTECTED]>
> > | > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > | > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > | > Subject: RE: [Q] Realms, Principals, et al...
> > | >
> > | > | Just as a simple example, consider the concept of "group" that
> > many
> > | > | security environments define.  Either of the following mappings
> > would
> > | > be
> > | > | perfectly legal from the perspective of a servlet container (or a
> > J2EE
> > | > app
> > | > | server):
> > | > |
> > | > | * "Group == Role" (since Tomcat 3.x and 4.0 do not have any
> > specific
> > | > |   concept of a group, this is effectively what they implement).
> > | > |
> > | > | * "Group == set of roles inherited by all members of the group"
> > | > (supported
> > | > |   explicitly by Tomcat 4.1).
> > | > |
> > | > | The details of how role is mapped to real-world things is up to
> > the
> > | > | container.
> > | > |
> > | >
> > | > How is group implemented then in 4.1 if we want to take advantage of
> > | > this feature?  I'm looking at the HttpServletRequest API which
> > involves
> > | > getting a requested Principal, but only Role is exposed via Strings.
> > | >
> > |
> > | If you look at the admin tool, you'll see that you can create users,
> > | groups, and roles.  Groups can have roles assigned to them (just like
> > | users can), as well as users who are members.  And, of course, users
> > can
> > | be members of more than one group.
> > |
> > | When an isUserInRole() check is performed, Tomcat performs a union of
> > all
> > | the roles assigned to the user individually, and all the roles
> > assigned to
> > | groups that this user is a member of.
> > |
> > | Stored in the tomcat-users.xml file, you'll see an element for each
> > | , an element for each , and an element for each .
> > The
> > | best wasy to see what's possible is to add some of these through the
> > admin
> > | tool, and then go examine $CATALINA_HOME/conf/tomcat-users.xml
> > afterwards.
> > |
> > | > Is the presumption that we cast to our own Principal (implements
> > User)
> > | > and do verification based on the now exposed groups?  Granted I
> > would
> > | > start with my own UserRealm extending RealmBase with a UserDatabase
> > of
> > | > my own.
> > | >
> > |
> > | As I said in an earlier email, groups are ***not*** exposed to a
> > webapp
> > | through the servlet apis.  The only difference is that you can assign
> > | roles once to a group instead of having to assign all of them
> > individually
> > | to each member, in the user database.
> > |
> > | There is no change to how security constraints are defined, or what
> > | isUserInRole returns - that all still happens in terms of roles.
> >
> > So, groups are implemented within the context of Tomcat's
> > admin/management,
>
> Yes.
>
> > not as a feature in a new Servlet API,
>
> That's true.
>
> > or Catalina's
> > general API.
> >
>
> That's true also.
>
> > If I were to implement Realm and return a ProxyPrincipal that would be
> > tied back to my DB, I could theoretically write my own Role schema with
> > my own group implementation; as long as I could provide accurate
> > authorization through Realm.hasRole(Principal,String).  Other than that,
> > Tomcat won't have any issues?
> >
>
> Absolutely fine.  Be sure to put the Realm implementation class in
> common/classes or common/lib so that both Tomcat and your webapp can see
> it.
>

Sorry ... I meant the *Principal* implementation class.  And that's
actually only necessary if your webapp wants to subclass it to access
private information.  If the webapp doesn't do that, then the Principal
implementation class can be in server/classes or server/lib along with the
Realm implementation class.

> Tomcat uses Realm.authenticate() and Realm.hasRole() according to the
> contracts described in the Javadocs -- whatever your Realm implementation
> does to satisfy those calls is up to you.
>
> > I guess my main concern is writing an implementation that fits the needs
> > of m

RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan

See below.

On Mon, 12 Aug 2002, Jacob Hookom wrote:

> Date: Mon, 12 Aug 2002 22:09:11 -0500
> From: Jacob Hookom <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: [Q] Realms, Principals, et al...
>
>
>
> | -Original Message-
> | From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> | Sent: Monday, August 12, 2002 9:27 PM
> | To: Tomcat Users List
> | Subject: RE: [Q] Realms, Principals, et al...
> |
> |
> |
> | On Mon, 12 Aug 2002, Jacob Hookom wrote:
> |
> | > Date: Mon, 12 Aug 2002 21:02:15 -0500
> | > From: Jacob Hookom <[EMAIL PROTECTED]>
> | > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> | > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> | > Subject: RE: [Q] Realms, Principals, et al...
> | >
> | > | Just as a simple example, consider the concept of "group" that
> many
> | > | security environments define.  Either of the following mappings
> would
> | > be
> | > | perfectly legal from the perspective of a servlet container (or a
> J2EE
> | > app
> | > | server):
> | > |
> | > | * "Group == Role" (since Tomcat 3.x and 4.0 do not have any
> specific
> | > |   concept of a group, this is effectively what they implement).
> | > |
> | > | * "Group == set of roles inherited by all members of the group"
> | > (supported
> | > |   explicitly by Tomcat 4.1).
> | > |
> | > | The details of how role is mapped to real-world things is up to
> the
> | > | container.
> | > |
> | >
> | > How is group implemented then in 4.1 if we want to take advantage of
> | > this feature?  I'm looking at the HttpServletRequest API which
> involves
> | > getting a requested Principal, but only Role is exposed via Strings.
> | >
> |
> | If you look at the admin tool, you'll see that you can create users,
> | groups, and roles.  Groups can have roles assigned to them (just like
> | users can), as well as users who are members.  And, of course, users
> can
> | be members of more than one group.
> |
> | When an isUserInRole() check is performed, Tomcat performs a union of
> all
> | the roles assigned to the user individually, and all the roles
> assigned to
> | groups that this user is a member of.
> |
> | Stored in the tomcat-users.xml file, you'll see an element for each
> | , an element for each , and an element for each .
> The
> | best wasy to see what's possible is to add some of these through the
> admin
> | tool, and then go examine $CATALINA_HOME/conf/tomcat-users.xml
> afterwards.
> |
> | > Is the presumption that we cast to our own Principal (implements
> User)
> | > and do verification based on the now exposed groups?  Granted I
> would
> | > start with my own UserRealm extending RealmBase with a UserDatabase
> of
> | > my own.
> | >
> |
> | As I said in an earlier email, groups are ***not*** exposed to a
> webapp
> | through the servlet apis.  The only difference is that you can assign
> | roles once to a group instead of having to assign all of them
> individually
> | to each member, in the user database.
> |
> | There is no change to how security constraints are defined, or what
> | isUserInRole returns - that all still happens in terms of roles.
>
> So, groups are implemented within the context of Tomcat's
> admin/management,

Yes.

> not as a feature in a new Servlet API,

That's true.

> or Catalina's
> general API.
>

That's true also.

> If I were to implement Realm and return a ProxyPrincipal that would be
> tied back to my DB, I could theoretically write my own Role schema with
> my own group implementation; as long as I could provide accurate
> authorization through Realm.hasRole(Principal,String).  Other than that,
> Tomcat won't have any issues?
>

Absolutely fine.  Be sure to put the Realm implementation class in
common/classes or common/lib so that both Tomcat and your webapp can see
it.

Tomcat uses Realm.authenticate() and Realm.hasRole() according to the
contracts described in the Javadocs -- whatever your Realm implementation
does to satisfy those calls is up to you.

> I guess my main concern is writing an implementation that fits the needs
> of my project without extending RealmBase or GenericPrincipal and
> sticking to the java.security.Principal and org.apache.calalina.Realm
> interfaces.  Because of the amount of permissions that must be checked,
> it's not ideal to load all roles upon authentication.
>

Loading all the roles into GenericPrincipal is just the way that the
existing Realm implementations do it.  Nothing stops you from using a
Principal implementation that doesn't contain the roles, and make your
Realm.hasRole() implementation do database lookups for the particular role
in question.  Note that your Realm implementation acts as a Factory for
the Principal -- you can override RealmBase.authenticate() to return
whatever kind of Principal you want, as long as you override hasRole()
also.  For example, it would be straightforward to create a Realm
implementation that implemented every call to has

Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Daniel Kehoe

On Mon, 12 Aug 2002 22:08:50 -0500, "Jacob Kjome" <[EMAIL PROTECTED]> said:
> 
> You shouldn't have backslashes when creating a file: protocol URL (although 
> Java seems somewhat forgiving) and you shouldn't be using the jar: protocol 
> for this scenario.  Using the jar: protocol and with the "!" at the end is 
> only if you were going to try to access a resource inside the archive for 
> direct viewing What you want is:
> 
> file:///C:/Projects/Crossbar/dist/crossbar.war

Yep, that works, too. So corrections below:

On Tue, 13 Aug 2002 03:12:24 UT, "Daniel Kehoe" <[EMAIL PROTECTED]>
said:
> Here's how to install a web app using the Tomcat Web Application
> Manager After trial and error, here's what works for files in a local Windows
> file system:
> Path: "/crossbar"
Config URL: "file:///C:/Projects/Crossbar/dist/crossbar.xml"
WAR URL: "file:///C:/Projects/Crossbar/dist/crossbar.war"
> 
> The "Path" is the context name you want for the web app, like
> http://localhost:8080/crossbar/.
> 
> The "Config URL" is a path to a file that contains the parameters you
> would otherwise add to the server.xml file (or add to the webapps
> directory as a file "crossbar.xml" under the new TC4.1 scheme).
> 
> The "WAR URL" is the path to the war file. 
It COULD begin with "jar:file://" and end with "!/" but it doesn't have
to.

-- 
  Daniel
  [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Daniel Kehoe

Here's how to install a web app using the Tomcat Web Application
Manager.

In the Tomcat Web Application Manager (version 4.1.8beta) at
http://localhost:8080/manager/html/install/
in the table row below "Install" there are
three text input fields:
"Path:   Config URL:   WAR URL: " plus the Install button.

After trial and error, here's what works for files in a local Windows
file system:
Path: "/crossbar"
Config URL: "file://C:\Projects\Crossbar\dist\crossbar.xml"
WAR URL: "jar:file://C:\Projects\Crossbar\dist\crossbar.war!/"

The "Path" is the context name you want for the web app, like
http://localhost:8080/crossbar/.

The "Config URL" is a path to a file that contains the parameters you
would otherwise add to the server.xml file (or add to the webapps
directory as a file "crossbar.xml" under the new TC4.1 scheme).

The "WAR URL" is the path to the war file. It begins with "jar:file://"
and ends with "!/".




-- 
  Daniel
  [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Jacob Hookom



| -Original Message-
| From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
| Sent: Monday, August 12, 2002 9:27 PM
| To: Tomcat Users List
| Subject: RE: [Q] Realms, Principals, et al...
| 
| 
| 
| On Mon, 12 Aug 2002, Jacob Hookom wrote:
| 
| > Date: Mon, 12 Aug 2002 21:02:15 -0500
| > From: Jacob Hookom <[EMAIL PROTECTED]>
| > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
| > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
| > Subject: RE: [Q] Realms, Principals, et al...
| >
| > | Just as a simple example, consider the concept of "group" that
many
| > | security environments define.  Either of the following mappings
would
| > be
| > | perfectly legal from the perspective of a servlet container (or a
J2EE
| > app
| > | server):
| > |
| > | * "Group == Role" (since Tomcat 3.x and 4.0 do not have any
specific
| > |   concept of a group, this is effectively what they implement).
| > |
| > | * "Group == set of roles inherited by all members of the group"
| > (supported
| > |   explicitly by Tomcat 4.1).
| > |
| > | The details of how role is mapped to real-world things is up to
the
| > | container.
| > |
| >
| > How is group implemented then in 4.1 if we want to take advantage of
| > this feature?  I'm looking at the HttpServletRequest API which
involves
| > getting a requested Principal, but only Role is exposed via Strings.
| >
| 
| If you look at the admin tool, you'll see that you can create users,
| groups, and roles.  Groups can have roles assigned to them (just like
| users can), as well as users who are members.  And, of course, users
can
| be members of more than one group.
| 
| When an isUserInRole() check is performed, Tomcat performs a union of
all
| the roles assigned to the user individually, and all the roles
assigned to
| groups that this user is a member of.
| 
| Stored in the tomcat-users.xml file, you'll see an element for each
| , an element for each , and an element for each .
The
| best wasy to see what's possible is to add some of these through the
admin
| tool, and then go examine $CATALINA_HOME/conf/tomcat-users.xml
afterwards.
| 
| > Is the presumption that we cast to our own Principal (implements
User)
| > and do verification based on the now exposed groups?  Granted I
would
| > start with my own UserRealm extending RealmBase with a UserDatabase
of
| > my own.
| >
| 
| As I said in an earlier email, groups are ***not*** exposed to a
webapp
| through the servlet apis.  The only difference is that you can assign
| roles once to a group instead of having to assign all of them
individually
| to each member, in the user database.
| 
| There is no change to how security constraints are defined, or what
| isUserInRole returns - that all still happens in terms of roles.

So, groups are implemented within the context of Tomcat's
admin/management, not as a feature in a new Servlet API, or Catalina's
general API.

If I were to implement Realm and return a ProxyPrincipal that would be
tied back to my DB, I could theoretically write my own Role schema with
my own group implementation; as long as I could provide accurate
authorization through Realm.hasRole(Principal,String).  Other than that,
Tomcat won't have any issues?

I guess my main concern is writing an implementation that fits the needs
of my project without extending RealmBase or GenericPrincipal and
sticking to the java.security.Principal and org.apache.calalina.Realm
interfaces.  Because of the amount of permissions that must be checked,
it's not ideal to load all roles upon authentication.

Much Appreciated,
Jake Hookom

| 
| > Best Regards,
| > Jake Hookom
| >
| 
| Craig
| 
| 
| --
| To unsubscribe, e-mail:   
| For additional commands, e-mail: 
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JNDI JDBC COnnection pooling problem...

2002-08-12 Thread Andrew

Try changing the name of your parameter from 'user' to 'username'


That worked for me with another driver (MSSQL Server JDBC Driver)


- Andrew

> -Original Message-
> From: Alexander Wallace [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, August 12, 2002 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: JNDI JDBC COnnection pooling problem...
> 
> 
> Hello. This has to be a very simple one for those who know.
> 
> I'm getting a java.lang.NullPointerException in my app, in 
> the second line here:
> 
> Context ctx = (Context) new InitialContext().lookup("java:comp/env");
> conn = ((DataSource) 
> ctx.lookup("jdbc/pgsql")).getConnection(); **Error happens here**
> 
> And have the following in my server.xml (I put my whole 
> context in case my error is there) 
> 
>  reloadable="true" crossContext="true">
> prefix="localhost_lto_log." suffix=".txt"
>   timestamp="true"/>
>  value="15"/>
>value="context.param.value" override="false"/>
> 
>  type="javax.sql.DataSource"/>
>   
>
> userawallace
>
> passwordpasswd
> driverClassName
>   org.postgresql.Driver
> driverName
>  
> jdbc:postgresql://10.100.101.1/awallace
>   
>type="javax.mail.Session"/>
>   
> 
>   mail.smtp.host
>   localhost
> 
>   
> 
>  debug="99"
> driverName="org.postgresql.Driver"
>
> connectionURL="jdbc:postgresql://10.100.101.1/awallace?user=aw
> allace;password=passwd"
> userTable="tbl_users" 
> userNameCol="user_name" userCredCol="password"
> userRoleTable="user_roles" 
> roleNameCol="role_name"
> digest="MD5"/>
> 
> 
> 
> 
> Thank you in advance.
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Jacob Kjome


You shouldn't have backslashes when creating a file: protocol URL (although 
Java seems somewhat forgiving) and you shouldn't be using the jar: protocol 
for this scenario.  Using the jar: protocol and with the "!" at the end is 
only if you were going to try to access a resource inside the archive for 
direct viewing.

An example of that can be seen on my web site here (using Mozilla):
http://www.visi.com/~hoju/resources_test.html

which uses img tags pointing to the following image locations:

jar:http://www.visi.com/~hoju/assets/resources/resources_test.jar!/images/apache_pb.gif
and
jar:file:///C:/resources_test.jar!/images/apache_pb.gif

What you want is:

file:///C:/Projects/Crossbar/dist/crossbar.war


Jake

At 06:37 PM 8/12/2002 -0700, you wrote:


>On Tue, 13 Aug 2002, Daniel Kehoe wrote:
>
> > Date: Tue, 13 Aug 2002 01:32:48 UT
> > From: Daniel Kehoe <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: web app mgr syntax for a Windows war location
> >
> > On Mon, 12 Aug 2002 17:38:57 -0700 (PDT), "Craig R. McClanahan"
> > <[EMAIL PROTECTED]> said:
> > > this should work:
> > > jar:file:d:\Projects//crossbar.war!/
> >
> > I tried
> > WAR URL: "jar:file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
> > Message: FAIL - Encountered exception java.net.MalformedURLException:
> > no protocol
> > and tried
> > WAR URL: "file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
> > Message: FAIL - Encountered exception java.net.MalformedURLException:
> > no protocol:
> > and tried
> > WAR URL: "C:\Projects/Crossbar/dist/crossbar.war!/"
> > Message: FAIL - Invalid application URL
> > C:\Projects/Crossbar/dist/crossbar.war!/ was specified
> >
> > When I use the "ant install" target I see (in my Tomcat log file):
> > "Manager: install: Installing web application at '/crossbar' from
> > 'file://C:\Projects\Crossbar/build'"
> > but variations on that don't work either.
> >
> > The docs at
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
> > say "The supported syntax for a URL referring to a WAR file is
> > described on the Javadocs page for the java.net.JarURLConnection class"
> > but the javadoc only gives examples for "http" not "file" protocol.
> >
>
>And I only use Linux, so I'm not going to be much help :-(.
>
> > > Is there a reason you're creating a WAR instead of just deploying a
> > > directory directly (like the example build.xml file does)?
> >
> > I want to give simple instructions for a user to download and deploy my
> > app, like:
> > "Download the war file. Use the TC W.A.M. to install the war file from
> > your downloads directory."
> >
> > (I can go back to saying "copy the war file to /webapps and
> > restart TC" but I still want to know how I'm supposed to use the TC
> > W.A.M.!).
> >
>
>
>
> > > > Also, what is the field "Config URL:" ?
> > > Where do you see this term being used?
> >
> > In the TC W.A.M. at
> > http://localhost:8080/manager/html/install/
> > in the table row below "Install" there are
> > three text input fields:
> > "Path:   Config URL:   WAR URL: " plus the Install button.
> >
>
>Sorry ... I've never used the html interface on the manager webapp, so I
>haven't got a clue what that is all about.  My instructions above were for
>using the non-HTML-ized version.
>
> >
> > --
> >   Daniel
> >   [EMAIL PROTECTED]
> >
>
>Criag
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 



RE: JDBC Realm Error --Can"t access database

2002-08-12 Thread Andrew

Your database does not support the disabling of AutoCommit, which
probably means it doesn't support transactions.  

Your Choices:

1) You might see if you can find a MySQL driver that doesn't throw an
exception when you try to disable AutoCommit

2) Change rdbms's

3) Alter the Realm source code and compile without the AutoCommit line

4) Report it as a bug and see what happens.  Since the call is compliant
with JDBC and your DB obviously isn't, I don't think they will do much.
But it can't hurt to ask.

- Andrew

> -Original Message-
> From: khozaima shakir [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, August 12, 2002 6:29 PM
> To: [EMAIL PROTECTED]
> Subject: RE: JDBC Realm Error --Can"t access database
> 
> 
> >Try removing your username and password info from your connection 
> >string and using the 'connectionName' and 'connectionPassword'
> _
> Hi, I did that , this time I got following error, sorry  this 
> question is 
> off topic ! but can you suggest a fix for that please? 
> Thanks Khozaima. Error Message: Starting service 
> Tomcat-Standalone Apache Tomcat/4.0.4
> Catalina.start: LifecycleException:  Exception opening 
> database connection:  
> jav
> a.sql.SQLException: Cannot disable AUTO_COMMIT
> LifecycleException:  Exception opening database connection:  
> java.sql.SQLExcepti
> on: Cannot disable AUTO_COMMIT
> at 
> org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> 
> at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
> )
> at 
> org.apache.catalina.core.StandardService.start(StandardService.java:3
> 88)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506
> )
> at 
> org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> at 
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at 
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at 
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)>
> >- Andrew
> >
> > > -Original Message-
> > > From: khozaima shakir [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, August 12, 2002 10:42 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: JDBC Realm Error --Can"t access database
> > >
> > >
> > > Hi all, need help, please!
> > > I am trying to set up JDBCRealm. I edit server.xml as:-  > > className="org.apache.catalina.realm.JDBCRealm" debug="99"
> > >  driverName="org.gjt.mm.mysql.Driver"
> > >
> > > connectionURL="jdbc:mysql://mysql.wpi.edu/EMSDATA?user=skhuzem
> > > a;password=pPqrAb"
> > >   userTable="USERS" userNameCol="USER_NAME" 
> > > userCredCol="USER_PASS"
> > >   userRoleTable="USER_ROLES" 
> roleNameCol="ROLE_NAME" /> When 
> > > i restart the tomcat after this, i get error message as Starting 
> > > service Tomcat-Standalone Apache Tomcat/4.0.4
> > > Catalina.start: LifecycleException:  Exception opening database 
> > > connection:
> > > java.sql.SQLException: Invalid authorization 
> specification: Access 
> > > denied for user:'skhuzema;[EMAIL PROTECTED]' (Using 
> > > password: NO)
> > > LifecycleException:  Exception opening database connection:
> > > java.sql.SQLException: Invalid authorization 
> specification: Access 
> > > denied for user: 'skhuzema;[EMAIL PROTECTED]' (Using 
> > > password: NO)
> > > at
> > > org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> > > at
> > > 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> > > at
> > > 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> > > at 
> > > org.apache.catalina.core.StandardService.start(StandardService
> > > .java:388)
> > > at
> > > 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> > > at
> > > org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> > > at
> > > org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> > >   at
> > > org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> > > at java.lang.reflect.Method.invoke(Native Method)
> > >at
> > > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> > >
> > > The mysql database server is not on my local host (for 
> tomcat). Does 
> > > it look like the connection URL is not being parsed correctly? ( I
> > > tried changing
> > > the connectionURL string in server.xml and those were
> > > reflected in the error
> > > message and still got error as (Using Password: NO) Without
> > > setting up
> > > JDBCRealm, I can start the tomcat sucessfully and the servlet
> > > also access
> > > the database using the same url username and password
> > > can't figure out the fault... please help???!!

RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Jacob Hookom wrote:

> Date: Mon, 12 Aug 2002 21:02:15 -0500
> From: Jacob Hookom <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: [Q] Realms, Principals, et al...
>
> | Just as a simple example, consider the concept of "group" that many
> | security environments define.  Either of the following mappings would
> be
> | perfectly legal from the perspective of a servlet container (or a J2EE
> app
> | server):
> |
> | * "Group == Role" (since Tomcat 3.x and 4.0 do not have any specific
> |   concept of a group, this is effectively what they implement).
> |
> | * "Group == set of roles inherited by all members of the group"
> (supported
> |   explicitly by Tomcat 4.1).
> |
> | The details of how role is mapped to real-world things is up to the
> | container.
> |
>
> How is group implemented then in 4.1 if we want to take advantage of
> this feature?  I'm looking at the HttpServletRequest API which involves
> getting a requested Principal, but only Role is exposed via Strings.
>

If you look at the admin tool, you'll see that you can create users,
groups, and roles.  Groups can have roles assigned to them (just like
users can), as well as users who are members.  And, of course, users can
be members of more than one group.

When an isUserInRole() check is performed, Tomcat performs a union of all
the roles assigned to the user individually, and all the roles assigned to
groups that this user is a member of.

Stored in the tomcat-users.xml file, you'll see an element for each
, an element for each , and an element for each .  The
best wasy to see what's possible is to add some of these through the admin
tool, and then go examine $CATALINA_HOME/conf/tomcat-users.xml afterwards.

> Is the presumption that we cast to our own Principal (implements User)
> and do verification based on the now exposed groups?  Granted I would
> start with my own UserRealm extending RealmBase with a UserDatabase of
> my own.
>

As I said in an earlier email, groups are ***not*** exposed to a webapp
through the servlet apis.  The only difference is that you can assign
roles once to a group instead of having to assign all of them individually
to each member, in the user database.

There is no change to how security constraints are defined, or what
isUserInRole returns - that all still happens in terms of roles.

> Best Regards,
> Jake Hookom
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Jacob Hookom

| Just as a simple example, consider the concept of "group" that many
| security environments define.  Either of the following mappings would
be
| perfectly legal from the perspective of a servlet container (or a J2EE
app
| server):
| 
| * "Group == Role" (since Tomcat 3.x and 4.0 do not have any specific
|   concept of a group, this is effectively what they implement).
| 
| * "Group == set of roles inherited by all members of the group"
(supported
|   explicitly by Tomcat 4.1).
| 
| The details of how role is mapped to real-world things is up to the
| container.
| 

How is group implemented then in 4.1 if we want to take advantage of
this feature?  I'm looking at the HttpServletRequest API which involves
getting a requested Principal, but only Role is exposed via Strings.

Is the presumption that we cast to our own Principal (implements User)
and do verification based on the now exposed groups?  Granted I would
start with my own UserRealm extending RealmBase with a UserDatabase of
my own.

Best Regards,
Jake Hookom
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache 2 and Tomcat 4

2002-08-12 Thread Robert L Sowders

That's not quite how it works. 

The only edit you need to do in the httpd.conf is the LoadModule statement 
for the mod_jk2.dll.  Then assuming all your paths are correct in 
worker2.properties file, Tomcat will display a blue directory listing at 
http://localhost/examples.  See below for details on how to turn that off.

The URI statements in the workers2.properties file is used by mod_jk2 to 
direct traffic to Tomcat but only the directories listed and only for the 
file types listed.  That way you can have static and dynamic files in the 
same directory.

I'm sorry Michael, are you saying that Tomcat is refusing to show you the 
directory listing of the /examples directory???  Please let me know if you 
see a blue directory listing or not at http://localhost/examples

If what you want to do is to NOT have Tomcat display the directory listing 
of the examples directory then please see line 54 of the 
TOMCAT_HOME\conf\web.xml file and change true to false.  But then you must 
know that if you deny the directory listing and you do not have an 
index.html or index.jsp file there, nothing will be displayed.


listings
true







"Michael Remijan" <[EMAIL PROTECTED]>
08/12/2002 07:26 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" <[EMAIL PROTECTED]>
cc: 
Subject:RE: Apache 2 and Tomcat 4

...

I do have this done.  Right now I'm thinking that it has to do with the 
Apache configuration.  If I have directory browsing turned on, and an 
index.html file is not found, then apache will display the directory.  I'm 
hoping that if I turn directory browsing off, and it doesn't find 
index.html it'll forward the request to tomcat.  This sound like it'll 
work?




-Original Message-
From: Robert L Sowders [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 5:41 AM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: Apache 2 and Tomcat 4


You need to register the dairy as a Context in the server.xml file, 
something like this assuming the path is /dairy



If your installation is working correctly at http://localhost:8080 then 
please read http://localhost:8080/tomcat-docs/appdev/index.html for an 
easy way to deploy applications under 4.1.x. using Ant.

Good luck

rls





"Michael Remijan" <[EMAIL PROTECTED]>
08/11/2002 02:57 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" <[EMAIL PROTECTED]>
cc: 
Subject:RE: Apache 2 and Tomcat 4

Robert,

Yes, but I don't and can't use an index.html.  I need index.jsp so I can 
put a tag in the page that will do a redirect to another jsp page if need 
be.  I've setup workers2.properties like this:

[uri:/diary]
info=Diary webapp in the default context
context=/diary
debug=0

[uri:/diary/servlet/*]
info=Prefix mapping

[uri:/diary/do/*]
info=Prefix mapping

[uri:/diary/*.jsp]
info=Extension mapping


but still get a directory listing when I goto http://localhost/diary or 
http://localhost/diary/  So it's like apache isn't forwarding this request to tomcat.  
If I put 
in http://localhost/diary/index.jsp it works fine.





-Original Message-
From: Robert L Sowders [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 05, 2002 6:37 PM
To: Tomcat Users List
Subject: RE: Apache 2 and Tomcat 4


Mod_jk2 doesn't have anything to do with the default index page.  That is 
up to Apache or Tomcat depending on what dirs Tomcat is mounting with 
mod_jk2.  This is determined in the works2.properties file in the 
APACHE_HOME\conf directory. (*.jsp)

Tomcat is set to recognize the index.jsp as the default in it's 
directories already.  If you just want a page to look at instead of the 
directory listing for the example directory then a simple index.html will 
do just fine.

Have a look at TOMCAT_HOME\examples\servlets\index.html or the 
TOMCAT_HOME\examples\jsp\index.html.  Apache will hand you these pages so 
there's no need to do a index.jsp.  Remember let Apache and Tomcat do 
their respective jobs, static for Apache, and jsp for Tomcat.






"Michael Remijan" <[EMAIL PROTECTED]>
08/05/2002 12:52 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" <[EMAIL PROTECTED]>
cc: 
Subject:RE: Apache 2 and Tomcat 4

Robert,

I tracked it down.  I've been using jdk1.4.1beta.  Once I downloaded and 
installed jdk1.4.0 it started to work.  How do I get mod_jk2 to recognize 
index.jsp as the default page.  I obviously need that other than a 
directory listing.  I have index.jsp added to "DirectoryIndex" in 
httpd.conf and I have the welcome-file-list set in the web.xml's






-Original Message-
From: Robert L Sowders [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 05, 2002 1:03 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: Apache 2 and Tomcat 4


Hey Mike,

What do the apache log files say?  Chck there to see any errors during 
startup for Tomcat.  Check you

Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Craig R. McClanahan



On Tue, 13 Aug 2002, Daniel Kehoe wrote:

> Date: Tue, 13 Aug 2002 01:32:48 UT
> From: Daniel Kehoe <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: web app mgr syntax for a Windows war location
>
> On Mon, 12 Aug 2002 17:38:57 -0700 (PDT), "Craig R. McClanahan"
> <[EMAIL PROTECTED]> said:
> > this should work:
> > jar:file:d:\Projects//crossbar.war!/
>
> I tried
> WAR URL: "jar:file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
> Message: FAIL - Encountered exception java.net.MalformedURLException:
> no protocol
> and tried
> WAR URL: "file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
> Message: FAIL - Encountered exception java.net.MalformedURLException:
> no protocol:
> and tried
> WAR URL: "C:\Projects/Crossbar/dist/crossbar.war!/"
> Message: FAIL - Invalid application URL
> C:\Projects/Crossbar/dist/crossbar.war!/ was specified
>
> When I use the "ant install" target I see (in my Tomcat log file):
> "Manager: install: Installing web application at '/crossbar' from
> 'file://C:\Projects\Crossbar/build'"
> but variations on that don't work either.
>
> The docs at
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
> say "The supported syntax for a URL referring to a WAR file is
> described on the Javadocs page for the java.net.JarURLConnection class"
> but the javadoc only gives examples for "http" not "file" protocol.
>

And I only use Linux, so I'm not going to be much help :-(.

> > Is there a reason you're creating a WAR instead of just deploying a
> > directory directly (like the example build.xml file does)?
>
> I want to give simple instructions for a user to download and deploy my
> app, like:
> "Download the war file. Use the TC W.A.M. to install the war file from
> your downloads directory."
>
> (I can go back to saying "copy the war file to /webapps and
> restart TC" but I still want to know how I'm supposed to use the TC
> W.A.M.!).
>



> > > Also, what is the field "Config URL:" ?
> > Where do you see this term being used?
>
> In the TC W.A.M. at
> http://localhost:8080/manager/html/install/
> in the table row below "Install" there are
> three text input fields:
> "Path:   Config URL:   WAR URL: " plus the Install button.
>

Sorry ... I've never used the html interface on the manager webapp, so I
haven't got a clue what that is all about.  My instructions above were for
using the non-HTML-ized version.

>
> --
>   Daniel
>   [EMAIL PROTECTED]
>

Criag


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Daniel Kehoe

On Mon, 12 Aug 2002 17:38:57 -0700 (PDT), "Craig R. McClanahan"
<[EMAIL PROTECTED]> said:
> this should work:
> jar:file:d:\Projects//crossbar.war!/

I tried
WAR URL: "jar:file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
Message: FAIL - Encountered exception java.net.MalformedURLException:
no protocol
and tried
WAR URL: "file:C:\Projects/Crossbar/dist/crossbar.war!/" and got
Message: FAIL - Encountered exception java.net.MalformedURLException:
no protocol:  
and tried
WAR URL: "C:\Projects/Crossbar/dist/crossbar.war!/" 
Message: FAIL - Invalid application URL
C:\Projects/Crossbar/dist/crossbar.war!/ was specified

When I use the "ant install" target I see (in my Tomcat log file):
"Manager: install: Installing web application at '/crossbar' from
'file://C:\Projects\Crossbar/build'"
but variations on that don't work either.

The docs at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
say "The supported syntax for a URL referring to a WAR file is
described on the Javadocs page for the java.net.JarURLConnection class"
but the javadoc only gives examples for "http" not "file" protocol.

> Is there a reason you're creating a WAR instead of just deploying a
> directory directly (like the example build.xml file does)?

I want to give simple instructions for a user to download and deploy my
app, like:
"Download the war file. Use the TC W.A.M. to install the war file from
your downloads directory."

(I can go back to saying "copy the war file to /webapps and
restart TC" but I still want to know how I'm supposed to use the TC
W.A.M.!).

> > Also, what is the field "Config URL:" ?
> Where do you see this term being used?

In the TC W.A.M. at
http://localhost:8080/manager/html/install/
in the table row below "Install" there are
three text input fields:
"Path:   Config URL:   WAR URL: " plus the Install button.


-- 
  Daniel
  [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat 4 and localization ???

2002-08-12 Thread HAVENS,PETER (HP-Cupertino,ex3)

I am looking on information on how to provide localized content via Tomcat.
I did a search and the only information I have found from the following
archive of the Jakarta tomcat 3.2.3 pages
 
http://www.ingrid.org/jajakarta/tomcat/tomcat-3.2.3/doc/tomcat-localization-
howto.html
 
 
Does Tomcat 4 support localized content?  Is it still as is documented in
the above how to?
 
The example it gives is for providing a localized "index.html" file for a
web app called "myapp".  It specifies that you can either provide the file
in a form like index_.html or put it in a directory structure like
/myapp//index.html.
 
Does anyone know if this is supported?  I tried a couple of samples that did
not seem to work, but perhaps I am not setting the locale correctly.
 
Thanks in advance,
 
-Peter
 
---Here is the example from the above
link--

* File based organization for localized resource lookup

This type of organization of localized content attempts to find the
localized version of the resource queried based on the basename of the
resource, using the lookup conventions specified in
java.lang.ResourceBundle.
*   For example, assume the following scenario: 
*   User's Locale: fr_CA 
*   Webserver's Locale: es_AR 
*   docbase: /myapp 
*   User's URL query: /myapp/index.html 
This scheme will try to look up for the resource in the following priority
order: 
*   /myapp/index_fr_CA.html 
*   /myapp/index_fr.html 
*   /myapp/index_es_AR.html 
*   /myapp/index_es.html 
*   /myapp/index.html 
 
*   Docbase based organization for localized resource lookup
This type of organization of the localized resources attempts to find the
localized version of the resource queried based on the existence of a
localized document hierarchy under the 'docbase' directory. The organization
of the documents is similar to the one that JavaHelp uses.
For example, assume the following scenario: 
*   User's Locale: fr_CA 
*   Webserver's Locale: es_AR 
*   docbase: /myapp 
*   User's URL query: /myapp/index.html 
This scheme will try to look up for the resource in the following priority
order: 
*   /myapp/fr_CA/index.html 
*   /myapp/fr/index.html 
*   /myapp/es_AR/index.html 
*   /myapp/es/index.html 
*   /myapp/index.html 
 
 



Re: web app mgr syntax for a Windows war location

2002-08-12 Thread Craig R. McClanahan



On Tue, 13 Aug 2002, Daniel Kehoe wrote:

> Date: Tue, 13 Aug 2002 00:05:14 UT
> From: Daniel Kehoe <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: web app mgr syntax for a Windows war location
>
> Using the Tomcat Web Application Manager in 4.1.8beta, what is the
> syntax used to install a web app specifying a war file located in the
> Windows file system? There is no example in the docs at
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
>
> I tried "WAR URL:"
> jar:file:C:\Projects\\crossbar.war!/
> file:C:\Projects\\crossbar.war!/
> C:\Projects\\crossbar.war!/
> and various variations without the "!/" and replacing "\" with "\\" and
> "/" all to no avail.
>

I normally install directories rather than JAR files, but something like
this should work:

jar:file:d:\Projects//crossbar.war!/

Is there a reason you're creating a WAR instead of just deploying a
directory directly (like the example build.xml file does)?


> Also, what is the field "Config URL:" ?

Where do you see this term being used?

> --
>   Daniel
>   [EMAIL PROTECTED]
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




web app mgr syntax for a Windows war location

2002-08-12 Thread Daniel Kehoe

Using the Tomcat Web Application Manager in 4.1.8beta, what is the
syntax used to install a web app specifying a war file located in the
Windows file system? There is no example in the docs at 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

I tried "WAR URL:"
jar:file:C:\Projects\\crossbar.war!/
file:C:\Projects\\crossbar.war!/
C:\Projects\\crossbar.war!/
and various variations without the "!/" and replacing "\" with "\\" and
"/" all to no avail.

Also, what is the field "Config URL:" ?
-- 
  Daniel
  [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: user's roles verification

2002-08-12 Thread Alexander Wallace

Excellent! This sounds just great!

Thanks to all that helped!

On Mon, 2002-08-12 at 22:55, Craig R. McClanahan wrote:
> 
> 
> On 12 Aug 2002, Alexander Wallace wrote:
> 
> > Date: 12 Aug 2002 15:43:58 +0100
> > From: Alexander Wallace <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: user's roles verification
> >
> >
> >
> > I've got (i think) Realms working. I need some advice for good
> > practices...
> >
> > My original idea (before hearing about realms and such) was to direct
> > all requests for any resource of my webapp to a servlet that would
> > verify user roles.
> >
> > Then I was told here that i would run into a lot of problems if I did
> > that. And was recomended to check filters and that realms are for this
> > purpose.
> >
> > Here is my main question: Using realms, should each jsp verify the role
> > of the user trying to access it? Or is there a more elegant way to do
> > it, to keep code in jsp minimum and centralize that task?
> >
> > The verification will have to happen for each one of the pages in my web
> > app..
> >
> > Thank you in advance!
> >
> 
> Using Filters would be for if you want your app to do its own checking.
> 
> Using Realms (as provided by Tomcat) implies that you are defining a
>  in your web application that says, in essence, "in
> order to access the following URLs, the user must be authenticated *and*
> possess one of the following roles".  If you are using this approach, your
> app doesn't have to do a thing (other than define the security constraint
> element in web.xml) -- the container does all the work for you.
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ADMINS: Ban a user?

2002-08-12 Thread micael


I personally don't understand why this bothers anyone.  No one has to 
answer anything.  If you don't like it, go to the next one.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JDBC Realm Error --Can"t access database

2002-08-12 Thread khozaima shakir

>Try removing your username and password info from your connection string
>and using the 'connectionName' and 'connectionPassword'
_
Hi, I did that , this time I got following error, sorry  this question is 
off topic ! but can you suggest a fix for that please?
Thanks
Khozaima.
Error Message:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database connection:  
jav
a.sql.SQLException: Cannot disable AUTO_COMMIT
LifecycleException:  Exception opening database connection:  
java.sql.SQLExcepti
on: Cannot disable AUTO_COMMIT
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)>
>- Andrew
>
> > -Original Message-
> > From: khozaima shakir [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 12, 2002 10:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: JDBC Realm Error --Can"t access database
> >
> >
> > Hi all, need help, please!
> > I am trying to set up JDBCRealm. I edit server.xml as:-
> >  >  driverName="org.gjt.mm.mysql.Driver"
> >
> > connectionURL="jdbc:mysql://mysql.wpi.edu/EMSDATA?user=skhuzem
> > a;password=pPqrAb"
> >   userTable="USERS" userNameCol="USER_NAME"
> > userCredCol="USER_PASS"
> >   userRoleTable="USER_ROLES" roleNameCol="ROLE_NAME"
> > /> When i restart the tomcat after this, i get error message
> > as Starting service Tomcat-Standalone Apache Tomcat/4.0.4
> > Catalina.start: LifecycleException:  Exception opening
> > database connection:
> > java.sql.SQLException: Invalid authorization specification:
> > Access denied
> > for user:'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
> > LifecycleException:  Exception opening database connection:
> > java.sql.SQLException: Invalid authorization specification:
> > Access denied
> > for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
> > at
> > org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> > at
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> > at
> > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> > at
> > org.apache.catalina.core.StandardService.start(StandardService
> > .java:388)
> > at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> > at
> > org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> > at
> > org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> >   at
> > org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> > at java.lang.reflect.Method.invoke(Native Method)
> >at
> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> >
> > The mysql database server is not on my local host (for
> > tomcat). Does it look
> > like the connection URL is not being parsed correctly? ( I
> > tried changing
> > the connectionURL string in server.xml and those were
> > reflected in the error
> > message and still got error as (Using Password: NO) Without
> > setting up
> > JDBCRealm, I can start the tomcat sucessfully and the servlet
> > also access
> > the database using the same url username and password
> > can't figure out the fault... please help???
> > What other configs, do I need to do in addition to the one in
> > server.xml,
> > just to get tomcat started?
> > Khozaima
> >
> >
> >
> >
> >
> > _
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> >  [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: 
> >
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Quick Question

2002-08-12 Thread Larry Meadors

If you are only reading the file, you could also put it in your
$/WEB-INF/classes folder and use the class loader to get an input
stream. That way, if you jar/war the file up, it will still find it.
Like this:

InputStream is = 
  Thread.
  currentThread().
  getContextClassLoader().
  getResourceAsStream("config.txt");

Also, a change to config.txt will trigger a reload, so in development,
you do not need to restart or otherwise force the file to get reloaded.

Not sure if this makes sense in your case, but it is another option.

Larry

>>> [EMAIL PROTECTED] 08/12/02 16:14 PM >>>
getServletContext.getRealPath("/config.txt") will return the path to
config.txt in the root of your apps directory.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 5:00 PM
> To: Tomcat Users List
> Subject: Quick Question
> 
> 
> Hi all,
> 
> I wrote a simple java bean that reads a txt file, the problem 
> is where do 
> I need to put the txt file??...
> What is the default directory in Tomcat??
> 
> when I put something like this in my java bean : 
> FileReader("config.txt") 
> Where does tomcat look for that file?
> 
> thanks
> Alex
> 

--
To unsubscribe, e-mail:  

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: .shtml with 4.0.4

2002-08-12 Thread rsequeira


Well can't pin-point the problem since you haven't provided any clues. What
do the DocumentRoot, Context, and JkMount statements say? How about
displaying the directory structure of where the jsps and shtml files are
located.
How about displaying the appropriate portions of the log in here. Might
help in quickly resolving your problem.

RS



   

  MadBit   

   <[EMAIL PROTECTED]>   

   cc: 

  08/12/02 05:07 PMSubject:  Re: .shtml with 4.0.4 

  Please respond to

  "Tomcat Users

  List"

   

   






 Any changes to httpd.conf or web.xml files? I have a 404 from
tomcat. The pages are located on apache.

[EMAIL PROTECTED] escribió::

 >First the  isn't supported by Tomcat. It
isn't a
 >standard tag i.e. it isn't defined in the servlet specs. You should use
 > instead. Convert  the .shtml files (be careful if you
have
 >SSI includes or CGI processing in the shtml files) that contain the
 > tags to .jsps.
 >And then replace the
 >
 >with
 >
 >
 >
 >RS
 >
 >
 >
 >
 >

 >  MadBit

 >.com>cc:

 >   Subject:  .shtml with
4.0.4
 >  08/12/02 04:45 AM

 >  Please respond to

 >  "Tomcat Users

 >  List"

 >

 >

 >
 >
 >
 >
 >
 >Hello.
 >
 >I'm using Tomcat 4.0.4 with Apache 1.3.26 on Windows 2000.
 >
 >I want to use .shtml pages. In tomcat I enabled de SSI servlet and
 >mapping on web.xml,
 >and on Apache I enabled the AJP connector and enabled .shtml processing:
 >
 >
 >
 >>LoadModule jk_module modules/mod_jk.dll
 >>Addmodule mod_jk.c
 >>
 >>JkWorkersFile /webprg/tomcat/conf/jk/workers.properties
 >>JkLogFile /webprg/apache/logs/mod_jk.log
 >>JkLogLevel info
 >>
 >>
 >
 >
 >
 >AddType text/html .shtml
 >AddHandler server-parsed .shtml
 >
 >...
 >JkMount /*.jsp ajp13
 >JkMount /servlet/* ajp13
 >JkMOunt /*.shtml ajp13
 >
 >On a .shtml page I have a 
 >call. The called Class it's working fine calling directely via
 >'localhost/servlet/classpath.Class' URL but with the .shtml the Class
 >seems not to be called and the browser never end to load the page,
 >always it's on awaiting data state.
 >
 >Anyone can help me?
 >
 >   Thanks
 >
 >
 >Rogelio Herranz
 >[EMAIL PROTECTED]
 >
 >
 >
 >--
 >To unsubscribe, e-mail:   <
 >mailto:[EMAIL PROTECTED]>
 >For additional commands, e-mail: <
 >mailto:[EMAIL PROTECTED]>
 >
 >
 >
 >
 >
 >
 >
 >--
 >To unsubscribe, e-mail:

 >For additional commands, e-mail:

 >
 >
 >
 >






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







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Quick Question

2002-08-12 Thread Durham David Cntr 805CSS/SCBE

getServletContext.getRealPath("/config.txt") will return the path to config.txt in the 
root of your apps directory.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 5:00 PM
> To: Tomcat Users List
> Subject: Quick Question
> 
> 
> Hi all,
> 
> I wrote a simple java bean that reads a txt file, the problem 
> is where do 
> I need to put the txt file??...
> What is the default directory in Tomcat??
> 
> when I put something like this in my java bean : 
> FileReader("config.txt") 
> Where does tomcat look for that file?
> 
> thanks
> Alex
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat performance and load capability

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Michael Locasto wrote:

> Date: Mon, 12 Aug 2002 17:58:23 -0400
> From: Michael Locasto <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: tomcat performance and load capability
>
>
> >
> > - Our provider has uttered that running it on two machines (Solaris),
> > one containing the apache web server, the other server hosting tomcat
> > would be the way to do it. Since only a few popup's are HTML and all
> > other pages have to be handled by Tomcat anyway (I would say more than
> > 80% off all request are for JSP's), I am concerned if it really is a
> > good idea to have apache forwarding all pages to a different computer.
> > Since we HAVE to use our providers shared MySql, the database server was
> > not part of my performance consideration.
>
> having apache handle static content isn't a bad idea anyway.
>
> > - Which version of Tomcat is recommended (4.0.4 or 4.1.8)?
>
> 4.0.4 is the current "production quality" release, but the 4.1.x (4.1.9
> was just released) releases will probably give you better performance, as
> well as running with the jdk1.4. Many folks on this list have reported
> good things while running 4.1.x
>

Among other things, 4.1.x includes a completely rewritten JSP page
compiler.  One of the primary concerns was improving the performance of
the generated code for a JSP page, especially for pages that use lots of
custom tags (where 8x to 10x performance improvements have been observed).

That being said, there are many other critical success factors, including
proper configuration (75 just happens to be the default maximum number of
threads on the HTTP connector -- is that coincidental?) to which OS/JVM
combination you are running (the maximum simultaneous thread counts for
different combinations vary widely) to how fast your database accesses
run.  Performance tuning is almost always going to be very dependent on
the particular mix of technologies and behavior in *your* application.

> If you are concerned with relatively heavy load, you may wish to consider
> multiple Tomcat instances.
>
> Regards,
> Michael
>
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: .shtml with 4.0.4

2002-08-12 Thread MadBit


 Any changes to httpd.conf or web.xml files? I have a 404 from
tomcat. The pages are located on apache.

[EMAIL PROTECTED] escribió::

 >First the  isn't supported by Tomcat. It 
isn't a
 >standard tag i.e. it isn't defined in the servlet specs. You should use
 > instead. Convert  the .shtml files (be careful if you have
 >SSI includes or CGI processing in the shtml files) that contain the
 > tags to .jsps.
 >And then replace the
 >
 >with
 >
 >
 >
 >RS
 >
 >
 >
 >
 > 

 >  MadBit 

 >.com>cc: 

 >   Subject:  .shtml with 
4.0.4
 >  08/12/02 04:45 AM 

 >  Please respond to 

 >  "Tomcat Users 

 >  List" 

 > 

 > 

 >
 >
 >
 >
 >
 >Hello.
 >
 >I'm using Tomcat 4.0.4 with Apache 1.3.26 on Windows 2000.
 >
 >I want to use .shtml pages. In tomcat I enabled de SSI servlet and
 >mapping on web.xml,
 >and on Apache I enabled the AJP connector and enabled .shtml processing:
 >
 >
 >
 >>LoadModule jk_module modules/mod_jk.dll
 >>Addmodule mod_jk.c
 >>
 >>JkWorkersFile /webprg/tomcat/conf/jk/workers.properties
 >>JkLogFile /webprg/apache/logs/mod_jk.log
 >>JkLogLevel info
 >>
 >>
 >
 >
 >
 >AddType text/html .shtml
 >AddHandler server-parsed .shtml
 >
 >...
 >JkMount /*.jsp ajp13
 >JkMount /servlet/* ajp13
 >JkMOunt /*.shtml ajp13
 >
 >On a .shtml page I have a 
 >call. The called Class it's working fine calling directely via
 >'localhost/servlet/classpath.Class' URL but with the .shtml the Class
 >seems not to be called and the browser never end to load the page,
 >always it's on awaiting data state.
 >
 >Anyone can help me?
 >
 >   Thanks
 >
 >
 >Rogelio Herranz
 >[EMAIL PROTECTED]
 >
 >
 >
 >--
 >To unsubscribe, e-mail:   <
 >mailto:[EMAIL PROTECTED]>
 >For additional commands, e-mail: <
 >mailto:[EMAIL PROTECTED]>
 >
 >
 >
 >
 >
 >
 >
 >--
 >To unsubscribe, e-mail: 

 >For additional commands, e-mail: 

 >
 >
 >
 >






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ADMINS: Ban a user?

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Paul Brinkley wrote:

> [snip]
> Putting "URGENT" is another annoyance.  It conveys the notion that the
> asker didn't plan time wisely.  If you truly got blindsided by a
> last-second request by management to solve a problem, you can explain in
> the body of the message.  If your job is at stake, then your management
> needs to get its priorities straightened out, and until then you're
> probably better off somewhere else.

While many of us can feel the hair on our backs start to bristle whenever
we see the word "Urgent" in a subject line, we do need to cut people a
little slack in one important respect.  A very large number of the people
posting questions on this list are not native English speakers -- they are
struggling to get across the basics of their question, and are not
necessarily familiar with the nuances of word choices that we take for
granted.

So let's try showing a little bit of understanding, OK?

> End soapbox.

Likewise.

Craig McClanahan




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Quick Question

2002-08-12 Thread TOMITA_ALEX_NONLILLY

Hi all,

I wrote a simple java bean that reads a txt file, the problem is where do 
I need to put the txt file??...
What is the default directory in Tomcat??

when I put something like this in my java bean : 
FileReader("config.txt") 
Where does tomcat look for that file?

thanks
Alex



Re: tomcat performance and load capability

2002-08-12 Thread Michael Locasto


>
> - Our provider has uttered that running it on two machines (Solaris),
> one containing the apache web server, the other server hosting tomcat
> would be the way to do it. Since only a few popup's are HTML and all
> other pages have to be handled by Tomcat anyway (I would say more than
> 80% off all request are for JSP's), I am concerned if it really is a
> good idea to have apache forwarding all pages to a different computer.
> Since we HAVE to use our providers shared MySql, the database server was
> not part of my performance consideration.

having apache handle static content isn't a bad idea anyway.

> - Which version of Tomcat is recommended (4.0.4 or 4.1.8)?

4.0.4 is the current "production quality" release, but the 4.1.x (4.1.9
was just released) releases will probably give you better performance, as
well as running with the jdk1.4. Many folks on this list have reported
good things while running 4.1.x

If you are concerned with relatively heavy load, you may wish to consider
multiple Tomcat instances.

Regards,
Michael




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: user's roles verification

2002-08-12 Thread Craig R. McClanahan



On 12 Aug 2002, Alexander Wallace wrote:

> Date: 12 Aug 2002 15:43:58 +0100
> From: Alexander Wallace <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: user's roles verification
>
>
>
> I've got (i think) Realms working. I need some advice for good
> practices...
>
> My original idea (before hearing about realms and such) was to direct
> all requests for any resource of my webapp to a servlet that would
> verify user roles.
>
> Then I was told here that i would run into a lot of problems if I did
> that. And was recomended to check filters and that realms are for this
> purpose.
>
> Here is my main question: Using realms, should each jsp verify the role
> of the user trying to access it? Or is there a more elegant way to do
> it, to keep code in jsp minimum and centralize that task?
>
> The verification will have to happen for each one of the pages in my web
> app..
>
> Thank you in advance!
>

Using Filters would be for if you want your app to do its own checking.

Using Realms (as provided by Tomcat) implies that you are defining a
 in your web application that says, in essence, "in
order to access the following URLs, the user must be authenticated *and*
possess one of the following roles".  If you are using this approach, your
app doesn't have to do a thing (other than define the security constraint
element in web.xml) -- the container does all the work for you.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SSL Connection Tomcat and Apache

2002-08-12 Thread Wills, Mike N. (TC)

Does anyone else have any ideas on this? 

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:41 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


Oh BTW. This is Apache 2.0.?? on IBM iSeries (AS/400) but that shouldn't
matter much. 

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:38 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


What about the transmittions between Apache and Tomcat? I realize if they
are on the same machine it isn't a problem, but what about if it is on a
different machine? 

This is all for the intranet.

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:33 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


In the httpd.conf file of apache, you can implement the virtual host
directive for SSL.  The port used is 443.  You have to have an entry like
this - 

##
## SSL Virtual Host Context
##

:443>

#  General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName 
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLCertificateFile "/"
SSLCertificateKeyFile "/"
  

you have to generate a CSR file(instructions for creating a CSR can be found
at http://www.verisign.com/support/csr/apache/v01.html).  Once you create a
CSR, you can send it to any of the certificate issuing authorities(verisign,
thawte etc) and once you get a certificate, you make the above changes in
the httpd.conf.

Thanks
Manoj.

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:21 PM
To: '[EMAIL PROTECTED]'
Subject: SSL Connection Tomcat and Apache


I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Michele Neylon -Blacknight Solutions

At 14.19 12/08/2002 -0500, you wrote:
I used a .htaccess for this on Apache with Tomcat 3*
The .htaccess :
DirectoryIndex index.jsp


Mr. Michele Neylon
Blacknight Solutions - affordable linux hosting
http://www.blacknightsolutions.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Per Kreipke wrote:

> Date: Mon, 12 Aug 2002 16:33:15 -0400
> From: Per Kreipke <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: [Q] Realms, Principals, et al...
>
> Craig,
>
> Thanks for the very detailed reply.
>
> > > > > Q1:
> > > > > ===
> > > > >
> > > > > If GenericPrincipal isn't available from webapps, is there
> > > > another way to
> > > > > get at the complete list of roles for a given user and
> > their password?
> > > > >
> > > >
> > > > Not from a webapp through a portable API.  What you see
> > (isUserInRole())
> > > > is what you get.
> > > >
> > > > However, properly configured web.xml files will have 
> > > > elements for all of the role names that are referenced by
> > that webapp, so
> > > > you might try reading them (by parsing /WEB-INF/web.xml) and
> > trying all of
> > > > those names through isUserInRole().  Of course, that doesn't
> > help you if
> > > > the webapp doesn't define them all ...
> > >
> > > ... or if the set of all roles is dynamic, a shortfall of the
> > declarative
> > > servlet security API.
> > >
> >
> > If the roles are dynamic, how is it that anyone believes it is possible to
> > enumerate "the" set of roles for a given user?
>
> Ok, I didn't realize that servlet spec says that roles must be a fixed
> enumeration for the life of a web application.
>
> Maybe that's where I mis-understand how servlets are supposed to use roles
> in web applications. Probably because I've never found any design patterns
> for how to use servlet container security for different internet application
> scenarios, only code samples on what to call when.
>
> IMO (<- where the impedence mismatch probably is), the servlet API is
> purposely generic enough (user's key and roles are simply strings) that
> roles could be used in multitude of ways to enforce security, except that
> the API only allows one question: isUserInRole().
>

That's a pretty accurate understanding.  The challenge is that the range
of existing security technologies is gigantic and getting bigger.

Just as a simple example, consider the concept of "group" that many
security environments define.  Either of the following mappings would be
perfectly legal from the perspective of a servlet container (or a J2EE app
server):

* "Group == Role" (since Tomcat 3.x and 4.0 do not have any specific
  concept of a group, this is effectively what they implement).

* "Group == set of roles inherited by all members of the group" (supported
  explicitly by Tomcat 4.1).

The details of how role is mapped to real-world things is up to the
container.

> - they are often mentioned as being roughly equivalent to *nix groups: a
> collection of users
> - they could also be used as a collection of permissions, as in RBAC systems
> - can't one imagine having to manage permissions among companies,
> workgroups, projects, users?
>
> > > > > I need the complete list of roles for the current user and
> > password to
> > > > > implement a connector from Cocoon authentication to the container
> > > > > authentication.
> > > > >
> > > >
> > > > It's not at all clear to me that every possible Realm
> > implementation will
> > > > be able to articulate such a list -- or that the list won't
> > change over
> > > > time.  For example, it's perfectly feasible to implement a
> > Realm that says
> > > > "user Joe has this role, but only from 8am to 5pm on
> > weekdays".  It sounds
> > > > like the Cocoon folks might want to do a little more thinking
> > about their
> > > > design.
> > >
> > > I don't know that it's their mistake, I'm just talking about
> > wrapping the
> > > GenericPrincipal class.
> >
> > GenericPrincipal is an internal implementation detail for how the existing
> > Realms implement things.  It is not part of the public API that Tomcat
> > exposes to a webapp.  There is no guarantee that any other container
> > creates something like this that has the roles built in to the Principal
> > object itself.
>
> Ok, and I understand Tomcat's role as the default/sample Servlet container
> and why it needs to remain committed to the API as defined.
>
> Perhaps in the future, the following APIs will get an enhancement:
>
> java.lang.String getRemoteUser()
> boolean isUserInRole(String role)
> java.security.Principal getUserPrincipal()
>
> // NEW
> String[] getUserRoles() // roles are already strings
>

The problem is that this method is not implementable on all possible
security domains, for the definition of "role" provided by those domains.
Putting it into the API therefore seems very unlikely to ever get added.

>
> Perhaps getRoles() on GenericPrincipal shouldn't be public but adding the
> following to HttpServletRequest would allow servlet containers to implement
> them on either the Principal or elsewhere. Tomcat could even expose it now
> through the wrapper or facade.
>
> > > Isn't it true that you can't do that from _any_
> > > webapp, m

RE: tomcat performance and load capability

2002-08-12 Thread Wills, Mike N. (TC)

We have one website running under Windows NT that gets 10,000 hits a month.
And another that got 5,000 hits last month. Both are on the same tomcat 3.2
server.

-Original Message-
From: michael wimmer [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:42 PM
To: 'Tomcat Users List'
Subject: AW: tomcat performance and load capability


Hi Mike,

I can't correct you, since my last post made it obvious that I am new to
both, tomcat and JSP. My point is, that it is not clear to me where high
loads start and low loads end. Maybe the subject was misleading, I meant
'possibly relative high loads for tomcat'. If you think that tomcat is
not capable of handling that type of project I described, thanks for the
information. (that was my intention in the first place, now there is
still time left to evaluate alternatives like Orion, JRun or Resin).

Regards,

Michael

> -Ursprüngliche Nachricht-
> Von: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 12. August 2002 23:30
> An: 'Tomcat Users List'
> Betreff: RE: tomcat performance and load capability
> 
> Correct me if I am wrong, but isn't Tomcat designed for low loads not
> heavy
> loads? I think you may need to look into a commercial product.
Bealogic
> and
> IBM Websphere I hear are good ones.
> 
> -Original Message-
> From: michael wimmer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 4:25 PM
> To: 'Tomcat Users List'
> Subject: tomcat performance and load capability
> 
> 
> hi all,
> 
> we are trying to migrate our development, at least partually, from
> coldfusion to jsp. Our first project is about to start and we are now
a
> little bit concerned about the performance.
> 
> It is a simple promotion, consisting of 6 JSP pages with access to a
> MySql database. DB connectivity is implemented with mm.mysql driver
and
> protomatter for connection pooling.
> 
> Since the the project will be promoted via radio spots, we estimate up
> two 30.000 hits per day with possibly extreme peaks after the spots
have
> been broadcasted.
> 
> I used JMeter for testing and I came up with the insight that tomcat
has
> problems if I start more than 75 concurrent threads. (e. q. 100 users,
> going for two rounds ended up with maybe half as many entries in the
> database as there were supposed to be). Increasing the 'maxProcessors'
> parameter for the connector did not solve the problem, tomcat (version
> 4.1.8) still stopped at 75 threads only viewing now the higher number
in
> the error message 'servlet status'. This problem did not occur when I
> ran the same project in the resin 2.1.4 container.
> 
> My questions are:
> - Is Tomcat capable of that load? (Especially for the peaks, I am not
> concerned about the overall load).
> 
> - Our provider has uttered that running it on two machines (Solaris),
> one containing the apache web server, the other server hosting tomcat
> would be the way to do it. Since only a few popup's are HTML and all
> other pages have to be handled by Tomcat anyway (I would say more than
> 80% off all request are for JSP's), I am concerned if it really is a
> good idea to have apache forwarding all pages to a different computer.
> Since we HAVE to use our providers shared MySql, the database server
was
> not part of my performance consideration.
> 
> - Which version of Tomcat is recommended (4.0.4 or 4.1.8)?
> 
> - Which JDK (1.3 or 1.4) works best with Tomcat.
> 
> - Any hints / tips for optimizing the configuration would be highly
> appreciated.
> 
> 
> Best regards,
> 
> Michael Wimmer
> mailto:[EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




AW: tomcat performance and load capability

2002-08-12 Thread michael wimmer

Hi Mike,

I can't correct you, since my last post made it obvious that I am new to
both, tomcat and JSP. My point is, that it is not clear to me where high
loads start and low loads end. Maybe the subject was misleading, I meant
'possibly relative high loads for tomcat'. If you think that tomcat is
not capable of handling that type of project I described, thanks for the
information. (that was my intention in the first place, now there is
still time left to evaluate alternatives like Orion, JRun or Resin).

Regards,

Michael

> -Ursprüngliche Nachricht-
> Von: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 12. August 2002 23:30
> An: 'Tomcat Users List'
> Betreff: RE: tomcat performance and load capability
> 
> Correct me if I am wrong, but isn't Tomcat designed for low loads not
> heavy
> loads? I think you may need to look into a commercial product.
Bealogic
> and
> IBM Websphere I hear are good ones.
> 
> -Original Message-
> From: michael wimmer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 4:25 PM
> To: 'Tomcat Users List'
> Subject: tomcat performance and load capability
> 
> 
> hi all,
> 
> we are trying to migrate our development, at least partually, from
> coldfusion to jsp. Our first project is about to start and we are now
a
> little bit concerned about the performance.
> 
> It is a simple promotion, consisting of 6 JSP pages with access to a
> MySql database. DB connectivity is implemented with mm.mysql driver
and
> protomatter for connection pooling.
> 
> Since the the project will be promoted via radio spots, we estimate up
> two 30.000 hits per day with possibly extreme peaks after the spots
have
> been broadcasted.
> 
> I used JMeter for testing and I came up with the insight that tomcat
has
> problems if I start more than 75 concurrent threads. (e. q. 100 users,
> going for two rounds ended up with maybe half as many entries in the
> database as there were supposed to be). Increasing the 'maxProcessors'
> parameter for the connector did not solve the problem, tomcat (version
> 4.1.8) still stopped at 75 threads only viewing now the higher number
in
> the error message 'servlet status'. This problem did not occur when I
> ran the same project in the resin 2.1.4 container.
> 
> My questions are:
> - Is Tomcat capable of that load? (Especially for the peaks, I am not
> concerned about the overall load).
> 
> - Our provider has uttered that running it on two machines (Solaris),
> one containing the apache web server, the other server hosting tomcat
> would be the way to do it. Since only a few popup's are HTML and all
> other pages have to be handled by Tomcat anyway (I would say more than
> 80% off all request are for JSP's), I am concerned if it really is a
> good idea to have apache forwarding all pages to a different computer.
> Since we HAVE to use our providers shared MySql, the database server
was
> not part of my performance consideration.
> 
> - Which version of Tomcat is recommended (4.0.4 or 4.1.8)?
> 
> - Which JDK (1.3 or 1.4) works best with Tomcat.
> 
> - Any hints / tips for optimizing the configuration would be highly
> appreciated.
> 
> 
> Best regards,
> 
> Michael Wimmer
> mailto:[EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Hello all

2002-08-12 Thread Aleksandr Shneyderman


I have browsed the archives and seems that there are a lot of questions
about the following error but there is really no answers that would be
a good solution in my situation:

We have an application that we were developing for a long time now and
it fairly extensive. Couple of days ago we decided to move from tc3 to
tc4 except that tc4 complains that it can not compile the jsp that tc3
was able to:

> Tomcat's Error

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred between lines: 1 and 151 in the jsp file:
/glsApp/glsAddress.jsp

Generated servlet error:
/cms/freeware/jakarta-tomcat-4.0.4/work/Standalone/localhost/admissions/glsA
pp/glsAddress$jsp.java:157: Class org.apache.jsp.glsAddress not found.
 glsAddress addrClass = new glsAddress();
 ^


An error occurred between lines: 1 and 151 in the jsp file:
/glsApp/glsAddress.jsp

Generated servlet error:
/cms/freeware/jakarta-tomcat-4.0.4/work/Standalone/localhost/admissions/glsA
pp/glsAddress$jsp.java:157: Class org.apache.jsp.glsAddress not found.
 glsAddress addrClass = new glsAddress();

>>

It seems that tc3 had a different way of constructing the java code for a
JSP.
It used to put the servlets it generaetd in the packages with the names that
were
based on the subdirectory of the jsp file

So for example /glsApp/glsAddress.jsp would be in package glsApp but now
it is in org.apache.jsp. Why is it happening and how would I go about fixing
it. As I stated above the app is huge and going thru each jsp and checking
for this kind of error is just not feasible.

Does anyone know how would I fix this, without going to each file and making
sure that import statement is there?

Thanks in advance and have a good night,
Alex.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: user's roles verification

2002-08-12 Thread Andrew

Read the security section in the Servlet FCS

http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html

Basically, you can control access to files using security-constaint and
url-pattern elements.

Example:


  
Tomcat Server Configuration Security
Constraint

  Protected Area
  *.*


  TimeOff

  


FORM
Tomcat Server Configuration Form-Based Authentication
Area

  /login.jsp
  /error.jsp

  



  The role that is required to log in to the Administration
Application

TimeOff
  


-Andrew

> -Original Message-
> From: Alexander Wallace [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, August 12, 2002 10:44 AM
> To: Tomcat Users List
> Subject: user's roles verification
> 
> 
> 
> 
> I've got (i think) Realms working. I need some advice for 
> good practices...
> 
> My original idea (before hearing about realms and such) was 
> to direct all requests for any resource of my webapp to a 
> servlet that would verify user roles.
> 
> Then I was told here that i would run into a lot of problems 
> if I did that. And was recomended to check filters and that 
> realms are for this purpose.
> 
> Here is my main question: Using realms, should each jsp 
> verify the role of the user trying to access it? Or is there 
> a more elegant way to do it, to keep code in jsp minimum and 
> centralize that task?
> 
> The verification will have to happen for each one of the 
> pages in my web app..
> 
> Thank you in advance!
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat performance and load capability

2002-08-12 Thread Wills, Mike N. (TC)

Correct me if I am wrong, but isn't Tomcat designed for low loads not heavy
loads? I think you may need to look into a commercial product. Bealogic and
IBM Websphere I hear are good ones. 

-Original Message-
From: michael wimmer [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:25 PM
To: 'Tomcat Users List'
Subject: tomcat performance and load capability


hi all,
 
we are trying to migrate our development, at least partually, from
coldfusion to jsp. Our first project is about to start and we are now a
little bit concerned about the performance. 
 
It is a simple promotion, consisting of 6 JSP pages with access to a
MySql database. DB connectivity is implemented with mm.mysql driver and
protomatter for connection pooling.
 
Since the the project will be promoted via radio spots, we estimate up
two 30.000 hits per day with possibly extreme peaks after the spots have
been broadcasted.
 
I used JMeter for testing and I came up with the insight that tomcat has
problems if I start more than 75 concurrent threads. (e. q. 100 users,
going for two rounds ended up with maybe half as many entries in the
database as there were supposed to be). Increasing the 'maxProcessors'
parameter for the connector did not solve the problem, tomcat (version
4.1.8) still stopped at 75 threads only viewing now the higher number in
the error message 'servlet status'. This problem did not occur when I
ran the same project in the resin 2.1.4 container.
 
My questions are:
- Is Tomcat capable of that load? (Especially for the peaks, I am not
concerned about the overall load).
 
- Our provider has uttered that running it on two machines (Solaris),
one containing the apache web server, the other server hosting tomcat
would be the way to do it. Since only a few popup's are HTML and all
other pages have to be handled by Tomcat anyway (I would say more than
80% off all request are for JSP's), I am concerned if it really is a
good idea to have apache forwarding all pages to a different computer.
Since we HAVE to use our providers shared MySql, the database server was
not part of my performance consideration.
 
- Which version of Tomcat is recommended (4.0.4 or 4.1.8)?
 
- Which JDK (1.3 or 1.4) works best with Tomcat.
 
- Any hints / tips for optimizing the configuration would be highly
appreciated.
 
 
Best regards,
 
Michael Wimmer
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JNDI JDBC COnnection pooling problem...

2002-08-12 Thread Alexander Wallace

Hello. This has to be a very simple one for those who know.

I'm getting a java.lang.NullPointerException in my app, in the second
line here:

Context ctx = (Context) new InitialContext().lookup("java:comp/env");
conn = ((DataSource) ctx.lookup("jdbc/pgsql")).getConnection(); **Error
happens here**

And have the following in my server.xml (I put my whole context in case
my error is there) 


  
  
  


  
   
userawallace
   
passwordpasswd
driverClassName
  org.postgresql.Driver
driverName
 
jdbc:postgresql://10.100.101.1/awallace
  
  
  

  mail.smtp.host
  localhost

  






Thank you in advance.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat performance and load capability

2002-08-12 Thread michael wimmer

hi all,
 
we are trying to migrate our development, at least partually, from
coldfusion to jsp. Our first project is about to start and we are now a
little bit concerned about the performance. 
 
It is a simple promotion, consisting of 6 JSP pages with access to a
MySql database. DB connectivity is implemented with mm.mysql driver and
protomatter for connection pooling.
 
Since the the project will be promoted via radio spots, we estimate up
two 30.000 hits per day with possibly extreme peaks after the spots have
been broadcasted.
 
I used JMeter for testing and I came up with the insight that tomcat has
problems if I start more than 75 concurrent threads. (e. q. 100 users,
going for two rounds ended up with maybe half as many entries in the
database as there were supposed to be). Increasing the 'maxProcessors'
parameter for the connector did not solve the problem, tomcat (version
4.1.8) still stopped at 75 threads only viewing now the higher number in
the error message 'servlet status'. This problem did not occur when I
ran the same project in the resin 2.1.4 container.
 
My questions are:
- Is Tomcat capable of that load? (Especially for the peaks, I am not
concerned about the overall load).
 
- Our provider has uttered that running it on two machines (Solaris),
one containing the apache web server, the other server hosting tomcat
would be the way to do it. Since only a few popup's are HTML and all
other pages have to be handled by Tomcat anyway (I would say more than
80% off all request are for JSP's), I am concerned if it really is a
good idea to have apache forwarding all pages to a different computer.
Since we HAVE to use our providers shared MySql, the database server was
not part of my performance consideration.
 
- Which version of Tomcat is recommended (4.0.4 or 4.1.8)?
 
- Which JDK (1.3 or 1.4) works best with Tomcat.
 
- Any hints / tips for optimizing the configuration would be highly
appreciated.
 
 
Best regards,
 
Michael Wimmer
mailto:[EMAIL PROTECTED]



sending errors in exception by e-mail

2002-08-12 Thread Andrzej

I have got problems with sending this JSP page. Errors in a stack should be pass to 
the subject. Included file month.jsp runs very well. I put to it error, for example 
wrong year format, and I expect that exception will be send  in a subject and errors 
in a body to the user2. Instead of that I get error as below jsp page. This page 
whitout passing the exception trace and the query string works very well, but the idea 
is passing eventually errors. Tell me please, what is the reason. 
Andrzej Michalczyk.
Thank You.

<%@ page isErrorPage="true" %>


Oops!


We are sorry
The page you have just reached has some errors.
Our technical staff have been informed of the error and will fix it as soon as 
possible.

<%@ include file ="month.jsp" %>

<% // Create the body passing the exception trace and the query string
String body = null;
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
exception.printStackTrace(pw); 
body = sw.toString() + request.getQueryString();
%>









%>

Thank you for your patience




Error: 500
Location: /jsp/error/error1.jsp
Internal Servlet Error:

javax.servlet.ServletException
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at 
jsp.error._0002fjsp_0002ferror_0002ferror_00031_0002ejsperror1_jsp_3._jspService(_0002fjsp_0002ferror_0002ferror_00031_0002ejsperror1_jsp_3.java:218)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)

Root cause: 
java.lang.NullPointerException
at 
jsp.error._0002fjsp_0002ferror_0002ferror_00031_0002ejsperror1_jsp_3._jspService(_0002fjsp_0002ferror_0002ferror_00031_0002ejsperror1_jsp_3.java:186)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)





RE: automatically serve index.jsp

2002-08-12 Thread Andrew

It's a known bug, and fixed.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10789

The next build will contain the fix. (build is July 19,  bug fixed July
20)

http://jakarta.apache.org/builds/jakarta-tomcat-connectors/


- Andrew

> -Original Message-
> From: Michael Remijan [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, August 12, 2002 1:45 PM
> To: Tomcat Users List
> Subject: automatically serve index.jsp
> 
> 
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with 
> mod_jk2 and jdk1.4.0_01.  I've posted previously about apache 
> giving a directory listing instead of returning index.jsp.  
> The only way I've been able to get around this problem is 
> editing the workers2.properties file to include a mapping to 
> the whole webapp...
> 
> 
> - workers2.properties (snippet) 
> ---
> [uri:/diary/*]
> info=Map the whole webapp
> --
> -
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet) 
> 
> ##
> ## diary webapp
> ##
> Alias /diary 
> "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
>  "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary">
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
> --
> --
> 
> 
> The question I have is, because of mapping the whole webapp 
> in the workers2.properties file, will that basically override 
> apache serving static content?  I assuming it would  but I 
> don't have the time to go digging around in the connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Connection IIS Tomcat

2002-08-12 Thread Isabel Lameda

I´ve downloaded Tomcat 4.1.8 Beta Released and uncomment the line for the
ajp 1.3 Connector
in the server.xml, which is:


   
So when i start the Tomcat i get this:

INFO: Creating MBeanServer
12/08/2002 04:22:10 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
ServerLifecycleListener: createMBeans: MBeanException
java.lang.Exception: ManagedBean is not found with Ajp13Connector
at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:359)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:716)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:690)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:329)
at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
cycleListener.java:206)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2181)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.8
12/08/2002 11:26:32 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080


Every thing works fine, i can view my pages using IIS via the ajp Connector.

The only problem is that i cannot use the Administration Tool, when i open
it i get this:
HTTP Status 503 - Servlet action is currently unavailable 

type: Status report
message: Servlet action is currently unavailable
description: The requested service (Servlet action is currently
unavailable) is not currently available.

If i comment back the line for the ajp connector the administration tool
works fine but the thing is that i need to use the connector.

I'm also worry about what other problems could be due that exception,
because until now i´ve only found that with the administration tool.

In the server.xml i also have this lines referencing some listeners:
  
  
If i comment the first one the exception in the Creating MBeanServer
disapeers
and  every thing works but i cannot also use the administration tool

Thanks, I´ll appreciate any help.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ADMINS: Ban a user?

2002-08-12 Thread Paul Brinkley

At 12:29 PM 8/12/2002 -0700, Mona Wong-Barnum wrote:

> I vote that we do NOT filter out emails with the below 
> keywords.  Let's
>not throw out the baby with the bath water!
>
> > While we are doing this, why don't we put a filter on subject and exclude
> > the following key words:
> >
> > URGENT
> >
> > REQUIRE
> >
> > DESPERATE
> >
> > HELP!!

To be fair, I do wish people would be more descriptive in their subject
headers.  This is better for the askers anyway.  If I see a subject like
"Help with a problem!", I'll feel no need to read it in detail, as chances
are I won't be able to help.  I don't have to time to delve into every
single message with a vague subject.

Putting "URGENT" is another annoyance.  It conveys the notion that the
asker didn't plan time wisely.  If you truly got blindsided by a
last-second request by management to solve a problem, you can explain in
the body of the message.  If your job is at stake, then your management
needs to get its priorities straightened out, and until then you're
probably better off somewhere else.

Finally, while I'm on the subject of pet peeves, I also wish people with
multiple questions would post each one separately.  One advantage is that
it keeps you from simply putting "a few questions" as a subject; see the
first paragraph.  Secondly, someone needing help with only one of your
questions will only need to scan for that question, rather than sifting
through the thirty-odd responses answering other questions.  With that
said, I'm relatively flexible on this principle.  Two questions in the same
message, both with short desc in the subject, seems perfectly reasonable,
for instance.

End soapbox.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SSL Connection Tomcat and Apache

2002-08-12 Thread Wills, Mike N. (TC)

Oh BTW. This is Apache 2.0.?? on IBM iSeries (AS/400) but that shouldn't
matter much. 

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:38 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


What about the transmittions between Apache and Tomcat? I realize if they
are on the same machine it isn't a problem, but what about if it is on a
different machine? 

This is all for the intranet.

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:33 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


In the httpd.conf file of apache, you can implement the virtual host
directive for SSL.  The port used is 443.  You have to have an entry like
this - 

##
## SSL Virtual Host Context
##

:443>

#  General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName 
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLCertificateFile "/"
SSLCertificateKeyFile "/"
  

you have to generate a CSR file(instructions for creating a CSR can be found
at http://www.verisign.com/support/csr/apache/v01.html).  Once you create a
CSR, you can send it to any of the certificate issuing authorities(verisign,
thawte etc) and once you get a certificate, you make the above changes in
the httpd.conf.

Thanks
Manoj.

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:21 PM
To: '[EMAIL PROTECTED]'
Subject: SSL Connection Tomcat and Apache


I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




user's roles verification

2002-08-12 Thread Alexander Wallace



I've got (i think) Realms working. I need some advice for good
practices...

My original idea (before hearing about realms and such) was to direct
all requests for any resource of my webapp to a servlet that would
verify user roles.

Then I was told here that i would run into a lot of problems if I did
that. And was recomended to check filters and that realms are for this
purpose.

Here is my main question: Using realms, should each jsp verify the role
of the user trying to access it? Or is there a more elegant way to do
it, to keep code in jsp minimum and centralize that task?

The verification will have to happen for each one of the pages in my web
app..

Thank you in advance!



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SSL Connection Tomcat and Apache

2002-08-12 Thread Short, Dave

Will this work for Tomcat 4.1.x and Apache 2.0.x?

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: August 12, 2002 1:33 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


In the httpd.conf file of apache, you can implement the virtual host
directive for SSL.  The port used is 443.  You have to have an entry like
this - 

##
## SSL Virtual Host Context
##

:443>

#  General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName 
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLCertificateFile "/"
SSLCertificateKeyFile "/"
  

you have to generate a CSR file(instructions for creating a CSR can be found
at http://www.verisign.com/support/csr/apache/v01.html).  Once you create a
CSR, you can send it to any of the certificate issuing authorities(verisign,
thawte etc) and once you get a certificate, you make the above changes in
the httpd.conf.

Thanks
Manoj.

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:21 PM
To: '[EMAIL PROTECTED]'
Subject: SSL Connection Tomcat and Apache


I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SSL Connection Tomcat and Apache

2002-08-12 Thread Wills, Mike N. (TC)

What about the transmittions between Apache and Tomcat? I realize if they
are on the same machine it isn't a problem, but what about if it is on a
different machine? 

This is all for the intranet.

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 3:33 PM
To: 'Tomcat Users List'
Subject: RE: SSL Connection Tomcat and Apache


In the httpd.conf file of apache, you can implement the virtual host
directive for SSL.  The port used is 443.  You have to have an entry like
this - 

##
## SSL Virtual Host Context
##

:443>

#  General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName 
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLCertificateFile "/"
SSLCertificateKeyFile "/"
  

you have to generate a CSR file(instructions for creating a CSR can be found
at http://www.verisign.com/support/csr/apache/v01.html).  Once you create a
CSR, you can send it to any of the certificate issuing authorities(verisign,
thawte etc) and once you get a certificate, you make the above changes in
the httpd.conf.

Thanks
Manoj.

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:21 PM
To: '[EMAIL PROTECTED]'
Subject: SSL Connection Tomcat and Apache


I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SSL Connection Tomcat and Apache

2002-08-12 Thread Pooleery, Manoj

In the httpd.conf file of apache, you can implement the virtual host
directive for SSL.  The port used is 443.  You have to have an entry like
this - 

##
## SSL Virtual Host Context
##

:443>

#  General setup for the virtual host
DocumentRoot "C:/Apache/htdocs"
ServerName 
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLCertificateFile "/"
SSLCertificateKeyFile "/"
  

you have to generate a CSR file(instructions for creating a CSR can be found
at http://www.verisign.com/support/csr/apache/v01.html).  Once you create a
CSR, you can send it to any of the certificate issuing authorities(verisign,
thawte etc) and once you get a certificate, you make the above changes in
the httpd.conf.

Thanks
Manoj.

-Original Message-
From: Wills, Mike N. (TC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:21 PM
To: '[EMAIL PROTECTED]'
Subject: SSL Connection Tomcat and Apache


I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Per Kreipke

Craig,

Thanks for the very detailed reply.

> > > > Q1:
> > > > ===
> > > >
> > > > If GenericPrincipal isn't available from webapps, is there
> > > another way to
> > > > get at the complete list of roles for a given user and
> their password?
> > > >
> > >
> > > Not from a webapp through a portable API.  What you see
> (isUserInRole())
> > > is what you get.
> > >
> > > However, properly configured web.xml files will have 
> > > elements for all of the role names that are referenced by
> that webapp, so
> > > you might try reading them (by parsing /WEB-INF/web.xml) and
> trying all of
> > > those names through isUserInRole().  Of course, that doesn't
> help you if
> > > the webapp doesn't define them all ...
> >
> > ... or if the set of all roles is dynamic, a shortfall of the
> declarative
> > servlet security API.
> >
>
> If the roles are dynamic, how is it that anyone believes it is possible to
> enumerate "the" set of roles for a given user?

Ok, I didn't realize that servlet spec says that roles must be a fixed
enumeration for the life of a web application.

Maybe that's where I mis-understand how servlets are supposed to use roles
in web applications. Probably because I've never found any design patterns
for how to use servlet container security for different internet application
scenarios, only code samples on what to call when.

IMO (<- where the impedence mismatch probably is), the servlet API is
purposely generic enough (user's key and roles are simply strings) that
roles could be used in multitude of ways to enforce security, except that
the API only allows one question: isUserInRole().

- they are often mentioned as being roughly equivalent to *nix groups: a
collection of users
- they could also be used as a collection of permissions, as in RBAC systems
- can't one imagine having to manage permissions among companies,
workgroups, projects, users?

> > > > I need the complete list of roles for the current user and
> password to
> > > > implement a connector from Cocoon authentication to the container
> > > > authentication.
> > > >
> > >
> > > It's not at all clear to me that every possible Realm
> implementation will
> > > be able to articulate such a list -- or that the list won't
> change over
> > > time.  For example, it's perfectly feasible to implement a
> Realm that says
> > > "user Joe has this role, but only from 8am to 5pm on
> weekdays".  It sounds
> > > like the Cocoon folks might want to do a little more thinking
> about their
> > > design.
> >
> > I don't know that it's their mistake, I'm just talking about
> wrapping the
> > GenericPrincipal class.
>
> GenericPrincipal is an internal implementation detail for how the existing
> Realms implement things.  It is not part of the public API that Tomcat
> exposes to a webapp.  There is no guarantee that any other container
> creates something like this that has the roles built in to the Principal
> object itself.

Ok, and I understand Tomcat's role as the default/sample Servlet container
and why it needs to remain committed to the API as defined.

Perhaps in the future, the following APIs will get an enhancement:

java.lang.String getRemoteUser()
boolean isUserInRole(String role)
java.security.Principal getUserPrincipal()

// NEW
String[] getUserRoles() // roles are already strings


Perhaps getRoles() on GenericPrincipal shouldn't be public but adding the
following to HttpServletRequest would allow servlet containers to implement
them on either the Principal or elsewhere. Tomcat could even expose it now
through the wrapper or facade.

> > Isn't it true that you can't do that from _any_
> > webapp, much less Cocoon. E.g. given any of the current Tomcat
> Realms, how
> > could you do your 'Joe' example?
> >
>
> Implementing time-sensitive permissions would actually be pretty easy -
> subclass the Realm implementation that talks to the right kind of
> persistent store, and add logic in its hasRole() method to return "false"

> outside the allowed times, even if the role is listed in the
> GenericPrincipal instance.  Obviously, you'd want to add more information
> to the database (or whatever) containing the user information, but that's
> all internal implementation stuff.

Ok. I'm guessing that the subclass you're mention will still be managed by
the Catalina class loader otherwise it doesn't have access to the Realm it
subclasses.

What it won't allow me to do is define three roles today, one for each
shift: morning, afternoon, and evening. Then add new ones to the database
('midnight', 'all-overnight', 'doctor-in-residence-40-hours'), in the
business layer without adding them to the web layer also in the web.xml for
the app.

> If you're following what's going on with Tomcat 5 on the developer's list,
> you'll see an extension being added to the Realm interface that passes the
> current request in to the hasRole() method as well (so that it can make
> decisions based on characteristics of the current request).  This is being
> done 

SSL Connection Tomcat and Apache

2002-08-12 Thread Wills, Mike N. (TC)

I have Apache and Tomcat working together, but now I am curious on security.
How I do implement SSL on that connection?

Mike Wills
IT Corporate Support
Taylor Corporation
[EMAIL PROTECTED]
Phone: (507) 386-3187


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat4.0.4 and Servlet Specification 2.3 and JSp1.2

2002-08-12 Thread Ashish Kulkarni

Hi,
Is tomcat4.0.4 using servlet specification 2.3 and JSP
specification1.2??
Because as per these specification 
 
<% if (someCondition) { %> 
   
<% } %>

the above code will give error, but if u make the
flush value="false", it must work, and not give
error.???
but when i tried it in jsp it gives my illleagal state
error, saying cannot forward after sumbitting
response.
Ashish


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Memory alloc on tomcat 4.0.4

2002-08-12 Thread Rodrigo Giammarini

Hi,  Is possible to limit the amount of memory taken by each java thread?
thanks!
  4:59pm  up  8:15,  4 users,  load average: 0.01, 0.05, 0.07
97 processes: 96 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  3.3% system,  0.0% nice, 96.4% idle
Mem:   126644K av,  123808K used,2836K free, 968K shrd,9084K
buff
Swap:  257032K av,   25828K used,  231204K free   50892K
cache

  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 5150 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:05 java
 5151 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5152 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:05 java
 5153 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5154 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5155 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5156 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5157 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5158 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:04 java
 5160 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5161 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5162 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5163 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5164 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5165 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5166 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5167 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java
 5168 geodem 9   0 56888  49M 26560 S 0.0 39.7   0:00 java


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk2 + htaccess files

2002-08-12 Thread frank delin

Hi there,

I've been experimenting with mod_jk and mod_jk2 for a little while now and
I've noticed something odd.  If I'm using mod_jk and an AJP13 connection
apache will acknowledge my htaccess files and ask for user authentication.
However if I use mod_jk2 and a coyote connection it seems to ignore the
htaccess file.  Is this to be expected or do you think it is a
configuration issue?

Thanks,

Frank


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: mod_jk and webapp file locations

2002-08-12 Thread Polito, John

what seems to work for me is:

(1) set forwardAll="false" in your Ajp13Connector configuration
( ref: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html );

(2) in httpd.conf, set up an Alias to map requests out to your tomcat app's directory 
(assuming that $CATALINA_HOME/webapps is not already under DocumentRoot or otherwise 
mapped in)
( ref: http://httpd.apache.org/docs/mod/mod_alias.html#alias );

(3) in httpd.conf, use a  block to set up access privileges, etc., for 
your app's directory.
( ref: http://httpd.apache.org/docs/mod/core.html#directory and previous );

hope that helps -jp2

/*  [EMAIL PROTECTED];  415.514.3529;  601 MCB  */

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Michael Remijan

...

Nope, I've tried that too.  and I'm using mod_jk2 so the JkMount doesn't apply




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 2:19 PM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp



Add "index.jsp" in the "DirectoryIndex" statement of Apache. Also check
your JkMount statements. Apache needs to forward all jsps to Tomcat.

RS



   
 
  "Michael Remijan"
 
  <[EMAIL PROTECTED]>  
 
cc:
 
  08/12/02 02:03 PM Subject:  RE: automatically serve 
index.jsp 
  Please respond to
 
  "Tomcat Users
 
  List"
 
   
 
   
 




...

Nope, that does work either.  I've been using tomcat for a while so I've
already tried the most of those kinds of things.

It looks to me like the mappings in the workers2.properties file is looked
at first.  If a matching is found, it is forwarded to tomcat.  If not, it
goes to apache.  Since I have directory browsing for that directory off and
no index.html I get apache's standard error message for not being able to
see that file.  What I want apache to do is translate
http://localhost/diary/ into http://localhost/diary/index.jsp.  can I do
this with a redirect?




-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 1:24 PM
To: 'Tomcat Users List'
Subject: RE: automatically serve index.jsp


Put this in your web.xml

  
index.jsp
  

Subir

-Original Message-
From: Michael Remijan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:02 AM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp


...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
>
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and
jdk1.4.0_01.  I've posted previously about apache giving a directory
listing
instead of returning index.jsp.  The only way I've been able to get around
this problem is editing the workers2.properties file to include a mapping
to
the whole webapp...
>
>
> - workers2.properties (snippet)
---
> [uri:/diary/*]
> info=Map the whole webapp
>
---
>
>
>
> I have an alias and directory in httpd.conf set up as follows
>
> - httpd.conf (snippet)

> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
>
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>


>
>
> The question I have is, because of mapping the whole webapp in the
workers2.properties file, will that basically override apache serving
static
content?  I assuming it would  but I don't have the time to go digging
around in the connector's source.
>
>
> thanks,
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   <
mail

Re: automatically serve index.jsp

2002-08-12 Thread Michael Locasto

Mike,

I think there was discussion on tomcat-dev about this issue (with jk2)
recently (~2/3 weeks ago)... there should also be a bug report in
bugzilla. Try searching both those archives.

Of course, it's been a while and I wasn't really paying attention to the
conversation because it didn't impact my use, so this may be a bit of a
red herring. I hope it isn't :)

http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]
che.org&msgId=404644

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10789

Good luck,
Michael



- Original Message -
From: "Michael Remijan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 3:03 PM
Subject: RE: automatically serve index.jsp


> ...
>
> Nope, that does work either.  I've been using tomcat for a while so I've
already tried the most of those kinds of things.
>
> It looks to me like the mappings in the workers2.properties file is
looked at first.  If a matching is found, it is forwarded to tomcat.  If
not, it goes to apache.  Since I have directory browsing for that
directory off and no index.html I get apache's standard error message for
not being able to see that file.  What I want apache to do is translate
http://localhost/diary/ into http://localhost/diary/index.jsp.  can I do
this with a redirect?
>
> 
>
>
> -Original Message-
> From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 1:24 PM
> To: 'Tomcat Users List'
> Subject: RE: automatically serve index.jsp
>
>
> Put this in your web.xml
>
>   
> index.jsp
>   
>
> Subir
>
> -Original Message-
> From: Michael Remijan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 11:02 AM
> To: Tomcat Users List
> Subject: RE: automatically serve index.jsp
>
>
> ...
>
> having this snippet workers2.properties also works
>
> - workers2.properties
(snippet) ---
>  [uri:/diary/]
>  info=Map the whole webapp
> 
---
>
>
> 
>
> -Original Message-
> From: Steve Prior [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 12:53 PM
> To: Tomcat Users List
> Subject: Re: automatically serve index.jsp
>
>
> You're a little ahead of me in doing this, but did you try adding
> index.jsp to a DirectoryIndex directive in Apache?
>
> This was very obious to do in Apache 1.3, not sure as obvious in 2.0.
>
> Steve
>
> Michael Remijan wrote:
> > hi all,
> >
> > I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2
and
> jdk1.4.0_01.  I've posted previously about apache giving a directory
listing
> instead of returning index.jsp.  The only way I've been able to get
around
> this problem is editing the workers2.properties file to include a
mapping to
> the whole webapp...
> >
> >
> > - workers2.properties (snippet)
> ---
> > [uri:/diary/*]
> > info=Map the whole webapp
> >
> 
---
> >
> >
> >
> > I have an alias and directory in httpd.conf set up as follows
> >
> > - httpd.conf (snippet)
> 
> > ##
> > ## diary webapp
> > ##
> > Alias /diary
"C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> >
> > 
> > Options FollowSymLinks MultiViews IncludesNoExec
> > AddOutputFilter Includes html htm gif jpeg jpg
> > AllowOverride None
> > Order allow,deny
> > Allow from all
> > 
> >
> 

> >
> >
> > The question I have is, because of mapping the whole webapp in the
> workers2.properties file, will that basically override apache serving
static
> content?  I assuming it would  but I don't have the time to go digging
> around in the connector's source.
> >
> >
> > thanks,
> > 
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Per Kreipke wrote:

> Date: Mon, 12 Aug 2002 13:11:56 -0400
> From: Per Kreipke <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: [Q] Realms, Principals, et al...
>
> > > Q1:
> > > ===
> > >
> > > If GenericPrincipal isn't available from webapps, is there
> > another way to
> > > get at the complete list of roles for a given user and their password?
> > >
> >
> > Not from a webapp through a portable API.  What you see (isUserInRole())
> > is what you get.
> >
> > However, properly configured web.xml files will have 
> > elements for all of the role names that are referenced by that webapp, so
> > you might try reading them (by parsing /WEB-INF/web.xml) and trying all of
> > those names through isUserInRole().  Of course, that doesn't help you if
> > the webapp doesn't define them all ...
>
> ... or if the set of all roles is dynamic, a shortfall of the declarative
> servlet security API.
>

If the roles are dynamic, how is it that anyone believes it is possible to
enumerate "the" set of roles for a given user?

> > > I need the complete list of roles for the current user and password to
> > > implement a connector from Cocoon authentication to the container
> > > authentication.
> > >
> >
> > It's not at all clear to me that every possible Realm implementation will
> > be able to articulate such a list -- or that the list won't change over
> > time.  For example, it's perfectly feasible to implement a Realm that says
> > "user Joe has this role, but only from 8am to 5pm on weekdays".  It sounds
> > like the Cocoon folks might want to do a little more thinking about their
> > design.
>
> I don't know that it's their mistake, I'm just talking about wrapping the
> GenericPrincipal class.

GenericPrincipal is an internal implementation detail for how the existing
Realms implement things.  It is not part of the public API that Tomcat
exposes to a webapp.  There is no guarantee that any other container
creates something like this that has the roles built in to the Principal
object itself.

> Isn't it true that you can't do that from _any_
> webapp, much less Cocoon. E.g. given any of the current Tomcat Realms, how
> could you do your 'Joe' example?
>

Implementing time-sensitive permissions would actually be pretty easy -
subclass the Realm implementation that talks to the right kind of
persistent store, and add logic in its hasRole() method to return "false"
outside the allowed times, even if the role is listed in the
GenericPrincipal instance.  Obviously, you'd want to add more information
to the database (or whatever) containing the user information, but that's
all internal implementation stuff.

If you're following what's going on with Tomcat 5 on the developer's list,
you'll see an extension being added to the Realm interface that passes the
current request in to the hasRole() method as well (so that it can make
decisions based on characteristics of the current request).  This is being
done in support of implementing JSR-115, which is an SPI between a
container (like Tomcat) and an authorization service that might implement
arbitrarily complex rules for deciding whether a user, for this request,
at this date and time, has a requested role.  But, from the web
application's point of view, nothing changes -- isUserInRole() is how you
can dynamically ask the question for a particular role.

If you want to expose a Principal object (via getUserPrincipal()) that can
be cast by a webapp to get more data than just the name, that would be
feasible;

* Create a new class implementing Principal (and putting it in
  common/lib or common/classes so that it's visible to both
  Tomcat and your app)

* Build your own Realm implementation that creates and returns one of
  these Principals from the authenticate() method.

Obviously (I hope), this would tie you directly to Tomcat 4 internals.
There's nothing portable in Servlet 2.3 (or 2.4) for enumerating roles --
in fact, if I remember right, JSR-115 dispensed with the idea of creating
API for enumerating all the roles owned by a user because it was not
going to be possible for many environments.

> Thanks, Per
>
> P.s. I know you spend a huge amount of time helping people on this and other
> lists, so I hesitate to ask again but...
>
> Is the implementation of JAASRealm in 4.1 backwards compatible to 4.0.4?
>

Haven't got a clue.  In theory it should be, but I've never tried.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ADMINS: Ban a user?

2002-08-12 Thread Mona Wong-Barnum


I vote that we do NOT filter out emails with the below keywords.  Let's 
not throw out the baby with the bath water!

> While we are doing this, why don't we put a filter on subject and exclude
> the following key words:
> 
> URGENT
> 
> REQUIRE
> 
> DESPERATE
> 
> HELP!!

==
Mona Wong-Barnum
National Center for Microscopy and Imaging Research
University of California, San Diego
http://ncmir.ucsd.edu/

"The truth shall set you free, but first it will piss you off"
A Landmark instructor
==



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




AW: form based auth...

2002-08-12 Thread Softwareentwicklung Hauschel

Really stupid to use a jsp error.jsp for login ;-)
It works, thank you very much !

-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 12. August 2002 08:31
An: Tomcat Users List
Betreff: AW: form based auth...


The problem lies in your error.jsp.

Have a look at line 61 of the generated file error$jsp.java
in the work directory to see what causes the Exception.

Ralph Einfeldt
Uptime Internet Solution Center GmbH
Hamburg, Germany
Hosting, Content Management, Java Consulting
http://www.uptime-isc.de 

> -Ursprüngliche Nachricht-
> Von: Softwareentwicklung Hauschel
> [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 11. August 2002 16:48
> An: [EMAIL PROTECTED]
> Betreff: form based auth...
> 
> java.lang.NullPointerException
> at org.apache.jsp.error$jsp._jspService(error$jsp.java:61)
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:



<>
--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: automatically serve index.jsp

2002-08-12 Thread rsequeira


Add "index.jsp" in the "DirectoryIndex" statement of Apache. Also check
your JkMount statements. Apache needs to forward all jsps to Tomcat.

RS



   
 
  "Michael Remijan"
 
  <[EMAIL PROTECTED]>  
 
cc:
 
  08/12/02 02:03 PM Subject:  RE: automatically serve 
index.jsp 
  Please respond to
 
  "Tomcat Users
 
  List"
 
   
 
   
 




...

Nope, that does work either.  I've been using tomcat for a while so I've
already tried the most of those kinds of things.

It looks to me like the mappings in the workers2.properties file is looked
at first.  If a matching is found, it is forwarded to tomcat.  If not, it
goes to apache.  Since I have directory browsing for that directory off and
no index.html I get apache's standard error message for not being able to
see that file.  What I want apache to do is translate
http://localhost/diary/ into http://localhost/diary/index.jsp.  can I do
this with a redirect?




-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 1:24 PM
To: 'Tomcat Users List'
Subject: RE: automatically serve index.jsp


Put this in your web.xml

  
index.jsp
  

Subir

-Original Message-
From: Michael Remijan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:02 AM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp


...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
>
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and
jdk1.4.0_01.  I've posted previously about apache giving a directory
listing
instead of returning index.jsp.  The only way I've been able to get around
this problem is editing the workers2.properties file to include a mapping
to
the whole webapp...
>
>
> - workers2.properties (snippet)
---
> [uri:/diary/*]
> info=Map the whole webapp
>
---
>
>
>
> I have an alias and directory in httpd.conf set up as follows
>
> - httpd.conf (snippet)

> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
>
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>


>
>
> The question I have is, because of mapping the whole webapp in the
workers2.properties file, will that basically override apache serving
static
content?  I assuming it would  but I don't have the time to go digging
around in the connector's source.
>
>
> thanks,
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




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







--
To unsubscribe, e-mail:   
For

.htaccess files

2002-08-12 Thread Mark_DiBattista

Hi,

I'm trying to configure a .htaccess file to set a compact privacy policy
for our web server, IE 6 doesn't like 3rd Party cookies too much.

The body of my .htaccess file looks like this.

header append P3P 'CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM
NAV INT DEM PRE"'


I've placed the file in several directories in Apache and Tomcat and it
hasn't picked it up yet.

Has anyone ever attempted to use a .htaccess file in such away?


Thank you very much for any input.
Mark


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Michael Remijan

...

Nope, that does work either.  I've been using tomcat for a while so I've already tried 
the most of those kinds of things.

It looks to me like the mappings in the workers2.properties file is looked at first.  
If a matching is found, it is forwarded to tomcat.  If not, it goes to apache.  Since 
I have directory browsing for that directory off and no index.html I get apache's 
standard error message for not being able to see that file.  What I want apache to do 
is translate http://localhost/diary/ into http://localhost/diary/index.jsp.  can I do 
this with a redirect?




-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 1:24 PM
To: 'Tomcat Users List'
Subject: RE: automatically serve index.jsp


Put this in your web.xml

  
index.jsp
  

Subir

-Original Message-
From: Michael Remijan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:02 AM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp


...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and
jdk1.4.0_01.  I've posted previously about apache giving a directory listing
instead of returning index.jsp.  The only way I've been able to get around
this problem is editing the workers2.properties file to include a mapping to
the whole webapp...
> 
> 
> - workers2.properties (snippet)
---
> [uri:/diary/*]
> info=Map the whole webapp
>
---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet)

> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>

> 
> 
> The question I have is, because of mapping the whole webapp in the
workers2.properties file, will that basically override apache serving static
content?  I assuming it would  but I don't have the time to go digging
around in the connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: .shtml with 4.0.4

2002-08-12 Thread rsequeira


First the  isn't supported by Tomcat. It isn't a
standard tag i.e. it isn't defined in the servlet specs. You should use
 instead. Convert  the .shtml files (be careful if you have
SSI includes or CGI processing in the shtml files) that contain the
 tags to .jsps.
And then replace the

with



RS




   

  MadBit   

  cc: 

   Subject:  .shtml with 4.0.4 

  08/12/02 04:45 AM

  Please respond to

  "Tomcat Users

  List"

   

   






Hello.

I'm using Tomcat 4.0.4 with Apache 1.3.26 on Windows 2000.

I want to use .shtml pages. In tomcat I enabled de SSI servlet and
mapping on web.xml,
and on Apache I enabled the AJP connector and enabled .shtml processing:

>
> LoadModule jk_module modules/mod_jk.dll
> Addmodule mod_jk.c
>
> JkWorkersFile /webprg/tomcat/conf/jk/workers.properties
> JkLogFile /webprg/apache/logs/mod_jk.log
> JkLogLevel info



AddType text/html .shtml
AddHandler server-parsed .shtml

...
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMOunt /*.shtml ajp13

On a .shtml page I have a 
call. The called Class it's working fine calling directely via
'localhost/servlet/classpath.Class' URL but with the .shtml the Class
seems not to be called and the browser never end to load the page,
always it's on awaiting data state.

Anyone can help me?

   Thanks


Rogelio Herranz
[EMAIL PROTECTED]



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







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Subir Sengupta

Put this in your web.xml

  
index.jsp
  

Subir

-Original Message-
From: Michael Remijan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:02 AM
To: Tomcat Users List
Subject: RE: automatically serve index.jsp


...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and
jdk1.4.0_01.  I've posted previously about apache giving a directory listing
instead of returning index.jsp.  The only way I've been able to get around
this problem is editing the workers2.properties file to include a mapping to
the whole webapp...
> 
> 
> - workers2.properties (snippet)
---
> [uri:/diary/*]
> info=Map the whole webapp
>
---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet)

> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>

> 
> 
> The question I have is, because of mapping the whole webapp in the
workers2.properties file, will that basically override apache serving static
content?  I assuming it would  but I don't have the time to go digging
around in the connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat jsse help!

2002-08-12 Thread Durham David Cntr 805CSS/SCBE

You have to tell tomcat to use that keystore.  I'm not sure how to do that, check the 
manual.

> -Original Message-
> From: Truong Hieu C 
> Sent: Monday, August 12, 2002 11:08 AM
> To: Tomcat Users List
> Subject: Re: tomcat jsse help!
> 
> 
> Thanks David.
> 
> I created my own keystore succesfully but I still get same 
> error when I
> startup tomcat.  Do I need to do anything else?
> 
> -Hoang
> 
> Durham David Cntr 805CSS/SCBE wrote:
> > 
> > create your own keystore:
> > 
> > keytool -genkey -alias tomcat -keyalg RSA -keystore tomcatCerts
> > 
> > > -Original Message-
> > > From: Truong Hieu C
> > > Sent: Monday, August 12, 2002 10:43 AM
> > > To: Tomcat Users List
> > > Subject: tomcat jsse help!
> > >
> > >
> > > Hi All,
> > > I wanted to turn on https support for tomcat.  So I ran 
> this command:
> > > %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
> > >
> > > I believe I mistypes keystore password.
> > >
> > > Now, If I startup tomcat, I got this error message:
> > > java.io.IOException: Keystore was tampered with, or password was
> > > incorrect
> > > at
> > > 
> sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:737)
> > > at java.security.KeyStore.load(KeyStore.java:608)
> > >
> > > I tried to recreate the key again but got this error:
> > > keytool error: java.io.IOException: Keystore was tampered with, or
> > > password was incorrect
> > >
> > > How do I recreate the key again?
> > >
> > > Thanks,
> > >
> > > -Hoang
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail: 

> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: automatically serve index.jsp

2002-08-12 Thread Michael Remijan

...

having this snippet workers2.properties also works

- workers2.properties (snippet) ---
 [uri:/diary/]
 info=Map the whole webapp
---




-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and 
>jdk1.4.0_01.  I've posted previously about apache giving a directory listing instead 
>of returning index.jsp.  The only way I've been able to get around this problem is 
>editing the workers2.properties file to include a mapping to the whole webapp...
> 
> 
> - workers2.properties (snippet) ---
> [uri:/diary/*]
> info=Map the whole webapp
> ---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet) 
> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
> 
> 
> 
> The question I have is, because of mapping the whole webapp in the 
>workers2.properties file, will that basically override apache serving static content? 
> I assuming it would  but I don't have the time to go digging around in the 
>connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat/Apache authentication

2002-08-12 Thread Koes, Derrick

I put this in my httpd.conf file:

 



AuthType Basic

AuthName "protected area"

AuthUserFile "C:/Program Files/Apache Group/users"

require user koes



 

I get the browser authentication popup and I enter the username and password
that is in my AuthUserFile.

 

However, I still get a 403 error from tomcat even though I have
tomcatAuthentication set to false in the AJP Connector.

 

Does anyone have any ideas why this is happening?




RE: automatically serve index.jsp

2002-08-12 Thread Michael Remijan

...

Yes I did.  In fact it was the first thing I tried.  I also tried getting rid of the 
"AddOutputFilter" snippet of the  tag thinking it was preventing apache 
from loading the jsp page.   that didn't work either.



-Original Message-
From: Steve Prior [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:53 PM
To: Tomcat Users List
Subject: Re: automatically serve index.jsp


You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and 
>jdk1.4.0_01.  I've posted previously about apache giving a directory listing instead 
>of returning index.jsp.  The only way I've been able to get around this problem is 
>editing the workers2.properties file to include a mapping to the whole webapp...
> 
> 
> - workers2.properties (snippet) ---
> [uri:/diary/*]
> info=Map the whole webapp
> ---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet) 
> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
> 
> 
> 
> The question I have is, because of mapping the whole webapp in the 
>workers2.properties file, will that basically override apache serving static content? 
> I assuming it would  but I don't have the time to go digging around in the 
>connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBC MySQL again

2002-08-12 Thread Peter T. Abplanalp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Aug 12, 2002 at 07:45:03PM +0200, Jan Willem Penterman wrote:
> Yes you get a medal. Only thing is that it is so incredibly heavy that I
> can't send it by mail. You have to come pick it up at our office in
> Amsterdam :P

next time i'm in europe, i'll stop by and pick them up.

> Why on earth they invented JDBC for then? I am really dissappointed by
> the lack of performance compared to PHP. The processing of query results
> in Java is even worse (about 10 times slower). 

well, how do propose to get results if your database server isn't on
the same box as your webserver?  ;-)

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9V/aXggA8sH0iRXQRAjPcAJ4yXUPW6542kd1jylikkRj4ohfEKQCgoS+/
Jk5bE6T/ZRLYOLeymzqTOD8=
=DTUQ
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: automatically serve index.jsp

2002-08-12 Thread Steve Prior

You're a little ahead of me in doing this, but did you try adding
index.jsp to a DirectoryIndex directive in Apache?

This was very obious to do in Apache 1.3, not sure as obvious in 2.0.

Steve

Michael Remijan wrote:
> hi all,
> 
> I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and 
>jdk1.4.0_01.  I've posted previously about apache giving a directory listing instead 
>of returning index.jsp.  The only way I've been able to get around this problem is 
>editing the workers2.properties file to include a mapping to the whole webapp...
> 
> 
> - workers2.properties (snippet) ---
> [uri:/diary/*]
> info=Map the whole webapp
> ---
> 
> 
> 
> I have an alias and directory in httpd.conf set up as follows
> 
> - httpd.conf (snippet) 
> ##
> ## diary webapp
> ##
> Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"
> 
> 
> Options FollowSymLinks MultiViews IncludesNoExec
> AddOutputFilter Includes html htm gif jpeg jpg
> AllowOverride None
> Order allow,deny
> Allow from all
> 
> 
> 
> 
> The question I have is, because of mapping the whole webapp in the 
>workers2.properties file, will that basically override apache serving static content? 
> I assuming it would  but I don't have the time to go digging around in the 
>connector's source.
> 
> 
> thanks,
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JDBC MySQL again

2002-08-12 Thread Jan Willem Penterman

> yay!  do i get a medal or something?  ;-)
> 
Yes you get a medal. Only thing is that it is so incredibly heavy that I
can't send it by mail. You have to come pick it up at our office in
Amsterdam :P
O and I gave my thanks to Hoang, but I was mistaken. Thanks Peter!

> > [off-topic]
> > Is that also the reason that php:mysql seems about twice as fast in 
> > executing queries in comparison to jdbc:mysql? I tested this on my 
> > Windows machine. [/off-topic]
> 
> yes.  domain sockets leave out the whole tcp/ip stack and are 
> much faster.
> 
Why on earth they invented JDBC for then? I am really dissappointed by
the lack of performance compared to PHP. The processing of query results
in Java is even worse (about 10 times slower). 

> use mysql;
> grant all privileges on db.object(s) to root@barrie
> identified by 'some_password' [with grant option];
> flush privileges;

You get TWO medals now.

> 
> minor nit - i wouldn't use the root user for these 
> connections.  if the password is somehow compromised, your 
> *entire* server is compromised.  if, however, you set up 
> different users for each database only that particular 
> database will be compromised.
> 
True. But at this stage it's not that important :)

JW


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




automatically serve index.jsp

2002-08-12 Thread Michael Remijan

hi all,

I'm currently working on Apache 2.0.39 <-> tomcat-4.1.8 with mod_jk2 and jdk1.4.0_01.  
I've posted previously about apache giving a directory listing instead of returning 
index.jsp.  The only way I've been able to get around this problem is editing the 
workers2.properties file to include a mapping to the whole webapp...


- workers2.properties (snippet) ---
[uri:/diary/*]
info=Map the whole webapp
---



I have an alias and directory in httpd.conf set up as follows

- httpd.conf (snippet) 
##
## diary webapp
##
Alias /diary "C:/apps/Tomcat/jakarta-tomcat-4.1.8-LE-jdk14/webapps/diary"


Options FollowSymLinks MultiViews IncludesNoExec
AddOutputFilter Includes html htm gif jpeg jpg
AllowOverride None
Order allow,deny
Allow from all




The question I have is, because of mapping the whole webapp in the workers2.properties 
file, will that basically override apache serving static content?  I assuming it would 
 but I don't have the time to go digging around in the connector's source.


thanks,



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat and SOCKS proxy server

2002-08-12 Thread Rutledge, Aaron

I am trying to use Tomcat behind a SOCKS firewall.  I have a servlet
that is trying to access information outside the application context and
I am getting the following exceptions

java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)
at sun.net.www.http.HttpClient.(HttpClient.java:292)
at sun.net.www.http.HttpClient.(HttpClient.java:253)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:301)
...and so on


I found on a really old post that I need to set TOMCAT_OPTS =
-DsocksProxyHost= -DsocksProxyPort=1080
I have set an environmental variable (I am using W2K), but I am still
having problems.  Is there something more I need to do?  I can't find
any documentation on this.  Any help GREATLY appreciated!  
Best regards, Aaron

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Servlet Compilation Taking Way Too Long

2002-08-12 Thread micael

Whenever I change a jsp page, it takes forever for the program to 
compile.  ("Forever" = five to fifteen minutes.)  During that time my site 
is essentially shut down.

I am current running aTomcat 4.0 with Struts 1.2.  I have an application 
set for www.myapp.com with the following code in server.xml, where the code 
for "/anniversaries" is reapeated for 24 different sites.

 

 

 

 

...

 

Am I doing something dumb, or am I misusing one of the applications?  Or, 
what?  Thanks.

Micael



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Does Tomcat "eat" Exceptions?

2002-08-12 Thread Will Hartung

Hi all,

Running Tomcat 3.2, and I'm debugging some new code I've been working on.

In my code, it checks for some notable details, and if it finds a problem,
it throws a simple RuntimeException describing the problem.

But, while running Tomcat, I never see the actual exception.

Does Tomcat silently eat exceptions it receives from Servlets? I would hope
that it would do Ye Olde Stack Trace when it hit an exception, but
apparently not.

Any hints?

Thanx!

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Page Load Problem in Stand-alone Mode

2002-08-12 Thread Cory Isaacson

When running Tomcat in stand-alone mode, if I successively request pages in
two different frames, the second page often does not display. I get a
"Server not found" error in the browser. For example, to keep pages in
multiple frames in synch I submit one frame based on the JavaScript ONLOAD
event of the other, so the second pages is requested immediately after the
first. Using the Coyote connector, this works fine so long as both pages are
JSP. If one page is JSP and the other HTML, the HTML will display using
Coyote, after about a 10 second delay (with both JSPs there is no delay).
Using the regular default connector, I almost always get the server not
found error. I tried this same code in WebSphere 4.x, and it works fine with
JSP and an HTML page without delay or a problem.

Because it works in WebSphere and to some degree with Coyote, I wonder if
its just not a configuration problem. Here are the relevant sections from
the server.xml file:

  







Thanks in advance for any help on this.

Cory


Cory Isaacson
President & CTO
Compuflex International
(818) 884-1168
[EMAIL PROTECTED]
www.compuflex.com



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Q] Realms, Principals, et al...

2002-08-12 Thread Per Kreipke

> > Q1:
> > ===
> >
> > If GenericPrincipal isn't available from webapps, is there
> another way to
> > get at the complete list of roles for a given user and their password?
> >
>
> Not from a webapp through a portable API.  What you see (isUserInRole())
> is what you get.
>
> However, properly configured web.xml files will have 
> elements for all of the role names that are referenced by that webapp, so
> you might try reading them (by parsing /WEB-INF/web.xml) and trying all of
> those names through isUserInRole().  Of course, that doesn't help you if
> the webapp doesn't define them all ...

... or if the set of all roles is dynamic, a shortfall of the declarative
servlet security API.

> > I need the complete list of roles for the current user and password to
> > implement a connector from Cocoon authentication to the container
> > authentication.
> >
>
> It's not at all clear to me that every possible Realm implementation will
> be able to articulate such a list -- or that the list won't change over
> time.  For example, it's perfectly feasible to implement a Realm that says
> "user Joe has this role, but only from 8am to 5pm on weekdays".  It sounds
> like the Cocoon folks might want to do a little more thinking about their
> design.

I don't know that it's their mistake, I'm just talking about wrapping the
GenericPrincipal class. Isn't it true that you can't do that from _any_
webapp, much less Cocoon. E.g. given any of the current Tomcat Realms, how
could you do your 'Joe' example?

Thanks, Per

P.s. I know you spend a huge amount of time helping people on this and other
lists, so I hesitate to ask again but...

Is the implementation of JAASRealm in 4.1 backwards compatible to 4.0.4?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBC MySQL again

2002-08-12 Thread Peter T. Abplanalp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Aug 12, 2002 at 06:57:09PM +0200, Jan Willem Penterman wrote:
> > generally, if you see this problem, your driver is loaded 
> > correctly; however, it is unable to connect to your mysql 
> > server.  i would test this by trying to telnet to port 3306 
> > on localhost and see if you get a connection.  if you don't, 
> > you need to make sure your mysql is allowing connections over 
> > tcp/ip which, if i'm not mistaken, debian has turned off by 
> > default.  look in the /etc/my.cnf or maybe /etc/mysql/my.cnf 
> > or some such for a skip-networking flag and comment it out if 
> > necessary.  restart mysql, try the telnet again.  if it 
> > works, restart tomcat and see if your app works.
> > 
> Very good! You're the 'winner' with the right answer! I was thinking my

yay!  do i get a medal or something?  ;-)

> mysqld setup was ok, since it worked flawlessly with PHP. I guess PHP
> and MySQL have some sort of secret 'marriage', and don't connect over
> TCP/IP? 

probably.

> [off-topic]
> Is that also the reason that php:mysql seems about twice as fast in
> executing queries in comparison to jdbc:mysql? I tested this on my
> Windows machine.
> [/off-topic]

yes.  domain sockets leave out the whole tcp/ip stack and are much
faster.

> However, now I get the following exception: 
> SQLException: Invalid authorization specification: Access denied for
> user: 'root@barrie' (Using password: YES)
> 
> My guess is that I have to config mysqld in a way that it accepts this
> user (of which I'm pretty sure it has the correct login and password)
> from 'barrie' instead of 'localhost' (barrie and localhost essentially
> are the same Debian box). But that's not a question to ask to this
> list...

since we're here...

yes, the problem is that when you connect using the mysql tool on the
command line, the client thinks it is localhost; however, java passes
the host name over the connection and thus you must allow the root
user to connect to mysql from that "host" even thought they are
esentially the same.

as root:

use mysql;
grant all privileges on db.object(s) to root@barrie
identified by 'some_password' [with grant option];
flush privileges;

minor nit - i wouldn't use the root user for these connections.  if
the password is somehow compromised, your *entire* server is
compromised.  if, however, you set up different users for each
database only that particular database will be compromised.

- -- 
Peter Abplanalp

Email:   [EMAIL PROTECTED]
PGP: pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9V+r/ggA8sH0iRXQRAiEYAJ0fDrn34VaWmFMGXIFqMjzRQH5I6wCguCkx
ldddPETeicqjMdQfm5ZgChc=
=0/8l
-END PGP SIGNATURE-

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JDBC MySQL again

2002-08-12 Thread Jan Willem Penterman

> generally, if you see this problem, your driver is loaded 
> correctly; however, it is unable to connect to your mysql 
> server.  i would test this by trying to telnet to port 3306 
> on localhost and see if you get a connection.  if you don't, 
> you need to make sure your mysql is allowing connections over 
> tcp/ip which, if i'm not mistaken, debian has turned off by 
> default.  look in the /etc/my.cnf or maybe /etc/mysql/my.cnf 
> or some such for a skip-networking flag and comment it out if 
> necessary.  restart mysql, try the telnet again.  if it 
> works, restart tomcat and see if your app works.
> 
Very good! You're the 'winner' with the right answer! I was thinking my
mysqld setup was ok, since it worked flawlessly with PHP. I guess PHP
and MySQL have some sort of secret 'marriage', and don't connect over
TCP/IP? 

[off-topic]
Is that also the reason that php:mysql seems about twice as fast in
executing queries in comparison to jdbc:mysql? I tested this on my
Windows machine.
[/off-topic]

However, now I get the following exception: 
SQLException: Invalid authorization specification: Access denied for
user: 'root@barrie' (Using password: YES)

My guess is that I have to config mysqld in a way that it accepts this
user (of which I'm pretty sure it has the correct login and password)
from 'barrie' instead of 'localhost' (barrie and localhost essentially
are the same Debian box). But that's not a question to ask to this
list...

Thanks Hoang! (and the rest of you who didn't give the right answer;). I
tried your solutions, and at least I got rid of the parse error that
also was in my catalina.out but that had a different cause).

JW







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Q] Realms, Principals, et al...

2002-08-12 Thread Craig R. McClanahan



On Mon, 12 Aug 2002, Per Kreipke wrote:

> Date: Mon, 12 Aug 2002 12:38:12 -0400
> From: Per Kreipke <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [Q] Realms, Principals, et al...
>
> I have a couple of security questions:
>
> Q1:
> ===
>
> If GenericPrincipal isn't available from webapps, is there another way to
> get at the complete list of roles for a given user and their password?
>

Not from a webapp through a portable API.  What you see (isUserInRole())
is what you get.

However, properly configured web.xml files will have 
elements for all of the role names that are referenced by that webapp, so
you might try reading them (by parsing /WEB-INF/web.xml) and trying all of
those names through isUserInRole().  Of course, that doesn't help you if
the webapp doesn't define them all ...

> I need the complete list of roles for the current user and password to
> implement a connector from Cocoon authentication to the container
> authentication.
>

It's not at all clear to me that every possible Realm implementation will
be able to articulate such a list -- or that the list won't change over
time.  For example, it's perfectly feasible to implement a Realm that says
"user Joe has this role, but only from 8am to 5pm on weekdays".  It sounds
like the Cocoon folks might want to do a little more thinking about their
design.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




apache 2.0.40 upgrade w/tomcat 4.0.4 on w2k

2002-08-12 Thread Carrie Salazar

this may be a silly question, but i assume to  upgrade to
Apache 2.0.40 (with Tomcat 4.0.4). i have to re-compile the  
mod_jk.dll?  if so, anyone have Visual C++ handy ;) ?

this is all after i have Apache 2.0.39 working beautifully  
with Tomcat 4.0.4., but for several reasons i need to upgrade.
-
carrie s.
~

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Ajp 1.3 Connector Fails

2002-08-12 Thread Isabel Lameda

I´ve downloaded Tomcat 4.1.8 Beta Released and
uncomment the line for the ajp 1.3 Connector, which is:


   
So when i start the Tomcat i get this

INFO: Initializing Coyote HTTP/1.1 on port 8080
ServerLifecycleListener: createMBeans: MBeanException
java.lang.Exception: ManagedBean is not found with Ajp13Connector
at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:359)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:716)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:690)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:329)
at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
cycleListener.java:206)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2181)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.8
12/08/2002 11:26:32 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080


Every thing works fine, i can view my pages using IIS via the ajp Connector.

The only problem is that i cannot use the Administration Tool, when i open
it
i get this:

HTTP Status 503 - Servlet action is currently unavailable 

type: Status report
message: Servlet action is currently unavailable
description: The requested service (Servlet action is currently
unavailable) is not currently available.

If i comment back the line for the ajp connector the administration tool
works fine but
the thing is that i need to use the connector.

I'm also worry about what other problems could be due that exception,
because until now i´ve only
found that with the administration tool.

Thanks, I´ll appreciate any help.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk and webapp file locations

2002-08-12 Thread John Rishea

I have a Tomcat/Apache application running successfully using mod_webapp but
want to allow Apache to handle static requests.

I built mod_jk from source and it's handling the Tomcat examples correctly,
but I'm wondering how I set up the directory structure for my own webapps so
that Apache can handle the static stuff.  Can I keep the webapp files (both
static html and servlets) in a directory under TOMCAT_HOME/webapps, as I did
when using mod_webapp, or do I have to move the static elements under an
Apache directory somewhere?  Should I change Apache's server root to point
to the Tomcat webapps directory?  I've searched the list and the web for a
clear answer but found nothing very helpful.

This is using apache 1.3.26 and tomcat 4.0.4.  Thanks for the help.
__
John Rishea



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Reading from files in servlet from Tomcat-4.0.4

2002-08-12 Thread Shapira, Yoav

Hi,
That's a misleading answer.  Using the FileInputStream approach, unless
you specify an absolute path your results will depend on what the
current directory ($CWD) is when you start the server.  Not everyone
starts it from TOMCAT_HOME/bin.  

The first answer posted, using getResource() or getResourceAsStream() is
better because it does not have the above dependency and will work out
of a WAR.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 12, 2002 12:34 PM
>To: Tomcat Users List
>Subject: Re: Reading from files in servlet from Tomcat-4.0.4
>
>Hi,
>
>you need to put the file in /TOMCAT_HOME/bin
>
>I had the same problem and first I made a simple servlet code that
writes
>a txt file, then I look for that file and Tomcat put it in
>/TOMCAT_HOME/bin
>
>regards
>Alex Tomita
>
>
>
>
>
>
>khozaima shakir <[EMAIL PROTECTED]>
>10/08/2002 04:30 p.m.
>Please respond to Tomcat Users List
>
>
>To: [EMAIL PROTECTED]
>cc:
>Subject:Reading from files in servlet from Tomcat-4.0.4
>
>
>
>Hi all,
>I am trying to read from a file : filename
>Where should i put this file in tomcat 4.0.4 directory structure?
>I tried putting the file in directories:
>webapps/ROOT, webapps/ROOT/WEB-INF, webapps/ROOT/WEB-INF/classes  in
each
>instance i get the error message
>"The system cannot find the file specified"
>
>I used following statement in servlet code.
>bufferin = new BufferedReader(new InputStreamReader(new
>FileInputStream(fileName)));
>
>Thanks
>Khozaima
>
>
>_
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Loading new context on tomcat 4

2002-08-12 Thread Shapira, Yoav

Hi,
Tomcat 4.x implements the Servlet Specification, v2.3.  You can get the
servlet spec at:
http://java.sun.com/products/servlet/download.html

In there you will find the DTD for web.xml.  Among other things, it
lists where you can put  elements and their meaning.
The  element is not required in order for a webapp to
load.  It is an optional element, with a default value of 30 minutes for
session expiration.

Accordingly, there must be some other reason why your webapp won't load
if you don't put the  element in your web.xml.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Rodrigo Giammarini [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 12, 2002 12:21 PM
>To: Tomcat Users List
>Subject: Re: Loading new context on tomcat 4
>
>hi, one more thing, I've found what is the problem,
>I have this on my web.xml
>
>10
>
>If I leave this uncommented the app wont load.
>Someone know which is de equivalent in tomcat4
>thank
>
>- Original Message -
>From: "Shapira, Yoav" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, August 12, 2002 12:10 PM
>Subject: RE: Loading new context on tomcat 4
>
>
>Hi,
>When you download tomcat 4.x, you get a couple of example deployment
>descriptors.  Check the
>webapps/ROOT/WEB-INF
>and
>webapps/examples/WEB-INF
>directories and you'll see the web.xml files there.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Rodrigo Giammarini [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, August 12, 2002 11:07 AM
>>To: Tomcat Users List
>>Subject: Re: Loading new context on tomcat 4
>>
>>hi,
>>I 've copy everything from tomcat 3.2 to tomcat4 because I'm not the
>>developer who done this apps, so I'll ask the developer to update the
>>deployment, beside, have you got a WEB-INF/web.xml example , so I can
>show
>>it to my developers?
>>and about the e.i. all are running fine.
>>Thank
>>RG
>>
>>- Original Message -
>>From: "Shapira, Yoav" <[EMAIL PROTECTED]>
>>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>Sent: Monday, August 12, 2002 11:33 AM
>>Subject: RE: Loading new context on tomcat 4
>>
>>
>>Hi,
>>If you're using tomcat 4.x, why is your DTD written to the version 2.2
>>spec?
>>You probably cannot copy the app directory from tomcat 3.2.1 to 4.x
>>without any changes.  You need to update your deployment descriptor at
>>least.  Have you also verified a proper installation of 4.x, i.e. all
>>examples running etc.?
>>
>>Yoav Shapira
>>Millennium ChemInformatics
>>
>>
>>>-Original Message-
>>>From: Rodrigo Giammarini [mailto:[EMAIL PROTECTED]]
>>>Sent: Monday, August 12, 2002 10:04 AM
>>>To: [EMAIL PROTECTED]
>>>Subject: Loading new context on tomcat 4
>>>
>>>Hi !
>>>I have a problem loading new context on tomcat 4.0.4 on a Redhat 7.2
>>and
>>>java 1.4.0_01, the app that wont work in tomcat 4 is working on
tomcat
>>>3.2.1-
>>>If I delete this lines from de webapps/context-name/WEB-INF/web.xml
>the
>>>page is loaded but not displayed an in the /manger/list appears as
>>running-
>>>web.xml
>>>
>>>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>>>"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
>>>
>>>
>>>  
>>>10
>>>  
>>>
>>>  
>>>Controller
>>>com.cti.webgeoloc.Controller
>>>  
>>>
>>>
>>>
>>>Thanks in advance!
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail:
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   >[EMAIL PROTECTED]>
>>For additional commands, e-mail: >[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Q] Realms, Principals, et al...

2002-08-12 Thread Per Kreipke

I have a couple of security questions:

Q1:
===

If GenericPrincipal isn't available from webapps, is there another way to
get at the complete list of roles for a given user and their password?

I need the complete list of roles for the current user and password to
implement a connector from Cocoon authentication to the container
authentication.

Jason Loo on 2-5-2002 asked:

"I've been successful in creating a custom JDBCRealm and have extended the
GenericPrincipal.  However, when attempting to pull my principal from the
request (request.getUserPrincipal()) and cast to EITHER
org.apache.catalina.realm.GenericPrincipal or my custom principal, I get a
Class Cast Exception."

http://marc.theaimsgroup.com/?l=tomcat-user&m=101289699814058&w=2

He pointed to this message:

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg40073.html

but never got a reply.

I presume that the reason it's not available is because the catalina jar is
loaded by a different classloader separate from webapps. [Aside: can't find
the documentation that details what each */lib directory does (e.g. common
vs lib vs ...)].

Is there any way besides tweaking the classpath (by changing it or by
copying JARs) to get at the GenericPrincipal class?

There are some convenience methods on GenericPrincipal that are not on
Principal that would be nice to get to (complete list of roles for the
current user and password).


Q2:
===
Is the implementation of JAASRealm in 4.1 backwards compatible to 4.0.4?


Q3:
===
Does anyone know of a Realm implementation that includes the notion of
groups?

Maybe I'm thinking about this the wrong way but here's the problem:

Parties in our case are users, companies and holding companies. Users are
members of one company and can have different application permissions within
the company (e.g. manager, employee, reader). Members of a holding company
have rights across other companies (e.g. they can be a manager of one but
only 'reader' of another).

I can model this in the database but have never found a sstisfactory Java
implementation that integrates with Tomcat's Realm based security and
security constraints.

Any pointers would be appreciated.


Thanks, Per


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Reading from files in servlet from Tomcat-4.0.4

2002-08-12 Thread TOMITA_ALEX_NONLILLY

Hi,

you need to put the file in /TOMCAT_HOME/bin

I had the same problem and first I made a simple servlet code that writes 
a txt file, then I look for that file and Tomcat put it in 
/TOMCAT_HOME/bin

regards
Alex Tomita






khozaima shakir <[EMAIL PROTECTED]>
10/08/2002 04:30 p.m.
Please respond to Tomcat Users List

 
To: [EMAIL PROTECTED]
cc: 
Subject:Reading from files in servlet from Tomcat-4.0.4



Hi all,
I am trying to read from a file : filename
Where should i put this file in tomcat 4.0.4 directory structure?
I tried putting the file in directories:
webapps/ROOT, webapps/ROOT/WEB-INF, webapps/ROOT/WEB-INF/classes  in each 
instance i get the error message
"The system cannot find the file specified"

I used following statement in servlet code.
bufferin = new BufferedReader(new InputStreamReader(new 
FileInputStream(fileName)));

Thanks
Khozaima


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






RE: JDBC Realm Error --Can"t access database

2002-08-12 Thread Andrew

Try removing your username and password info from your connection string
and using the 'connectionName' and 'connectionPassword' attributes

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html

- Andrew

> -Original Message-
> From: khozaima shakir [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, August 12, 2002 10:42 AM
> To: [EMAIL PROTECTED]
> Subject: JDBC Realm Error --Can"t access database
> 
> 
> Hi all, need help, please!
> I am trying to set up JDBCRealm. I edit server.xml as:-
>   driverName="org.gjt.mm.mysql.Driver"
>   
> connectionURL="jdbc:mysql://mysql.wpi.edu/EMSDATA?user=skhuzem
> a;password=pPqrAb"
>   userTable="USERS" userNameCol="USER_NAME" 
> userCredCol="USER_PASS"
>   userRoleTable="USER_ROLES" roleNameCol="ROLE_NAME" 
> /> When i restart the tomcat after this, i get error message 
> as Starting service Tomcat-Standalone Apache Tomcat/4.0.4
> Catalina.start: LifecycleException:  Exception opening 
> database connection:
> java.sql.SQLException: Invalid authorization specification: 
> Access denied 
> for user:'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: Invalid authorization specification: 
> Access denied 
> for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
> at 
> org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> at 
> org.apache.catalina.core.StandardService.start(StandardService
> .java:388)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> at 
> org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> at 
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>   at 
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
>at 
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> 
> The mysql database server is not on my local host (for 
> tomcat). Does it look 
> like the connection URL is not being parsed correctly? ( I 
> tried changing 
> the connectionURL string in server.xml and those were 
> reflected in the error 
> message and still got error as (Using Password: NO) Without 
> setting up 
> JDBCRealm, I can start the tomcat sucessfully and the servlet 
> also access 
> the database using the same url username and password
> can't figure out the fault... please help???
> What other configs, do I need to do in addition to the one in 
> server.xml, 
> just to get tomcat started?
> Khozaima
> 
> 
> 
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Authentication: Use Tomcat and Apache

2002-08-12 Thread Kevin Andryc

I have an application that currently uses Apache's authentication. In order
for this to work with Tomcat I had to specify it in my server.xml, like so:



I also have another application running under Tomcat that I would like
Tomcat to handle the authentication. Is there a way to have both methods?

Thanks,
Kevin


Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Loading new context on tomcat 4

2002-08-12 Thread Rodrigo Giammarini

hi, one more thing, I've found what is the problem,
I have this on my web.xml

10

If I leave this uncommented the app wont load.
Someone know which is de equivalent in tomcat4
thank

- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 12:10 PM
Subject: RE: Loading new context on tomcat 4


Hi,
When you download tomcat 4.x, you get a couple of example deployment
descriptors.  Check the
webapps/ROOT/WEB-INF
and
webapps/examples/WEB-INF
directories and you'll see the web.xml files there.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Rodrigo Giammarini [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 12, 2002 11:07 AM
>To: Tomcat Users List
>Subject: Re: Loading new context on tomcat 4
>
>hi,
>I 've copy everything from tomcat 3.2 to tomcat4 because I'm not the
>developer who done this apps, so I'll ask the developer to update the
>deployment, beside, have you got a WEB-INF/web.xml example , so I can
show
>it to my developers?
>and about the e.i. all are running fine.
>Thank
>RG
>
>- Original Message -
>From: "Shapira, Yoav" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, August 12, 2002 11:33 AM
>Subject: RE: Loading new context on tomcat 4
>
>
>Hi,
>If you're using tomcat 4.x, why is your DTD written to the version 2.2
>spec?
>You probably cannot copy the app directory from tomcat 3.2.1 to 4.x
>without any changes.  You need to update your deployment descriptor at
>least.  Have you also verified a proper installation of 4.x, i.e. all
>examples running etc.?
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Rodrigo Giammarini [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, August 12, 2002 10:04 AM
>>To: [EMAIL PROTECTED]
>>Subject: Loading new context on tomcat 4
>>
>>Hi !
>>I have a problem loading new context on tomcat 4.0.4 on a Redhat 7.2
>and
>>java 1.4.0_01, the app that wont work in tomcat 4 is working on tomcat
>>3.2.1-
>>If I delete this lines from de webapps/context-name/WEB-INF/web.xml
the
>>page is loaded but not displayed an in the /manger/list appears as
>running-
>>web.xml
>>
>>
>>>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>>"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
>>
>>
>>  
>>10
>>  
>>
>>  
>>Controller
>>com.cti.webgeoloc.Controller
>>  
>>
>>
>>
>>Thanks in advance!
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >