How to configure tomcat to forbid indexing of a directory

2002-11-18 Thread John Z Yang
Dear all:
I am puzzled that in Apache
the httpd.conf has a directive "Options Indexes" to turn directory mapping on and off, 
but for tomcat there seems no way to block the user from viewing the directory 
structure unless you create an index.jsp file.

Can anyone give me a pointer to the "Options" equivalent in tomcat configuration?

Many thanks.

John



Re: Connection pooling with Tomcat4 and IBM DB2 7.1

2002-11-18 Thread Kwok Peng Tuck
I think the type should be javax.sql.DataSource rather than what you put 
in there.
And add the dbcp factory name plus value as per docs in 4.1.12


factory
org.apache.commons.dbcp.BasicDataSourceFactory


This will use the dbcp connection pool.
Your web.xml looks about ok as far as the resource-ref is concerned..


Mauro Brändle wrote:

Between the tags   of my server.xml file (in the proper context of my
web application) i have:


name="jdbc/DBname" auth="Container"/>
 
   
 password
 password
   
   
 maxWait
 5000
   
   
 maxIdle
 2
   
   
 maxActive
 4
   
   
 url
 jdbc:db2://db2cpy.bettinelli.it:6789/bettdev
   
   
 driverClassName
 COM.ibm.db2.jdbc.net.DB2Driver
   
   
 username
 user
   
 

And here is my web.xml file:


   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd";>



   Prova liste assemblaggio
   
PROVA LASS.
   


 author
 [EMAIL PROTECTED]
 
 MBR
  



   
   listeners.ContextListener
   
   
   listeners.SessionListener
   

   
   lass1
   listeass.lass1
   


   lass2
   listeass.lass2
   


   riepil1
   listeass.riepil1
   


   menuAss
   listeass.menuAss
   

  
   lass1
   /liste/servlet/listeass
   


   invoker
   /servlet/*
   

   
   lass2
   /listeass
   

   
   riepil1
   /listeass
   

  
   menuAss
   /listeass
   


 60



   
   http://jakarta.apache.org/tomcat/debug-taglib
   
   
  /WEB-INF/jsp/debug-taglib.tld
   
   


   http://jakarta.apache.org/tomcat/examples-taglib
   
   
  /WEB-INF/jsp/example-taglib.tld
   
   


 jdbc/DBname
 jdbc/DBname
 javax.sql.DataSource
 Container



Thanks.
Mauro Brändle


Kwok Peng Tuck wrote:

 

Can you post a sample of your jndi resource declaration plus your web.xml ?
Looks like it is looking up a nonexistant name.

Mauro Brändle wrote:

   

Hello everybody,
  I'm asking if anyone has ever used connection pooling to access a
DB2 database with Tomcat4, since I only have found examples for MySQL
and Oracle database.
  I'm trying to use a connection pool to access a DB2 7.1 database.
I'm almost sure to have  properly configured Tomcat 4, but still i have
problems when i perform the context lookup to get the database resource.
The code is:

javax.naming.InitialContext ctx = new javax.naming.InitialContext();
javax.naming.Context envCtx = (javax.naming.Context)
ctx.lookup("java:comp/env");
javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");
java.sql.Connection conn = ds.getConnection("user", "password");

 When I perform   javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");   I get the following error:

javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.ResourceFactory.getObjectInstance(Unknown
Source)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:310)

at org.apache.naming.NamingContext.lookup(Unknown Source)
at org.apache.naming.NamingContext.lookup(Unknown Source)
at org.apache.naming.NamingContext.lookup(Unknown Source) ...

I hope you could please help me with this problem.
Thank you very much!

Mauro Brändle



 

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


 




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




Re: Connection pooling with Tomcat4 and IBM DB2 7.1

2002-11-18 Thread Mauro Brändle
Between the tags   of my server.xml file (in the proper context of my
web application) i have:


  

  password
  password


  maxWait
  5000


  maxIdle
  2


  maxActive
  4


  url
  jdbc:db2://db2cpy.bettinelli.it:6789/bettdev


  driverClassName
  COM.ibm.db2.jdbc.net.DB2Driver


  username
  user

  

And here is my web.xml file:

http://java.sun.com/dtd/web-app_2_3.dtd";>



Prova liste assemblaggio

 PROVA LASS.


 
  author
  [EMAIL PROTECTED]
  
  MBR
   
 



listeners.ContextListener


listeners.SessionListener



lass1
listeass.lass1


 
lass2
listeass.lass2


 
riepil1
listeass.riepil1


 
menuAss
listeass.menuAss


   
lass1
/liste/servlet/listeass



invoker
/servlet/*



lass2
/listeass



riepil1
/listeass


   
menuAss
/listeass



  60
 



http://jakarta.apache.org/tomcat/debug-taglib


   /WEB-INF/jsp/debug-taglib.tld



 
http://jakarta.apache.org/tomcat/examples-taglib


   /WEB-INF/jsp/example-taglib.tld



 
  jdbc/DBname
  jdbc/DBname
  javax.sql.DataSource
  Container
 


Thanks.
Mauro Brändle


Kwok Peng Tuck wrote:

> Can you post a sample of your jndi resource declaration plus your web.xml ?
> Looks like it is looking up a nonexistant name.
>
> Mauro Brändle wrote:
>
> >Hello everybody,
> >I'm asking if anyone has ever used connection pooling to access a
> >DB2 database with Tomcat4, since I only have found examples for MySQL
> >and Oracle database.
> >I'm trying to use a connection pool to access a DB2 7.1 database.
> >I'm almost sure to have  properly configured Tomcat 4, but still i have
> >problems when i perform the context lookup to get the database resource.
> >The code is:
> >
> >  javax.naming.InitialContext ctx = new javax.naming.InitialContext();
> >  javax.naming.Context envCtx = (javax.naming.Context)
> >ctx.lookup("java:comp/env");
> >  javax.sql.DataSource ds = (javax.sql.DataSource)
> >envCtx.lookup("jdbc/DBname");
> >  java.sql.Connection conn = ds.getConnection("user", "password");
> >
> >   When I perform   javax.sql.DataSource ds = (javax.sql.DataSource)
> >envCtx.lookup("jdbc/DBname");   I get the following error:
> >
> >javax.naming.NamingException: Cannot create resource instance
> > at org.apache.naming.factory.ResourceFactory.getObjectInstance(Unknown
> >Source)
> > at
> >javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:310)
> >
> > at org.apache.naming.NamingContext.lookup(Unknown Source)
> > at org.apache.naming.NamingContext.lookup(Unknown Source)
> > at org.apache.naming.NamingContext.lookup(Unknown Source) ...
> >
> >I hope you could please help me with this problem.
> >Thank you very much!
> >
> >Mauro Brändle
> >
> >
> >
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



Re: auto-redirect to default page - undesired

2002-11-18 Thread Bill Barker

"neal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Nope.  Doesnt work ... I just tried it.  Two problems:
>
> 1. When mapping the servlet to "/" EVERYTHING requested will return that
> default page .. even sub pages, graphics etc. Apparently "/" does not map
to
> the default page at the root level, rather anything and everything
requested
> from that domain!

The servlet-mapping "/" is special.  It specifies the servlet that gets
called when no other mapping matches.  By default, it is mapped to
Catalina's DefaultServlet, but if you specify another servlet in your
web.xml file, it will go to that one instead.

What you want to do is possible in Tomcat 3.3.2-dev (with non-default
options set), and I'm guessing will eventually be possible in Tomcat 5.x
(since the hard part is required by the 2.4 Servlet-Spec).  However, to get
it into the 4.1.x code-base, you'll probably have to push the issue yourself
with patches.  Since Tomcat's behavior falls within the 2.3 Servlet-Spec, it
can't really be considered a bug.

>
> 2.  apparently isn't supported by Netscape 4.7 so even if the above
> was working, this still would not apparently be an option for some of the
> older but still supported browsers.
>
> :(
>
> Any other thoughts?  I'm not to keen on this 'feature'.
>
> Thanks.
> Neal
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 4:30 PM
> To: Tomcat Users List
> Subject: RE: auto-redirect to default page - undesired
>
>
>
>
> On Mon, 18 Nov 2002, neal wrote:
>
> > Date: Mon, 18 Nov 2002 16:12:29 -0800
> > From: neal <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: RE: auto-redirect to default page - undesired
> >
> > Well, cool idea but there's still a problem:
> >
> > I mean...The requestDispatcher *does* redirect to the right page *BUT*
all
> > my relative links are broken.  So, I tried mapping the forward servlet
to
> > the path "/test" instead of just "/" and sure enough *that* url worked
...
> > relative paths just fine.  So even though mapping to "/" did get the
page
> to
> > call correctly, nothing in that page resolved correctly.  Somehow its
> > context was off I guess. Do you know of some alternative syntax to "/"
> that
> > could be specified to indicate the root of the domain?  I tried
everything
> I
> > could think of and nothing else worked (e.g. "", "/*", "*", "*/", etc).
> >
>
> That's not a bug ... that's a feature :-).
>
> The reason relative references are often broken by
> RequestDispatcher.forward() comes from the fact that the reference is
> resolved by your *browser* (not by the server), against the request URI to
> which the request was originally submitted.  The browser has no idea that
> the forward happened, so if it points into a different subdirectory of
> your webapp, it will typically fail.
>
> One workaround for this is to include an HTML  element nested in
> your  element.  This will allow you to specify the absolute URL
> against which relative URLs are resolved -- you would typically set it to
> the absolute URL of the page file itself.  That way, relative links will
> work when the page is accessed directly and when it is accessed via a
> forward.
>
> Implementing this idea is pretty tedious if you don't have a tag library
> that takes care of it for you, like the  tag in Struts.
>
> > Thanks.
> > Neal
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 





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




Re: Granting security permissions not working

2002-11-18 Thread Pae Choi
I know it's not going to help you much or at all. And I am not
certain what's going on with your side, but just FYI. I have
tested the TC v4.1.12 with "-security." And it runs fine on
the WinNT.

It has many security permissions in the catalina.policy, inclduing
own Web Apps, JAXM, AXIS, RMI stub downloading, blah, blah...


Pae

> Thank you for your suggestions. See my comments below:
>
> > First, ensure you are running with the -security option that
> > turns on Tomcat
> > with the security manager installed.  Often you need to modify the
>
> I am definitely running with the -security option. I have double-checked
> that it's in my start.bat script in the bin/ directory and I see the
> statement "Using Security Manager" on the tomcat console. Plus, when
> running with -Djava.security.debug=access,failure, I see permissions
> checking etc. going on.
>
> > Second, you are granting your permissions far too low on the
> > file path.  At
> > the very least, consider something like
> >
> > grant codeBase "file:${catalina.base}/webapps/yourappname/-" {
>
> The grant that I described there was a last-ditch desparate attempt to
> cover everything with AllPermission. I had previously tried granting on
> the individual .jar files, on the webapps directory, on my specific
> webapps directory, etc. I've tried every conceivable known permutation.
> Regardless, I did as you suggested and put the grant back on the
> specific webapp directory (using the "-" at the end)... No luck.
>
> >
> > Third, are you actually running multiple instances in which your
> > catalina.base is different than your catalina.home?  If so,
>
> I'm only running one instance of tomcat. I'm not sure where/how
> catalina.base gets set, but I have a good feeling that the actual policy
> file is being read b/c if I remove that policy file then everything goes
> nuts.
>
> One interesting thing is that I can grant access in the general grant {
> ... } clause (no specific codeBase specified... Just the default for all
> webapps), and things will work fine. However, I don't want to grant
> access to all webapps, I only want to grant access to a particular
> webapp/jar file.
>
> Basically, it looks like grant entries on codebase's under the webapps
> directory are *completely ignored*. No matter what I grant on a
> particular webapp (using grant codeBase
> "file:${catalina.base}/webapps/appname/-" {  }), nothing takes
> effect at all. I can verify this by looking at debug output (setting
> java.debug.security=policy,access,failure) -- when it prints the
> Protection Domain that failed the access call, I can clearly see that
> *no permissions* are granted to the jar files under that webapp/codebase
> besides the default jndi and file read permissions. If I want any
> permissions to apply, I have to grant them generally in the grant { ...
> } clause (no codeBase).
>
> Obviously, this is not desired behavior. It looks like there could be a
> bug in the Tomcat policy management?
>
> JP
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Re: Connection pooling with Tomcat4 and IBM DB2 7.1

2002-11-18 Thread Kwok Peng Tuck
Can you post a sample of your jndi resource declaration plus your web.xml ?
Looks like it is looking up a nonexistant name.

Mauro Brändle wrote:


Hello everybody,
   I'm asking if anyone has ever used connection pooling to access a
DB2 database with Tomcat4, since I only have found examples for MySQL
and Oracle database.
   I'm trying to use a connection pool to access a DB2 7.1 database.
I'm almost sure to have  properly configured Tomcat 4, but still i have
problems when i perform the context lookup to get the database resource.
The code is:

 javax.naming.InitialContext ctx = new javax.naming.InitialContext();
 javax.naming.Context envCtx = (javax.naming.Context)
ctx.lookup("java:comp/env");
 javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");
 java.sql.Connection conn = ds.getConnection("user", "password");

  When I perform   javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");   I get the following error:

javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.ResourceFactory.getObjectInstance(Unknown
Source)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:310)

at org.apache.naming.NamingContext.lookup(Unknown Source)
at org.apache.naming.NamingContext.lookup(Unknown Source)
at org.apache.naming.NamingContext.lookup(Unknown Source) ...

I hope you could please help me with this problem.
Thank you very much!

Mauro Brändle

 




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




Connection pooling with Tomcat4 and IBM DB2 7.1

2002-11-18 Thread Mauro Brändle
Hello everybody,
I'm asking if anyone has ever used connection pooling to access a
DB2 database with Tomcat4, since I only have found examples for MySQL
and Oracle database.
I'm trying to use a connection pool to access a DB2 7.1 database.
I'm almost sure to have  properly configured Tomcat 4, but still i have
problems when i perform the context lookup to get the database resource.
The code is:

  javax.naming.InitialContext ctx = new javax.naming.InitialContext();
  javax.naming.Context envCtx = (javax.naming.Context)
ctx.lookup("java:comp/env");
  javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");
  java.sql.Connection conn = ds.getConnection("user", "password");

   When I perform   javax.sql.DataSource ds = (javax.sql.DataSource)
envCtx.lookup("jdbc/DBname");   I get the following error:

javax.naming.NamingException: Cannot create resource instance
 at org.apache.naming.factory.ResourceFactory.getObjectInstance(Unknown
Source)
 at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:310)

 at org.apache.naming.NamingContext.lookup(Unknown Source)
 at org.apache.naming.NamingContext.lookup(Unknown Source)
 at org.apache.naming.NamingContext.lookup(Unknown Source) ...

I hope you could please help me with this problem.
Thank you very much!

Mauro Brändle



Re: mod_jk Connector Source

2002-11-18 Thread Bill Barker
At a guess, you are using either Solaris or Mac/OSX.  For these systems you
can't use the default tar program.  You must use the GNU gtar instead.

"Jaimes Blunt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
Hi Everyone,

I am trying to get the source files to build the mod_jk connector for
Apache2.0.43.  I tried downloading from the main jakarta site at
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0
/src/ and I get a corrput file.  Does anyone have a mirror site or a copy of
the source tar than I can use to get these files?

Much appreciated

Jaimes Blunt








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




Which Apache Connector works and which is recommend for Tomcat 4.1.12?

2002-11-18 Thread Rademacher Tobias
Hi Folks,

we want to use Apache and Tomcat as "tandem" you recommend. 
We currently use Apache 1.3.27 and Tomcat 4.1.12 and JDK 1.4.1 on Solaris.

Could be please give me a tip which kind of connector we should use.
There are already 3 (!) kind of connectors:

- mod_jk
- mod_jk2
- mod_webapp

Which will work and which will you recommend with the above mentioned
version/configuration in mind?

The documenation seems to be a little bit old. Does tomcat still generate
the script mod_jk.conf-auto? It doesn't seem so?!?
Is this different in mod_jk2?
Where is mod_webapp documentation? Do you have a link? 
Which connetor will work with next version of tomcat e.g 5.x?

Questions about Questions.

Thx a lot for your advise.

Bye
Tobias Rademacher



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




Re: update text file under WEB-INF

2002-11-18 Thread Jacob Kjome

Well, you can access it in a portable way but note that you cannot count of 
File IO in servlets.  If the webapp is served from a .war file then File IO 
will be impossible.  Not sure if you can updated it in other ways.  I 
suppose there are ways.

Here is how you load it:

InputStream propStream = 
getServletContext().getResourceAsStream("/WEB-INF/conf/config.properties");

Here is how to access your WEB-INF directory if the app is served off the 
filesystem.  Note that this will return null if the app is served from a 
.war file:

String webinfPath = getServletContext().getRealPath("/WEB-INF/");

Using this, you can create a File object that points to your 
config.properties file and do any File IO you want.  Again, there are risks 
involved, so be careful to make sure the app is served off the filesystem.

Jake

At 05:37 PM 11/18/2002 -0800, you wrote:
Help!
I need configure my log4j to put log file under WEB-INF\logs(or maybe
docroot\logs; and I want put my editable config properties into
WEB-INF\conf. I know how to load a property file under WEB-INF. But I
need update that file in program as well.
So how can I:
1 Config log4j?
2 How do load and write the property file under WEB-INF?

Thanks
David Cao
  -- Innovation by Critical Thinking


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 06, 2002 6:56 AM
To: Tomcat Users List
Subject: Re: Location of application-specific properties files


You must load your properties through some Classloader that is able to
locate your properties file.  For example you can use the class
PropertyResourceBundle for a real properties file or if you want to
access
some own file format, just call the Thread.getCurrentThread
().getContextClassLoader().getResourceAsStream(...) function. Then the
WEB-INF/classes folder or some of your application specific .jar files
in
WEB-INF/lib (if any) is the right place for it (and as far as i know, it
is
the only standard way, which assures you to find a specific file on
every
standard J2EE server).

Hope that helps,

Jens Stutte






"Robert Baker"


<[EMAIL PROTECTED]>
   cc:

04/08/2002 Subject: Location of
application-specific properties
21.05  files

Please respond

to "Tomcat

Users List"









I am using Tomcat 4.0.3 under WinXP Pro, and I am trying to get my
application to "find" an application-specific properties file.  I am
having
problems trying to determine which directory to put this file in.

Here is the Java code I am using for this class:

//---
import java.util.Properties;
import java.io.FileInputStream;

public class ForumProperties extends Properties {

   private static final String separator =
System.getProperty("file.separator", ".");
   private static final String homeDirectory =
System.getProperty("user.home",".");
   private static final String DEFAULT_FILENAME = "forum.properties";
   private static ForumProperties globalProps;

   private ForumProperties() {
   }

   private ForumProperties(String fileName) throws Exception {
  this();
  load(new FileInputStream(fileName));
   }

   public static ForumProperties getInstance() throws Exception {
  try {
 if (globalProps == null)
globalProps = new ForumProperties(DEFAULT_FILENAME);
  } catch (Exception ex) {
 ex.printStackTrace(System.out);
 throw new Exception("Error loading properties file");
  }
  return globalProps;
   }

}
//---

I have put the properties file in just about every directory I can think
of
to try and find out where it's supposed to be, but I can't get it to
work.
I can put the file into the "user.home" System property (which turns out
to
be C:\Documents and Settings\Administrator) and have it pick it up, but
I
would prefer to put the file into the directory tree of the application.

Is there an attribute or something in the server.xml or web.xml file I
am
forgetting to set?

Can anyone help?

Thanks,
Bob



--
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: JK2

2002-11-18 Thread Robert Williams
Hi,
I was shown this link on this list just the other day. It helped me so
give it a whirl.
Robert

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



-Original Message-
From: Dave Thieben [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 18, 2002 5:45 PM
To: Tomcat Users List
Subject: JK2



I'm having some trouble getting JK2 to work correctly with my Virtual
Hosts.  Can anyone recommend a good resource on the web that I can read
through before I start pelting the list with questions?

it is:
Apache 2.0.43
JK2 2.0.1
Tomcat 4.1.12
on Red Hat Linux 8.0

Thanks.


Dave Thieben
Lighthouse Technologies, Inc. [EMAIL PROTECTED]
937-848-3400 x202


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: APACHE 2.34+TOMCAT4.0.6 on WIN XP

2002-11-18 Thread Robert L Sowders
This should get you started.

http://www.geovelocity.com/index_apache-tomcat-arcims.html

There is no difference that I know of between installing on Win2k and 
WinXP

rls






"Andrzej Michalczyk" <[EMAIL PROTECTED]>
11/18/2002 03:32 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" <[EMAIL PROTECTED]>
cc: 
Subject:APACHE 2.34+TOMCAT4.0.6 on WIN XP


I am trying to integrate them. Can You write me in details what should I 
to do. I have got installed tomcat and apache and i have got mod_jk- 
2.0.dll.
Write me please in details, what should I to do? Is it possible to do it 
with binary code ?
Andrzej.




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




Re: HTTP GET Response size discrepancy

2002-11-18 Thread RXZ JLo
Anyone again?


--- RXZ JLo <[EMAIL PROTECTED]> wrote:
> My servlet reads an xml file from the disk and just
> outputs it as the response. When I access the URL
> from
> IE, I get the xml file finely. But when I access the
> xml from my VB program, the xml seems to be somewhat
> different(I dont know in what way its different but
> MS
> XML parser refuses to parse it; IE shows it nicely
> though).
> 
> The tomcat access log is as follows:
> the file size is 1489
> 
> When IE requests it, the log is
> x.x.x.x - - [18/Nov/2002:16:38:24 -0600] "GET
> /myservlet?id=120 HTTP/
> 1.0" 200 1496
> 
> When VB requests it, the log is
> x.x.x.x - - [18/Nov/2002:16:38:24 -0600] "GET
> /myservlet?id=120 HTTP/
> 1.0" 200 1489
> 
> That is, when IE requests the xml Tomcat is sending
> 7
> bytes more.
> 
> I have the following in my servlet:
> String xml = ...
> System.out.println ("xml size: " + xml.length());
> PrintWriter out = response.getWriter();
> out.print (xml);
> 
> This prints 1489 for both the requests.
> 
> What are those 7 bytes that get added to the
> response
> to IE, and more importantly WHY?
> 
> Frustrated,
> Rf.
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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




RE: auto-redirect to default page - undesired

2002-11-18 Thread neal
Nope.  Doesnt work ... I just tried it.  Two problems:

1. When mapping the servlet to "/" EVERYTHING requested will return that
default page .. even sub pages, graphics etc. Apparently "/" does not map to
the default page at the root level, rather anything and everything requested
from that domain!

2.  apparently isn't supported by Netscape 4.7 so even if the above
was working, this still would not apparently be an option for some of the
older but still supported browsers.

:(

Any other thoughts?  I'm not to keen on this 'feature'.

Thanks.
Neal

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 4:30 PM
To: Tomcat Users List
Subject: RE: auto-redirect to default page - undesired




On Mon, 18 Nov 2002, neal wrote:

> Date: Mon, 18 Nov 2002 16:12:29 -0800
> From: neal <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: auto-redirect to default page - undesired
>
> Well, cool idea but there's still a problem:
>
> I mean...The requestDispatcher *does* redirect to the right page *BUT* all
> my relative links are broken.  So, I tried mapping the forward servlet to
> the path "/test" instead of just "/" and sure enough *that* url worked ...
> relative paths just fine.  So even though mapping to "/" did get the page
to
> call correctly, nothing in that page resolved correctly.  Somehow its
> context was off I guess. Do you know of some alternative syntax to "/"
that
> could be specified to indicate the root of the domain?  I tried everything
I
> could think of and nothing else worked (e.g. "", "/*", "*", "*/", etc).
>

That's not a bug ... that's a feature :-).

The reason relative references are often broken by
RequestDispatcher.forward() comes from the fact that the reference is
resolved by your *browser* (not by the server), against the request URI to
which the request was originally submitted.  The browser has no idea that
the forward happened, so if it points into a different subdirectory of
your webapp, it will typically fail.

One workaround for this is to include an HTML  element nested in
your  element.  This will allow you to specify the absolute URL
against which relative URLs are resolved -- you would typically set it to
the absolute URL of the page file itself.  That way, relative links will
work when the page is accessed directly and when it is accessed via a
forward.

Implementing this idea is pretty tedious if you don't have a tag library
that takes care of it for you, like the  tag in Struts.

> Thanks.
> Neal

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Granting security permissions not working

2002-11-18 Thread tc
Thank you for your suggestions. See my comments below:

> First, ensure you are running with the -security option that 
> turns on Tomcat
> with the security manager installed.  Often you need to modify the

I am definitely running with the -security option. I have double-checked
that it's in my start.bat script in the bin/ directory and I see the
statement "Using Security Manager" on the tomcat console. Plus, when
running with -Djava.security.debug=access,failure, I see permissions
checking etc. going on.

> Second, you are granting your permissions far too low on the 
> file path.  At
> the very least, consider something like
> 
> grant codeBase "file:${catalina.base}/webapps/yourappname/-" {

The grant that I described there was a last-ditch desparate attempt to
cover everything with AllPermission. I had previously tried granting on
the individual .jar files, on the webapps directory, on my specific
webapps directory, etc. I've tried every conceivable known permutation.
Regardless, I did as you suggested and put the grant back on the
specific webapp directory (using the "-" at the end)... No luck.

> 
> Third, are you actually running multiple instances in which your
> catalina.base is different than your catalina.home?  If so, 

I'm only running one instance of tomcat. I'm not sure where/how
catalina.base gets set, but I have a good feeling that the actual policy
file is being read b/c if I remove that policy file then everything goes
nuts.

One interesting thing is that I can grant access in the general grant {
... } clause (no specific codeBase specified... Just the default for all
webapps), and things will work fine. However, I don't want to grant
access to all webapps, I only want to grant access to a particular
webapp/jar file.

Basically, it looks like grant entries on codebase's under the webapps
directory are *completely ignored*. No matter what I grant on a
particular webapp (using grant codeBase
"file:${catalina.base}/webapps/appname/-" {  }), nothing takes
effect at all. I can verify this by looking at debug output (setting
java.debug.security=policy,access,failure) -- when it prints the
Protection Domain that failed the access call, I can clearly see that
*no permissions* are granted to the jar files under that webapp/codebase
besides the default jndi and file read permissions. If I want any
permissions to apply, I have to grant them generally in the grant { ...
} clause (no codeBase). 

Obviously, this is not desired behavior. It looks like there could be a
bug in the Tomcat policy management?

JP


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




RE: unable to authenticate against company-generated certificate

2002-11-18 Thread Adrian Richter
Check out this link for some help:
http://javaalmanac.com/egs/javax.net.ssl/GetCert.html

Only problem is that it requires JDK 1.4. The JSSE packages do not cut it.

Adrian

-Original Message-
From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 19 November 2002 1:25 PM
To: "Tomcat Users List"<[EMAIL PROTECTED]
Subject: unable to authenticate against company-generated certificate


Hi everyone,

I have a servlet that is tasked to download various files from a secure
site.   It uses an HttpsURLConnection to connect to the site's root and
passes my Authenticator class (w/ username and password) as the default
authenticator.   It used to work fine until the site's admin replaced their
verisign certificate with an in-house-generated one.  Now my servlet
receives a java.security.cert.CertificateException stating that it cannot
find a trusted certificate.

I tried adding the server's certificate to my server's keystore, but I'm
afraid that didn't work.  I believe I have to obtain the certificate and
somehow validate it.  If anyone has experience with this I'd greatly
appreciated it.

Thanks in advance,
-Becky


--
To unsubscribe, e-mail:

For additional commands, e-mail:




unable to authenticate against company-generated certificate

2002-11-18 Thread Becky Phaneuf

Hi everyone,

I have a servlet that is tasked to download various files from a secure site.   It 
uses an HttpsURLConnection to connect to the site's root and passes my Authenticator 
class (w/ username and password) as the default authenticator.   It used to work fine 
until the site's admin replaced their verisign certificate with an in-house-generated 
one.  Now my servlet receives a java.security.cert.CertificateException stating that 
it cannot find a trusted certificate.

I tried adding the server's certificate to my server's keystore, but I'm afraid that 
didn't work.  I believe I have to obtain the certificate and somehow validate it.  If 
anyone has experience with this I'd greatly appreciated it.

Thanks in advance,
-Becky


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




Access control in Apache+tomcat (mod_jk)

2002-11-18 Thread Ryszard Lach
Hi!

How does work access control with apache 'Location' directive? I'm using
apache+mod_jk+tomcat with 

JkMount /servlet/* ajp13


and 


..
require user someuser


and apache seems to ignore this access control restriction when I'm
entering the url http://myhost.mydomain/servlet/some.servlet.example
Should I include this restriction into my app's web.xml file? Anyway,
adding something like 

  
invoker
/servlet/*
  

  

   myhost.mydomain
   /servlet/some.servlet.*


   somerole

  

does not require to authenticate too. What am I doing wrong?

TIA

Richard.

-- 
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.

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




JK2

2002-11-18 Thread Dave Thieben

I'm having some trouble getting JK2 to work correctly with my Virtual
Hosts.  Can anyone recommend a good resource on the web that I can read
through before I start pelting the list with questions?

it is:
Apache 2.0.43
JK2 2.0.1
Tomcat 4.1.12
on Red Hat Linux 8.0

Thanks.


Dave Thieben
Lighthouse Technologies, Inc.
[EMAIL PROTECTED]
937-848-3400 x202


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




update text file under WEB-INF

2002-11-18 Thread David Cao
Help!
I need configure my log4j to put log file under WEB-INF\logs(or maybe
docroot\logs; and I want put my editable config properties into
WEB-INF\conf. I know how to load a property file under WEB-INF. But I
need update that file in program as well.
So how can I:
1 Config log4j?
2 How do load and write the property file under WEB-INF?

Thanks
David Cao 
  -- Innovation by Critical Thinking 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 06, 2002 6:56 AM
To: Tomcat Users List
Subject: Re: Location of application-specific properties files


You must load your properties through some Classloader that is able to
locate your properties file.  For example you can use the class
PropertyResourceBundle for a real properties file or if you want to
access
some own file format, just call the Thread.getCurrentThread
().getContextClassLoader().getResourceAsStream(...) function. Then the
WEB-INF/classes folder or some of your application specific .jar files
in
WEB-INF/lib (if any) is the right place for it (and as far as i know, it
is
the only standard way, which assures you to find a specific file on
every
standard J2EE server).

Hope that helps,

Jens Stutte




 

"Robert Baker"


<[EMAIL PROTECTED]>
   cc:

04/08/2002 Subject: Location of
application-specific properties
21.05  files

Please respond

to "Tomcat

Users List"

 

 





I am using Tomcat 4.0.3 under WinXP Pro, and I am trying to get my
application to "find" an application-specific properties file.  I am
having
problems trying to determine which directory to put this file in.

Here is the Java code I am using for this class:

//---
import java.util.Properties;
import java.io.FileInputStream;

public class ForumProperties extends Properties {

   private static final String separator =
System.getProperty("file.separator", ".");
   private static final String homeDirectory =
System.getProperty("user.home",".");
   private static final String DEFAULT_FILENAME = "forum.properties";
   private static ForumProperties globalProps;

   private ForumProperties() {
   }

   private ForumProperties(String fileName) throws Exception {
  this();
  load(new FileInputStream(fileName));
   }

   public static ForumProperties getInstance() throws Exception {
  try {
 if (globalProps == null)
globalProps = new ForumProperties(DEFAULT_FILENAME);
  } catch (Exception ex) {
 ex.printStackTrace(System.out);
 throw new Exception("Error loading properties file");
  }
  return globalProps;
   }

}
//---

I have put the properties file in just about every directory I can think
of
to try and find out where it's supposed to be, but I can't get it to
work.
I can put the file into the "user.home" System property (which turns out
to
be C:\Documents and Settings\Administrator) and have it pick it up, but
I
would prefer to put the file into the directory tree of the application.

Is there an attribute or something in the server.xml or web.xml file I
am
forgetting to set?

Can anyone help?

Thanks,
Bob



--
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: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2

2002-11-18 Thread Bruce Dahms
Hi Larry:

Thanks for that tip. Unfortunately, I'm still not able to set this working.
It's strange because I can debug an ordinary servlet (e.g., one that comes
with Tomcat), but I can't debug a servlet created by Jasper.  

Do you have any other suggestions?  Can I put a CLASSDEBUG attribute in the
SERVER.XML file (I can't tell since it doesn't have a DTD)?  Do I have
anything missing from the Java command line I'm using to start Tomcat?  I
tried adding "-Xint" but that didn't help.  Is there a Jasper configuration
file I can modify?  I believe I just need to add a "-g" to the Javac command
line that creates the compiled servlet, but I don't know how to do that.

Thanks in advance.

Bruce

> -Original Message-
> From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 15, 2002 07:11
> To: Tomcat Users List
> Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> 
> 
> Reading of the "conf/web.xml" go turned off for Tomcat 3.2.x,
> though the file is still present.  You should add the XML
> below to the "WEB-INF/web.xml" for the webapps you want to
> debug.
> 
> Cheers,
> Larry
> 
> > -Original Message-
> > From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> > Sent: Thursday, November 14, 2002 4:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > 
> > 
> > I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 
> > 3.2.3.  I'm 
> > trying to configure Tomcat so I can watch JSP variables and 
> > expressions.  
> > Here is how I'm starting Tomcat:
> > 
> >  start "Tomcat 3.2.3" 
> >"C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
> >-Xnoagent -Djava.compiler=NONE 
> >
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 
> >-Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
> >org.apache.tomcat.startup.Tomcat
> > 
> > Once Tomcat is running, I can attach to it from NetBeans via 
> > dt_socket on 
> > port .  I can then mount the compiled servlet in NetBeans, set 
> > a breakpoint, and execute up to that breakpoint.  What I 
> cannot do is 
> > watch variables or expressions.  If I specify a variable to watch, 
> > NetBeans tells me the "Identifier cannot be resolved."  
> > 
> > At the top of the variables list in the NetBeans debugger window is 
> > the message "source compiled without -g option."  This leads me to 
> > believe Tomcat isn't creating the servlet with the required 
> > debugging information.  I enabled the "classdebuginfo" parameter in 
> > Tomcat's WEB.XML, but this seems to have no effect.  Here's 
> > an excerpt:
> > 
> >  
> >jsp
> >
> org.apache.jasper.runtime.JspServlet
> >
> >  classdebuginfo
> >  true
> >
> >-2147483646
> >  
> >  
> >jsp
> >*.jsp
> >  
> > 
> > Any suggestions?  The application I'm using requires Tomcat 
> 3.2.3.  I 
> > cannot use a different version of Tomcat.
> > 
> > Bruce
 

This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.


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




Re: Granting security permissions not working

2002-11-18 Thread David Wall
> I am not able to grant security permissions on individual jar files. Can
> someone tell me what I'm doing wrong?
>
> In my policy file (CATALINA_HOME/conf/catalina.policy) I have the
> following setting:
>
> grant codeBase "file:${catalina.home}/-" {
> permission java.security.AllPermission;
> };
>
> I would think this would grant all permissions to all jar files,
> classes, etc under the catalina directory, including webapps'
> classes/jars.

First, ensure you are running with the -security option that turns on Tomcat
with the security manager installed.  Often you need to modify the
startup.sh script to include that options between 'start' and '$@'.  In my
TC 4.1.12 startup.sh, I have:

exec "$PRGDIR"/"$EXECUTABLE" start -security "$@"

Second, you are granting your permissions far too low on the file path.  At
the very least, consider something like

grant codeBase "file:${catalina.base}/webapps/yourappname/-" {

Third, are you actually running multiple instances in which your
catalina.base is different than your catalina.home?  If so, make sure you
are modifying the right catalina.policy file (you want the one that's under
your catalina.base, not the one under catalina.home).  If you are only
running a single instance of TC, though, then this should not be an issue.

Hope something here helps...

David Wall
www.yozons.com Electronic signatures with secure document delivery


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




RE: auto-redirect to default page - undesired

2002-11-18 Thread Craig R. McClanahan


On Mon, 18 Nov 2002, neal wrote:

> Date: Mon, 18 Nov 2002 16:12:29 -0800
> From: neal <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: auto-redirect to default page - undesired
>
> Well, cool idea but there's still a problem:
>
> I mean...The requestDispatcher *does* redirect to the right page *BUT* all
> my relative links are broken.  So, I tried mapping the forward servlet to
> the path "/test" instead of just "/" and sure enough *that* url worked ...
> relative paths just fine.  So even though mapping to "/" did get the page to
> call correctly, nothing in that page resolved correctly.  Somehow its
> context was off I guess. Do you know of some alternative syntax to "/" that
> could be specified to indicate the root of the domain?  I tried everything I
> could think of and nothing else worked (e.g. "", "/*", "*", "*/", etc).
>

That's not a bug ... that's a feature :-).

The reason relative references are often broken by
RequestDispatcher.forward() comes from the fact that the reference is
resolved by your *browser* (not by the server), against the request URI to
which the request was originally submitted.  The browser has no idea that
the forward happened, so if it points into a different subdirectory of
your webapp, it will typically fail.

One workaround for this is to include an HTML  element nested in
your  element.  This will allow you to specify the absolute URL
against which relative URLs are resolved -- you would typically set it to
the absolute URL of the page file itself.  That way, relative links will
work when the page is accessed directly and when it is accessed via a
forward.

Implementing this idea is pretty tedious if you don't have a tag library
that takes care of it for you, like the  tag in Struts.

> Thanks.
> Neal

Craig


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




Coyote Connector won't listen on port 8004, only 8009 (Tomcat 4.1.12)

2002-11-18 Thread Brandon Cruz


Even with the above configuration, this connector tries to start up on port
8009.  Anyone know why?



Brandon


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




Deploying Discovered web applications (never stops) Tomcat 4.1.12

2002-11-18 Thread Brandon Cruz
Hi,

When setting up a host with the following syntax in server.xml...





...

I seem to get a neverending loop shown as follows in catalina.out...


HostConfig[www.customer.com]: Deploying discovered web applications
HostConfig[www.customer.com]: Deploying discovered web applications
HostConfig[www.customer.com]: Deploying discovered web applications

...

These constantly print to the file until I shutdown Tomcat.

Any ideas why?


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: Can all vhosts share one Webapp?

2002-11-18 Thread Craig R. McClanahan


On Mon, 18 Nov 2002, Cox, Charlie wrote:

>
> If you want to share a context between multiple  elements, you can set
> the appBase to the same directory and let tomcat autoload the context from
> there. Then each context specific to each webapp can have an absolute path
> to the context.

While this will share the webapps between virtual hosts, it does not share
the webapp *instances* themselves.  There will be a separate 
instance in each  with this configuration, even though they happen
to run the same set of servlets and JSPs.

>
> Charlie

Craig


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




Re: the tomcat versions

2002-11-18 Thread Craig R. McClanahan


On Mon, 18 Nov 2002, Dionisio Ruiz de Zarate wrote:

> Date: Mon, 18 Nov 2002 12:09:14 +0100 (CET)
> From: Dionisio Ruiz de Zarate <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: the tomcat versions
>
> why in the tomcat page there are some versions (stables)?
> why the development groups are development two version (4.0.x, 4.1.x)?
> why?
> which is the diference?
> thanks
>

The 4.0.x tree is stable, and tends to receive security updates only --
new features for Tomcat 4 (Servlet 2.3 / JSP 1.2 support) are happening in
4.1.  There is a stable 4.1 release as well, of course.

Craig


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




RE: auto-redirect to default page - undesired

2002-11-18 Thread neal
Well, cool idea but there's still a problem:

I mean...The requestDispatcher *does* redirect to the right page *BUT* all
my relative links are broken.  So, I tried mapping the forward servlet to
the path "/test" instead of just "/" and sure enough *that* url worked ...
relative paths just fine.  So even though mapping to "/" did get the page to
call correctly, nothing in that page resolved correctly.  Somehow its
context was off I guess. Do you know of some alternative syntax to "/" that
could be specified to indicate the root of the domain?  I tried everything I
could think of and nothing else worked (e.g. "", "/*", "*", "*/", etc).

Thanks.
Neal


-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:54 PM
To: Tomcat Users List
Subject: RE: auto-redirect to default page - undesired


You could map a servlet or jsp to the path / that dispatches the request
using RequestDispatcher.forward("/path_to_somewhere" to what ever place you
want, then remove the welcome-files from web.xml, if you don't want that
functionality.

I think that might work for you.

Hope it helps
[EMAIL PROTECTED]



> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: 18. nóvember 2002 20:53
> To: Tomcat Users List
> Subject: auto-redirect to default page - undesired
>
>
> Tomcat appears to auto-redirect to the default page rather
> than leaving the url of the default url (www.mysite.com)
> while displaying the default page. In otherwords, if the url
(www.mysite.com) is requested, the url is actually redirected (the url of
the window will change) to www.mysite.com/index.jsp. This presumes use of
tomcat as standalone.

>From what I have been reading this can have adverse effects on search engine
placement and is thus not a desired effect.  Does anyone know how to
configure tomcat to behave as most other web servers and *not* redirect the
user?  I think the difference here may be to forward the user versus
redirecting them.

Thanks.
Neal


--
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: spec compliants vs implementation specific parts?

2002-11-18 Thread Craig R. McClanahan


On Mon, 18 Nov 2002, Pierre-Laurent Ribault wrote:

> Date: Mon, 18 Nov 2002 16:13:18 +0900
> From: Pierre-Laurent Ribault <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: spec compliants vs implementation specific parts?
>
> Hi,
>
> I'm in the process of developping a Web application using Tomcat as the
> development testbed. However, I'd like to be able later to deploy the
> application on another servlet engine with the same specs level.
> I know that Tomcat is the reference implementation of the servlet/JSP
> spec, but is there an easy way (i.e. without reading the whole spec) to
> know what is part of the spec and what is implementation specific in
> Tomcat? For example, among the server settings (datasource, realms, etc).
>

Everything in javax.servlet.* is part of the servlet and/or JSP specs.
Programming to those APIs is portable.

The format of web.xml is portable, but not all servers necessarily support
all the configurable features (unless you're on a J2EE server).  Tomcat
implements the configurable stuff for  and  in a
manner that is compatible with the J2EE requirements.  Thus, you'd be able
to portably use the JNDI based resources that Tomcat supports.

The mechanisms by which resources are configured (in Tomcat, it's the
 element in server.xml) are specific to each server.
Things like the format of server.xml, and any reference to an
org.apache.catalina.* or org.apache.jasper.* class, is Tomcat specific.

Craig

> $B!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=(B
> Pierre-Laurent Ribault
> Fujitsu Info Software Technologies Ltd.
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




Re: Processing form uploaded files

2002-11-18 Thread Craig R. McClanahan


On Mon, 18 Nov 2002, David Wall wrote:

> Date: Mon, 18 Nov 2002 13:24:08 -0800
> From: David Wall <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>  David Wall <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Processing form uploaded files
>
> >   I never saw anyone mentioning jakarta's upload servlet... what's wrong
> > with it?
>
> Good question.  When I took a look, it appeared to not really be at
> production 1.0 yet.  I'd hope that the authors also looked over the many
> nits discovered in the Jason Hunter version to ensure all of the bugs there
> are also incorporated as many browsers have minor bugs that need to be
> correctly handled (often related to boundaries improperly defined, etc.)
>

There's pretty good upload support in the commons-fileupload project -- at
least good enough for Turbine and Struts to use it :-).

> David

Craig


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




Re:

2002-11-18 Thread Jon Eaves
Andoni wrote:

Yes, it is, in as much as any .jsp file IS a servlet.


A servlet may not be specified as a welcome-file.  I suppose
you could re-write your servlet as a JSP and then use that,
but that certainly wouldn't be my recommended course of
action.

There's a fairly simple way to solve this and I posted a
workaround for this a couple of days ago.

Here's the article thread:

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


Cheers,
	-- jon



Why don't you describe more about what you want to achieve.

For example what URL do you want your users to type in and what do you want
served first?

Andoni.


--
Jon Eaves <[EMAIL PROTECTED]>
http://www.eaves.org/jon/


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




Re: How to get Tomcat to accept attribute names "lang" and "maxRows"?

2002-11-18 Thread Triptpal Singh Lamba
I guess maxRows may be some class or some definite meaning somewhere.

You can change to diff intutive name I guess ..like maxResultRows etc.


org.idoox.uddi.client.api.v2.request.inquiry
Class MaxRows
java.lang.Object
  |
  +--org.idoox.uddi.client.api.v2.request.inquiry.MaxRows

  All Implemented Interfaces:
  java.io.Serializable





I do know the above conotation though.. for the MaxRows.


Thanks

Tript Singh

- Original Message -
From: "Jim Cobban" <[EMAIL PROTECTED]>
To: "Tomcat User Maillist" <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 6:22 PM
Subject: How to get Tomcat to accept attribute names "lang" and "maxRows"?


I have found that Tomcat does not handle the attributes "lang" and "maxRows"
in my custom tags the way it does attributes with otherwise similar names.
With those two attribute names Tomcat complains that it is "unable to find
setter method".  But if I change the attributes to "ling" and "maxRoz"
Tomcat can find my setter methods.  Unfortunately I do not believe that my
customers will find "ling" and "maxRoz" to be intuitive attribute names to
describe the human language of the interface and the maximum number of rows
from the table to display.

Am I just SOL?  Am I forced to use non-intuitive attribute names in order to
comply with some implementation characteristic of Tomcat?  I have searched
the JSP specification from top to bottom.  I cannot find any occurrence of
the word "maxRows" and the only occurrences of the word "lang" is as part of
"java.lang.xxx".  Therefore I do believe that there is any restriction in
the JSP specification that I cannot use these attribute names.

Jim Cobban   [EMAIL PROTECTED]
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438




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




Granting security permissions not working

2002-11-18 Thread tc
I am not able to grant security permissions on individual jar files. Can
someone tell me what I'm doing wrong?

In my policy file (CATALINA_HOME/conf/catalina.policy) I have the
following setting:

grant codeBase "file:${catalina.home}/-" {
permission java.security.AllPermission;
};

I would think this would grant all permissions to all jar files,
classes, etc under the catalina directory, including webapps'
classes/jars. However, I keep getting the following (I set security
debug output according to the following --
java.security.debug=access,failure):

access: access denied (java.util.PropertyPermission
log4j.defaultInitOverride read)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1071)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.
java:259)
at
java.security.AccessController.checkPermission(AccessController.java:401
)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
at java.lang.System.getProperty(System.java:611)
at
org.apache.log4j.helpers.OptionConverter.getSystemProperty(OptionConvert
er.java:92)
at org.apache.log4j.LogManager.(LogManager.java:117)
at org.apache.log4j.Logger.getLogger(Logger.java:85)
at
com.cssc.security.CognisecAuthFilter$1.run(CognisecAuthFilter.java:85)
at java.security.AccessController.doPrivileged(Native Method)
at
com.cssc.security.CognisecAuthFilter.(CognisecAuthFilter.java:83
)
...

access: domain that failed ProtectionDomain
(jar:file:C:/tomcat/webapps/cssc/WEB-INF/lib/log4j-1.2.6.jar!/org/apache
/log4j/helpers/OptionConverter.class )
 WebappClassLoader
  available:
Extension[Struts Framework, implementationVendor=Apache Software
Foundation, implementationVendorId=org.apache,
implementationVersion=1.0.2, specificationVendor=Apache Software
Foundation, specificationVersion=1.0]
  delegate: false
  repositories:
/WEB-INF/classes/
  required:
--> Parent Classloader:

+ other stuff.

What gives? I don't understand why this is not working. Please help!

Running Tomcat 4.0.4, J2SDK 1.4.0, on a winxp box

Thanks,
John



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




APACHE 2.34+TOMCAT4.0.6 on WIN XP

2002-11-18 Thread Andrzej Michalczyk
I am trying to integrate them. Can You write me in details what should I to do. I have 
got installed tomcat and apache and i have got mod_jk- 2.0.dll.
Write me please in details, what should I to do? Is it possible to do it with binary 
code ?
Andrzej.



How to get Tomcat to accept attribute names "lang" and "maxRows"?

2002-11-18 Thread Jim Cobban
I have found that Tomcat does not handle the attributes "lang" and "maxRows" in my 
custom tags the way it does attributes with otherwise similar names.  With those two 
attribute names Tomcat complains that it is "unable to find setter method".  But if I 
change the attributes to "ling" and "maxRoz" Tomcat can find my setter methods.  
Unfortunately I do not believe that my customers will find "ling" and "maxRoz" to be 
intuitive attribute names to describe the human language of the interface and the 
maximum number of rows from the table to display.

Am I just SOL?  Am I forced to use non-intuitive attribute names in order to comply 
with some implementation characteristic of Tomcat?  I have searched the JSP 
specification from top to bottom.  I cannot find any occurrence of the word "maxRows" 
and the only occurrences of the word "lang" is as part of "java.lang.xxx".  Therefore 
I do believe that there is any restriction in the JSP specification that I cannot use 
these attribute names.

Jim Cobban   [EMAIL PROTECTED]
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438



coyote exception

2002-11-18 Thread Nick Wesselman
I'm trying to connect Apache2/mod_jk w/ Tomcat 4.1.12 Coyote via AJP13  
over tcp socket. However, I get the following exception from my tomcat.

SEVERE: Caught exception executing  
org.apache.jk.common.SocketConnection@1f06dc3, terminating thread
java.lang.NullPointerException
at  
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 
543)
at  
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool 
.java:533)
at java.lang.Thread.run(Thread.java:536)

Line 543 of ChannelSocket.java (rev 1.21 marked for Tomcat 4.1.12) is  
the highlighted line of this method:

/** Process a single ajp connection.
 */
void processConnection(MsgContext ep) {
try {
MsgAjp recv=new MsgAjp();
while( running ) {
int status= this.receive( recv, ep );
if( status <= 0 ) {
if( status==-3)
log.warn( "server has closed the current  
connection (-1)" );
else
log.warn("Closing ajp connection " + status );
break;
}
ep.setLong( MsgContext.TIMER_RECEIVED,  
System.currentTimeMillis());

ep.setType( 0 );
status= this.invoke( recv, ep );
if( status!= JkHandler.OK ) {
log.warn("processCallbacks status " + status );
break;
}
}
this.close( ep );
} catch( Exception ex ) {
if( ex.getMessage().indexOf( "Connection reset" ) >=0 ) {
log.warn( "Server has closed connection");
} else {
log.error( "Error, closing connection", ex);
}
}
}

So what is null on this line? I can only imagine it would be the  
exception's message. So what exception is being thrown in this method  
without a message, and how can I prevent it?

Config files follow.

Thanks,
Nick Wesselman
Digital Visions, Inc.

--
server.xml


   port="8015" minProcessors="5" maxProcessors="75"
   enableLookups="true"
   acceptCount="10" debug="0" connectionTimeout="2"
   useURIValidationHack="false"

protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>


jk2.properties
handler.list=channelSocket
channelSocket.port=8015
channelSocket.maxPort=port+0

workers.properties

worker.ajp13.port=8015
worker.ajp13.host=localhost
worker.ajp13.type=ajp13


RE: auto-redirect to default page - undesired

2002-11-18 Thread neal
Aah,  Interesting idea.  Thanks!

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:54 PM
To: Tomcat Users List
Subject: RE: auto-redirect to default page - undesired


You could map a servlet or jsp to the path / that dispatches the request
using RequestDispatcher.forward("/path_to_somewhere" to what ever place you
want, then remove the welcome-files from web.xml, if you don't want that
functionality.

I think that might work for you.

Hope it helps
[EMAIL PROTECTED]



> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]]
> Sent: 18. nóvember 2002 20:53
> To: Tomcat Users List
> Subject: auto-redirect to default page - undesired
>
>
> Tomcat appears to auto-redirect to the default page rather
> than leaving the url of the default url (www.mysite.com)
> while displaying the default page. In otherwords, if the url
(www.mysite.com) is requested, the url is actually redirected (the url of
the window will change) to www.mysite.com/index.jsp. This presumes use of
tomcat as standalone.

>From what I have been reading this can have adverse effects on search engine
placement and is thus not a desired effect.  Does anyone know how to
configure tomcat to behave as most other web servers and *not* redirect the
user?  I think the difference here may be to forward the user versus
redirecting them.

Thanks.
Neal


--
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: auto-redirect to default page - undesired

2002-11-18 Thread Reynir Hübner
You could map a servlet or jsp to the path / that dispatches the request using 
RequestDispatcher.forward("/path_to_somewhere" to what ever place you want, then 
remove the welcome-files from web.xml, if you don't want that functionality. 

I think that might work for you. 

Hope it helps
[EMAIL PROTECTED]



> -Original Message-
> From: neal [mailto:[EMAIL PROTECTED]] 
> Sent: 18. nóvember 2002 20:53
> To: Tomcat Users List
> Subject: auto-redirect to default page - undesired
> 
> 
> Tomcat appears to auto-redirect to the default page rather 
> than leaving the url of the default url (www.mysite.com) 
> while displaying the default page. In otherwords, if the url 
(www.mysite.com) is requested, the url is actually redirected (the url of the window 
will change) to www.mysite.com/index.jsp. This presumes use of tomcat as standalone.

>From what I have been reading this can have adverse effects on search engine 
>placement and is thus not a desired effect.  Does anyone know how to configure tomcat 
>to behave as most other web servers and *not* redirect the user?  I think the 
>difference here may be to forward the user versus redirecting them.

Thanks.
Neal


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


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




RE: exception when accessing web application

2002-11-18 Thread Reynir Hübner
Hi, 
These information do not really tell much, 
The problem is coming up when you try to call some class that is not in the classpath 
in the following class : 
Electric.server.http.ServletServer ?

Things you should look into are versions of jdk used to compile the two and runtime, 
for example if you are using jdk.1.3.1 for runtime but 1.4.1 for comilation some 
classes are not available in the runtime. 

hope it helps
-reynir



> -Original Message-
> From: Abhijat Thakur [mailto:[EMAIL PROTECTED]] 
> Sent: 18. nóvember 2002 20:53
> To: [EMAIL PROTECTED]
> Subject: exception when accessing web application
> 
> 
> after loading a web application when i go to access the web 
> application through the URL i get this error. My jar files 
> are under PathToWebApp/WEB-INF/lib. What am i doing wrong?
> 
> javax.servlet.ServletException: java.lang.NoClassDefFoundError
>   at electric.server.http.ServletServer.init(Unknown Source)
>   at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardW
> rapper.java:924)
>   at 
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrap
> per.java:658)
>   at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:214)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:643)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:191)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:643)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at 
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2396)
>   at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:643)
>   at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.java:170)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:641)
>   at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:172)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:641)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:174)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:643)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:223)
>   at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:405)
>   at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConnection(Http11Protocol.java:380)
>   at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:508)
>   at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:533)
>   at java.lang.Thread.run(Thread.java:484)
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




SOLVED Re: Tomcat Startup 2 errors

2002-11-18 Thread Triptpal Singh Lamba
Solved the first problem. The tomcat window was not being seen because it
was being run as a NT service.

A simple re install without the NT option solved the second problem which
was an exception of  address.

Thats it...Pls note I was on  Win XP.

Thanks
Tript Singh

- Original Message -
From: "Triptpal Singh Lamba" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 12:58 PM
Subject: Tomcat Startup 2 errors


> 1. I have 3 versions of Tomcat, 2 are "associated" with Jbuilder.
> These 2 versions start off and give me an error described below. The
> point to note is that the command window(dos) in which I  run it stays and
> does not disappear.
>
> 2. Downloaded a version of Tomcat , the  port for which I have chosen as
> 8000. I have tried starting it from startup.bat and catalina.bat run
> options.
>
> In all cases above 1 and 2 , Tomcat is starting off - that is 100% sure.
(I
> can see http://localhost:portno/ page). In case 1 the tomcat server window
> stays on the screen. In case 2 it disappears but I can see it is running
as
> a process after doing CTRL-ALT-DELETE for windows XP.
>
> The exceptions in all cases is similar :-
> Why is this exception coming and how can I remove it.
>
> So my questions are :-
> 1. How do I remove the exception below.
> 2. In CASE 2 above, while running tomcat server ,why does the does window
> not remain on screen and  disappear ( something like "echo on" should make
> it remain,not go as a background process, I have tried catalina.bat start
> also, Funnily the Tomcat servers with JBuilder remain on screen , this is
> imp for jsp debugging later on and System.out.printlns etc . )
>
>
> Thanks
> Tript Singh
>
> I am copying pasting the exception below:-
>
> C:\Tomcat4\Tomcat 4.1\bin>catalina.bat run
> Using CATALINA_BASE:   ..
> Using CATALINA_HOME:   ..
> Using CATALINA_TMPDIR: ..\temp
> Using JAVA_HOME:   c:\j2sdk1.4.1
> Nov 17, 2002 12:44:00 PM org.apache.commons.modeler.Registry loadRegistry
> INFO: Loading registry information
> Nov 17, 2002 12:44:00 PM org.apache.commons.modeler.Registry getRegistry
> INFO: Creating new Registry instance
> Nov 17, 2002 12:44:01 PM org.apache.commons.modeler.Registry getServer
> INFO: Creating MBeanServer
> Nov 17, 2002 12:44:02 PM org.apache.coyote.http11.Http11Protocol init
> SEVERE: Error initializing endpoint
> java.net.BindException: Address already in use: JVM_Bind:8000
> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java
> :268)
> at
> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:150)
> at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:10
> 02)
> at
>
org.apache.catalina.core.StandardService.initialize(StandardService.java:579
> )
> at
>
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2245)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
> 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)
> Catalina.start: LifecycleException:  Protocol handler initialization
failed:
> java.net.BindException
>  Address already in use: JVM_Bind:8000
> LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Address alread
>  in use: JVM_Bind:8000
> at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:10
> 04)
> at
>
org.apache.catalina.core.StandardService.initialize(StandardService.java:579
> )
> at
>
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2245)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
> 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)
> Catalina.stop: LifecycleException:  This server has not yet been started
> LifecycleException:  This server has not yet been started
> at
> org.apache.catalina.core.StandardServer.stop(StandardServer.java:2212)
> at org.apache.catalina.s

Got a sample code on how to use WebappClassLoader or StandardClassLoader?

2002-11-18 Thread aps olute
Anyone got a sample code on how to use this WebappClassLoader
or the StandardClassLoader?  and no need to specify these in 
the server.xml file? It just seems I had the impression it
required to be specified on the server.xml per the docs.



__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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




RE: Problem using Https connection on tomcat 4 & jdk 1.4

2002-11-18 Thread mech
I'm not sure if it has something to do with servlets or with the JDK
version. Did not try it.

In case you encounter a problem as mentioned here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14164

(anyway) I would suggest upgrading to Tomcat 4.1.14. Because actually
Tomcat 4.1.12 has a SSL bug. Maybe it's related to your problem, maybe
not.

mech

> -Original Message-
> From: Ritu Kumar [mailto:[EMAIL PROTECTED]] 
> Sent: Montag, 18. November 2002 19:25
> To: '[EMAIL PROTECTED]'
> Subject: Problem using Https connection on tomcat 4 & jdk 1.4
> 
> 
> Hi,
>  
> I am using tomcat 4.1.12 & jdk 1.4.
>  
> I am having problem using HTTPS as a protocol to connect to 
> another servlet. ( No problem if I use HTTP protocol) I do 
> not get any errors, but the code seems to hang.
>  
> If I use tomcat 4.1.12 & jdk 1.3 , the same code works fine.
>  
> Any idea why this could be happining ?
> 
> Ritu Kumar 
> 703-464-5379 
> 
>  
> 


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




Re: tomcat 4.1 displays a blank page when compiling a JSP with compilationerrors

2002-11-18 Thread Christos Karras
Nope, I tried making a very simple JSP with syntax errors:
<%
test
%>
which should give me an error message because "test" is not defined, but 
I still only get a blank page, and an error only in the logs

Robin Lee (Tech Support) wrote:

Hi Christos,

Quick Question for you.  Does your JSP page have an include in it?
Example:
Login.jsp
   This page includes another jsp page called LoginForm.jsp.

Does your jsp page have this?  If so, I've noticed that my pages will show
up blank if there is an error, where there is an include.  Is this your
situation?

If so... because you are developing, the easiest way would be to call the
include jsp directly (http://localhost/xxx/LoginForm.jsp).  This will then
give you the error in the browser.

I've noticed this in tomcat, as well as Java Web Server when i first used
that ages ago...

 



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




RE: Tomcat on a separate machine

2002-11-18 Thread Lee Grey
At
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0
/bin/linux/i386/, it says "mod_jk-2.0.42.so is for Apache 2.0.42 (and only
2.0.42)".  I am running 2.0.43.  I assumed that note meant 2.0.42 and above,
but, given all the problems I'm having, I'm starting to wonder.  That's not
the problem, is it?

Thanks,
Lee

-Original Message-
From: Lee Grey [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 4:38 PM
To: Tomcat Users List
Subject: RE: Tomcat on a separate machine


I've made some changes to server.xml since I wrote my first email.  I
realized there was no  in there from my WARP configuration.  Here's
what the current (still broken) server.xml looks like:


  


  
  
  
  
  urlinone.com
  
  
  

  


I see log entries when Apache gets requests, but there is no indication at
all that Tomcat is seeing anything at all.  I have no idea where the
requests are going.  Is there any way to sniff what's coming in?  Or, better
yet, is the problem apparent above?

Thanks!

Lee

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:35 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat on a separate machine



Does server.xml have a Host tag for server2?  Something like:




John

> -Original Message-
> From: Lee Grey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 2:21 PM
> To: Tomcat Users List
> Subject: RE: Tomcat on a separate machine
>
>
> The problem with that is that it doesn't help me with
> load-balancing and
> such.  I really need to get the connector working.
>
> Thanks, though.
>
> Any other thoughts on what I've done wrong here?
>
> --Lee
>
> -Original Message-
> From: Paul Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 11:35 PM
> To: Tomcat Users List
> Subject: Re: Tomcat on a separate machine
>
>
> How about trying what I do:
>
> in httpd.conf
>
> ProxyPass /equivhttp://other:8080/equiv
> ProxyPassReverse /equiv http://other:8080/equiv
>
> Where other is someother machine
>
>
> At 02:37 PM 11/17/02, you wrote:
> >I have server1 running both Apache2 and an instance of
> Tomcat4.  I have
> >server2 running its own instance of Tomcat4.  The Tomcats on
> server1 and
> >server2 are running different applications.
> >
> >I am currently trying to get requests for urlinone.com
> received by Apache
> at
> >server1 forwarded to the Tomcat at server2.  It seems like
> they see each
> >other, because, when I shut down Apache on server1,
> server2's log shows:
> >
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >
> >However, I don't see any indication that servlet requests
> are getting from
> >Apache on server1 to Tomcat on server2.  There is no log activity on
> server2
> >to match the requests shown at server1.
> >
> >On server1, Apache httpd.conf contains, in part:
> >
> >NameVirtualHost *
> >
> >  LoadModule jk_module /usr/local/apache/modules/mod_jk.so
> >
> ># Am I supposed to have AddModule mod_jk anywhere?  There
> are no AddModule
> >statements in this file.
> >JkWorkersFile /var/tomcat4/conf/jk/workers.properties
> >JkLogFile /var/tomcat4/logs/mod_jk.log
> >JkLogLevel info
> >JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> >
> >ServerName www.urlinone.com
> >ServerAlias urlinone.com
> >DocumentRoot /var/tomcat4/webapps/urlinone
> >ErrorLog /var/tomcat4/logs/urlinone-errorlog
> >CustomLog /var/tomcat4/logs/urlinone-access.log common
> >Alias / "/var/tomcat4/webapps/urlinone/"
> >JkMount /servlet/* server2
> >
> >
> >Server1's workers.properties file says:
> >
> >worker.list=server1,server2
> >worker.server1.type=ajp13
> >worker.server1.host=192.168.1.80
> >worker.server1.port=8009
> >
> >worker.server2.type=ajp13
> >worker.server2.host=192.168.1.50
> >worker.server2.port=8009
> >
> >Server2's server.xml file says, in part:
> >
> >  
> >
> > > port="8009" minProcessors="5" maxProcessors="75"
> > enableLookups="true" appBase="webapps"
> > acceptCount="10" debug="0"/>
> > debug="0">
> >   >  prefix="urlinone_log." suffix=".txt"
> >  timestamp="true"/>
> >  
> >
> >  
> >
> >The Apache log shows a request being successfully completed:
> >
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET
> /index.html HTTP/1.1" 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET
> /urlinone.js HTTP/1.1"
> 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /servlet/PagePump
> >HTTP/1.1" 200 0
> >
> >But there is no activity, as far as I can see, on server2.
> Server1 is
> >running Red Hat 7.3 and Tomcat 4.1.12, while server2 is
> running Red Hat 7.2
> >and Tomcat 4.0.3.  I had to d

Re: tomcat 4.1 displays a blank page when compiling a JSP with compilation errors

2002-11-18 Thread Robin Lee \(Tech Support\)
Hi Christos,

Quick Question for you.  Does your JSP page have an include in it?
Example:
Login.jsp
This page includes another jsp page called LoginForm.jsp.

Does your jsp page have this?  If so, I've noticed that my pages will show
up blank if there is an error, where there is an include.  Is this your
situation?

If so... because you are developing, the easiest way would be to call the
include jsp directly (http://localhost/xxx/LoginForm.jsp).  This will then
give you the error in the browser.

I've noticed this in tomcat, as well as Java Web Server when i first used
that ages ago...

Hope this helps,

...Robin
- Original Message -
From: "Christos Karras" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 1:49 PM
Subject: tomcat 4.1 displays a blank page when compiling a JSP with
compilation errors


> On one of our Tomcat 4.1.12 servers, when someone requests a JSP page
> that has compilation errors, he gets a blank page instead of getting a
> tomcat generated page showing the compilation error. So we have to look
> in tomcat's logs to get the error message. That's nice for a production
> server, but I would like to have errors directly in the browser when
> developping.
>
> How can I enable error messages to be sent to the browser?
>
> Is hiding the error pages the normal default behavior? I have some
> Tomcat 4.1.12 servers (one per machine, development done on NT and
> production servers on linux) which have always sent jsp compilation
> error messages to the browser by default, while others only write the
> messages to logs.
>
> I tried the following:
> - set debug="1" to everything which has a debug parameter in server.xml
> - set jasper's "logVerbosityLevel" init-param to "DEBUG" (and left
> default values for other parameters)
>
> but still no error message shown in browser. Am I missing something in
> the documentation?
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



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




making webapps without write access to $CATALINA_HOME

2002-11-18 Thread Price, Erik



Hello,

I have an account on my friend's Linux box, and he installed
Tomcat 4.0.6 so that I could get some hands-on practice with
servlet and JSP development.  I was wondering if I will need
to have write access to the $CATALINA_HOME subdirectories
or whether there is a way to configure Tomcat to allow me to
use my ~/public_html directory.  If there is a HOWTO on this
that I missed, I apologize -- please forward the link. ;)


Erik

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




RE: Tomcat on a separate machine

2002-11-18 Thread Lee Grey
I've made some changes to server.xml since I wrote my first email.  I
realized there was no  in there from my WARP configuration.  Here's
what the current (still broken) server.xml looks like:


  


  
  
  
  
  urlinone.com
  
  
  

  


I see log entries when Apache gets requests, but there is no indication at
all that Tomcat is seeing anything at all.  I have no idea where the
requests are going.  Is there any way to sniff what's coming in?  Or, better
yet, is the problem apparent above?

Thanks!

Lee

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:35 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat on a separate machine



Does server.xml have a Host tag for server2?  Something like:




John

> -Original Message-
> From: Lee Grey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 2:21 PM
> To: Tomcat Users List
> Subject: RE: Tomcat on a separate machine
>
>
> The problem with that is that it doesn't help me with
> load-balancing and
> such.  I really need to get the connector working.
>
> Thanks, though.
>
> Any other thoughts on what I've done wrong here?
>
> --Lee
>
> -Original Message-
> From: Paul Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 11:35 PM
> To: Tomcat Users List
> Subject: Re: Tomcat on a separate machine
>
>
> How about trying what I do:
>
> in httpd.conf
>
> ProxyPass /equivhttp://other:8080/equiv
> ProxyPassReverse /equiv http://other:8080/equiv
>
> Where other is someother machine
>
>
> At 02:37 PM 11/17/02, you wrote:
> >I have server1 running both Apache2 and an instance of
> Tomcat4.  I have
> >server2 running its own instance of Tomcat4.  The Tomcats on
> server1 and
> >server2 are running different applications.
> >
> >I am currently trying to get requests for urlinone.com
> received by Apache
> at
> >server1 forwarded to the Tomcat at server2.  It seems like
> they see each
> >other, because, when I shut down Apache on server1,
> server2's log shows:
> >
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >
> >However, I don't see any indication that servlet requests
> are getting from
> >Apache on server1 to Tomcat on server2.  There is no log activity on
> server2
> >to match the requests shown at server1.
> >
> >On server1, Apache httpd.conf contains, in part:
> >
> >NameVirtualHost *
> >
> >  LoadModule jk_module /usr/local/apache/modules/mod_jk.so
> >
> ># Am I supposed to have AddModule mod_jk anywhere?  There
> are no AddModule
> >statements in this file.
> >JkWorkersFile /var/tomcat4/conf/jk/workers.properties
> >JkLogFile /var/tomcat4/logs/mod_jk.log
> >JkLogLevel info
> >JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> >
> >ServerName www.urlinone.com
> >ServerAlias urlinone.com
> >DocumentRoot /var/tomcat4/webapps/urlinone
> >ErrorLog /var/tomcat4/logs/urlinone-errorlog
> >CustomLog /var/tomcat4/logs/urlinone-access.log common
> >Alias / "/var/tomcat4/webapps/urlinone/"
> >JkMount /servlet/* server2
> >
> >
> >Server1's workers.properties file says:
> >
> >worker.list=server1,server2
> >worker.server1.type=ajp13
> >worker.server1.host=192.168.1.80
> >worker.server1.port=8009
> >
> >worker.server2.type=ajp13
> >worker.server2.host=192.168.1.50
> >worker.server2.port=8009
> >
> >Server2's server.xml file says, in part:
> >
> >  
> >
> > > port="8009" minProcessors="5" maxProcessors="75"
> > enableLookups="true" appBase="webapps"
> > acceptCount="10" debug="0"/>
> > debug="0">
> >   >  prefix="urlinone_log." suffix=".txt"
> >  timestamp="true"/>
> >  
> >
> >  
> >
> >The Apache log shows a request being successfully completed:
> >
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET
> /index.html HTTP/1.1" 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET
> /urlinone.js HTTP/1.1"
> 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /servlet/PagePump
> >HTTP/1.1" 200 0
> >
> >But there is no activity, as far as I can see, on server2.
> Server1 is
> >running Red Hat 7.3 and Tomcat 4.1.12, while server2 is
> running Red Hat 7.2
> >and Tomcat 4.0.3.  I had to download all the jars at
> >http://jakarta.apache.org/builds/jakarta-tomcat-connectors/co
> yote/release/v
> 1
> >.0-rc2/ to get Coyote running on server2, so I'm wondering
> if there is some
> >incompatibility there.  Despite the instructions on that
> page, I do not
> have
> >a jk2.properties file, nor do I have tomcat-jni.jar, because
> I don't think
> >I'm using either of those, since I'm using mod_jk.  I also
> don't believe
> >there is any need for a workers.properties file on server2,
> since that is
> >fo

RE: Scanning the URL

2002-11-18 Thread Reynir Hübner
Hello Anders, 

You can implement a Filter :

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/servletapi/javax/servlet/Filter.html

that would be executed either before or after (or both) the response is created, with 
traditional servlets/jsp.

You could for example check out the URL in the request, and redirect the request to 
the error-page you want to use for such 404.

Hope it helps
- reynir
[EMAIL PROTECTED]




> -Original Message-
> From: Anders Gunnare [mailto:[EMAIL PROTECTED]] 
> Sent: 18. nóvember 2002 20:38
> To: [EMAIL PROTECTED]
> Subject: Scanning the URL
> 
> 
> Hello World,
> 
> I'm intrested in scaning the URL in my Tomcat-server 4.1.12 
> before the server is making a response. Depending what the 
> URL contains the server shall do something with that.
> 
> Can I do that?
> 
> For example,
> a request can look like
> http://myserver/abc/index.jsp
> I don't have anything on my server which name is 
> abc/index.jsp At this time the server shows an error-page. 
> But I would like to show an home-made error page which says something 
> about the content of the UTL.
> 
> For example, in MS IIS and MS ASP there is a file global.as which a 
> request is going in one time per session. Here is it possible 
> to check 
> the URL or whatever I want.
> 
> Best regards
> Anders Gunnare
> Frontec
> Sweden
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




Re: Processing form uploaded files

2002-11-18 Thread David Wall
>   I never saw anyone mentioning jakarta's upload servlet... what's wrong
> with it?

Good question.  When I took a look, it appeared to not really be at
production 1.0 yet.  I'd hope that the authors also looked over the many
nits discovered in the Jason Hunter version to ensure all of the bugs there
are also incorporated as many browsers have minor bugs that need to be
correctly handled (often related to boundaries improperly defined, etc.)

David


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




RE: jdbc connection list

2002-11-18 Thread Darya Chernikhova

Hi Ralph and Steven,

Obsession pays.  You were right -- I haven't been able to find a way to
track connections from code.  I gave up and resolved to try to use
connection pools in the future.  And yet...  I've just randomly stumbled
upon this tool (http://www.p6spy.com/) .  It seems to put a layer between
my code and the JDBC driver, for debugging purposes.  This freeware tool
promises to help me track calls to open connections, calculate how long
all of the db calls take, and make my bed in the morning too.  I haven't
tried it yet, and it will be a long time before I can afford the time to
check it out, but I wanted to share my wondrous finding with the folks who
helped me understand JDBC connections way back in June.

Thanks a lot,
Darya.


On Wed, 5 Jun 2002, Steven Wood wrote:
> --=_NextPart_000_0044_01C20CAB.2E2012B0
> Content-Type: text/plain;
>   charset="iso-8859-1"
> Content-Transfer-Encoding: 8bit
>
> Hi,
>
> If you use the javax.sql extension API you can be notified whenever a
> connection is closed, using the javax.sql.ConnectionEvent Listener
> interface.  I think that most major Database vendors support this ?? but
> ralph is right, there is no standard way to be notified when a connection is
> opened.  I suppose you should consider writing or using some kind of
> connection pool object which manages all the Connections across your
> applications.  This is a widely used techinque and theres plenty
> documentaion out there about connection pools.  You at least need to create
> a class that sits between your application and the standard JDBC way of
> getting a connection, so that you could generate the events you want or keep
> a count of open connections.  i.e. this would involve changing all your
> servlets/jsps, to get connections the new way,
>
>
>
> Steve.
>
> -Original Message-
> From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
> Sent: 05 June 2002 15:47
> To: Tomcat Users List
> Subject: AW: jdbc connection list
>
>
> For connection you are out of luck.
>
> There is nothing like a common event model for
> connections or connection pools. (No driver
> or pool that I know has a feature like this).
>
> One solution if you have complete control over
> any class that accesses the database:
>
> Wrap the pool or the connection inside a own class
> that delegates all get/release calls to the underlying
> class and track the connection count.
>
> If you have third party tools that access the database
> I think that you have lost with the most databases.
> With some database it's possible to get a list of
> open connection through system views or stored procedures.
> (E.g. Oracle) but that's not portable.
>
> > -Ursprüngliche Nachricht-
> > Von: Darya Chernikhova [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 5. Juni 2002 16:34
> > An: Tomcat Users List
> > Betreff: Re: jdbc connection list
> 
> > I'd like to write a bean that would keep track of all
> > of the jdbc connections that users make.
> 
>
> --



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




Re: proper use of servlet contexts

2002-11-18 Thread Justin Ruthenbeck

Noah --

I don't really see how doing



makes your app dependent on your context ... it makes your app dependent on 
the _name_ of your context, but not anything else about your context.  If 
you move your app around to other appservers, you'll always have to define 
a name in some proprietary way.  If you're concerned about this (ie want to 
be able to dynamically create the application name), then why not just make 
this a configurable parameter and do something such as this in each of your 
jsps:

<%  String urlPrepend = MyConfig.getAppNamePrepend();
%>
...


(or some variation thereof).  There are many ways to implement a process 
for doing this depending on what sort of Tomcat/J2EE "features" you're 
using and your deployment requirements.  Be sure you really need 
application _name_ independence, though ... most apps don't need this.

justin


At 11:58 PM 11/16/2002, you wrote:
Any other thoughts on this? Someone suggested using Struts  . . but short of
instituting a framework  . .

- Original Message -
From: "Noah Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 8:18 PM
Subject: proper use of servlet contexts


I have a question regarding the proper way to use servlet contexts. The way
I've been using them I always seem to bump into one problem or another which
affects the flexibility of using servlets or affects the portability of my
application.

Here's my problem:

I developed several servlets and defined them in the web.xml file. Then I
referenced them in a form as such:



Now I've made my application dependent on my servlet context. Ok, so I
decided that instead of referencing my servlets in a root (context) relative
way I would reference them in a relative way from the page i'm on:



I would then map the servlet in a way that parallels my physical directory
structure. If the form tag above was on a page "/help/finance/index.jsp", I
would have to map the above servlet as "/help/finance/doThis", in order for
it to resolve correctly.

Ok, great. Now I have a way to refer to servlets that doesn't affect the
portability of my application. But it's seems like this isn't a great
solution either. What if I use this servlet in multiple places? Now I have
to go back and add new mappings in each place to make sure that a relative
call to this servlet works in these cases as well.

Now I'm thinking that possibly the best solution is to prepend the servlet
context for each form action call:



But this seems like a round about way to go for something so simple. Am I
missing something here?

A second issue is that if your servlet does a forward using the request
dispatcher AND your servlet url mapping does not reflect your directory
structure, all the image paths and links and such could get screwed. There
is a workaround using the HTML Base tag, but this isn't an option in my
particular situation.

Thoughts on this?

Thanks in advance.

Noah




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



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




auto-redirect to default page - undesired

2002-11-18 Thread neal
Tomcat appears to auto-redirect to the default page rather than leaving the
url of the default url (www.mysite.com) while displaying the default page.
In otherwords, if the url (www.mysite.com) is requested, the url is actually
redirected (the url of the window will change) to www.mysite.com/index.jsp.
This presumes use of tomcat as standalone.

>From what I have been reading this can have adverse effects on search engine
placement and is thus not a desired effect.  Does anyone know how to
configure tomcat to behave as most other web servers and *not* redirect the
user?  I think the difference here may be to forward the user versus
redirecting them.

Thanks.
Neal


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




exception when accessing web application

2002-11-18 Thread Abhijat Thakur
after loading a web application when i go to access the web application through the 
URL i get this error. My jar files are under PathToWebApp/WEB-INF/lib. What am i doing 
wrong?

javax.servlet.ServletException: java.lang.NoClassDefFoundError
at electric.server.http.ServletServer.init(Unknown Source)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)


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




Tomcat 4.1.12 and packageless classes as Beans

2002-11-18 Thread Thorsten Huber
I've tried to port an old training-webapps from tomcat 3.3 to
4.1.12. This webapp contains a simple JSP (counter1.jsp) which
accesses a simple Bean which contains the counter functionality. The
Bean was implemented as a packageless class lying directly in
WEB-FINF/classes. This worked under tomcat 3.3 but on 4.1.12 I get the
following message:

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

An error occurred at line: 0 in the jsp file: /counter1.jsp

Generated servlet error:
[javac] Compiling 1 source file

.../Standalone/localhost/WebEng2/counter1_jsp.java:41: cannot resolve symbol
symbol  : class Counter 
location: class org.apache.jsp.counter1_jsp
  Counter counter = null;
...
---

The only solution to get this example working under tomcat 4.1.12 was
to move the class into a package and to call it from within this
package. It's a solution that works, but out of curiosity: Can someone
explain me why I have to use packages in 4.1.12?


-- 
Gruss / Best regards  |  LF.net GmbH|  fon +49 711 90074-414
Thorsten Huber|  Ruppmannstrasse 27 |  fax +49 711 90074-33
[EMAIL PROTECTED] |  D-70565 Stuttgart  |  http://www.lf.net 

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




tomcat 4.1 displays a blank page when compiling a JSP with compilationerrors

2002-11-18 Thread Christos Karras
On one of our Tomcat 4.1.12 servers, when someone requests a JSP page 
that has compilation errors, he gets a blank page instead of getting a 
tomcat generated page showing the compilation error. So we have to look 
in tomcat's logs to get the error message. That's nice for a production 
server, but I would like to have errors directly in the browser when 
developping.

How can I enable error messages to be sent to the browser?

Is hiding the error pages the normal default behavior? I have some 
Tomcat 4.1.12 servers (one per machine, development done on NT and 
production servers on linux) which have always sent jsp compilation 
error messages to the browser by default, while others only write the 
messages to logs.

I tried the following:
- set debug="1" to everything which has a debug parameter in server.xml
- set jasper's "logVerbosityLevel" init-param to "DEBUG" (and left 
default values for other parameters)

but still no error message shown in browser. Am I missing something in 
the documentation?

Thanks


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



RE: FW: Problem using Https connection on tomcat 4 & jdk 1.4

2002-11-18 Thread Ritu Kumar
Here is the part of my code to connect to another servlet
 

 System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
HttpsURLConnection.setDefaultHostnameVerifier(this);
 URL url = new
URL("https://xyz.org/xxx/SystemAuthenticator.jk";);  
 connection = url.openConnection();
//send file

connection.setDoOutput(true);
  
PrintWriter out = new
PrintWriter(connection.getOutputStream());
String outString
="mode=init&username="+username+"&password="+password;+
out.println(outString);

out.close();
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 3:29 PM
To: Tomcat Users List
Subject: Re: FW: Problem using Https connection on tomcat 4 & jdk 1.4



how do you connecting to the other servlet?

Torsten

On Monday 18 November 2002 21:16, Ritu Kumar wrote:
> Hi,
>
> I am using tomcat 4.1.12 & jdk 1.4.
>
> I am having problem using HTTPS as a protocol to connect to another
> servlet. ( No problem if I use HTTP protocol)
> I do not get any errors, but the code seems to hang.
>
> If I use tomcat 4.1.12 & jdk 1.3 , the same code works fine.
>
> Any idea why this could be happining ?
>
> Ritu Kumar
> 703-464-5379


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Scanning the URL

2002-11-18 Thread Anders Gunnare
Hello World,

I'm intrested in scaning the URL in my Tomcat-server 4.1.12
before the server is making a response.
Depending what the URL contains the server shall do something with that.

Can I do that?

For example,
a request can look like
http://myserver/abc/index.jsp
I don't have anything on my server which name is abc/index.jsp
At this time the server shows an error-page.
But I would like to show an home-made error page which says something 
about the content of the UTL.

For example, in MS IIS and MS ASP there is a file global.as which a 
request is going in one time per session. Here is it possible to check 
the URL or whatever I want.

Best regards
Anders Gunnare
Frontec
Sweden



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



RE: Tomcat 4.12 no longer likes my admin directory.

2002-11-18 Thread Colic, Alex
Hi,

sorry I should have been clearer. My directory structure is:
Tomcat/webapps/myApp/admin/menu.jsp

Since I have moved from 4.06 to 4.12 nothing in the admin directory is
accessable. Other sub directories off of myApp work fine.

Is there problems with a directory name of 'admin'?

Thanks

Alex

-Original Message-
From: Jano [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:05 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.12 no longer likes my admin directory.



> I have a web app that I am moving from 4.06 to 4.12. Within my web app I
> have an admin folder that has a bunch of jsp's. Now when I try to access
> anything in that folder I get an error that the resource does not exist or
> cannot be found. All other sub folders off of my webapps folder works
fine.

you have an admin/WEB-INF/web.xml, right?



This e-mail may be privileged and/or confidential, and the sender does not waive any 
related rights and obligations. Any distribution, use or copying of this e-mail or the 
information it contains by other than an intended recipient is unauthorized. If you 
received this e-mail in error, please advise me (by return e-mail or otherwise) 
immediately. 

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et 
obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou 
des renseignements qu'il contient par une personne autre que le (les) destinataire(s) 
désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser 
immédiatement, par retour de courriel ou par un autre moyen. 


 



Re: FW: Problem using Https connection on tomcat 4 & jdk 1.4

2002-11-18 Thread Torsten Fohrer

how do you connecting to the other servlet?

Torsten

On Monday 18 November 2002 21:16, Ritu Kumar wrote:
> Hi,
>
> I am using tomcat 4.1.12 & jdk 1.4.
>
> I am having problem using HTTPS as a protocol to connect to another
> servlet. ( No problem if I use HTTP protocol)
> I do not get any errors, but the code seems to hang.
>
> If I use tomcat 4.1.12 & jdk 1.3 , the same code works fine.
>
> Any idea why this could be happining ?
>
> Ritu Kumar
> 703-464-5379


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




Problem using Https connection on tomcat 4 & jdk 1.4

2002-11-18 Thread Ritu Kumar
Hi,
 
I am using tomcat 4.1.12 & jdk 1.4.
 
I am having problem using HTTPS as a protocol to connect to another servlet.
( No problem if I use HTTP protocol)
I do not get any errors, but the code seems to hang.
 
If I use tomcat 4.1.12 & jdk 1.3 , the same code works fine.
 
Any idea why this could be happining ?

Ritu Kumar 
703-464-5379 

 



FW: Problem using Https connection on tomcat 4 & jdk 1.4

2002-11-18 Thread Ritu Kumar
Hi,
 
I am using tomcat 4.1.12 & jdk 1.4.
 
I am having problem using HTTPS as a protocol to connect to another servlet.
( No problem if I use HTTP protocol)
I do not get any errors, but the code seems to hang.
 
If I use tomcat 4.1.12 & jdk 1.3 , the same code works fine.
 
Any idea why this could be happining ?

Ritu Kumar 
703-464-5379 

 



after increasing debug level Tomcat shuts down when callingJSP

2002-11-18 Thread Becky Phaneuf
Hello,

I am running Tomcat 4.1.12 on a Windows 2000 machine.
I have a web application that contains one servlet and one JSP page.  The only 
functionality of the JSP page right now is to call the servlet via:



I have been working on the servlet for a while now, and can confirm that web.xml is 
properly configured and  /servlet/DownloadServlet is the correct path.

For a while the servlet was working.  Then I went into the administrator and upped the 
debug level for some components to 8 or more.  After making this change, Tomcat shuts 
itself down after I call the JSP page.  There is one error in my application (called 
ISOdownload) log file - see below:  


2002-11-18 11:18:44 invoker: init: Associated with Context '/ISOdownload'
2002-11-18 11:18:44 WebappClassLoader: loadClass(org.apache.jasper.servlet.JspServlet, 
false)
WebappClassLoader:   Searching local repositories
WebappClassLoader: findClass(org.apache.jasper.servlet.JspServlet)
WebappClassLoader:   findClassInternal(org.apache.jasper.servlet.JspServlet)
WebappClassLoader: --> Passing on ClassNotFoundException
java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet
at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1608)
at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:874)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3341)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3534)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
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)
WebappClassLoader:   Delegating to parent classloader
WebappClassLoader:   Loading class from parent


I believe the Tomcat manager may be creating bad XML in server.xml (all I did was 
change debug levels using the manager), but I can't locate the source of the problem.  
My new XML file is below (generated from the manager app):





  
  

  


  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  

  

  


  



  



  



  


  






  
  
  
  
  
  
  
  
  
  
  
  
  
  

  user
  sa


  password
  


  driverName
  jdbc:HypersonicSQL:database


  driverClassName
  org.hsql.jdbcDriver

  
  

  mail.smtp.host
  localhost

  
  






  
  
  
  



  






  
  
  

  




Any help would be greatly appreciated.

Thanks
-Becky




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




RE: ManagedBean is not found with Ajp13Connector

2002-11-18 Thread Jeff Tulley
Yeah, his response didn't make total sense.  By default, everything in Tomcat Catalina 
should have a MBean equivalent that you shouldn't have to worry about as a user.  It 
is something "under the covers" to make management of tomcat (the /admin app) work 
better.  It is just that, when somebody went to define the MBean resources in an XML 
file in the source code, they skipped the AJP13Connector since it is considered 
"deprecated". 
If I am not mistaken, the problem caused by this exception is that the admin app 
doesn't always function correctly.  Sometimes it simply comes up with a "page not 
found" and I think this exception might be the problem.  Shutdown is also problematic 
because the JMX stuff isn't fully set up right.

The default server.xml (Tomcat 4.1.7 and higher, I think, 4.1.12 for sure) should use 
the Coyote connector JkHandler by default, and the AJP13Connector should be commented 
out.  I know this to be the case because on NetWare we had to explicitly switch that 
around to use the AJP13Connector.  I think in the future we are also going to move to 
using the defaults, just keeping the Coyote Connector.

Are you adverse to fixing up your tomcat instance?  I can send the patch that I have - 
to 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
This adds in a section that describes the AJP13Connector, getting rid of the immediate 
problem.  You would have to then replace the mbeans-descriptors.xml file in 
server\lib\catalina.jar with your patched one (with the right path, 
org\apache\catalina\mbeans).  That fixed the problem for us, though long term I'd move 
away from this connector.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com

>>> [EMAIL PROTECTED] 11/14/02 2:33:14 PM >>>
What do you mean "set up your configuration with the coyote connector"?  I
followed the documenation as given and it uses the AjpConnector.  What is it
that is using MBeans?  I'm totally confused!  I am completely new to tomcat
and apache and would appreciate any clarification!  How can I comment out
the MBeans that are causing the exception?  Will this exception cause
instability or can I just ignore it without fear of further problems?

Please Help!!!  I've looked at the default server.xml and I don't see any
help there.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 14, 2002 3:20 PM
To: Tomcat Users List
Subject: Re: ManagedBean is not found with Ajp13Connector


Hello M.,

The Ajp13Connector doesn't support MBeans.  You need to set up your
AJP configuration with the CoyoteConnector instead.  Or, just comment
out the MBeans that are causing the exception.  See Tomcat-4.1.12's
default server.xml for reference.

Jake

Thursday, November 14, 2002, 2:12:41 PM, you wrote:

AMP> I have just completed setting up the Apache 1.3.27 web server which
will be
AMP> used with Tomcat 4.1 to serve the servlet and jsp pages.  I am also
using
AMP> j2sdk1.4.0_02.  I have set up the configuration of my server.xml and
AMP> https.conf files as described in the tomcat online help for the
AMP> ajp13Connector.  When I run them, however, I get an exception stack
that
AMP> looks like this (this is from my stdout.log file):

AMP> Bootstrap: Create Catalina server
AMP> Bootstrap: Starting service
AMP> ServerLifecycleListener: createMBeans: MBeanException
AMP> java.lang.Exception: ManagedBean is not found with Ajp13Connector
AMP> at
AMP> org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
AMP> at
AMP>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP> cleListener.java:369)
AMP> at
AMP>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP> cleListener.java:777)
AMP> at
AMP>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP> cleListener.java:751)
AMP> at
AMP>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP> cleListener.java:339)
AMP> at
AMP>
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
AMP> cycleListener.java:206)
AMP> at
AMP>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
AMP> t.java:166)
AMP> at
AMP> org.apache.catalina.core.StandardServer.start(StandardServer.java:2182)
AMP> at
AMP>
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
AMP> at java.lang.reflect.Method.invoke(Native Method)
AMP> at
AMP>
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
AMP> )
AMP> at
AMP>
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
AMP> Starting service Tomcat-Standalone
AMP> Apache Tomcat/4.1.12

AMP> The server works fine and I can invoke my servlets and jsp pages
through
AMP> apache without a problem.  My q

RE: Processing form uploaded files

2002-11-18 Thread Felipe Schnack
  I never saw anyone mentioning jakarta's upload servlet... what's wrong
with it?

On Mon, 2002-11-18 at 17:26, Abre Chase wrote:
> You'll need to either write code to parse a multi-part form post or use a 3rd party 
>tool.  Check out Jason Hunter's library here -> 
>http://www.servlets.com/cos/index.html.  You'll just have to buy a copy of his book 
>for everyone on your development staff to license the code ;)
> 
> -Original Message-
> From: Trevor MacPhail [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 7:32 AM
> To: [EMAIL PROTECTED]
> Subject: Processing form uploaded files
> 
> 
> I would like to build a form to allow uploading of an image through a servlet(using 
>the  html tag) but can seem to find out how to retrieve the 
>information properly out of the request. Any suggestions?
> 
> -- 
> Trevor MacPhail
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328


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




[PATCH] Fixes TagHandlerPool Size patch

2002-11-18 Thread Torsten Fohrer

Adding Integer to String 

Index: Generator.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.127
diff -u -w -b -r1.127 Generator.java
--- Generator.java  16 Nov 2002 04:20:10 -  1.127
+++ Generator.java  18 Nov 2002 19:38:47 -
@@ -660,7 +660,7 @@
for (int i=0; imailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




usiing Tomcat with Apache mod_jk and mod_ssl

2002-11-18 Thread Paul Landolt
Hello,

I have been running Tomcat 4.1.12 with Apache 1.3.23 for a while now as
a development platform. I use mod_jk to redirect various virtual hosts
(using an internal DNS server) to the appropriate tomcat Context with no
troubles. All is well in my little http world.

I would like to add new contexts to tomcat that will accessed via both
http (80) and https (443). I can get tomcat going no problem on 8080 and
8443 (by adding the jsse, jnet, and jcert jar files), but I would like
Apache (and mod_ssl) to handle the https redirects.

I seem to be encountering difficulties when configuring SSL availability
in ($APACHE_HOME)/conf/httpd.conf.

I have mod_ssl.so installed
I have the listener listening:

Listen 80
Listen 443


I have a default SSL host set (which has the default options all set to
it):

SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key


I have a name-based virtual host
NameVirtualHost 192.168.1.22

I have a virtual host that points to the main page

ServerName  main.MYHOST.com
ServerAlias main.MYHOST.com
ServerAlias main

ErrorLoglogs/siteDevWorker-error_log
CustomLog   logs/siteDevWorker-access_log common
DocumentRoot/var/www/html


I have a Virtual host pointing to a mod_jk worker and Tomcat Webapp
which works great:

ServerName  webdev.MYHOST.com
ServerAlias webdev.MYHOST.com
ServerAlias webdev

JkMount /   siteDevWorker
JkMount /*  siteDevWorker

ErrorLoglogs/siteDevWorker-error_log
CustomLog   logs/siteDevWorker-access_log common


If I set up a SINGLE  using SSL (443) for my
webdev.MYHOST.com host, it works great with http and https:


ServerName  webdev.MYHOST.com
ServerAlias webdev.MYHOST.com
ServerAlias webdev

SSLEngine   On
SSLCertificateFile  /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile   /etc/httpd/conf/ssl.key/server.key

JkMount /   siteDevWorker
JkMount /*  siteDevWorker
ErrorLoglogs/siteDevWorker-error_log
CustomLog   logs/siteDevWorker-access_log common


Now, here's where it breaks down.
If I try and install a SECOND virtual hose using SSL, I get some odd
precedence error.  I create an SSL Virtual host for my main page:


ServerName  main.MYHOST.com
ServerAlias main.MYHOST.com
ServerAlias main

SSLEngine   On
SSLCertificateFile  /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile   /etc/httpd/conf/ssl.key/server.key

ErrorLoglogs/siteDevWorker-error_log
CustomLog   logs/siteDevWorker-access_log common
DocumentRoot/var/www/html


But, when I start up apache, I get a precedence error:

[root@MYHOST conf]# /etc/init.d/httpd start
Starting httpd: [Mon Nov 18 14:29:43 2002] [warn] VirtualHost
192.168.1.22:443 overlaps with VirtualHost 192.168.1.22:443, the first
has precedence, perhaps you need a NameVirtualHost directive

Note that in both cases the only differences between the HTTP and the
HTTPS version of the virtual host are the reference to :443 and the SSL
directives.

I don't understand why such a precedence error happens for https but not
http. Has anyone else succeeded in configuring their systems as such? If
anyone has some documentation or hints as to how to proceed, it would be
very handy


Platform particulars:
Linux (redhat 7.2)
Tomcat 4.1.12
Apache 1.3.23
mod_jk.so
mod_ssl.so

...Paul




Re: Unable to find setter method

2002-11-18 Thread Jim Cobban
I am really at a roadblock with this problem.  I cannot proceed until
someone tells me what I am doing wrong.

I have continued experimenting.  Even on 4.1.12 I definitely have the
problem that Tomcat cannot find the setLang method which is in the base
class unless I include that silly redirection routine in the derived class.
I know that this is not what is supposed to happen, but it is what is
happening.  The declarations of the two classes remain the same except that
I have commented out the set methods in the derived class.

Would someone please give me some ideas of how to proceed in resolving this
problem?

- Original Message -
From: "Jim Cobban" <[EMAIL PROTECTED]>
To: "Tomcat User Maillist" <[EMAIL PROTECTED]>
Sent: Saturday, November 16, 2002 12:02 PM
Subject: Unable to find setter method


I do not understand why I am getting this error message.

The line in the JSP is:

  

The definition of the tag in the TLD is:

  
subdivq
Census.tags.QuerySubDivTag
JSP
Performs a query of the census subdivision table based upon the
 parameters supplied in the request URL

  
  lang
  false


  
  maxRows
  false

  

The class definition is:



public class QuerySubDivTag extends QueryTag
{

  public void setLang(String lang)
  {
super.setLang(lang);
  }

  public void setMaxRows(String repeats)
  {
super.setMaxRows(repeats);
  }

Tomcat 4.1.12 recognizes that the setLang method is present (although I had
to put in that pointless redirection to super to get it to do that) but not
the presence of the setMaxRows method.

The definition of the methods in the base class is:

  public void setLang(String lang)
  {
  if ((lang != null) && lang.equalsIgnoreCase("FR"))
 Language = FRENCH;
  else
 Language = ENGLISH;
  }  // LangTag.setLang

public void setMaxRows(String repeats)
{
 try
 {
 maxRows = Integer.parseInt(repeats);
 }
 catch(NumberFormatException nfe)
 {
 maxRows = 50;
 }
}  // QueryTag.setMaxRows

Jim Cobban   [EMAIL PROTECTED]
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438



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




Re: ManagedBean is not found with Ajp13Connector

2002-11-18 Thread Jeff Tulley
Have you searched the user list archives? I've answered this problem about 3 times in 
the last month or so.

It is common; I've patched the actual problem, but the Tomcat committers recommend you 
move to the JkHandler of the Coyote Connector instead of using the Ajp13Connector, 
which is deprecated.  The coyote connector does work fine with mod_jk.

The patch is to the XML file that defines the MBeans corresponding to the various 
connectors and such.  It is pretty simple.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com

>>> [EMAIL PROTECTED] 11/14/02 1:12:41 PM >>>
I have just completed setting up the Apache 1.3.27 web server which will be
used with Tomcat 4.1 to serve the servlet and jsp pages.  I am also using
j2sdk1.4.0_02.  I have set up the configuration of my server.xml and
https.conf files as described in the tomcat online help for the
ajp13Connector.  When I run them, however, I get an exception stack that
looks like this (this is from my stdout.log file):

Bootstrap: Create Catalina server
Bootstrap: Starting service
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:369)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:777)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:751)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:339)
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:2182)
at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12

The server works fine and I can invoke my servlets and jsp pages through
apache without a problem.  My question concerns this error.  I have searched
the net to find an answer but I can't find what this problem is.  I am
satisfied that I have configured the servers properly since I can view my
pages but I need to know what that error is so I can be satisfied it won't
cause any future problems.

Any help would be greatly appreciated!!

Paul

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



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




Re: Processing form uploaded files

2002-11-18 Thread Kiev
In order to get the uploaded information right, you need to do is set the
following parameters in your HTML  tag:



You'll have to use some java class to take care of the uploaded information.
at http://jakarta.apache.org/commons/fileupload you can find the FileUpload
component that can help you do that.

hope it helps,


Kiev


- Original Message -
From: "Trevor MacPhail" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 10:31 AM
Subject: Processing form uploaded files


> I would like to build a form to allow uploading of an image through a
servlet(using the  html tag) but can seem to find out how
to retrieve the information properly out of the request. Any suggestions?
>
> --
> Trevor MacPhail
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




RE: Tomcat on a separate machine

2002-11-18 Thread Turner, John

Does server.xml have a Host tag for server2?  Something like:




John

> -Original Message-
> From: Lee Grey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 2:21 PM
> To: Tomcat Users List
> Subject: RE: Tomcat on a separate machine
> 
> 
> The problem with that is that it doesn't help me with 
> load-balancing and
> such.  I really need to get the connector working.
> 
> Thanks, though.
> 
> Any other thoughts on what I've done wrong here?
> 
> --Lee
> 
> -Original Message-
> From: Paul Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 11:35 PM
> To: Tomcat Users List
> Subject: Re: Tomcat on a separate machine
> 
> 
> How about trying what I do:
> 
> in httpd.conf
> 
> ProxyPass /equivhttp://other:8080/equiv
> ProxyPassReverse /equiv http://other:8080/equiv
> 
> Where other is someother machine
> 
> 
> At 02:37 PM 11/17/02, you wrote:
> >I have server1 running both Apache2 and an instance of 
> Tomcat4.  I have
> >server2 running its own instance of Tomcat4.  The Tomcats on 
> server1 and
> >server2 are running different applications.
> >
> >I am currently trying to get requests for urlinone.com 
> received by Apache
> at
> >server1 forwarded to the Tomcat at server2.  It seems like 
> they see each
> >other, because, when I shut down Apache on server1, 
> server2's log shows:
> >
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
> processConnection
> >WARNING: server has closed the current connection (-1)
> >
> >However, I don't see any indication that servlet requests 
> are getting from
> >Apache on server1 to Tomcat on server2.  There is no log activity on
> server2
> >to match the requests shown at server1.
> >
> >On server1, Apache httpd.conf contains, in part:
> >
> >NameVirtualHost *
> >
> >  LoadModule jk_module /usr/local/apache/modules/mod_jk.so
> >
> ># Am I supposed to have AddModule mod_jk anywhere?  There 
> are no AddModule
> >statements in this file.
> >JkWorkersFile /var/tomcat4/conf/jk/workers.properties
> >JkLogFile /var/tomcat4/logs/mod_jk.log
> >JkLogLevel info
> >JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> >
> >ServerName www.urlinone.com
> >ServerAlias urlinone.com
> >DocumentRoot /var/tomcat4/webapps/urlinone
> >ErrorLog /var/tomcat4/logs/urlinone-errorlog
> >CustomLog /var/tomcat4/logs/urlinone-access.log common
> >Alias / "/var/tomcat4/webapps/urlinone/"
> >JkMount /servlet/* server2
> >
> >
> >Server1's workers.properties file says:
> >
> >worker.list=server1,server2
> >worker.server1.type=ajp13
> >worker.server1.host=192.168.1.80
> >worker.server1.port=8009
> >
> >worker.server2.type=ajp13
> >worker.server2.host=192.168.1.50
> >worker.server2.port=8009
> >
> >Server2's server.xml file says, in part:
> >
> >  
> >
> > > port="8009" minProcessors="5" maxProcessors="75"
> > enableLookups="true" appBase="webapps"
> > acceptCount="10" debug="0"/>
> > debug="0">
> >   >  prefix="urlinone_log." suffix=".txt"
> >  timestamp="true"/>
> >  
> >
> >  
> >
> >The Apache log shows a request being successfully completed:
> >
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET 
> /index.html HTTP/1.1" 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET 
> /urlinone.js HTTP/1.1"
> 304
> >0
> >192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /servlet/PagePump
> >HTTP/1.1" 200 0
> >
> >But there is no activity, as far as I can see, on server2.  
> Server1 is
> >running Red Hat 7.3 and Tomcat 4.1.12, while server2 is 
> running Red Hat 7.2
> >and Tomcat 4.0.3.  I had to download all the jars at
> >http://jakarta.apache.org/builds/jakarta-tomcat-connectors/co
> yote/release/v
> 1
> >.0-rc2/ to get Coyote running on server2, so I'm wondering 
> if there is some
> >incompatibility there.  Despite the instructions on that 
> page, I do not
> have
> >a jk2.properties file, nor do I have tomcat-jni.jar, because 
> I don't think
> >I'm using either of those, since I'm using mod_jk.  I also 
> don't believe
> >there is any need for a workers.properties file on server2, 
> since that is
> >for mod_jk in Apache, right?
> >
> >The only other thing, and I don't know if this is a red flag or a red
> >herring, is that mod_jk.log on server1 gives bursts of 
> errors sometimes,
> >although 90% of the time it's when Tomcat on server2 is 
> starting up or
> >shutting down.  I have seen some errors upon a request, 
> though.  I tend to
> >think the problem is within my configuration, though, and 
> that these errors
> >are not significant.  I include them for completeness.
> >
> >[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (679)]:
> >ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
> >[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (1041)]: Error 
> reading reply
> >[Sun Nov 17 16:53:49 2002

RE: Processing form uploaded files

2002-11-18 Thread Abre Chase
You'll need to either write code to parse a multi-part form post or use a 3rd party 
tool.  Check out Jason Hunter's library here -> 
http://www.servlets.com/cos/index.html.  You'll just have to buy a copy of his book 
for everyone on your development staff to license the code ;)

-Original Message-
From: Trevor MacPhail [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 7:32 AM
To: [EMAIL PROTECTED]
Subject: Processing form uploaded files


I would like to build a form to allow uploading of an image through a servlet(using 
the  html tag) but can seem to find out how to retrieve the 
information properly out of the request. Any suggestions?

-- 
Trevor MacPhail

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


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




RE: Serving PDF files on Apache2 + Tomcat4.1

2002-11-18 Thread Hugo Villeneuve
Sorry, I have found this is a pathInfo issue, look I at my next post
:pathInfo is not enconded.

-Original Message-
From: Hugo Villeneuve [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:05 AM
To: Tomcat Users List
Subject: RE: Serving PDF files on Apache2 + Tomcat4.1


I can share the experience I had with IE5, Tomcat 4.1 and serving dynamic
PDF.
IE 5 have a problem with the "Cache-Control" parameter in the HTTP 1.1
header. With Tomcat 4.1, if I just send the pdf on the OutputStream every
think is working fine. What is your problem exactly?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, November 15, 2002 7:29 PM
To: Tomcat Users List
Subject: Re: Serving PDF files on Apache2 + Tomcat4.1


Hi Hugo !
I have been trying to get .pdf files to display.
I am using IE4 on Apache/Tomcat.
.pdf is an Oracle blob . pdf does not display on IE but gif and jpg all
okay.
Did you get it working ?

--
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: Unable to compile class for JSP in Windows

2002-11-18 Thread brtiany swinaa

salama , what is your problem ??
i have windows xp, and run the stuff using it 
 Salama hussein <[EMAIL PROTECTED]> wrote:It doesn't matter. Any JSP gives the same 
error. I tried the examples that 
come with Tomcat also and same problem. I even tried Windows 2000 and XP and 
same problem. I going to believe that Tomcat does not work in Windows and 
wonder how others got it to work.

Salama
PS: I am a new user and I am not getting any messages from the list. I had 
to go to the archive.



Exactly what did the jsp contain?
I mean the code you put in. Post it on the list and let everyone have a look 
see.

Salama hussein wrote:



I am getting the error below in Windows 2000 SP2, Tomcat 4.1.12 and JDK1.4 
for any JSP program including the examples. I have reinstalled Tomcat 
different versions and tried JDK1.3 but always same problem. Any ideas?

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

An error occurred at line: -1 in the jsp file: null

.


Salama


_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



-
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site


RE: Tomcat on a separate machine

2002-11-18 Thread Lee Grey
The problem with that is that it doesn't help me with load-balancing and
such.  I really need to get the connector working.

Thanks, though.

Any other thoughts on what I've done wrong here?

--Lee

-Original Message-
From: Paul Campbell [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 11:35 PM
To: Tomcat Users List
Subject: Re: Tomcat on a separate machine


How about trying what I do:

in httpd.conf

ProxyPass /equivhttp://other:8080/equiv
ProxyPassReverse /equiv http://other:8080/equiv

Where other is someother machine


At 02:37 PM 11/17/02, you wrote:
>I have server1 running both Apache2 and an instance of Tomcat4.  I have
>server2 running its own instance of Tomcat4.  The Tomcats on server1 and
>server2 are running different applications.
>
>I am currently trying to get requests for urlinone.com received by Apache
at
>server1 forwarded to the Tomcat at server2.  It seems like they see each
>other, because, when I shut down Apache on server1, server2's log shows:
>
>Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
processConnection
>WARNING: server has closed the current connection (-1)
>Nov 17, 2002 4:14:29 PM org.apache.jk.common.ChannelSocket
processConnection
>WARNING: server has closed the current connection (-1)
>
>However, I don't see any indication that servlet requests are getting from
>Apache on server1 to Tomcat on server2.  There is no log activity on
server2
>to match the requests shown at server1.
>
>On server1, Apache httpd.conf contains, in part:
>
>NameVirtualHost *
>
>  LoadModule jk_module /usr/local/apache/modules/mod_jk.so
>
># Am I supposed to have AddModule mod_jk anywhere?  There are no AddModule
>statements in this file.
>JkWorkersFile /var/tomcat4/conf/jk/workers.properties
>JkLogFile /var/tomcat4/logs/mod_jk.log
>JkLogLevel info
>JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
>
>ServerName www.urlinone.com
>ServerAlias urlinone.com
>DocumentRoot /var/tomcat4/webapps/urlinone
>ErrorLog /var/tomcat4/logs/urlinone-errorlog
>CustomLog /var/tomcat4/logs/urlinone-access.log common
>Alias / "/var/tomcat4/webapps/urlinone/"
>JkMount /servlet/* server2
>
>
>Server1's workers.properties file says:
>
>worker.list=server1,server2
>worker.server1.type=ajp13
>worker.server1.host=192.168.1.80
>worker.server1.port=8009
>
>worker.server2.type=ajp13
>worker.server2.host=192.168.1.50
>worker.server2.port=8009
>
>Server2's server.xml file says, in part:
>
>  
>
> port="8009" minProcessors="5" maxProcessors="75"
> enableLookups="true" appBase="webapps"
> acceptCount="10" debug="0"/>
>
>prefix="urlinone_log." suffix=".txt"
>  timestamp="true"/>
>  
>
>  
>
>The Apache log shows a request being successfully completed:
>
>192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /index.html HTTP/1.1" 304
>0
>192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /urlinone.js HTTP/1.1"
304
>0
>192.168.1.1 - - [17/Nov/2002:16:27:27 -0500] "GET /servlet/PagePump
>HTTP/1.1" 200 0
>
>But there is no activity, as far as I can see, on server2.  Server1 is
>running Red Hat 7.3 and Tomcat 4.1.12, while server2 is running Red Hat 7.2
>and Tomcat 4.0.3.  I had to download all the jars at
>http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v
1
>.0-rc2/ to get Coyote running on server2, so I'm wondering if there is some
>incompatibility there.  Despite the instructions on that page, I do not
have
>a jk2.properties file, nor do I have tomcat-jni.jar, because I don't think
>I'm using either of those, since I'm using mod_jk.  I also don't believe
>there is any need for a workers.properties file on server2, since that is
>for mod_jk in Apache, right?
>
>The only other thing, and I don't know if this is a red flag or a red
>herring, is that mod_jk.log on server1 gives bursts of errors sometimes,
>although 90% of the time it's when Tomcat on server2 is starting up or
>shutting down.  I have seen some errors upon a request, though.  I tend to
>think the problem is within my configuration, though, and that these errors
>are not significant.  I include them for completeness.
>
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (679)]:
>ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (1041)]: Error reading reply
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (1178)]: In
>jk_endpoint_t::service, ajp_get_reply failed in send loop 0
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (679)]:
>ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (1041)]: Error reading reply
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (1178)]: In
>jk_endpoint_t::service, ajp_get_reply failed in send loop 0
>[Sun Nov 17 16:53:49 2002] [jk_connect.c (177)]: jk_open_socket, connect()
>failed errno = 111
>[Sun Nov 17 16:53:49 2002] [jk_ajp_common.c (626)]: In
>jk_endpoint_t::ajp_connect_to_endpoint, fai

Processing form uploaded files

2002-11-18 Thread Trevor MacPhail
I would like to build a form to allow uploading of an image through a servlet(using 
the  html tag) but can seem to find out how to retrieve the 
information properly out of the request. Any suggestions?

-- 
Trevor MacPhail

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




RE: Escaped versus unescaped cookies

2002-11-18 Thread Lee Grey
Could this have something to do with HTTP version?  Is there a different
setting between Apache 1 and Apache 2, perhaps?

Thanks,
Lee

-Original Message-
From: Lee Grey [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 9:38 PM
To: [EMAIL PROTECTED]
Subject: Escaped versus unescaped cookies


I am running the same servlet on two different machines.  One is running
Apache 1.3.26, Tomcat 4.0.3, and J2SDK 1.4.0.  The other is running Apache
2.0.43, Tomcat 4.1.12, and J2SDK 1.4.1.

In the first environment, my cookie comes back in plain text, like:

Cookie 0: set0=(sn=About
URLinOne|ao=y|l=d)%http://www.URLinOne.com/about.html|i=0|h=n

In the second environment, it looks like:

Cookie 14:
set13=%28sn%3DDev%7Cao%3Dn%7Cl%3Dnull%29%25http%3A%2F%2Fwww.autoscripter.com
%7Ci%3D0%7Ch%3Dn%25http%3A%2F%2Fwww.swishzone.com%7Ci%3D1%7Ch%3Dn%25http%3A%
2F%2Fwww.anim-fx.com%7Ci%3D2%7Ch%3Dn%25http%3A%2F%2Fwww.coffeecup.com%2Ffire
starter%7Ci%3D3%7Ch%3Dn

What setting(s) could account for this difference?

Thanks,
Lee Grey
Grey Matter
http://www.URLinOne.com

If you've ever opened more than one browser
window at the same time, you need URL in One
at http://www.URLinOne.com.  There's no
software to install, and it's free!


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Programmatic login

2002-11-18 Thread Christoph Kulla
Hi Juergen,

another approach is to put your welcome file under a security constraint. 
Your app will then start with the login page.

Regards

Christoph

Juergen Weber schrieb:
Hi,

thanks to all who answered to my question.

The valve solution looks good, but as we develop with
tomcat and run on weblogic we cannot use nonportable
solutions.

So, if marketing insists on their idea we have to dump
container managed security. Probably we will use a
struts based security.

Thanks,
Juergen


__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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






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




Re: Unable to compile class for JSP in Windows

2002-11-18 Thread Salama hussein
It doesn't matter. Any JSP gives the same error. I tried the examples that 
come with Tomcat also and same problem. I even tried Windows 2000 and XP and 
same problem. I going to believe that Tomcat does not work in Windows and 
wonder how others got it to work.

Salama
PS: I am a new user and I am not getting any messages from the list. I had 
to go to the archive.



Exactly what did the jsp contain?
I mean the code you put in. Post it on the list and let everyone have a look 
see.

Salama hussein wrote:



I am getting the error below in Windows 2000 SP2, Tomcat 4.1.12 and JDK1.4 
for any JSP program including the examples. I have reinstalled Tomcat 
different versions and tried JDK1.3 but always same problem. Any ideas?

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

An error occurred at line: -1 in the jsp file: null

.


Salama


_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Re: Tomcat 4.12 no longer likes my admin directory.

2002-11-18 Thread Jano

> I have a web app that I am moving from 4.06 to 4.12. Within my web app I
> have an admin folder that has a bunch of jsp's. Now when I try to access
> anything in that folder I get an error that the resource does not exist or
> cannot be found. All other sub folders off of my webapps folder works fine.

you have an admin/WEB-INF/web.xml, right?


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





RE: Manager application - quick question

2002-11-18 Thread Cox, Charlie
both are safe. reload will be faster(one command vs two), but start/stop
will allow web.xml to be read again.

Charlie

> -Original Message-
> From: Renato [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 1:30 PM
> To: [EMAIL PROTECTED]
> Subject: Manager application - quick question
> 
> 
> Hi all,
> 
> I'll deploy the manager application to my users. Probably the 
> only funcionality I'll let them use is to stop and start 
> their web applications.
> 
> Which is the safest method ?
> 
> - reload ?
> - stop / start ?
> - indifferent ?
> 
> Thanks 
> Renato.
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




Tomcat 4.12 no longer likes my admin directory.

2002-11-18 Thread Colic, Alex
HI,

I have a web app that I am moving from 4.06 to 4.12. Within my web app I
have an admin folder that has a bunch of jsp's. Now when I try to access
anything in that folder I get an error that the resource does not exist or
cannot be found. All other sub folders off of my webapps folder works fine.

Is admin a reserved folder?

Thanks

Alex





This e-mail may be privileged and/or confidential, and the sender does not waive any 
related rights and obligations. Any distribution, use or copying of this e-mail or the 
information it contains by other than an intended recipient is unauthorized. If you 
received this e-mail in error, please advise me (by return e-mail or otherwise) 
immediately. 

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et 
obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou 
des renseignements qu'il contient par une personne autre que le (les) destinataire(s) 
désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser 
immédiatement, par retour de courriel ou par un autre moyen. 


 



Tomcat 4.1.12 Critically Crashing-- Help

2002-11-18 Thread developer
I am running 4.1.12 with mod_jk and apache 1.3.27 on a linux 2.2.22
kernel and with java version "1.4.1_01".  Tomcat is being used ona
production system and is getting heavy usage.  I am getting some wierd
variety of errors and tomcat has
critically crashed on my several times in the same fashion.  I have looked
on the newsgroups, and at the docs and can't really find anything helpful
so please help, sorry this message is so long but wanted to include all
the details


1)First of all I am constantly getting this message:
Nov 18, 2002 10:37:57 AM org.apache.jk.common.ChannelSocket
processConnection
WARNING: server has closed the current connection (-1)

When I say constant I mean literally like every 5 seconds.  What does that
mean?





2)When tomcat has critically crashed I first got a couple of these
messages:
SEVERE: Error in action code
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:380)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:558)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:354)
at org.apache.coyote.Response.action(Response.java:216)
at org.apache.coyote.Response.finish(Response.java:336)
at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:504)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)



Then it finally crashed with this:

Unexpected Signal : 11 occurred at PC=0x4032A4BE
Function=get_stack_trace_depth__19java_lang_ThrowableP7oopDescP6Thread+0xBA
Library=/usr/environment/javastuff/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so

Current Java thread:
at java.lang.Throwable.getStackTraceDepth(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:588)
- locked <0x44709338> (a java.lang.IllegalStateException)
at java.lang.Throwable.printStackTrace(Throwable.java:510)
- locked <0x4470a548> (a java.io.PrintWriter)
at org.apache.catalina.logger.LoggerBase.log(LoggerBase.java:291)
at
org.apache.catalina.core.ApplicationContext.internalLog(ApplicationContext.java:870)
at
org.apache.catalina.core.ApplicationContext.log(ApplicationContext.java:862)
at
org.apache.catalina.core.ApplicationContextFacade.log(ApplicationContextFacade.java:210)
at
org.apache.jasper.logging.DefaultLogger.realLog(DefaultLogger.java:135)
at org.apache.jasper.logging.Logger.log(Logger.java:349)
at org.apache.jasper.logging.Logger$Helper.log(Logger.java:734)
at org.apache.jasper.logging.Logger$Helper.log(Logger.java:696)
at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:180)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:154)
at org.apache.jsp.errorpage_jsp._jspService(errorpage_jsp.java:41)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:395)
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:480)
at org.apache.jsp.errorpage_jsp._jspService(errorpage_jsp.java:58)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
.
.
.
.
.
.
.
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
a

RE: What is the name of Class Loader in Tomcat 4.1.x

2002-11-18 Thread Cox, Charlie
WebAppClassloader is the classloader used for webapps and
StandardClassLoader is used for common,shared, and server classloaders.

You probably want the whole source since they reference other classes. It's
not that big.

Charlie

> -Original Message-
> From: aps olute [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 1:38 PM
> To: [EMAIL PROTECTED]
> Subject: What is the name of Class Loader in Tomcat 4.1.x
> 
> 
> Where and how can I get a copy of these ClassLoaders source 
> without downloading
> the entire Tomcat source? Is it possible? The name has change from
> LoaderInterceptor in the older 3.x? 
> There were a mention of Loader Component in the docs but I am 
> uncertain to its
> usage as the sample server.xml does not include a sample 
>  element, not
> even a commented one.
> 
> Thanks in advance.
> 
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




What is the name of Class Loader in Tomcat 4.1.x

2002-11-18 Thread aps olute
Where and how can I get a copy of these ClassLoaders source without downloading
the entire Tomcat source? Is it possible? The name has change from
LoaderInterceptor in the older 3.x? 
There were a mention of Loader Component in the docs but I am uncertain to its
usage as the sample server.xml does not include a sample  element, not
even a commented one.

Thanks in advance.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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




pathInfo is not encoded.

2002-11-18 Thread Hugo Villeneuve

Hi, I am switching between Tomcat 3.3 and Tomcat 4.1. Now my servlet that
was using the pathInfo parameter does not work when I have special char in
the path (like é).


Tomcat 3.3 :
http://server/context/my_servletHandler/public/Qualité/myDoc.txt
OK, path info is decoded on the server

Tomcat 4.1 :
http://server/context/my_servletHandler/public/Qualité/myDoc.txt
Bug: getPathInfo function returns : /public/Qualit

Can not find anything about that. Is this a known Issues ? if not I think it
is a bug.

Thank you.

Hugo



Manager application - quick question

2002-11-18 Thread Renato
Hi all,

I'll deploy the manager application to my users. Probably the only funcionality I'll 
let them use is to stop and start 
their web applications.

Which is the safest method ?

- reload ?
- stop / start ?
- indifferent ?

Thanks 
Renato.


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




mod_jk Connector Source

2002-11-18 Thread Jaimes Blunt
Hi Everyone,
 
I am trying to get the source files to build the mod_jk connector for Apache2.0.43.  I 
tried downloading from the main jakarta site at 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/src/ and 
I get a corrput file.  Does anyone have a mirror site or a copy of the source tar than 
I can use to get these files?
 
Much appreciated

Jaimes Blunt 





capturing form data in a tag

2002-11-18 Thread Bernd Prager
Hi everybody,
I'm trying to capture form data within a JSP tag
and would appreciate some help.
This is my code:

   /* Process Start Tag */
   public int doStartTag()
  throws JspTagException {
 ServletRequest request = (ServletRequest) pageContext.getRequest();
 try {
JspWriter out = pageContext.getOut();
sId = request.getParameter("myId");
  out.println("myId >>" + sId + "<<");
if (sId == null) {
   out.println("sId is null");
   return SKIP_BODY;
}
...
 }
 catch (IOException e) {
 throw new JspTagException(e.toString());


  return SKIP_BODY;
   }

I get allways a null value. I assume I'm doing something wrong in the
request initialization.
What is it? Thanks a lot!
-- Bernd


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




Re: Who can help ???

2002-11-18 Thread Jean-Luc BEAUDET
 Yep !

Thanks to all of you.

I have the answer to my question.
I had a kind of issue like this of Jim, but i was just thinking it would 
have been possible to
authenticate teh same way than /manager: ie. with the authentication 
system of Tomcat not of Apache.


I do appreciate yur help.

Best regards.
Jean-Luc B :O)




Jean-Luc BEAUDET wrote:

Hi all,

Runnin' Tomcat 4.0.2 and Apache 1.3.26 on SOLARIS 8 in Production.

I'd like to get /webapp-info/ secured by login/password - even BASIC -
when asked by

http://my.sever.com/webapp-info/

Any help welcome.

Jean-Luc B :O)




--
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: Page caching in 4.0.x

2002-11-18 Thread Andrew Geery
I'm having a similar problem (also using struts) in Tomcat > 4.0.2.

Scenario: I have a search page that performs a search and brings up a
results page. On the results page, you can click on a hyperlink to get
additional information about an element of the search. If you have clicked
on a hyperlink and are on the page with the additional information about an
element of the search and you click the back button of the browser, you get
the message [in IE] Warning: Page has expired.

I've found that the problem (for me) is realm security. Using the JDBCRealm,
I get the above message when I use the back button; however, if I modify the
realm such that it is not protecting my search and results pages, I no
longer receive the warning when I use the back button.

I'm guessing that the realm "filter" turns caching off for all pages in the
realm. Watching the access logs, I've noticed that even for jsp pages in a
realms, the browser goes back to the server and reloads the page, rather
than using a cached copy of the page (as it does for pages not in the
realm).

Does that sound correct? Is there some way to disable turning the caching
off?

Thanks
Andrew

-Original Message-
From: Eric Hansen [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 08, 2002 11:36 AM
To: Tomcat Users List
Subject: Page caching in 4.0.x


Hello, 
I'm in the process of migrating a Struts-based web application from Tomcat
3.x to Tomcat 4.0.6.

Without making any changes to the 'Action' servlets or the JSP pages, my
form based pages are now giving the 'Page has Expired' message and forcing
me to 'refresh'.  They never did this with Tomcat 3.x

My JSP pages have no expire dates set in the header nor any other header
directives relating to caching (that I am aware of)

Can anyone venture an explanation to this change?  and maybe a solution...

Thanks,
Eric Hansen

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




Deploying Discovered web applications (never stops) Tomcat 4.1.12

2002-11-18 Thread Brandon Cruz
Hi,

When setting up a host with the following syntax in server.xml...





...

I seem to get a neverending loop shown as follows in catalina.out...


HostConfig[www.customer.com]: Deploying discovered web applications
HostConfig[www.customer.com]: Deploying discovered web applications
HostConfig[www.customer.com]: Deploying discovered web applications

...

These constantly print to the file until I shutdown Tomcat.

Any ideas why?


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




How to set log file permissions?

2002-11-18 Thread Leonard Sitongia
Hello,

I'm running Tomcat 4.1.14 (not 4.1.12 due to the SSL problem there), although 
I don't know if this question is specific to that release.  It's running on 
Sun Solaris.

How do I control the Unix file permissions that are set for the log files that 
are created by Tomcat?  They end up mode 600.  I would like them to be 644 so 
that developers can read the log files.

I've searched all over the web, and read documentation about Tomcat.  I don't 
think it would be java.io.FilePermission, which I think is for the apps 
running within Tomcat.  Am I wrong about that?  I don't see configurables for 
the Logger or AccessLogValve for setting this.

Thank you for your help!
-- 
==Leonard E. Sitongia   
  Visualization and Enabling Technologies / Scientific Computing Division
  National Center for Atmospheric Research
  P.O. Box 3000 Boulder CO 80307  USA
  [EMAIL PROTECTED]voice: (303)497-2454   fax: (303)497-1829


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




Re: Internal Server Configuration Error

2002-11-18 Thread Marc
Hi Roland, the line 437 tries to load the mod_jk.so library. I think that the
libc.so.6 library is needed when using mod_jk.so, but I don't know how to fix
this.

Note: My OS is FreeBSD, apache is 1.3.19 and tomcat 4.1.12.

Thanxs

Marc

Roland Carlsson wrote:

> Have you tried to look at line 437 in your http-conf. Verified that the path
> to libc.so.6 is correct? One not that qualified guess could be that it is
> something wrong with that.
>
> Check where the libc.so.6 is in your filesystem and then verify with line
> 437 in the http-conf. If you doesn't find the libc.so.6 or the path is
> different from what the http.conf says you have found the error.
>
> Regards
> Roland
>
> - Original Message -
> From: "Marc" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 18, 2002 4:08 PM
> Subject: Internal Server Configuration Error
>
> > Hi everybody!!!
> >
> > I'm trying to configure tomcat with apache. When I try to load the
> > mod_jk.so library in apache, I get this error message:
> >
> > Syntax error on line 437 of /usr/local/etc/httpd/conf/httpd.conf: Cannot
> > load /usr/home/parcbit/usr/local/etc/httpd/modules/mod_jk.so into
> > server: Shared object "libc.so.6" not found
> >
> >
> > Any ideas???
> >
> > Thank you all!
> >
> >
> > Marc
> >
> >
> >
> >
> > --
> > 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: Re[2]: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL HAVING PROBLEMS

2002-11-18 Thread Turner, John

Works OK for me.  You can change what is used on that line by using the
modJk="" parameter in the Listener tag in server.xml.

John

> -Original Message-
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 12:31 PM
> To: Tomcat Users List
> Subject: Re[2]: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
> HAVING PROBLEMS
> 
> 
> Hello Jaimes,
> 
> Change the following line:
> 
> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
> 
> to:
> 
> LoadModule jk_module modules/mod_jk.so
> 
> 
> Now just include the mod_jk.conf file in your httpd.conf file.
> 
> BTW, when using the listeners to auto-generate the mod_jk.conf file,
> I've noticed that they *always* write out the former LoadModule line
> which just doesn't work right.  What I do is let it auto-generate
> mod_jk.conf to conf/auto and then I copy that file to conf/jk 
> and change the
> LoadModule line to the latter.  Then I include the modified version in
> httpd.conf since the auto-generated version just doesn't work as is.
> 
> Jake
> 
> Monday, November 18, 2002, 10:02:05 AM, you wrote:
> 
> JB> Here it is:
> JB> ## Auto generated on Mon Nov 18 10:08:28 EST 
> 2002##
> 
> JB> 
> JB>   LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
> JB> 
> 
> JB> JkWorkersFile "/usr/jakarta/tomcat/conf/jk/workers.properties"
> JB> JkLogFile "/usr/jakarta/tomcat/logs/mod_jk.log"
> 
> JB> JkLogLevel emerg
> 

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




Re[2]: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL HAVING PROBLEMS

2002-11-18 Thread Jacob Kjome
Hello Jaimes,

Change the following line:

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

to:

LoadModule jk_module modules/mod_jk.so


Now just include the mod_jk.conf file in your httpd.conf file.

BTW, when using the listeners to auto-generate the mod_jk.conf file,
I've noticed that they *always* write out the former LoadModule line
which just doesn't work right.  What I do is let it auto-generate
mod_jk.conf to conf/auto and then I copy that file to conf/jk and change the
LoadModule line to the latter.  Then I include the modified version in
httpd.conf since the auto-generated version just doesn't work as is.

Jake

Monday, November 18, 2002, 10:02:05 AM, you wrote:

JB> Here it is:
JB> ## Auto generated on Mon Nov 18 10:08:28 EST 2002##

JB> 
JB>   LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
JB> 

JB> JkWorkersFile "/usr/jakarta/tomcat/conf/jk/workers.properties"
JB> JkLogFile "/usr/jakarta/tomcat/logs/mod_jk.log"

JB> JkLogLevel emerg



JB> 
JB> ServerName localhost

JB> JkMount /examples ajp13
JB> JkMount /examples/* ajp13

JB> JkMount /webdav ajp13
JB> JkMount /webdav/* ajp13

JB> JkMount /tomcat-docs ajp13
JB> JkMount /tomcat-docs/* ajp13

JB> JkMount /admin ajp13
JB> JkMount /admin/* ajp13

JB> JkMount /manager ajp13
JB> JkMount /manager/* ajp13
JB> 

JB> Jaimes

JB> -Original Message-
JB> From: Turner, John [mailto:[EMAIL PROTECTED]]
JB> Sent: Monday, November 18, 2002 10:46 AM
JB> To: 'Tomcat Users List'
JB> Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
JB> HAVING PROBLEMS



JB> Nope.  Can you post the contents of mod_jk.conf?

JB> John


>> -Original Message-
>> From: Jaimes Blunt [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, November 18, 2002 10:45 AM
>> To: Tomcat Users List
>> Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
>> HAVING PROBLEMS
>> 
>> 
>> Hmmm
>> I tried remming out the Include file, and Apache starts up fine.  
>> I then tried putting the data in the mod_jk.conf file into 
>> the httpd.conf file in APACHE_HOME/conf and when i tried to 
>> start I got the segmentation fault again.
>> Any ideas?
>> 
>> Jaime
>> 
>> -Original Message-
>> From: Turner, John [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, November 18, 2002 10:30 AM
>> To: 'Tomcat Users List'
>> Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
>> HAVING PROBLEMS
>> 
>> 
>> 
>> Doesn't look Tomcat related. 
>> 
>> Remove the line from httpd.conf that says "Include 
>> /my/mod_jk.conf/file".
>> 
>> Then try /your/path/to/apache/bin/apachectl configtest.
>> 
>> If you still get the same error, then there is something 
>> wrong with your
>> Apache.
>> 
>> You can also try starting Tomcat, letting it generate 
>> mod_jk.conf, then just
>> append that to the end of httpd.conf instead of using the "Include"
>> directive, and try the same thing.
>> 
>> Also, FYI, you can get rid of all of that stuff in your 
>> workers.properties
>> file.  The only lines you need are list, type, host, and port.
>> 
>> John
>> 
>> 
>> > -Original Message-
>> > From: Jaimes Blunt [mailto:[EMAIL PROTECTED]]
>> > Sent: Monday, November 18, 2002 10:28 AM
>> > To: Tomcat Users List
>> > Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
>> > HAVING PROBLEMS
>> > 
>> > 
>> > I installed Apache2.0.43 and am still getting a startup 
>> > error.  The exact error I am getting is as follows:
>> > apachectl: line 87: 26252 Segmentation Fault  $HTTPD -t
>> > 
>> > My httpd.conf file is including the 
>> > $JAKART_HOME/conf/auto/mod_jk.conf file that is automatically 
>> > generated by Tomcat.
>> > 
>> > Here is the code for my server.xml file:
>> > 
>> >   > > modJK="/usr/local/apache2/lib/mod_jk.so"
>> > workersConfig="/usr/jakarta/tomcat/conf/jk/workers.properties"/>
>> > 
>> >   
>> >   
>> > 
>> > > > value="30"/>
>> > 
>> > 
>> > > >   type="org.apache.catalina.UserDatabase"
>> >description="User database that can be updated and saved">
>> > 
>> > 
>> >   
>> > factory
>> > 
>> > org.apache.catalina.users.MemoryUserDatabaseFactory
>> >   
>> >   
>> > pathname
>> > conf/tomcat-users.xml
>> >   
>> > 
>> >   
>> > 
>> >   
>> > 
>> > > >port="8080" minProcessors="5" maxProcessors="75"
>> >enableLookups="true" redirectPort="8443"
>> >acceptCount="10" debug="0" connectionTimeout="2"
>> >useURIValidationHack="false" />
>> >  
>> > 
>> > > >port="8009" minProcessors="5" maxProcessors="75"
>> >acceptCount="10" debug="0"/>
>> > 
>> > 
>> > 
>> >   
>> >   > >   prefix="catalina_log." suffix=".txt"
>> >   timestamp="true"/>
>> > 
>> >   > >  debug="0" resourceName="UserDatabase"/>
>> > 
>> > 

Does the touches the OutputStream ?

2002-11-18 Thread Hugo Villeneuve
 I use tomcat 4.1 to serve Dynamic PDF.

I have a servlet that send's PDF to the browser. When I call my servlet
directly (see URL below) the PDF gets render on the client correctly.

When I go through a  I get a Adobe alert “File does not
begin with ‘%PDF-‘”. The file gets corrupted.
it is not the code, my servlet was working with the servlet-mapping under
Tomcat 3.3 and the servlet-mapping is also working under Tomcat 4.1 for all
files except Pdf !

My servlet : com.bwax.ocian.web.renderer.RendererLookupServlet
My web.xml :
[..]
 
  rendererLookup

com.bwax.ocian.web.renderer.RendererLookupServlet
 
[..]
 
  rendererLookup
  /root/*
 
[..]

Calling URL :
/my_context/servlet/com.bwax.ocian.web.renderer.RendererLookupServlet?path=/
public/MyPdf.pdf
PDF OK.

Calling URL : /my_context/servlet/rendererLookup?path=/public/MyPdf.pdf
PDF OK.

Calling URL : /my_context/root/public/MyPdf.pdf
PDF BAD. (was working under Tomcat 3.3 and HTTP 1.0)





Anybody have a Virtual host example ?

2002-11-18 Thread Adrian
Does anyone have an Apache + Tomcat virtual
host example I can see. Server.xml would be great.
I need to log seperately for each hosts, and
config mod_jk. Does my Tomcat virtual hosting
mirror my apache config with mod_jk connectors ?


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




RE:

2002-11-18 Thread Anderson, M. Paul
Thanks Yoav...I have some other modifications that were just giving to me
for the site and I think I may try to implement the architecture you
suggested at the same time.  I will check out some tutorials and see what I
can come up with.  Your help is much appreciated!

Any thoughts on how to implement a "discussion thread"?  I need to allow
users to enter  a comment and then allow other users to follow up on that
comment creating a "comment thread"... just like this user list does. 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 12:00 PM
To: Tomcat Users List
Subject: RE: 


Howdy,

>What do you think the learning curve is on using filters and would it
be

The learning curve for these types of filters (authenticators, loggers)
is short and not steep.  This is a good place to start:
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

>worth the effort (dicounting the time/cost factor) to reorganize my
design
>using proper filters?  What would be the major benefits of making this
>change?

The major benefits would be:
- Decoupling of authentication and logging from the business code, and
from each other.  This really opens up a lot of architecture
possibilities when you need to scale up / increase uptime/reliability
(e.g. via clustering) etc.
- The ability to selectively authenticate certain requests and not
others in a clean way.  The business code is untouched.
- The ability to selectively log different things about different
requests in a clean way.
- The ability to monitor one set of things for requests, and one
different set of things (e.g. content-length) about responses.
- You would still be container-independent.
- You will have learned about filters and have a clean, easy to
understand, easy to maintain design.

>One last newby (and possibly very stupid) question...when you write
>com.mycompany.MyAuthenticationFilter the
>com.mycompany is simply indicating the package that
MyAuthenticationFilter
>is in, right, or am I completely missing what that indicates.  Sorry
for

It's simply the fully-qualified class name of the servlet class.  Your
understanding is correct.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL HAVING PROBLEMS

2002-11-18 Thread Turner, John

You should be using the mod_jk that is compatible with Apache 2.  My
personal preference is to build from scratch, but that's me.

The modules directory is the correct place for .so files under Apache 2.

I guess it's possible that there is enough difference between 7.2/3 and 8
that things that work on 7.x don't work on 8.  I don't have access to a RH 8
box, so I can't say for sure.  That Seg Fault error you get, though, is
indicative of something a little more serious than a configuration problem.
My guess would be it's related to 7.x vs. 8, as in the mod_jk.so binary you
downloaded was built against 7.x and not 8, but that's only a guess.

John

> -Original Message-
> From: Jaimes Blunt [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 12:07 PM
> To: Tomcat Users List
> Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
> HAVING PROBLEMS
> 
> 
> I have read the HowTo's on your page.  Do you think that I 
> should build mod_jk from scratch as I just downloaded the 
> mod_jk2.0.42.so file, and renamed it to mod_jk.so.  Also, 
> should I be using that so or should i get the mod_jk-1.3 file?
> Yes I am using RH8 with Apache2.0.43 newly instealled as per 
> your previous emails.
> Just to make sure the proper directory for the mod_jk.so is 
> /usr/local/apache2/modules correct? When I had installed the 
> original Apache2.0.40 there were many .so files in the dir, 
> now there is only the mod_jk.so and the httpd.exp file.  
> Should I put the .so in the lib directory?
> 
> Jaimes
> 
> -Original Message-
> From: Turner, John [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 11:52 AM
> To: 'Tomcat Users List'
> Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
> HAVING PROBLEMS
> 
> 
> 
> Well, I took a quick look, and it seems fine, but I can't promise that
> everything will work.
> 
> I think you said you are using RH 8.  Have you looked at my 
> HOWTO for 7.2?  
> 
> John
> 
> > -Original Message-
> > From: Jaimes Blunt [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 18, 2002 11:42 AM
> > To: Tomcat Users List
> > Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
> > HAVING PROBLEMS
> > 
> > 
> > Ok, last ditch effort before I throw the server out the window:
> > Here is a copy of my httpd.conf file located in APACHE_HOME/conf:
> > I have attached the filew to email.  Please let me know if I 
> > should include all text in email.
> > 
> > Jaimes
> > 
> > 
> > -Original Message-
> > From: Turner, John [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 18, 2002 11:30 AM
> > To: 'Tomcat Users List'
> > Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
> > HAVING PROBLEMS
> > 
> > 
> > 
> > It looked OK to me.  Is there another instance of 
> > ApacheConfig somewhere the
> > might be getting called instead of the one you think is 
> being called?
> > 
> > That said, I would just grab the mod_jk.conf file from that 
> > link, edit it to
> > fit your environment, and stick it in httpd.conf and see 
> what happens.
> > 
> > John
> > 
> 
> --
> 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: 




Hugo : Serving PDF files on Apache2 + Tomcat4.1

2002-11-18 Thread achana
Hugo Villeneuve wrote:
> 
> I can share the experience I had with IE5, Tomcat 4.1 and serving dynamic
> PDF.
> IE 5 have a problem with the "Cache-Control" parameter in the HTTP 1.1
> header. With Tomcat 4.1, if I just send the pdf on the OutputStream every
> think is working fine. What is your problem exactly?

Where is the "Cache-control" ?

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




  1   2   >