Re: Issue with the "admin" webapp

2005-09-12 Thread Toby Vidler

Hi All,

I am also experiencing issues with this and am wondering if what is 
happening is intended behaviour or not.  Have replicated this using 
Tomcat 5.5.7 and 5.5.9 on Windows.  When I use the Tomcat Admin webapp 
the server.xml is overwritten without any of our customised preexisting 
(manually configured) settings.  Indeed, when I use the admin app to 
configure settings in the server.xml these changes are applied OK but 
then seem to be lost on a Tomcat restart anyway!  Surely I'm doing 
*something* wrong!  Any help here would be great. There doesn't seem to 
be much documentation around for this Admin app so any pointers in this 
regard would be helpful as well.


Regards,
Toby

Sastry Malladi wrote:


Hi,
I've noticed that when I use the "admin" web app (the default one that 
comes with
tomcat distribution) and click on "commit changes",  the SSL connector 
entry
in server.xml seems to get corrupted. As a result, tomcat can not be 
restarted. This happens
whether or not I actually change any parameters through the admin 
page, before I click

on "commit changes".

For example, there are extra duplicate attributes on the SSL connector 
entry :

  secure="true" keystore=".." protocol="TLS"

If I remove the duplicate attributes manually, and then restart, it 
works ok.


Has anyone else noticed this ? Is this a known issue ? I'm using 
tomcat 5.0.28


Thanks,
Sastry


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




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



Re: problems setting up tomcat on debian sarge

2005-09-12 Thread Jim Buttafuoco
good questions, all I did was have apt-get install tomcat4 + all needed 
packages.  I know I have kaffe installed.  

here is a list from dpkg of what I have installed.  let me know if I should 
look for and/or install another package.

thanks for you help
Jim

ii  gjdoc  0.7.3-1documentation generation framework for java
ii  java-common0.22   Base of all Java packages
ii  jikes  1.22-2 Fast Java compiler adhering to language and
ii  kaffe  1.1.5-3A JVM to run Java bytecode
ii  libant1.6-java 1.6.2-2.1  Java based build tool like make -- library
ii  libapache-mod- 1.2.5-2Apache 1.3 connector for the Tomcat Java ser
ii  libbcel-java   5.1-4  Analyze, create, and manipulate (binary) Jav
ii  libcommons-bea 1.6.1-4utility for manipulating JavaBeans
ii  libcommons-dig 1.5.0.1-4  Rule based XML Java object mapping tool
ii  libcommons-lan 2.0-6  Extension of the java.lang package
ii  libcommons-mod 1.1-4  A convenience library to use Java Management
ii  libjaxp1.2-jav 1.2.01-1   Java XML parser and transformer APIs (DOM, S
ii  liblog4j1.2-ja 1.2.9-1Logging library for java
ii  libmx4j-java   2.0.1-4An open source implementation of the JMX(TM)
ii  liboro-java2.0.8-3Regular expression library for Java
ii  libregexp-java 1.3-1  regular expression library for Java
ii  libservlet2.3- 4.0-6  Servlet 2.3 and JSP 1.2 Java classes and doc
ii  libstruts1.1-j 1.1-2  Java Framework for MVC web applications
ii  libstruts1.2-j 1.2.4-1Java Framework for MVC web applications
ii  libtomcat4-jav 4.1.31-3   Java Servlet engine -- core libraries
ii  libxerces2-jav 2.6.2-2Validating XML parser for Java with DOM leve
ii  tomcat44.1.31-3   Java Servlet 2.3 engine with JSP 1.2 support
ii  tomcat4-admin  4.1.31-3   Java Servlet engine -- admin web interfaces
ii  tomcat4-webapp 4.1.31-3   Java Servlet engine -- documentation and exa


-- Original Message ---
From: [EMAIL PROTECTED]
To: "Tomcat Users List" , [EMAIL PROTECTED]
Sent: Mon, 12 Sep 2005 23:43:25 +
Subject: Re: problems setting up tomcat on debian sarge 

> Which JDK are you using?
> 
> > Hi all,
> > 
> > I am trying to setup tomcat 4.1 (comes with debian sarge in contrib) inside 
> > a 
> > vserver also running debian sarge.
> > 
> > I am getting the following error after I login into the adminstration tool, 
> > the 
> > sample apps and the manage tool both 
> > seems to be working.  
> > 
> > I am new to java and tomcat so please be gentle.
> > 
> > Thanks
> > Jim
> > 
> > 
> > 
> > HTTP Status 500 - 
> > 
> > 
> > 
> > type Exception report
> > 
> > message 
> > 
> > description The server encountered an internal error () that prevented it 
> > from 
> > fulfilling this request.
> > 
> > exception 
> > 
> > javax.servlet.ServletException: Servlet.init() for servlet action threw 
> > exception
> >at org.apache.catalina.core.StandardWrapper.loadServlet 
> > (StandardWrapper.java:916)
> >at org.apache.catalina.core.StandardWrapper.allocate 
> > (StandardWrapper.java:621)
> >at org.apache.catalina.core.StandardWrapperValve.invoke 
> > (StandardWrapperValve.java:163)
> >at 
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> > t (StandardPipeline.java:596)
> >at org.apache.catalina.core.StandardPipeline.invoke 
> > (StandardPipeline.java:433)
> >at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
> >at org.apache.catalina.core.StandardContextValve.invoke 
> > (StandardContextValve.java:144)
> >at 
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> > t (StandardPipeline.java:596)
> >at org.apache.catalina.authenticator.AuthenticatorBase.invoke 
> > (AuthenticatorBase.java:504)
> >at 
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> > t (StandardPipeline.java:594)
> >at org.apache.catalina.core.StandardPipeline.invoke 
> > (StandardPipeline.java:433)
> >at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
> >at org.apache.catalina.core.StandardContext.invoke 
> > (StandardContext.java:2358)
> >at org.apache.catalina.core.StandardHostValve.invoke 
> > (StandardHostValve.java:133)
> >at 
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> > t (StandardPipeline.java:596)
> >at org.apache.catalina.valves.ErrorDispatcherValve.invoke 
> > (ErrorDispatcherValve.java:118)
> >at 
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> > t (StandardPipeline.java:594)
> >at org.apache.catalina.valves.ErrorReportValve.invoke 
> > (ErrorReportValve.java:116)
> >at 
> > org.apache.catalina.core.StandardPipeli

Re: problems setting up tomcat on debian sarge

2005-09-12 Thread pacea
Which JDK are you using?


> Hi all,
> 
> I am trying to setup tomcat 4.1 (comes with debian sarge in contrib) inside a 
> vserver also running debian sarge.
> 
> I am getting the following error after I login into the adminstration tool, 
> the 
> sample apps and the manage tool both 
> seems to be working.  
> 
> I am new to java and tomcat so please be gentle.
> 
> Thanks
> Jim
> 
> 
> 
> HTTP Status 500 - 
> 
> 
> 
> type Exception report
> 
> message 
> 
> description The server encountered an internal error () that prevented it 
> from 
> fulfilling this request.
> 
> exception 
> 
> javax.servlet.ServletException: Servlet.init() for servlet action threw 
> exception
>at org.apache.catalina.core.StandardWrapper.loadServlet 
> (StandardWrapper.java:916)
>at org.apache.catalina.core.StandardWrapper.allocate 
> (StandardWrapper.java:621)
>at org.apache.catalina.core.StandardWrapperValve.invoke 
> (StandardWrapperValve.java:163)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:596)
>at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:433)
>at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
>at org.apache.catalina.core.StandardContextValve.invoke 
> (StandardContextValve.java:144)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:596)
>at org.apache.catalina.authenticator.AuthenticatorBase.invoke 
> (AuthenticatorBase.java:504)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:594)
>at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:433)
>at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
>at org.apache.catalina.core.StandardContext.invoke 
> (StandardContext.java:2358)
>at org.apache.catalina.core.StandardHostValve.invoke 
> (StandardHostValve.java:133)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:596)
>at org.apache.catalina.valves.ErrorDispatcherValve.invoke 
> (ErrorDispatcherValve.java:118)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:594)
>at org.apache.catalina.valves.ErrorReportValve.invoke 
> (ErrorReportValve.java:116)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:594)
>at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:433)
>at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
>at org.apache.catalina.core.StandardEngineValve.invoke 
> (StandardEngineValve.java:127)
>at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t (StandardPipeline.java:596)
>at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:433)
>at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
>at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:152)
>at org.apache.coyote.http11.Http11Processor.process 
> (Http11Processor.java:799)
>at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
> n (Http11Protocol.java:705)
>at org.apache.tomcat.util.net.TcpWorkerThread.runIt 
> (PoolTcpEndpoint.java:577)
>at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run 
> (ThreadPool.java:683)
>at java.lang.Thread.run (Thread.java:673)
>at java.lang.VMThread.run (VMThread.java:123)
> 
> 
> root cause 
> 
> java.lang.NumberFormatException
>at java.lang.Integer.parseInt (Integer.java:602)
>at java.lang.Integer.parseInt (Integer.java:231)
>at java.util.Properties.load (Properties.java:306)
>at java.util.PropertyResourceBundle. 
> (PropertyResourceBundle.java:109)
>at java.util.ResourceBundle.tryBundle (ResourceBundle.java:533)
>at java.util.ResourceBundle.tryBundle (ResourceBundle.java:601)
>at java.util.ResourceBundle.getBundle (ResourceBundle.java:443)
>at java.util.ResourceBundle.getBundle (ResourceBundle.java:284)
>at org.apache.webapp.admin.ApplicationLocales. 
> (ApplicationLocales.java:60)
>at org.apache.webapp.admin.ApplicationServlet.initApplicationLocales 
> (ApplicationServlet.java:124)
>at org.apache.webapp.admin.ApplicationServlet.init 
> (ApplicationServlet.java:110)
>at javax.servlet.GenericServlet.init (GenericServlet.java:258)
>at org.apache.catalina.core.StandardWrapper.loadServlet 
> (StandardWrapper.java:888)
>at org.apache.catalina.core.StandardWrapper.allocate 
> (StandardWrapper.java:621)
>at org.apache.catalina.core.StandardWrapperValve.invoke 
> (StandardWrapperValve.java:163)
>  

RES: ClassNotFoundException - common/lib works, shared/lib gets exception

2005-09-12 Thread Paulo Alvim
Hi Rich,

Did you have any answer? I'm with the same problem using TC559...

-Mensagem original-
De: Rich Mayfield [mailto:[EMAIL PROTECTED]
Enviada em: sabado, 7 de maio de 2005 14:53
Para: tomcat-user@jakarta.apache.org
Assunto: ClassNotFoundException - common/lib works, shared/lib gets
exception


 So that I avoid "already loaded" classloader problems with jar's that
front native library calls via JNI, I am following the pattern of
putting the jars into "shared/lib".

However, I get a ClassNotFoundException.  If I put this into
"CATALINA_HOME/common/lib", everything works fine.  It's my impression,
though,
that one ought to put it into "shared/lib".

I've tried both CATALINA_HOME/shared/lib and CATALINA_BASE/shared/lib.

This is on Tomcat 5.0.28.  I have not changed
CATALINA_HOME/conf/catalina.properties, which would imply that
CATALINA_BASE/shared/lib should
work.

Any ideas what might be going awry?

Thanks for you help.
rich


-
Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.



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



Re: web.xml,

2005-09-12 Thread Hassan Schroeder

Trond Hersløv wrote:

Can you please be so kind and explain what the servlet spec. has 

> to do with configuring the deployment descriptor.

Chapter SRV.13: Deployment Descriptor


Could you give me a link to the servlet spec?


Download from:


HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



Re: web.xml,

2005-09-12 Thread Mark Thomas

Trond Hersløv wrote:

Can you please be so kind and explain what the servlet spec. has to do with 
configuring the deployment descriptor.


The servlet specification defines the format of the deployment 
descriptor and this therefore the definitive reference for what is, 
and is not, allowed.



Could you give me a link to the servlet spec?


Would it have killed you to do a Google or to search the Sun/Java
website?

http://java.sun.com/products/servlet/docs.html
http://java.sun.com/products/servlet/reference/api/index.html




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



RE: web.xml,

2005-09-12 Thread Trond Hersløv
Hi
Thanks a lot for clarifying that. At the bottom you say: the servlet spec.
Im reading "The J2EE 1.4 Tutorial", for Sun Java System Application Server 
Platform. Isnt Tomcat the referential project for this technologi?

Can you please be so kind and explain what the servlet spec. has to do with 
configuring the deployment descriptor.

Could you give me a link to the servlet spec?

Thanks again,
Trond



-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 12. september 2005 20:17
To: Tomcat Users List
Subject: Re: web.xml, 

Trond Hersløv wrote:
> But, if I try using wildcards, eg. /*foxer doesent work anymore.

Correct. Wildcards are not supported for mapping paths. Read the 
servlet spec for more details.

> If I try to map the servlet so that it seems like a jsp-page 
> /foxer.jsp, it doesn't work at all.

Also correct. There is a server-wide mapping for *.jsp (wild cards are 
supported for extension mapping) in $TOMCAT_HOME/conf/web.xml

> In the book I also read that I should be able to access the servlet even if 
> it's not mapped up in web.xml. http://www.mymachine.no/servlet/foxer Ofcourse 
> this does also not work.

This is using the invoker servlet, which is disabled by default.

> Who can explain how to use the  and maybe tell me where I can 
> find some documentation on how to configure web.xml

The servlet spec.



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


**
This email message has been swept by
MIMEsweeper for the presence of computer viruses.
**


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



problems setting up tomcat on debian sarge

2005-09-12 Thread Jim Buttafuoco
Hi all,

I am trying to setup tomcat 4.1 (comes with debian sarge in contrib) inside a 
vserver also running debian sarge.

I am getting the following error after I login into the adminstration tool, the 
sample apps and the manage tool both 
seems to be working.  

I am new to java and tomcat so please be gentle.

Thanks
Jim



HTTP Status 500 - 



type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for servlet action threw 
exception
   at org.apache.catalina.core.StandardWrapper.loadServlet 
(StandardWrapper.java:916)
   at org.apache.catalina.core.StandardWrapper.allocate 
(StandardWrapper.java:621)
   at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:163)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:596)
   at org.apache.catalina.core.StandardPipeline.invoke 
(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
   at org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:144)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:596)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke 
(AuthenticatorBase.java:504)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:594)
   at org.apache.catalina.core.StandardPipeline.invoke 
(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
   at org.apache.catalina.core.StandardContext.invoke 
(StandardContext.java:2358)
   at org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:133)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:596)
   at org.apache.catalina.valves.ErrorDispatcherValve.invoke 
(ErrorDispatcherValve.java:118)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:594)
   at org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:116)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:594)
   at org.apache.catalina.core.StandardPipeline.invoke 
(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
   at org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:127)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:596)
   at org.apache.catalina.core.StandardPipeline.invoke 
(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
   at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:152)
   at org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:799)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
 (Http11Protocol.java:705)
   at org.apache.tomcat.util.net.TcpWorkerThread.runIt 
(PoolTcpEndpoint.java:577)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run 
(ThreadPool.java:683)
   at java.lang.Thread.run (Thread.java:673)
   at java.lang.VMThread.run (VMThread.java:123)


root cause 

java.lang.NumberFormatException
   at java.lang.Integer.parseInt (Integer.java:602)
   at java.lang.Integer.parseInt (Integer.java:231)
   at java.util.Properties.load (Properties.java:306)
   at java.util.PropertyResourceBundle. (PropertyResourceBundle.java:109)
   at java.util.ResourceBundle.tryBundle (ResourceBundle.java:533)
   at java.util.ResourceBundle.tryBundle (ResourceBundle.java:601)
   at java.util.ResourceBundle.getBundle (ResourceBundle.java:443)
   at java.util.ResourceBundle.getBundle (ResourceBundle.java:284)
   at org.apache.webapp.admin.ApplicationLocales. 
(ApplicationLocales.java:60)
   at org.apache.webapp.admin.ApplicationServlet.initApplicationLocales 
(ApplicationServlet.java:124)
   at org.apache.webapp.admin.ApplicationServlet.init 
(ApplicationServlet.java:110)
   at javax.servlet.GenericServlet.init (GenericServlet.java:258)
   at org.apache.catalina.core.StandardWrapper.loadServlet 
(StandardWrapper.java:888)
   at org.apache.catalina.core.StandardWrapper.allocate 
(StandardWrapper.java:621)
   at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:163)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
 (StandardPipeline.java:596)
   at org.apache.catalina.core.StandardPipeline.invoke 
(StandardPipeline.java:433)
   at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:948)
   a

RE: Memory leak in Tomcat

2005-09-12 Thread Wade Chandler
--- Ingrid Morterud <[EMAIL PROTECTED]> wrote:

> 
> 
> Thanks for the quick reply. 
> 
> You might be right in us not understanding the java
> heap. Still - then
> we are even more at a loss on how to fix the problem
> than if we really
> had understood how it works.
> 
> We are running on a test server with 64 mb total
> memory. I know I can
> increase that, still increasing it will not solve
> the original problem.
> To be quite honest I am not quite sure what I would
> be expecting to be
> using, but I would think that the application up and
> running would use
> less than what it is using at the moment. 
> 
> We are using the following code to determine the
> memory used:
> 
> 
>
<%=java.lang.Runtime.getRuntime().freeMemory()/1024%>
> KB
> 
> <%=java.lang.Runtime.getRuntime().maxMemory()/1024%>
> KB
> 
>
<%=java.lang.Runtime.getRuntime().totalMemory()/1024%>
> KB
> 
> 
> The application uses approx 40 - 45 Mb when it is
> running. During
> runtime (when users access and use the application)
> they use from zero
> to 25 Mb of memory. I still cannot find any pattern
> as to when it uses
> the memory. The amount of memory used changes not
> accordingly to the
> user input, that means that when a user does the
> same thing twice, that
> does not mean that the same amount of memory is
> used. 
> 
> We haven't used a memory profiler as of yet, but we
> are going to try
> that out now. 
> 
> If you have any more hints and tips, it would be
> highly appreciated. 
> 
> 
> Ingrid and Tommy
> 

Ingrid,

I included this on the tomcat users list.  Yes, any
time you reply to a mail where you asked the question
on the list then please include the entire list.  It
will help everyone help you out as they will get the
information you give me, and if it is something they
could better help you with then the right person got
the info, and you can get helped faster.

Yeah, 64mb of memory could be enough depending on what
you are doing, but you are using struts and I don't
know what other libraries.  The jvm itself will use a
number of megs of memory simply by loading classes and
static information into what is know as Persistent
memory.  A good link would be:
http://java.sun.com/docs/performance/

where you will find a lot of information about memory
and performance.

Also see:
http://java.sun.com/docs/hotspot/gc1.4.2/

Also understand that the info you will see with the
commands you are using in your source code are not
going to show you the memory being used by the
persistent section of the JVM process nor are they
going to show you the OS reserved memory for the
process or "virtual memory".  So, you might have
issues trying to use Tomcat on a 64MB machine
depending on the number of libraries used to the
number of classes loaded to the number of static
variables and things of that nature.  The OS will use
a number of memory along with what ever other
applications you are using.  After that memory is used
you start paging to disk a lot and performance will
stink at best.  You can also search the list for
JProfiler.  There have been other mailings about
memory and leaks on the list and a lot of information
for a starting point has already been provided.  I can
simply start tomcat with only the admin and manager
application running and be using 22mb of memory.  Are
you memory usage reports after your web application
has loaded.  Then after it has loaded you are using
40+mb?  You can find jstat and install it into your
1.4.2 jvm.  If you have 1.5 it will already be
available.  Then with tomcat running do a jps to
locate your PID and then jstat -class PID to explain
the classes loaded before you hit your first URL to
your web app vs after.  Might tell you something as
well.

Using:
http://java.sun.com/docs/hotspot/gc1.4.2/
and
JAVA_OPTS
you should be able to adjust the memory usage of
tomcat, and if not you might have to dig into
catalina.bat or if on windows use the configure tomcat
GUI for the service.

But, that amount of memory is so tiny I don't think
you'll have much luck if your web application expects
much usage.  It will all depend on the number of
classes being loaded and used and the number of
objects being instantiated.

You can limit your entire heap with the -mx option of
the JVM.  This will not however limit your persistent
memory usage.  You'll have to use -XX:MaxPermSize to
limit that.  Limiting your heap and your permsize
however will mean you know for a fact or good close
estimate that you should be loading x number of
classes and using x number of perm memory and limiting
your heap means you have calculated your application
and tomcats expected memory usage and number of
supported users for your needs.

Wade

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



Re: tomcat 5 - apache 2 - ldap

2005-09-12 Thread sudip shrestha
But, you will run into problems if you use JNDIRealm with SSL (ldap with ssl 
- Container Managed Security)use mozilla-java sdk if you prefer to do 
this way.
http://www.mozilla.org/directory

On 7/27/05, Nili Adoram <[EMAIL PROTECTED]> wrote:
> 
> What about single sign-on for web applications and PHP?
> 
> Does tomcat delegate credentials back to Apache so Apache would not
> authenticate again?
> 
> Thanks
> Nili
> 
> On Wed, 27 Jul 2005 13:05:49 +0100, Raghupathy,Gurumoorthy
> <[EMAIL PROTECTED]> wrote:
> 
> > If you use
> > Form-based authentication (login page) then tomcat needs to do it...
> >
> > Regards
> > Guru
> >
> > -Original Message-
> > From: Raghupathy,Gurumoorthy
> > [mailto:[EMAIL PROTECTED]
> >
> > Sent: 27 July 2005 13:02
> > To: 'Tomcat Users List'
> > Subject: RE: tomcat 5 - apache 2 - ldap
> >
> >
> > Ask tomcat  Because if sometime you change the webserver ( in the
> > worst
> > case ) then you don't need to change anything :)
> >
> > Tomcat has good support for OpenLdap ... ( I have been using it for > 1
> > year
> > )
> >
> > Guru
> >
> >
> > -Original Message-
> > From: Nili Adoram [mailto:[EMAIL PROTECTED]
> > Sent: 27 July 2005 12:54
> > To: tomcat-user@jakarta.apache.org
> > Subject: tomcat 5 - apache 2 - ldap
> >
> >
> > Hi,
> >
> > I need to setup the following system:
> >
> > - Tomcat 5.5.9
> > - Apache 2 (using mod_jk)
> > - Redhat 7.3
> > - User authentication against Ldap (using OpenLdap)
> > - Single sign-on (e.g. if the user is authenticated for entering a web
> > application he will not have to authenticate again when browsing a PHP
> > page)
> > - Form-based authentication (login page)
> >
> > I still need to figure out the following:
> >
> > - Should Tomcat or Apache do ldap authentication ?
> > - How are credentials passed between Tomcat and Apache (to ensure
> > single
> > sign-on) ?
> >
> > Your help is appreciated.
> >
> 
> 
> 
> --
> Nili Adoram ([EMAIL PROTECTED])
> SEMPRE Team, R&D
> Qlusters Inc.
> 972-3-6081976
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Problems delivering images / tomcat 5

2005-09-12 Thread Leon Rosenberg
Hi,

I have a strange behaviour with delivering images from our tomcats. 
I've just checked the manager on all machines and was quite surprised to see
following entries:

S 130223 ms 104 KB 0 KB xxx.xxx.xxx.xxx www.xxx.de GET
/dating/img/be2/be2Logout.gif HTTP/1.1 

I mean 130 seconds is a lot for a small image, isn't it?

We have a loadbalancer in front of our machines, so it shouldn't be a slow
client. I also don't see any other urls lasting so long, 
(similar images yes, but no dynamical urls).


Any idea anyone?

The hanging images are 75/105K large. We are using zip mode.

Regards
Leon

P.S. tomcat5.0.25, jdk1.4_08, linux/debian/3.1.




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



RE: Memory leak in Tomcat

2005-09-12 Thread Ingrid Morterud


Hi,

On my test environment I am just on 64 Mb of memory. I know I can
increase that - but that still will not fix my initial problem. 

My application is using 40 - 45 Mb - and that is more than I thought it
should use. 

At the moment I have no JAVA_OPTS. 

Thanks for trying to help. :-)

Ingrid and Tommy

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED] 
Sent: 12. september 2005 22:36
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Memory leak in Tomcat


Hi,
Can you share how much memory do you have and how much used by tomcat
and what JAVA_OPTs do you have.

Thanks a lot,
Mark.

--- Michael Oliver <[EMAIL PROTECTED]> wrote:

> Ingrid,
> 
> I am not on the tomcat developer committer list so my reply is just an
> FYI from my own experience.
> 
> I saw unstable performance myself in a very similar deployment of
> Struts applications similar to yours.  I too thought there was a 
> memory leak and
> there may be, but I don't think it is in the applications
> themselves.  The
> behavior I saw, led me to think it was related to socket allocation
> as after
> a period of time my system began to complain and slow down and
> other socket
> related programs began to complain about timeouts, etc.
> 
> I found that my tomcat needed to use virtual memory to avoid out of
> memory exceptions.  I added physical memory and the problems all but 
> went away,
> however it still occurs just less frequently.
> 
> I am using
> 
> j2sdk1.4.2_09
> Tomcat-5.0.28
> 
> On Windows XP Pro sp1
>  
> 
> 
> Michael Oliver
> CTO
> Alarius Systems LLC
> 6800 E. Lake Mead Blvd, #1096
> Las Vegas, NV 89156
> Phone:(702)643-7425
> Fax:(702)974-0341
> *Note new email changed from [EMAIL PROTECTED]
> 
> -Original Message-
> From: Ingrid Morterud Rosvall [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 12, 2005 1:00 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Memory leak in Tomcat
> 
> Hello.
> 
> We are running an application on Tomcat 4.1.30, and java 1.4.2.
> 
> Our application is using the struts framework with jsp's, and cocoon
> to render the xml's.
> 
> There seems to be a major memory leak at startup - the application
> seems to constantly be using between 40 - 45 mb of the memory. We also

> have some
> memory leak during runtime, when users log on and starts using the
> application.
> 
> So far we have not been able to find anything in our code review that
> will explain these memory leaks, and when we monitor the memory used,
> there is no
> obvious reason, nor is there any connection with how the users use
> our
> application and the amount of memory being used. 
> 
> We would highly appreciate any help on this topic, and any tips and
> hints you can provide us with.
> 
> Ingrid and Tommy
> 
> 
> --
> I am using the free version of SPAMfighter for private users. It has
> removed 4102 spam emails to date. Paying users do not have this 
> message in their emails. Try www.SPAMfighter.com for free now!
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



-- 
I am using the free version of SPAMfighter for private users. It has
removed 4102 spam emails to date. Paying users do not have this message
in their emails. Try www.SPAMfighter.com for free now!



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



RE: Memory leak in Tomcat

2005-09-12 Thread Mark
Hi,
Can you share how much memory do you have and how much used by tomcat
and what JAVA_OPTs do you have.

Thanks a lot,
Mark.

--- Michael Oliver <[EMAIL PROTECTED]> wrote:

> Ingrid,
> 
> I am not on the tomcat developer committer list so my reply is just
> an FYI
> from my own experience.
> 
> I saw unstable performance myself in a very similar deployment of
> Struts
> applications similar to yours.  I too thought there was a memory
> leak and
> there may be, but I don't think it is in the applications
> themselves.  The
> behavior I saw, led me to think it was related to socket allocation
> as after
> a period of time my system began to complain and slow down and
> other socket
> related programs began to complain about timeouts, etc.
> 
> I found that my tomcat needed to use virtual memory to avoid out of
> memory
> exceptions.  I added physical memory and the problems all but went
> away,
> however it still occurs just less frequently.
> 
> I am using 
> 
> j2sdk1.4.2_09
> Tomcat-5.0.28
> 
> On Windows XP Pro sp1
>  
> 
> 
> Michael Oliver
> CTO
> Alarius Systems LLC
> 6800 E. Lake Mead Blvd, #1096
> Las Vegas, NV 89156
> Phone:(702)643-7425
> Fax:(702)974-0341
> *Note new email changed from [EMAIL PROTECTED]
> 
> -Original Message-
> From: Ingrid Morterud Rosvall [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 12, 2005 1:00 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Memory leak in Tomcat
> 
> Hello.
> 
> We are running an application on Tomcat 4.1.30, and java 1.4.2.
> 
> Our application is using the struts framework with jsp's, and
> cocoon to
> render the xml's. 
> 
> There seems to be a major memory leak at startup - the application
> seems to
> constantly be using between 40 - 45 mb of the memory. We also have
> some
> memory leak during runtime, when users log on and starts using the
> application.
> 
> So far we have not been able to find anything in our code review
> that will
> explain these memory leaks, and when we monitor the memory used,
> there is no
> obvious reason, nor is there any connection with how the users use
> our
> application and the amount of memory being used. 
> 
> We would highly appreciate any help on this topic, and any tips and
> hints
> you can provide us with. 
> 
> Ingrid and Tommy
> 
> 
> --
> I am using the free version of SPAMfighter for private users.
> It has removed 4102 spam emails to date.
> Paying users do not have this message in their emails.
> Try www.SPAMfighter.com for free now!
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



RE: Memory leak in Tomcat

2005-09-12 Thread Michael Oliver
Ingrid,

I am not on the tomcat developer committer list so my reply is just an FYI
from my own experience.

I saw unstable performance myself in a very similar deployment of Struts
applications similar to yours.  I too thought there was a memory leak and
there may be, but I don't think it is in the applications themselves.  The
behavior I saw, led me to think it was related to socket allocation as after
a period of time my system began to complain and slow down and other socket
related programs began to complain about timeouts, etc.

I found that my tomcat needed to use virtual memory to avoid out of memory
exceptions.  I added physical memory and the problems all but went away,
however it still occurs just less frequently.

I am using 

j2sdk1.4.2_09
Tomcat-5.0.28

On Windows XP Pro sp1
 


Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Ingrid Morterud Rosvall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 1:00 PM
To: tomcat-user@jakarta.apache.org
Subject: Memory leak in Tomcat

Hello.

We are running an application on Tomcat 4.1.30, and java 1.4.2.

Our application is using the struts framework with jsp's, and cocoon to
render the xml's. 

There seems to be a major memory leak at startup - the application seems to
constantly be using between 40 - 45 mb of the memory. We also have some
memory leak during runtime, when users log on and starts using the
application.

So far we have not been able to find anything in our code review that will
explain these memory leaks, and when we monitor the memory used, there is no
obvious reason, nor is there any connection with how the users use our
application and the amount of memory being used. 

We would highly appreciate any help on this topic, and any tips and hints
you can provide us with. 

Ingrid and Tommy


--
I am using the free version of SPAMfighter for private users.
It has removed 4102 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!



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



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



Re: Memory leak in Tomcat

2005-09-12 Thread Wade Chandler
--- Ingrid Morterud Rosvall <[EMAIL PROTECTED]> wrote:

> Hello.
> 
> We are running an application on Tomcat 4.1.30, and
> java 1.4.2.
> 
> Our application is using the struts framework with
> jsp's, and cocoon to
> render the xml's. 
> 
> There seems to be a major memory leak at startup -
> the application seems
> to constantly be using between 40 - 45 mb of the
> memory. We also have
> some memory leak during runtime, when users log on
> and starts using the
> application.
> 
> So far we have not been able to find anything in our
> code review that
> will explain these memory leaks, and when we monitor
> the memory used,
> there is no obvious reason, nor is there any
> connection with how the
> users use our application and the amount of memory
> being used. 
> 
> We would highly appreciate any help on this topic,
> and any tips and
> hints you can provide us with. 
> 
> Ingrid and Tommy
> 

One, I think you might be having issues by not
understanding the java heap...just an observation by
the way you phrased the question.

Two, do you have any more information about the memory
being used?  How much were you expecting to be used? 
Are you seeing the virtual memory usage or the real
memory usage?  How did you determine the amount of
memory used?  Do you have any numbers?  Have you tried
to use a memory profiler?  Search the list for memory
profiler.

Wade

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



Memory leak in Tomcat

2005-09-12 Thread Ingrid Morterud Rosvall
Hello.

We are running an application on Tomcat 4.1.30, and java 1.4.2.

Our application is using the struts framework with jsp's, and cocoon to
render the xml's. 

There seems to be a major memory leak at startup - the application seems
to constantly be using between 40 - 45 mb of the memory. We also have
some memory leak during runtime, when users log on and starts using the
application.

So far we have not been able to find anything in our code review that
will explain these memory leaks, and when we monitor the memory used,
there is no obvious reason, nor is there any connection with how the
users use our application and the amount of memory being used. 

We would highly appreciate any help on this topic, and any tips and
hints you can provide us with. 

Ingrid and Tommy


-- 
I am using the free version of SPAMfighter for private users.
It has removed 4102 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!



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



Re: no luck with allowLinking="true"

2005-09-12 Thread Maurice Yarrow

Hello Hassan

Thanks again:
however:
(1) tomcat is started by root who superusers tomcat process
to be owned by user tomcat, as you can see from ps:

 1415 tomcat /opt/j2sdk1.4.2_05/bin/java
-Djava.endorsed.dirs=/opt/tomcat/comm,etc...

(2) Tomcat owns the link:

lrwxrwxrwx  1 tomcat tomcat 32 Sep 12 11:32 images ->
 /usr/scratch/images

so tomcat certainly owns the link, but also:

(3)  Tomcat can write to and read from the linked dir directly:

[EMAIL PROTECTED] webapps]$ ls -ld /usr/scratch/images
drwxrwxr-x  2 tomcat tomcat 4096 Sep 12 11:44 /usr/scratch/images

[EMAIL PROTECTED] webapps]$ echo hello > /usr/scratch/images/hello.dat
(i.e., user tomcat has no problem creating only images dir)

and

[EMAIL PROTECTED] webapps]$ cat /usr/scratch/images/hello.dat
hello
(i.e., user tomcat has no problem seeing the file)

and
(4) also, tomcat can even delete the file via the link
 (no error, and file is removed)

Maurice



Hassan Schroeder wrote:

Maurice Yarrow wrote:



Neither configuration worked to allow symlinks.




Also, as I indicated in my first letter, I even
set up a completely new 5.0.30 complete deployment
to test this issue, but the results were the same.



That's good, eliminating as many variables as possible. And if that
setup doesn't work...

Is it possible you have a permissions problem between the Tomcat
process userid and the owner of the linked directory?





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



Re: set different JRE versions on Tomcat 5.x

2005-09-12 Thread Mark Thomas

Olena Mitovska wrote:

How Tomcat 5.0.28 running on IIS (OS windows XP)  can be configured to use 
different JVM ( JRE versions) for J2EE applications running on the server?
There are a bunch of existing applications that were compiled using 1.4 
version, while our new apps use 1.5. We need to be able to set JRE version for every application. There are some version conflicts that prevent us from setting one common JRE for all apps.

This is the production server so we don't have any other Java software like 
Eclipse installed there. I know that Eclipse allows to choose JRE for every 
deployed application, but we don't have it on production machine.


Sorry, this can't be done. Tomcat and all the apps run within a single 
JVM. You would have to have multiple Tomcat instances.


Mark


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



Re: isapi_redirector or isapi_redirector2?

2005-09-12 Thread Mark Thomas

Tracy Spratt wrote:

Again, if I am mistaken, please correct me, but this is what I have
recently come to understand.

The isapi_redirect2.dll is part of the JK2 connector, along with the
corresponding conf files.  JK2 was "deprecated" in 2004 because of
insufficient interest by both developers and users.  


http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html

I do not know what is the significance of "JK2 will have it's successor
within core Apache2.1/2.2 distribution".


This is refering to mod_proxy_ajp

See http://httpd.apache.org/docs/2.1/mod/mod_proxy_ajp.html


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



Re: web.xml,

2005-09-12 Thread Mark Thomas

Trond Hersløv wrote:

But, if I try using wildcards, eg. /*foxer

Correct. Wildcards are not supported for mapping paths. Read the 
servlet spec for more details.



If I try to map the servlet so that it seems like a jsp-page 
/foxer.jsp, it doesn't work at all.


Also correct. There is a server-wide mapping for *.jsp (wild cards are 
supported for extension mapping) in $TOMCAT_HOME/conf/web.xml



In the book I also read that I should be able to access the servlet even if 
it's not mapped up in web.xml. http://www.mymachine.no/servlet/foxer Ofcourse 
this does also not work.


This is using the invoker servlet, which is disabled by default.


Who can explain how to use the  and maybe tell me where I can find 
some documentation on how to configure web.xml


The servlet spec.



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



Re: tomcat 5.0.24 crashes silently when clustering turned on

2005-09-12 Thread Mike Noel



Which platform/OS? I've no experience on Win, but I never experienced a
tomcat crash on unix/linux. Nevertheless five comments:


This is running on RHEL 3.2.3-39 and Java 1.4.2.


0) jk2 is no longer under development. The only active connector
development for apache is mod_jk and mod_proxy (for the upcoming apache
2.1/2.2).


Yes, I know that jk2 is dead.  We set these servers up with it almost a 
year ago, before it was pronounced dead, and I was hoping to not have to 
change.



1) If you really want to use clustering, either choose the tomcat 5.5 line
(preferably with fastasyncmode), or at least 5.0.28 (better 5.0.30).


Are there any config file changes in going from 5.0.24 to 5.0.28?


2) Some *nixes and shells will send signals, when the user starting tomcat
logs out of the system resulting in killed tomcat processes. Inj that case
use nohup or any similar workaround.


This isn't an issue in my case.  Tomcat dies before I log out of the shell.


3) With replication you will need more memory. Any indications for
OutOfMemory?


Nope.


4) The only real process crashes I experienced where fixed by updates to
bug fix releases of the JVM.


We could try upgrading our JVM from 1.4.2 but I'm concerned with going to 
5.0 in case that causes other things to break.  Will TC 5.0.24 run on a 5.0 
JVM?


-Mike Noel



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



Re: no luck with allowLinking="true"

2005-09-12 Thread Hassan Schroeder

Maurice Yarrow wrote:


Neither configuration worked to allow symlinks.



Also, as I indicated in my first letter, I even
set up a completely new 5.0.30 complete deployment
to test this issue, but the results were the same.


That's good, eliminating as many variables as possible. And if that
setup doesn't work...

Is it possible you have a permissions problem between the Tomcat
process userid and the owner of the linked directory?

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



Re: no luck with allowLinking="true"

2005-09-12 Thread Maurice Yarrow

Hassan

Thank you for thinking about this and suggesting
the context fragment that you have successfully used.

I had tried such a fragment a little while back,
without success, but tried it again just now
exactly as you had indicated.  I tried placing it
in

tomcat/conf/Catalina/localhost/getimg.xml

and I also, separately, tried placing that Context
element in the Host element of server.xml.

Neither configuration worked to allow symlinks.

Note: I know that the Context element works for
me in the more broad usage of deploying a webapp
in an arbitrary location:  I just (again) tried

/getimg/images

and see the contents of that directory once the
symlink is created.  It's just that the getimg
app itself still cannot see it.  And, as I
previously indicated, actually creating a
directory in the webapp tree with images
in it of course makes those images visible
to the app.

Thanks again for the suggestion.

Frankly, I'm as confounded as you about this.
As I indicated in my first letter, I always find
(eventually) the correct configuration for just
about anything that is required, but this has
eluded me.  There must be some conflict which I
am not seeing, but, pretty much, my tomcat
configuration is fairly vanilla: have postgres,
am using OpenEJB as well as JDBC, all successfully.
Use lots of XStream xml files for app information,
but none of this should be a conflict.  Hmmm, let's
see: am also using the SSL/https Connector in
the conf/server.xml, and have enabled CGI from
the conf/web.xml, and all this works fine for me.

Also, as I indicated in my first letter, I even
set up a completely new 5.0.30 complete deployment
to test this issue, but the results were the same.

Puzzled, in Sunnyvale,

Maurice


Hassan Schroeder wrote:

Maurice Yarrow wrote:

I have simply had no success getting allowLinking="true".  


/

Am running 5.0.28  (tried it in 5.0.30, as well, with same lack of 
success).


/








Shouldn't that just be:




:: ? which works for me in TC 5.5.x, at least, and appears to match
the Context attribute descriptions for 5.0.x in


FWIW!




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



set different JRE versions on Tomcat 5.x

2005-09-12 Thread Olena Mitovska
How Tomcat 5.0.28 running on IIS (OS windows XP)  can be configured to use 
different JVM ( JRE versions) for J2EE applications running on the server?
There are a bunch of existing applications that were compiled using 1.4 
version, while our new apps use 1.5. We need to be able to set JRE version for 
every application. There are some version conflicts that prevent us from 
setting one common JRE for all apps.
This is the production server so we don't have any other Java software like 
Eclipse installed there. I know that Eclipse allows to choose JRE for every 
deployed application, but we don't have it on production machine.

I have been looking for any information about this problem in internet  but 
found nothing.

Any help would be appreciated.

Thanks
Olena


Thanks,
Olena Mitovska
Senior Java Systems Developer
E-Commerce and Web Services
Halifax Regional Municipality
tel. (902) 490-7297
[EMAIL PROTECTED] 



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



Re: user authetication on MySql db issue need some help!

2005-09-12 Thread Wade Chandler
--- Yassine ELassad <[EMAIL PROTECTED]> wrote:

> hi list,
> 
> iam about to set my user to a database instead of
> file and i am now trying  to get that done on a
> mysql rdbms
> i created the following tables :
> mysql> use authority;
> Database changed
> mysql> show tables;
> +-+
> | Tables_in_authority |
> +-+
> | user_roles  |
> | users   |
> +-+
> 2 rows in set (0.00 sec)
> 
> mysql> describe user_roles;
>
+---+-+--+-+-+---+
> | Field | Type| Null | Key | Default |
> Extra |
>
+---+-+--+-+-+---+
> | user_name | varchar(15) |  | PRI | |  
> |
> | role_name | varchar(10) |  | | |  
> |
>
+---+-+--+-+-+---+
> 2 rows in set (0.00 sec)
> 
> mysql> describe users;
>
+---+-+--+-+-+---+
> | Field | Type| Null | Key | Default |
> Extra |
>
+---+-+--+-+-+---+
> | user_name | varchar(15) |  | PRI | |  
> |
> | user_pass | varchar(32) |  | | |  
> |
>
+---+-+--+-+-+---+
> 2 rows in set (0.00 sec)
> 
> 
> and this  this is my server.xml:
> 
> 
> =
> 
>  
> 
>   
> 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
>   
>
>   
> 
> 
>   
> 
> 
> 
> 
> 
> 
>className="org.apache.catalina.logger.FileLogger" />
> 
>   
className="org.apache.catalina.realm.UserDatabaseRealm"
>  resourceName="UserDatabase" />
> 
> className="org.apache.catalina.realm.JDBCRealm"
> debug="99"
>   driverName="org.gjt.mm.mysql.Driver"
>   
> connectionURL="jdbc:mysql://dekold4711/authority"
>   connectionName="tomcat"
> connectionPassword="tomcat"
>   userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>   userRoleTable="user_roles"
> roleNameCol="role_name"
>   digest="md5" />
> 
>   
> 
>   
> 
> 
> 
> each time iam trying to login i gets an error
> message telling me wrong username or wrong password 
> catalina.out dont show any susspecious errors any
> idea what i could be doing wrong please!!
> 
> regards Yassine ELassad

I'm using mysql fine.  I use a context.xml file for my
web app in META-INF and this is it:


  
  


I then have my web.xml file setup with different
security constraints like this one:
   
  Agent security
constraint
  
 Agents
 
 /agents/secure/*
  
  
 
 Administrator
 AgencyAdministrator
 Agent
  



I can login fine.  You certainly have to make sure you
have your roles linking to your user name.

Wade

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



RE: Asking again: Final questions: Default pages

2005-09-12 Thread Allistair Crossley
Hi,

The part you are terming the servlet name is actually the web application name. 
As far as I am aware the only way to do what you need is

- Run the "store" web application as ROOT
- Implement a URL rewriting system

Allistair.

> -Original Message-
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2005 17:21
> To: 'Tomcat Users List'
> Subject: RE: Asking again: Final questions: Default pages
> 
> 
> Hi;
> 
> What I am trying to do is beable to have a url of 
> www.windward.net/cart.jsp
> instead of www.windward.net/stroe/cart.jsp. Is there any way 
> to get the
> servlet name out of the url for the "default" servlet?
> 
> Thanks - dave
> 
> 
> -Original Message-
> From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 12, 2005 10:07 AM
> To: Tomcat Users List
> Subject: RE: Asking again: Final questions: Default pages
> 
> Hi,
> 
> Just don't bother putting the domain in the mapping from IIS 
> to Tomcat, e.g
> 
> /*.jsp=ajp13
> 
> would capture both domain requests and forward to Tomcat.
> 
> Allistair.
> 
> > -Original Message-
> > From: David Thielen [mailto:[EMAIL PROTECTED]
> > Sent: 12 September 2005 17:03
> > To: 'Tomcat Users List'
> > Subject: Asking again: Final questions: Default pages
> > 
> > 
> > 
> > Hi;
> > 
> > I have multiple domains on my website (IIS). I would like to do the
> > following.
> > 
> > When a user goes to http://www.windward.net/cart.jsp or
> > http://www.windwardreports.com/cart.jsp that it then loads 
> > the jsp page in
> > the root of a specific webapp of mine.
> > 
> > In other words, all requests for a .jsp (or .faces) page is 
> > mapped to the
> > same servlet regardless of the domain. And that the servlet 
> > name is not
> > needed as part of the url.
> > 
> > How can I do this?
> > 
> > Thanks - dave
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
>  
> ---
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
>   
> Disclaimer:  The information contained within this e-mail is 
> confidential
> and may be privileged. This email is intended solely for the 
> named recipient
> only; if you are not authorised you must not disclose, copy, 
> distribute, or
> retain this message or any part of it. If you have received 
> this message in
> error please contact the sender at once so that we may take 
> the appropriate
> action and avoid troubling you further.  Any views expressed 
> in this message
> are those of the individual sender.  QAS Limited has the 
> right lawfully to
> record, monitor and inspect messages between its employees 
> and any third
> party.  Your messages shall be subject to such lawful 
> supervision as QAS
> Limited deems to be necessary in order to protect its information, its
> interests and its reputation.  
> 
> Whilst all efforts are made to safeguard Inbound and Outbound 
> emails, QAS
> Limited cannot guarantee that attachments are virus free or 
> compatible with
> your systems and does not accept any liability in respect of 
> viruses or
> computer problems experienced.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Asking again: Final questions: Default pages

2005-09-12 Thread David Thielen
Hi;

What I am trying to do is beable to have a url of www.windward.net/cart.jsp
instead of www.windward.net/stroe/cart.jsp. Is there any way to get the
servlet name out of the url for the "default" servlet?

Thanks - dave


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 10:07 AM
To: Tomcat Users List
Subject: RE: Asking again: Final questions: Default pages

Hi,

Just don't bother putting the domain in the mapping from IIS to Tomcat, e.g

/*.jsp=ajp13

would capture both domain requests and forward to Tomcat.

Allistair.

> -Original Message-
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2005 17:03
> To: 'Tomcat Users List'
> Subject: Asking again: Final questions: Default pages
> 
> 
> 
> Hi;
> 
> I have multiple domains on my website (IIS). I would like to do the
> following.
> 
> When a user goes to http://www.windward.net/cart.jsp or
> http://www.windwardreports.com/cart.jsp that it then loads 
> the jsp page in
> the root of a specific webapp of mine.
> 
> In other words, all requests for a .jsp (or .faces) page is 
> mapped to the
> same servlet regardless of the domain. And that the servlet 
> name is not
> needed as part of the url.
> 
> How can I do this?
> 
> Thanks - dave
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
  
Disclaimer:  The information contained within this e-mail is confidential
and may be privileged. This email is intended solely for the named recipient
only; if you are not authorised you must not disclose, copy, distribute, or
retain this message or any part of it. If you have received this message in
error please contact the sender at once so that we may take the appropriate
action and avoid troubling you further.  Any views expressed in this message
are those of the individual sender.  QAS Limited has the right lawfully to
record, monitor and inspect messages between its employees and any third
party.  Your messages shall be subject to such lawful supervision as QAS
Limited deems to be necessary in order to protect its information, its
interests and its reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS
Limited cannot guarantee that attachments are virus free or compatible with
your systems and does not accept any liability in respect of viruses or
computer problems experienced.



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



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



How to get an URL embedded filename suggestion to work in Tomcat as it does in Apache

2005-09-12 Thread Ron Cozad
This url is not working, but it works with Apache http server.

 

http://my.company.com/cgi-bin/program1.cgi/filename.txt?parameter1=123

 

Next url does work with tomcat but of course the browser proposes
program1.cgi as the name instead of filename.txt, as desired in the
first url.

 

http://my.company.com/cgi-bin/program1.cgi?parameter1=123

 

 

I am using tomcat 4.1.31 on windows, and IE 6.x browser.

 

I have enabled cgi support on Tomcat.

 

Ideas?



RE: Asking again: Final questions: Default pages

2005-09-12 Thread Allistair Crossley
Hi,

Just don't bother putting the domain in the mapping from IIS to Tomcat, e.g

/*.jsp=ajp13

would capture both domain requests and forward to Tomcat.

Allistair.

> -Original Message-
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2005 17:03
> To: 'Tomcat Users List'
> Subject: Asking again: Final questions: Default pages
> 
> 
> 
> Hi;
> 
> I have multiple domains on my website (IIS). I would like to do the
> following.
> 
> When a user goes to http://www.windward.net/cart.jsp or
> http://www.windwardreports.com/cart.jsp that it then loads 
> the jsp page in
> the root of a specific webapp of mine.
> 
> In other words, all requests for a .jsp (or .faces) page is 
> mapped to the
> same servlet regardless of the domain. And that the servlet 
> name is not
> needed as part of the url.
> 
> How can I do this?
> 
> Thanks - dave
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
  
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.



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



RE: Asking Again: What's the best way to mix html & jsp

2005-09-12 Thread Allistair Crossley
Hi,

It works just as great keeping your web application a self-contained unit, you 
can still serve HTML from IIS if you really want by setting the document root 
for the site, or using virtual folders. you'd also for absolute certainty put 
an exlusion mask in uriworkers.properties for static type file extensions.

Allistair.

> -Original Message-
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: 12 September 2005 17:03
> To: 'Tomcat Users List'
> Subject: Asking Again: What's the best way to mix html & jsp
> 
> 
> 
> Hi;
> 
> I have websites which are 95% html and 5% jsp/jsf. Any 
> suggestions on the
> best way to mix this? What I have always done to date is put 
> the jsp/jsf
> stuff under the Tomcat webapps dir and the rest under the IIS
> inetpub/wwwroot dir. It's a little disjointed during 
> development but seems
> to work great in production.
> 
> ? - thanks - dave
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
  
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.



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



Asking again: Final questions: Default pages

2005-09-12 Thread David Thielen

Hi;

I have multiple domains on my website (IIS). I would like to do the
following.

When a user goes to http://www.windward.net/cart.jsp or
http://www.windwardreports.com/cart.jsp that it then loads the jsp page in
the root of a specific webapp of mine.

In other words, all requests for a .jsp (or .faces) page is mapped to the
same servlet regardless of the domain. And that the servlet name is not
needed as part of the url.

How can I do this?

Thanks - dave


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



Asking Again: What's the best way to mix html & jsp

2005-09-12 Thread David Thielen

Hi;

I have websites which are 95% html and 5% jsp/jsf. Any suggestions on the
best way to mix this? What I have always done to date is put the jsp/jsf
stuff under the Tomcat webapps dir and the rest under the IIS
inetpub/wwwroot dir. It's a little disjointed during development but seems
to work great in production.

? - thanks - dave


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



user authetication on MySql db issue need some help!

2005-09-12 Thread Yassine ELassad
hi list,

iam about to set my user to a database instead of file and i am now trying  to 
get that done on a mysql rdbms
i created the following tables :
mysql> use authority;
Database changed
mysql> show tables;
+-+
| Tables_in_authority |
+-+
| user_roles  |
| users   |
+-+
2 rows in set (0.00 sec)

mysql> describe user_roles;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| user_name | varchar(15) |  | PRI | |   |
| role_name | varchar(10) |  | | |   |
+---+-+--+-+-+---+
2 rows in set (0.00 sec)

mysql> describe users;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| user_name | varchar(15) |  | PRI | |   |
| user_pass | varchar(32) |  | | |   |
+---+-+--+-+-+---+
2 rows in set (0.00 sec)


and this  this is my server.xml:


=

 



   


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


  






  

  

   

  

  



each time iam trying to login i gets an error message telling me wrong username 
or wrong password  catalina.out dont show any susspecious errors any idea what 
i could be doing wrong please!!

regards Yassine ELassad
__
Verpassen Sie keine eBay-Auktion und bieten Sie bequem
und schnell über das Telefon mit http://www.telefonbieten.de

Ihre eMails auf dem Handy lesen - ohne Zeitverlust - 24h/Tag
eMail, FAX, SMS, VoiceMail mit http://www.directbox.com



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



RE: problem with tomcat manager's deploy command

2005-09-12 Thread Caldarale, Charles R
> From: rahul [mailto:[EMAIL PROTECTED] 
> Subject: problem with tomcat manager's deploy command
> 
> If I remove this context tag from "server.xml" then the deploy
> command works fine.
> 
> But I want to keep this information in "server.xml" and at
> the same time use tomcat manager's deploy command from ant script

You may want to rethink that one.  From the Tomcat 5.5 documentation for
:

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place  elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above."

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Q: Will tomcat 4.0 work with IIS6 ?

2005-09-12 Thread Birbeck, JR \(John\)
We are implementing Objective version 6 with tomcat 4 and IIS6 on win2003 
Server.

Is Tomcat 4 going to work with IIS6 on 2003 server?


John R Birbeck 
Corporate Systems Group
Email: [EMAIL PROTECTED] Tel:+44 (0)1235 446492
Building R1. Room G-50, Business & Information Technology Dept ,Rutherford 
Appleton Laboratory, 
CLRC, Chilton, Didcot, OX11 0QX,UK 
Buses stop at a bus station. Trains stop at a train station. I sit at a work 
station?


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



Re: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread David Haynes

Rick,
Until you are comfortable with all this, may I suggest you download the 
NetBeans IDE (if company policy allows it) and see how they are setting 
everything up? NetBeans has a good template for a war distributed 
web-app and gives you a friendly way to deploy your war file to a TomCat 
server - either the one that is supplied (5.5.7) or one of your choosing 
(requires some minimal setting of preferences).


At that point, you may add the postgresql drivers and datasource and see 
how it all bolts together.


-david-

p.s. If you need further help with the datasource context, email me and 
I'll show you how it works for me.


Mattier, Ricardo wrote:


For now, I placed a test .jsp file in the $CATALINA_HOME/webapps/ROOT
directory.  I haven't deployed a .war file yet.   



Rick Mattier
Systems Analyst II
Wind River Systems
Canton: 781 364-2002
Nashua 603 897-2084
Email: [EMAIL PROTECTED]
 




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



RE: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread Mattier, Ricardo
For now, I placed a test .jsp file in the $CATALINA_HOME/webapps/ROOT
directory.  I haven't deployed a .war file yet.   


Rick Mattier
Systems Analyst II
Wind River Systems
Canton: 781 364-2002
Nashua 603 897-2084
Email: [EMAIL PROTECTED]

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 9:38 AM
To: Tomcat Users List
Subject: Re: Trying to connect tomcat5 with postgresql database

Depends on how you are deploying your app.

1) If deploying as an expanded folder, name the context.xml file after
your webapp and place it in conf/Catalina/localhost.  For example, if
your app is called tutorial, it would have it's  element in the
file $CATALINA_BASE/conf/Catalina/localhost/tutorial.xml where
$CATALINA_BASE is the top level of your tomcat installation.

2) If deploying as a .war file, the file is named 'context.xml' and
placed in the META-INF directory of the war archive.  Tomcat will read
it when deploying the application.

--David

Mattier, Ricardo wrote:

>Where should the context.xml file be placed, and what else should go in

>this file?  I'll rename my jar file to see if that works too?  Thanks!
>
>
>Rick Mattier
>Systems Analyst II
>Wind River Systems
>Canton: 781 364-2002
>Nashua 603 897-2084
>Email: [EMAIL PROTECTED]
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 12, 2005 6:16 AM
>To: Tomcat Users List
>Subject: Re: Trying to connect tomcat5 with postgresql database
>
>And make sure the driver you downloaded matches your server version.
>Also, for some reason, my setup wouldn't work until I renamed the 
>driver to postgresql.jar from pg74.216.jdbc3.jar.
>
>
>  
>
>>Hi Rick --
>>
>>>  description="PostgresSQL Connection Pool"
>>  name="jdbc/postDB" type="javax.sql.DataSource"
>>  driverClassName="org.postgresql.Driver"
>>  url="jdbc:postgresql://localhost:5432/test"
>>/>
>>
>>Good, just make sure you get the rest of the parameters in there like 
>>username="" and password="x".  The  elements 
>>are not used in tomcat 5.5.  Also you mentioned this is in server.xml.
>>
>>
>
>  
>
>>It should be inside the  element of the context.xml file used
>>
>>
>
>  
>
>>in your deployment.
>>
>>  
>>   jdbc/postDB
>>   javax.sql.DataSource
>>Container
>>
>>
>>The web.xml looks good.  The only other thing I can think of is to be 
>>sure the driver jar file is in common/lib.
>>
>>
>>Edoardo Panfili wrote:
>>
>>
>>
>>>I miss a part of my web.xml
>>>
>>>===
>>>
>>>
>>>postgreSQL Datasource
>>>jdbc/lisy
>>>javax.sql.DataSource
>>>Container
>>>
>>>
>>>lisy
>>>
>>>..
>>>
>>>==
>>>
>>>Edoardo
>>>
>>>
>>>Mattier, Ricardo wrote:
>>>
>>>  
>>>
I duplicated your configuration for the server.xml file, and I came


>
>  
>
up with the same error.
-Original Message-
From: Edoardo Panfili [mailto:[EMAIL PROTECTED] Sent: Saturday, 
September 10, 2005 7:49 AM
To: Tomcat Users List
Subject: Re: Trying to connect tomcat5 with postgresql database

This is my configuration server.xml 

>>>type="javax.sql.DataSource"/>


factoryorg.apache.commons.dbcp.BasicDataSourceF
actor
y


driverClassNameorg.postgresql.Driver


urljdbc:postgresql://127.0.0.1:5432/lisy>>>



usernameUNAME


passwordPWD


initialSize3


maxActive5


maxIdle5

  
minIdle3


maxWait-1


removeAbandonedtrue


removeAbandonedTimeout60


logAbandonedtrue



= conde inside the servlet

Context ambiente =(
Context) new InitialContext().lookup("java:comp/env");

DataSource pool = (DataSource) ambiente.lookup("jdbc/lisy");

Connection c=pool.getConnection();

==

I am using Postgres 7.4 and Tomcat 5.0

Edoardo



Mattier, Ricardo wrote:



>Hello,   I'm currently working with Tomcat5 on Solaris10 x86 
>machine.  I'm running into problems when trying to access a 
>postgresql 8.0.1 database on the local machine. Cannot create JDBC
>  
>
>
>  
>
>driver of class '' for connect URL null'  is the error I receive 
>when trying to establish
>  
>
a connection.



>Here's the snipet of code I used in my .jsp:
>Context ctx = new InitialConection();
>
>D

Re: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread David Smith
Depends on how you are deploying your app.

1) If deploying as an expanded folder, name the context.xml file after
your webapp and place it in conf/Catalina/localhost.  For example, if
your app is called tutorial, it would have it's  element in the
file $CATALINA_BASE/conf/Catalina/localhost/tutorial.xml where
$CATALINA_BASE is the top level of your tomcat installation.

2) If deploying as a .war file, the file is named 'context.xml' and
placed in the META-INF directory of the war archive.  Tomcat will read
it when deploying the application.

--David

Mattier, Ricardo wrote:

>Where should the context.xml file be placed, and what else should go in
>this file?  I'll rename my jar file to see if that works too?  Thanks! 
>
>
>Rick Mattier
>Systems Analyst II
>Wind River Systems
>Canton: 781 364-2002
>Nashua 603 897-2084
>Email: [EMAIL PROTECTED]
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
>Sent: Monday, September 12, 2005 6:16 AM
>To: Tomcat Users List
>Subject: Re: Trying to connect tomcat5 with postgresql database
>
>And make sure the driver you downloaded matches your server version.
>Also, for some reason, my setup wouldn't work until I renamed the driver
>to postgresql.jar from pg74.216.jdbc3.jar.
>
>
>  
>
>>Hi Rick --
>>
>>>  description="PostgresSQL Connection Pool"
>>  name="jdbc/postDB" type="javax.sql.DataSource"
>>  driverClassName="org.postgresql.Driver"
>>  url="jdbc:postgresql://localhost:5432/test"
>>/>
>>
>>Good, just make sure you get the rest of the parameters in there like 
>>username="" and password="x".  The  elements 
>>are not used in tomcat 5.5.  Also you mentioned this is in server.xml.
>>
>>
>
>  
>
>>It should be inside the  element of the context.xml file used
>>
>>
>
>  
>
>>in your deployment.
>>
>>  
>>   jdbc/postDB
>>   javax.sql.DataSource
>>Container
>>
>>
>>The web.xml looks good.  The only other thing I can think of is to be 
>>sure the driver jar file is in common/lib.
>>
>>
>>Edoardo Panfili wrote:
>>
>>
>>
>>>I miss a part of my web.xml
>>>
>>>===
>>>
>>>
>>>postgreSQL Datasource
>>>jdbc/lisy
>>>javax.sql.DataSource
>>>Container
>>>
>>>
>>>lisy
>>>
>>>..
>>>
>>>==
>>>
>>>Edoardo
>>>
>>>
>>>Mattier, Ricardo wrote:
>>>
>>>  
>>>
I duplicated your configuration for the server.xml file, and I came


>
>  
>
up with the same error.
-Original Message-
From: Edoardo Panfili [mailto:[EMAIL PROTECTED] Sent: Saturday, 
September 10, 2005 7:49 AM
To: Tomcat Users List
Subject: Re: Trying to connect tomcat5 with postgresql database

This is my configuration server.xml 

>>>type="javax.sql.DataSource"/>


factoryorg.apache.commons.dbcp.BasicDataSourceF
actor
y


driverClassNameorg.postgresql.Driver


urljdbc:postgresql://127.0.0.1:5432/lisy>>>



usernameUNAME


passwordPWD


initialSize3


maxActive5


maxIdle5

  
minIdle3


maxWait-1


removeAbandonedtrue


removeAbandonedTimeout60


logAbandonedtrue



= conde inside the servlet

Context ambiente =(
Context) new InitialContext().lookup("java:comp/env");

DataSource pool = (DataSource) ambiente.lookup("jdbc/lisy");

Connection c=pool.getConnection();

==

I am using Postgres 7.4 and Tomcat 5.0

Edoardo



Mattier, Ricardo wrote:



>Hello,   I'm currently working with Tomcat5 on Solaris10 x86 
>machine.  I'm running into problems when trying to access a 
>postgresql 8.0.1 database on the local machine. Cannot create JDBC
>  
>
>
>  
>
>driver of class '' for connect URL null'  is the error I receive 
>when trying to establish
>  
>
a connection.



>Here's the snipet of code I used in my .jsp:
>Context ctx = new InitialConection();
>
>DataSource ds = 
>(DataSource)ctx.lookup("java:comp/env/jdbc/postDB");
>
>Connection con = ds.getConnection();
>
>I noticed it would compile fine if I remove the getConnection
>  
>
line.



>Once I add it back in,  the above error appears.  I've followed 
>the instructions on the jakarta page, and thought I made the 
>correct insertions in both server.xml, and WE

Security problem

2005-09-12 Thread Gunnar Brading
When trying a recently unpacked 5.5.11, started with -security, I get an 
exception the first time I try to check the root index.jsp.

Anyone know what I am doing wrong?

Cheers,
-- Gunnar Brading

SEVERE: Servlet.service() for servlet org.apache.jsp.index_jsp threw 
exception
java.security.AccessControlException: access denied 
(java.lang.RuntimePermission accessClassInPackage.org.apache.coyote.http11)
   at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
   at 
java.security.AccessController.checkPermission(AccessController.java:427)
   at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
   at 
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)

   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at 
org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:429)
   at 
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1602)
   at 
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:961)

   at org.apache.coyote.Response.action(Response.java:180)
   at 
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573)

   at org.apache.coyote.Response.doWrite(Response.java:555)
   at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)

   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:299)
   at 
org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:235)
   at 
sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
   at 
sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
   at 
sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)

   at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
   at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
   at 
org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:184)
   at 
org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:127)
   at 
org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:536)

   at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:259)
   at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:456)
   at 
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:142)
   at 
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
   at 
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:325)
   at 
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:341)

   at org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   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:585)
   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)

   at java.security.AccessController.doPrivileged(Native Method)
   at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)

   at java.security.AccessController.doPrivileged(Native Method)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process

problem with tomcat manager's deploy command

2005-09-12 Thread rahul
Hi all,

I am trying to use Tomcat Manager's deploy command using Ant script to
deploy a web application.
The command doesn't work in case there is an entry in tomcat
configuration file "server.xml" for my application like

...
...


which I am using for connection pooling purpose.
on running tomcat manager's deploy command using ant,
I get an error saying "Application already exists at path /myAppName"
even when there is no application folder in webapps

If I remove this context tag from "server.xml" then the deploy
command works fine.

But I want to keep this information in "server.xml" and at
the same time use tomcat manager's deploy command from ant script

I am using tomcat-5.5.7 with ant-1.6.5

Can anyone help?

Thanks in advance
RahulJoshi




RE: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread Mattier, Ricardo
I constantly receive this error when datasource.getConnection() is
called:
root cause 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null' 


Rick Mattier
Systems Analyst II
Wind River Systems
Canton: 781 364-2002
Nashua 603 897-2084
Email: [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 6:16 AM
To: Tomcat Users List
Subject: Re: Trying to connect tomcat5 with postgresql database

And make sure the driver you downloaded matches your server version.
Also, for some reason, my setup wouldn't work until I renamed the driver
to postgresql.jar from pg74.216.jdbc3.jar.


> Hi Rick --
> 
>description="PostgresSQL Connection Pool"
>   name="jdbc/postDB" type="javax.sql.DataSource"
>   driverClassName="org.postgresql.Driver"
>   url="jdbc:postgresql://localhost:5432/test"
> />
> 
> Good, just make sure you get the rest of the parameters in there like 
> username="" and password="x".  The  elements 
> are not used in tomcat 5.5.  Also you mentioned this is in server.xml.

> It should be inside the  element of the context.xml file used

> in your deployment.
> 
>   
>jdbc/postDB
>javax.sql.DataSource
> Container
> 
> 
> The web.xml looks good.  The only other thing I can think of is to be 
> sure the driver jar file is in common/lib.
> 
> 
> Edoardo Panfili wrote:
> 
> >
> > I miss a part of my web.xml
> >
> > ===
> > 
> > 
> > postgreSQL Datasource
> > jdbc/lisy
> > javax.sql.DataSource
> > Container
> > 
> >
> > lisy
> >
> > ..
> >
> > ==
> >
> > Edoardo
> >
> >
> > Mattier, Ricardo wrote:
> >
> >> I duplicated your configuration for the server.xml file, and I came

> >> up with the same error.
> >> -Original Message-
> >> From: Edoardo Panfili [mailto:[EMAIL PROTECTED] Sent: Saturday, 
> >> September 10, 2005 7:49 AM
> >> To: Tomcat Users List
> >> Subject: Re: Trying to connect tomcat5 with postgresql database
> >>
> >> This is my configuration server.xml 
> >> 
> >>  >> type="javax.sql.DataSource"/>
> >> 
> >> 
> >> factoryorg.apache.commons.dbcp.BasicDataSourceF
> >> actor
> >> y
> >> 
> >> 
> >> driverClassNameorg.postgresql.Driver
> >> 
> >> 
> >> urljdbc:postgresql://127.0.0.1:5432/lisy >> >
> >> 
> >> 
> >> usernameUNAME
> >> 
> >> 
> >> passwordPWD
> >> 
> >> 
> >> initialSize3
> >> 
> >> 
> >> maxActive5
> >> 
> >> 
> >> maxIdle5
> >> 
> >>   
> >> minIdle3
> >> 
> >> 
> >> maxWait-1
> >> 
> >> 
> >> removeAbandonedtrue
> >> 
> >> 
> >> removeAbandonedTimeout60
> >> 
> >> 
> >> logAbandonedtrue
> >> 
> >> 
> >>
> >> = conde inside the servlet
> >>
> >> Context ambiente =(
> >> Context) new InitialContext().lookup("java:comp/env");
> >>
> >> DataSource pool = (DataSource) ambiente.lookup("jdbc/lisy");
> >>
> >> Connection c=pool.getConnection();
> >>
> >> ==
> >>
> >> I am using Postgres 7.4 and Tomcat 5.0
> >>
> >> Edoardo
> >>
> >>
> >>
> >> Mattier, Ricardo wrote:
> >>
> >>> Hello,   I'm currently working with Tomcat5 on Solaris10 x86 
> >>> machine.  I'm running into problems when trying to access a 
> >>> postgresql 8.0.1 database on the local machine. Cannot create JDBC

> >>> driver of class '' for connect URL null'  is the error I receive 
> >>> when trying to establish
> >>
> >> a connection.
> >>
> >>> Here's the snipet of code I used in my .jsp:
> >>> Context ctx = new InitialConection();
> >>>
> >>> DataSource ds = 
> >>> (DataSource)ctx.lookup("java:comp/env/jdbc/postDB");
> >>>
> >>> Connection con = ds.getConnection();
> >>>
> >>> I noticed it would compile fine if I remove the getConnection
> >>
> >> line.
> >>
> >>> Once I add it back in,  the above error appears.  I've followed 
> >>> the instructions on the jakarta page, and thought I made the 
> >>> correct insertions in both server.xml, and WEB-INF/web.xml. Here 
> >>> are the entries
> >>> used:
> >>> server.xml
> >>>  >>>   description="PostgresSQL Connection Pool"
> >>>   name="jdbc/postDB" type="javax.sql.DataSource"
> >>>   driverClassName="org.postgresql.Driver"
> >>>   url="jdbc:postgresql://localhost:5432/test"
> >>> />
> >>> 
> >>> 
> >>> driverClassName
> >>> org.postgresql.Driver
> >>> 
> >>> 
> >>> url
> >>>  
> >>>
jdbc:postgresql://localhost:5432/test?autoConnect=true
> >>> 
> >>> 
> >>>

RE: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread Mattier, Ricardo
Where should the context.xml file be placed, and what else should go in
this file?  I'll rename my jar file to see if that works too?  Thanks! 


Rick Mattier
Systems Analyst II
Wind River Systems
Canton: 781 364-2002
Nashua 603 897-2084
Email: [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 6:16 AM
To: Tomcat Users List
Subject: Re: Trying to connect tomcat5 with postgresql database

And make sure the driver you downloaded matches your server version.
Also, for some reason, my setup wouldn't work until I renamed the driver
to postgresql.jar from pg74.216.jdbc3.jar.


> Hi Rick --
> 
>description="PostgresSQL Connection Pool"
>   name="jdbc/postDB" type="javax.sql.DataSource"
>   driverClassName="org.postgresql.Driver"
>   url="jdbc:postgresql://localhost:5432/test"
> />
> 
> Good, just make sure you get the rest of the parameters in there like 
> username="" and password="x".  The  elements 
> are not used in tomcat 5.5.  Also you mentioned this is in server.xml.

> It should be inside the  element of the context.xml file used

> in your deployment.
> 
>   
>jdbc/postDB
>javax.sql.DataSource
> Container
> 
> 
> The web.xml looks good.  The only other thing I can think of is to be 
> sure the driver jar file is in common/lib.
> 
> 
> Edoardo Panfili wrote:
> 
> >
> > I miss a part of my web.xml
> >
> > ===
> > 
> > 
> > postgreSQL Datasource
> > jdbc/lisy
> > javax.sql.DataSource
> > Container
> > 
> >
> > lisy
> >
> > ..
> >
> > ==
> >
> > Edoardo
> >
> >
> > Mattier, Ricardo wrote:
> >
> >> I duplicated your configuration for the server.xml file, and I came

> >> up with the same error.
> >> -Original Message-
> >> From: Edoardo Panfili [mailto:[EMAIL PROTECTED] Sent: Saturday, 
> >> September 10, 2005 7:49 AM
> >> To: Tomcat Users List
> >> Subject: Re: Trying to connect tomcat5 with postgresql database
> >>
> >> This is my configuration server.xml 
> >> 
> >>  >> type="javax.sql.DataSource"/>
> >> 
> >> 
> >> factoryorg.apache.commons.dbcp.BasicDataSourceF
> >> actor
> >> y
> >> 
> >> 
> >> driverClassNameorg.postgresql.Driver
> >> 
> >> 
> >> urljdbc:postgresql://127.0.0.1:5432/lisy >> >
> >> 
> >> 
> >> usernameUNAME
> >> 
> >> 
> >> passwordPWD
> >> 
> >> 
> >> initialSize3
> >> 
> >> 
> >> maxActive5
> >> 
> >> 
> >> maxIdle5
> >> 
> >>   
> >> minIdle3
> >> 
> >> 
> >> maxWait-1
> >> 
> >> 
> >> removeAbandonedtrue
> >> 
> >> 
> >> removeAbandonedTimeout60
> >> 
> >> 
> >> logAbandonedtrue
> >> 
> >> 
> >>
> >> = conde inside the servlet
> >>
> >> Context ambiente =(
> >> Context) new InitialContext().lookup("java:comp/env");
> >>
> >> DataSource pool = (DataSource) ambiente.lookup("jdbc/lisy");
> >>
> >> Connection c=pool.getConnection();
> >>
> >> ==
> >>
> >> I am using Postgres 7.4 and Tomcat 5.0
> >>
> >> Edoardo
> >>
> >>
> >>
> >> Mattier, Ricardo wrote:
> >>
> >>> Hello,   I'm currently working with Tomcat5 on Solaris10 x86 
> >>> machine.  I'm running into problems when trying to access a 
> >>> postgresql 8.0.1 database on the local machine. Cannot create JDBC

> >>> driver of class '' for connect URL null'  is the error I receive 
> >>> when trying to establish
> >>
> >> a connection.
> >>
> >>> Here's the snipet of code I used in my .jsp:
> >>> Context ctx = new InitialConection();
> >>>
> >>> DataSource ds = 
> >>> (DataSource)ctx.lookup("java:comp/env/jdbc/postDB");
> >>>
> >>> Connection con = ds.getConnection();
> >>>
> >>> I noticed it would compile fine if I remove the getConnection
> >>
> >> line.
> >>
> >>> Once I add it back in,  the above error appears.  I've followed 
> >>> the instructions on the jakarta page, and thought I made the 
> >>> correct insertions in both server.xml, and WEB-INF/web.xml. Here 
> >>> are the entries
> >>> used:
> >>> server.xml
> >>>  >>>   description="PostgresSQL Connection Pool"
> >>>   name="jdbc/postDB" type="javax.sql.DataSource"
> >>>   driverClassName="org.postgresql.Driver"
> >>>   url="jdbc:postgresql://localhost:5432/test"
> >>> />
> >>> 
> >>> 
> >>> driverClassName
> >>> org.postgresql.Driver
> >>> 
> >>> 
> >>> url
> >>>  
> >>>
jdbc:postgresql://localhost:5432/test?autoConnect=true
> >>> 
> >>> 
> >>> username
> >>> postgres
> >>>

Re: no luck with allowLinking="true"

2005-09-12 Thread Hassan Schroeder

Maurice Yarrow wrote:

I have simply had no success getting allowLinking="true".  

/
Am running 5.0.28  (tried it in 5.0.30, as well, with same lack of 
success).

/






Shouldn't that just be:




:: ? which works for me in TC 5.5.x, at least, and appears to match
the Context attribute descriptions for 5.0.x in


FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



Re: Trying to connect tomcat5 with postgresql database

2005-09-12 Thread pacea
And make sure the driver you downloaded matches your server version.  Also, for 
some reason, my setup wouldn't work until I renamed the driver to 
postgresql.jar from pg74.216.jdbc3.jar.


> Hi Rick --
> 
>description="PostgresSQL Connection Pool"
>   name="jdbc/postDB" type="javax.sql.DataSource"
>   driverClassName="org.postgresql.Driver"
>   url="jdbc:postgresql://localhost:5432/test"
> />
> 
> Good, just make sure you get the rest of the parameters in there like 
> username="" and password="x".  The  elements are 
> not used in tomcat 5.5.  Also you mentioned this is in server.xml.  It 
> should be inside the  element of the context.xml file used in 
> your deployment.
> 
>   
>jdbc/postDB
>javax.sql.DataSource
> Container
> 
> 
> The web.xml looks good.  The only other thing I can think of is to be 
> sure the driver jar file is in common/lib.
> 
> 
> Edoardo Panfili wrote:
> 
> >
> > I miss a part of my web.xml
> >
> > ===
> > 
> > 
> > postgreSQL Datasource
> > jdbc/lisy
> > javax.sql.DataSource
> > Container
> > 
> >
> > lisy
> >
> > ..
> >
> > ==
> >
> > Edoardo
> >
> >
> > Mattier, Ricardo wrote:
> >
> >> I duplicated your configuration for the server.xml file, and I came up
> >> with the same error.
> >> -Original Message-
> >> From: Edoardo Panfili [mailto:[EMAIL PROTECTED] Sent: Saturday, 
> >> September 10, 2005 7:49 AM
> >> To: Tomcat Users List
> >> Subject: Re: Trying to connect tomcat5 with postgresql database
> >>
> >> This is my configuration server.xml
> >> 
> >>  >> type="javax.sql.DataSource"/>
> >> 
> >> 
> >> factoryorg.apache.commons.dbcp.BasicDataSourceFactor
> >> y
> >> 
> >> 
> >> driverClassNameorg.postgresql.Driver
> >> 
> >> 
> >> urljdbc:postgresql://127.0.0.1:5432/lisy
> >> 
> >> 
> >> usernameUNAME
> >> 
> >> 
> >> passwordPWD
> >> 
> >> 
> >> initialSize3
> >> 
> >> 
> >> maxActive5
> >> 
> >> 
> >> maxIdle5
> >> 
> >>   
> >> minIdle3
> >> 
> >> 
> >> maxWait-1
> >> 
> >> 
> >> removeAbandonedtrue
> >> 
> >> 
> >> removeAbandonedTimeout60
> >> 
> >> 
> >> logAbandonedtrue
> >> 
> >> 
> >>
> >> = conde inside the servlet
> >>
> >> Context ambiente =(
> >> Context) new InitialContext().lookup("java:comp/env");
> >>
> >> DataSource pool = (DataSource) ambiente.lookup("jdbc/lisy");
> >>
> >> Connection c=pool.getConnection();
> >>
> >> ==
> >>
> >> I am using Postgres 7.4 and Tomcat 5.0
> >>
> >> Edoardo
> >>
> >>
> >>
> >> Mattier, Ricardo wrote:
> >>
> >>> Hello,   I'm currently working with Tomcat5 on Solaris10 x86 
> >>> machine.  I'm running into problems when trying to access a 
> >>> postgresql 8.0.1 database on the local machine. Cannot create JDBC 
> >>> driver of class '' for connect URL null'  is the error I receive 
> >>> when trying to establish
> >>
> >> a connection.
> >>
> >>> Here's the snipet of code I used in my .jsp:
> >>> Context ctx = new InitialConection();
> >>>
> >>> DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/postDB");
> >>>
> >>> Connection con = ds.getConnection();
> >>>
> >>> I noticed it would compile fine if I remove the getConnection
> >>
> >> line.
> >>
> >>> Once I add it back in,  the above error appears.  I've followed the 
> >>> instructions on the jakarta page, and thought I made the correct 
> >>> insertions in both server.xml, and WEB-INF/web.xml. Here are the 
> >>> entries
> >>> used:
> >>> server.xml
> >>>  >>>   description="PostgresSQL Connection Pool"
> >>>   name="jdbc/postDB" type="javax.sql.DataSource"
> >>>   driverClassName="org.postgresql.Driver"
> >>>   url="jdbc:postgresql://localhost:5432/test"
> >>> />
> >>> 
> >>> 
> >>> driverClassName
> >>> org.postgresql.Driver
> >>> 
> >>> 
> >>> url
> >>>  
> >>> jdbc:postgresql://localhost:5432/test?autoConnect=true
> >>> 
> >>> 
> >>> username
> >>> postgres
> >>> 
> >>> 
> >>> password
> >>> postgres
> >>> 
> >>> 
> >>> maxIdle
> >>> 2
> >>> 
> >>> 
> >>> maxActive
> >>> 10
> >>> 
> >>> 
> >>> Here is the web.xml:
> >>>   
> >>>jdbc/postDB
> >>>javax.sql.DataSource
> >>> Container
> >>> 
> >>>
> >>> Thanks in advance!
>

Unexpected Jasper Exception

2005-09-12 Thread A. Alonso Dominguez
Hi there!

I'm developing a web application covered inside a security manager. The 
problem is that I left the right permissions to the commons libraries and 
now the jasper compiler can not initialize the tlds cache. This the 
exception:

org.apache.jasper.JasperException: Unable to initialize
TldLocationsCache: XML parsing error on file
/WEB-INF/tlds/displaytag-el-12.tld

org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:252)

org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:223)

org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:519)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:417)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
java.security.AccessController.doPrivileged(Native Method)

com.interlogical.portal.security.WebappSecurityFilter.doFilter(WebappSecurityFilter.java:51)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)

I'm using Tomcat 5.5.9 and JVM 1.5.0. The catalina.policy file looks like:
...
grant codeBase "file:/home/domains/i/interlogical.com/htdocs/-" {
permission java.net.SocketPermission "jakarta.apache.org:80
", "connect";
permission java.net.SocketPermission "jakarta.apache.org:80
", "resolve";

permission java.util.PropertyPermission "file.encoding", "read";
permission java.util.PropertyPermission "java.class.path", "read";
permission java.util.PropertyPermission "java.compiler", "read";
permission java.util.PropertyPermission "java.ext.dirs", "read";
permission java.util.PropertyPermission "java.io.tmpdir", "read";
permission java.util.PropertyPermission "java.library.path", "read";
permission java.util.PropertyPermission "java.runtime.name
", "read";
permission java.util.PropertyPermission "java.runtime.version", "read";
permission java.util.PropertyPermission "java.vm.info
", "read";
permission java.util.PropertyPermission "user.country", "read";
permission java.util.PropertyPermission "user.region", "read";
permission java.util.PropertyPermission "user.dir", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.util.PropertyPermission "user.language", "read";
permission java.util.PropertyPermission "user.name ", 
"read";

permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.tomcat.util.buf";
permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.tomcat.uti