Re: Tomcat 6 SSL configuration error

2010-07-23 Thread aung bar hlay
I'm running on WindowsXP.
Path to my keystore file is "c:\is.keystore".


And this is server.xml file.


---server.xml---






  
  
  
  
  
  
  

  
  


  

  
  

























  
  

  
  

  
  

  
  







  

  


---server.xml
--



Also this is catalina.log file.

--catalina.log--
Jul 25, 2010 10:47:39 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN
Jul 25, 2010 10:47:39 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 25, 2010 10:47:39 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Jul 25, 2010 10:47:39 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use: JVM_Bind:8080
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Jul 25, 2010 10:47:39 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 251 ms
Jul 25, 2010 10:47:39 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 25, 2010 10:47:39 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Jul 25, 2010 10:47:40 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 25, 2010 10:47:40 AM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:519)
at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
at
org.apache.catalina.core.StandardService.start(StandardService.java:531)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at s

Issue with Eclipse 3.6, Tomcat 6/7 with Apache Myfaces 2.0

2010-07-23 Thread puneet arora
Hi All

I have defined a dynamic web project in Eclipse 3.6 to which i have added a 
user library that has all the Myfaces 2.0 jars as well as the el-api-1.1 and 
el-impl-1.1 jars.

When i publish the project under wtp to the reference tomcat, i get the 
following startup error:

java.lang.LinkageError: loader constraint violation: when resolving interface 
method 
"javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;"
 the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of 
the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the 
class loader (instance of org/apache/catalina/loader/StandardClassLoader) for 
resolved class, javax/servlet/jsp/JspApplicationContext, have different Class 
objects for the type javax/el/ExpressionFactory used in the signature

I have attached my catalina.out, web.xml and faces-config.xml... please help. 
Else please point me to the right direction.

Puneet





Jul 23, 2010 10:18:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
C:\Program 
Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program
 Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program 
Files/Java/jre6/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows 
Live;C:\Program Files\IBM\WebSphere 
MQ\Java\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
 Files\QuickTime\QTSystem\;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program 
Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\Windows 
Imaging\;C:\Program Files\TortoiseSVN\bin;c:\Program Files\Microsoft SQL 
Server\90\Tools\binn\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program
 Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\IDM Computer 
Solutions\UltraEdit\
Jul 23, 2010 10:18:54 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'source' to 'org.eclipse.jst.jee.server:jsf-test' did not find a 
matching property.
Jul 23, 2010 10:18:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 704 ms
Jul 23, 2010 10:18:54 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 23, 2010 10:18:54 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
Jul 23, 2010 10:18:58 PM org.apache.catalina.core.StandardContext 
addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is 
already configured for this context. The duplicate definition has been ignored.
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using 
default value true
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, 
using default value true
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 
'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default 
value false
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' 
found, using default value false
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 
'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default 
value true
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, 
using default value true
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, 
using default value true
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getLongInitParameter
INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' 
found, using default value 2
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' 
found, using default value false
Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig 
getStringInitParameter
INFO: No context init parameter 
'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON

Re: Problems starting Tomcat on windows 7 64bit.

2010-07-23 Thread sharkanana

Well this is the first time I've tried running tomcat on this system, so I am
using a vanilla install.

I have set JAVA_HOME and JRE_HOME in my env vars, I'm not sure if they
should be there or not.
I have removed the CLASSPATH var.

Other than that I have tried 5.5, 6 and 7 fresh installs and am getting the
same errors on startup with each, and I have been trying to start it from
the command line.

Any other ideas?  When I get back to my desktop on monday I will try
resetting on my env vars and trying again, then if that fails add them one
by one.


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Sharkanana,
> 
> On 7/22/2010 8:34 PM, sharkanana wrote:
>> Here is my server.xml.  It is default.
> 
> Yup, that looks like the default -- or close enough that it doesn't
> matter what you may have changed.
> 
> Could you try reinstalling a fresh copy of Tomcat and starting it
> without using IntelliJIdea or anything like that?
> 
> Just a vanilla Tomcat install, when you start it you should get the
> default webapps like the manager and ROOT. You should get the "it works"
> default Tomcat page if you browse to http://host:8080/
> 
> If that works, then try to deploy your webapps onto it.
> 
> I'm not sure what you've broken, but it appears that your classpath or
> other environment has been damaged.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkxJ3H8ACgkQ9CaO5/Lv0PBvHQCfUVwIX08NpjzpE6mItaBWfyLy
> UhYAn3sg/prIQtIiQU6rLzlaretQvVDW
> =Grrg
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problems-starting-Tomcat-on-windows-7-64bit.-tp29232948p29252733.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Shutting Down by Itself?

2010-07-23 Thread André Warnier

Robinson, Eric wrote:
 
This Tomcat and Java are just trying to say, in the only 
way they can, that after some 10 years of good and hard 
labor, it is now time to retire them and have the burden 
taken over by a new generation.


Yes, that's probably it. One of the...

[r...@app03 ~]# ps ax|grep java|wc -l
164

..164 instances of tomcat that are running on this server is bored with
being old and has decided to act up. The other 163 instances are lame
for insisting on working fine day after day. :-)


Out of memory ?
(which is also something that happens frequently to old people, and to java 
programs)

What I was trying to say above, in a devious but humoristic way, is that there are not a 
lot of people on this list running those versions anymore.  There may not even be a lot of 
people on this list with any experience of running that anymore.  Probably, any people 
with the experience of running these versions have been since promoted and don't have the 
time to be on this list anymore.
So you are basically stuck with Chuck and me, and we are telling you that Tomcat does not 
shut down by itself.  I'll add that when it shuts down properly, it usually says so in its 
logfiles.  If it doesn't, then it must be that it is being brutally terminated (or 
euthanasied ?) by something else.  Under Linux, there is some talk of an "OOM killer" 
character who has been known to do that kind of thing.

When all these JVM instances are running, what does "free" say ?
And while you're at it, go to the Tomcat bin subdirectory, and tell us what "version.sh" 
has to say.
Another possibility on a Linux system, is that some smart /etc/init.d startup script for 
Tomcat redirects Tomcat's messages somewhere else, like /var/log/daemon.log.  Have you 
been looking there ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cocoon 2.0.4 with Tomcat 5.5.23

2010-07-23 Thread Pid
On 23 Jul 2010, at 19:51, Venkat Tanga  wrote:

> Hi All,
> 
> Does Tomcat 5.5.23 supports Apache Cocoon 2.0.4 ., till now I am using 
> Tomcat 5.0.18 which is working fine with Cocoon 2.0.4.

Tomcat supports Servlet Spec compliant applications.


p

> -- 
> Regards,
> Venkat
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Shutting Down by Itself?

2010-07-23 Thread Robinson, Eric
 
> This Tomcat and Java are just trying to say, in the only 
> way they can, that after some 10 years of good and hard 
> labor, it is now time to retire them and have the burden 
> taken over by a new generation.

Yes, that's probably it. One of the...

[r...@app03 ~]# ps ax|grep java|wc -l
164

..164 instances of tomcat that are running on this server is bored with
being old and has decided to act up. The other 163 instances are lame
for insisting on working fine day after day. :-)

--
Eric Robinson


Disclaimer - July 23, 2010 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of . Warning: Although  has taken reasonable precautions to ensure no 
viruses are present in this email, the company cannot accept responsibility for 
any loss or damage arising from the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Shutting Down by Itself?

2010-07-23 Thread André Warnier

Robinson, Eric wrote:
Tomcat 5.x.y what?  Be specific.  Also tell us the JVM 
you're using and the platform you're running on. 


Apache Tomcat/5.0.28 
Java 1.4.2_09-b05 Sun Microsystems Inc. 
Linux 2.6.18-92.1.22.el5PAE i386 


Gentlemen,
I think we need a minute of silence here, and a golden watch.
The above versions of Java and Tomcat are so old, that it is probably the 
explanation.
This Tomcat and Java are just trying to say, in the only way they can, that after some 10 
years of good and hard labor, it is now time to retire them and have the burden taken over 
by a new generation.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Shutting Down by Itself?

2010-07-23 Thread Robinson, Eric
> Maybe something from this recent discussion applies:
> http://marc.info/?t=12767355721&r=1&w=2 

Good thread, thanks. Unfortunately, the situations it describes don't
apply in this case.

--
Eric Robinson


Disclaimer - July 23, 2010 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of . Warning: Although  has taken reasonable precautions to ensure no 
viruses are present in this email, the company cannot accept responsibility for 
any loss or damage arising from the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Shutting Down by Itself?

2010-07-23 Thread Robinson, Eric
> Tomcat 5.x.y what?  Be specific.  Also tell us the JVM 
> you're using and the platform you're running on. 

Apache Tomcat/5.0.28 
Java 1.4.2_09-b05 Sun Microsystems Inc. 
Linux 2.6.18-92.1.22.el5PAE i386 

> If one of your webapps is doing something antisocial such 
> as calling System.exit(), that will cause a shutdown.

Not too likely as there are 100+ separate instances of tomcat on the
same server listening on different ports and running the same webapp
from differenet directories. The other instances are fine and have been
for years. This is the only instance that has the problem and it has
only been happening for a few weeks.

> What else is in the logs?

Not much except some errors related to date parsing (an obvious coding
bug) and a socket connection timeout related to faxing.

java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1108)
at java.text.DateFormat.parse(DateFormat.java:333)
at catalog.EcwFax.getEasternTime(EcwFax.java:2281)
at catalog.EcwFax.LogFaxRequest(EcwFax.java:887)
at catalog.EcwFax.LogFaxRequest(EcwFax.java:790)
at
org.apache.jsp.jsp.catalog.xml.fax.LogFaxRequest_jsp._jspService(LogFaxR
equest_jsp.java:142)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
java:683)
at java.lang.Thread.run(Thread.java:534)
java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1108)
at java.text.DateFormat.parse(DateFormat.java:333)
at catalog.EcwFax.getEasternTime(EcwFax.java:2281)
at catalog.EcwFax.LogFaxRequest(EcwFax.java:887)
at catalog.EcwFax.LogFaxRequest(EcwFax.java:790)
at
org.apache.jsp.jsp.catalog.xml.fax.LogFaxRequest_jsp._jspService(LogFaxR
equest_jsp.java:142)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.ser

Re: using Apache as a front end for Tomcat

2010-07-23 Thread James Godrej
Hi,
I am using Apache2
Architecture: amd64
Version: 2.2.14-5ubuntu8

 and for Tomcat it is 
apache-tomcat-5.5.29

The machine on which tomcat is running has an Apache instance also.
Which is same
Architecture: amd64
Version: 2.2.14-5ubuntu8

The operating system is Ubuntu 10.04





From: André Warnier 
To: Tomcat Users List 
Sent: Tue, 20 July, 2010 1:22:07 AM
Subject: Re: using Apache as a front end for Tomcat

James Godrej wrote:
> Hi,
> it would be very kind of you people if some one can share how can I use 
> Apache 
>as a front end to Tomcat.
> I am having an application in CATALINA_HOME/webapps and I can access it as 
>http://localhost:9090/portal
> Thanks 
Apart from the recommendations you already got, it may help to indicate which 
versions of Apache and Tomcat you are using,
and on which platform.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Cocoon 2.0.4 with Tomcat 5.5.23

2010-07-23 Thread Venkat Tanga

Hi All,

 Does Tomcat 5.5.23 supports Apache Cocoon 2.0.4 ., till now I am 
using Tomcat 5.0.18 which is working fine with Cocoon 2.0.4.
 
--

Regards,
Venkat


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Shutting Down by Itself?

2010-07-23 Thread Rainer Jung

On 23.07.2010 19:43, Robinson, Eric wrote:


We've observed tomcat5 shutting down seemingly by itself recently. This
morning I saw this in the log:

- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.

Any way to tell why tomcat is shutting down?


Maybe something from this recent discussion applies:

http://marc.info/?t=12767355721&r=1&w=2

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems starting Tomcat on windows 7 64bit.

2010-07-23 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sharkanana,

On 7/22/2010 8:34 PM, sharkanana wrote:

Here is my server.xml.  It is default.


Yup, that looks like the default -- or close enough that it doesn't
matter what you may have changed.

Could you try reinstalling a fresh copy of Tomcat and starting it
without using IntelliJIdea or anything like that?


And, if you do that, and if you are under Windows 7, make sure that you download the 
installer, right-click on it for properties, "fix" the compatibility issues, and then when 
you execute it, use "run as Administrator".

Or whatever else is needed to get past the damn UAC..

Honestly, I am not quite sure what one needs/must do with Tomcat, but I've had all kinds 
of trouble installing and running stuff under Windows 7 because of that kind of thing.

UAC is a p. in the a., and I have not yet found the way to completely get rid 
of it.

...

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Shutting Down by Itself?

2010-07-23 Thread Caldarale, Charles R
> From: Robinson, Eric [mailto:eric.robin...@psmnv.com]
> Subject: Tomcat Shutting Down by Itself?
> 
> We've observed tomcat5

Tomcat 5.x.y what?  Be specific.  Also tell us the JVM you're using and the 
platform you're running on.

> shutting down seemingly by itself recently. This
> morning I saw this in the log:
> 
> - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.

There's nothing in the above that indicates Tomcat is shutting down (Tomcat 
itself doesn't use Quartz).  If one of your webapps is doing something 
antisocial such as calling System.exit(), that will cause a shutdown.

What else is in the logs?

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Fire off asynch task in Tomcat.

2010-07-23 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric,

On 7/22/2010 7:41 PM, Eric P wrote:

I'll probably go w/the email queue/database table approach.  All the
points André and Christopher raised gave me further insight into the
robustness of this approach (loose coupling w/the app, no extra lib
dependencies, emails not lost if the app goes down, etc.).  Also, the
email queue table can serve as a nice log of emails processed.


Heh, I hadn't thought of that point, which is an excellent one.

Another (potential) advantage of using a database to hold the "queue" is
that you can then choose some other programming language to do the
actual email sending if that's more convenient for you.


Too late, that suggestion was already made :
".. it does not even depend on the programming language used to write the 
email-sending job.."

You can of course imagine which language I was thinking of.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems starting Tomcat on windows 7 64bit.

2010-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sharkanana,

On 7/22/2010 8:34 PM, sharkanana wrote:
> Here is my server.xml.  It is default.

Yup, that looks like the default -- or close enough that it doesn't
matter what you may have changed.

Could you try reinstalling a fresh copy of Tomcat and starting it
without using IntelliJIdea or anything like that?

Just a vanilla Tomcat install, when you start it you should get the
default webapps like the manager and ROOT. You should get the "it works"
default Tomcat page if you browse to http://host:8080/

If that works, then try to deploy your webapps onto it.

I'm not sure what you've broken, but it appears that your classpath or
other environment has been damaged.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxJ3H8ACgkQ9CaO5/Lv0PBvHQCfUVwIX08NpjzpE6mItaBWfyLy
UhYAn3sg/prIQtIiQU6rLzlaretQvVDW
=Grrg
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Default JVM argument for tomcat

2010-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gopi,

On 7/22/2010 5:46 PM, Gopi Valleru wrote:
> Do you you know the reason why? Is there is any way that we can predict
> this.

Just a quick Google search yields many resources, including this one
which appears to have a lot of info:

http://techno-cratic.blogspot.com/2009/04/ergonomics-garbage-collection-in-java.html

> And for monitoring is there any open source with less memory foot print.

Less footprint than what?

See the above post for some monitoring tools.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxJ20YACgkQ9CaO5/Lv0PBwXgCeMbpr691FB/9IcxUGrg5iBljB
LZgAn2cnxEeja+MjXOAUhcE2NuxM+41f
=Koge
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Fire off asynch task in Tomcat.

2010-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric,

On 7/22/2010 7:41 PM, Eric P wrote:
> I'll probably go w/the email queue/database table approach.  All the
> points André and Christopher raised gave me further insight into the
> robustness of this approach (loose coupling w/the app, no extra lib
> dependencies, emails not lost if the app goes down, etc.).  Also, the
> email queue table can serve as a nice log of emails processed.

Heh, I hadn't thought of that point, which is an excellent one.

Another (potential) advantage of using a database to hold the "queue" is
that you can then choose some other programming language to do the
actual email sending if that's more convenient for you.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxJ27UACgkQ9CaO5/Lv0PAgEQCcDZlPk6RlfDPcCdANbTlvht1e
3SAAoKmHbkqZdFkPgTLYXnJkwApfQE2W
=GjNk
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat Shutting Down by Itself?

2010-07-23 Thread Robinson, Eric
 
We've observed tomcat5 shutting down seemingly by itself recently. This
morning I saw this in the log:

- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.

Any way to tell why tomcat is shutting down?

--
Eric Robinson


Disclaimer - July 23, 2010 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of . Warning: Although  has taken reasonable precautions to ensure no 
viruses are present in this email, the company cannot accept responsibility for 
any loss or damage arising from the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



change the default javac from JDT to ant

2010-07-23 Thread 王科选
 Hi, I have put the ant.jar and tools.jar into $CATALINA_HOME/lib 
directory and while compiling JSP, this error occurs:


java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain

could anyone explain how to solve this problem?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat

2010-07-23 Thread Mark Thomas
On 23/07/2010 15:56, André Warnier wrote:
> Mark Thomas wrote:
>> On 23/07/2010 15:44, André Warnier wrote:
>>> Andy Bell wrote:
 Hi

 I'm running Tomcat 6.0.24 as aa serviced on Windows XP.

 I am trying to debug Java code in the webapp Ihave deployed to Tomcat
 and I have added this line:

 -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

>>> I don't know anything about debugging Java, but considering that the
>>> attribute above is called "address", should you not be giving it a value
>>> more like "127.0.0.1:8000" ?
>>
>> Nope.
>>
> Then it should better be called "port", no ?

Feel free to raise a bug with Sun and best of luck getting them to
acknowledge it, let alone actually do something about it. I can't get
anywhere with functional issues and don't even bother with cosmetic
stuff like this.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat

2010-07-23 Thread André Warnier

Mark Thomas wrote:

On 23/07/2010 15:44, André Warnier wrote:

Andy Bell wrote:

Hi

I'm running Tomcat 6.0.24 as aa serviced on Windows XP.

I am trying to debug Java code in the webapp Ihave deployed to Tomcat
and I have added this line:

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n


I don't know anything about debugging Java, but considering that the
attribute above is called "address", should you not be giving it a value
more like "127.0.0.1:8000" ?


Nope.


Then it should better be called "port", no ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat

2010-07-23 Thread Andy Bell
Unfortunately, no, the address just means 'port' according to:

http://download.oracle.com/docs/cd/E17476_01/javase/1.3/docs/tooldocs/solaris/jdb.html

> I don't know anything about debugging Java, but considering that the
> attribute above is called "address", should you not be giving it a value
> more like "127.0.0.1:8000" ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat

2010-07-23 Thread Mark Thomas
On 23/07/2010 15:44, André Warnier wrote:
> Andy Bell wrote:
>> Hi
>>
>> I'm running Tomcat 6.0.24 as aa serviced on Windows XP.
>>
>> I am trying to debug Java code in the webapp Ihave deployed to Tomcat
>> and I have added this line:
>>
>> -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
>>
> I don't know anything about debugging Java, but considering that the
> attribute above is called "address", should you not be giving it a value
> more like "127.0.0.1:8000" ?

Nope.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat

2010-07-23 Thread André Warnier

Andy Bell wrote:

Hi

I'm running Tomcat 6.0.24 as aa serviced on Windows XP.

I am trying to debug Java code in the webapp Ihave deployed to Tomcat
and I have added this line:

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

I don't know anything about debugging Java, but considering that the attribute above is 
called "address", should you not be giving it a value more like "127.0.0.1:8000" ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: getting StandardContext in Tomcat 7

2010-07-23 Thread Mark Thomas
On 23/07/2010 15:33, martin.szna...@centrum.cz wrote:
> 
> Hello
> In Tomcat 6 I was using this code to get StandardContext:
> StandardEngine engine = (StandardEngine) 
> ServerFactory.getServer().findService("Catalina").getContainer();
> StandardContext context = (StandardContext) 
> engine.findChild(engine.getDefaultHost()).findChild(getPortalContext());
> 
> but this is no more working in Tomcat 7, because ServerFactory was removed.
> 
> My code was inspired by this HowTo:
> http://wiki.apache.org/tomcat/HowTo#How_do_I_get_direct_access_to_a_Tomcat_Realm.3F
> 
> Does anyone have idea how to get StandardContext instance in Tomcat 7?

You should be able to go via the MBean server.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



getting StandardContext in Tomcat 7

2010-07-23 Thread martin.sznapka

Hello
In Tomcat 6 I was using this code to get StandardContext:
StandardEngine engine = (StandardEngine) 
ServerFactory.getServer().findService("Catalina").getContainer();
StandardContext context = (StandardContext) 
engine.findChild(engine.getDefaultHost()).findChild(getPortalContext());

but this is no more working in Tomcat 7, because ServerFactory was removed.

My code was inspired by this HowTo:
http://wiki.apache.org/tomcat/HowTo#How_do_I_get_direct_access_to_a_Tomcat_Realm.3F

Does anyone have idea how to get StandardContext instance in Tomcat 7?

Thank you
Martin

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Debugging Tomcat

2010-07-23 Thread Andy Bell
Hi

I'm running Tomcat 6.0.24 as aa serviced on Windows XP.

I am trying to debug Java code in the webapp Ihave deployed to Tomcat
and I have added this line:

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

to the Java Options in the Tomcat 6 Properties Java Options. I've
added it as the first line in the Java Options list.

However when i point my debugger at localhost:8000 I just get a
Connection Refused message.

Am I doing something wrong?

-- 
Andy

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Re: setHeader vs addHeader problem

2010-07-23 Thread Pid
On 23/07/2010 10:10, Yoryos wrote:
> Hello
> looking at HttpServletResponse
> javadoc
> I
> can understand that the difference between setHeader and addHeader is that
> the first one overrides previous setted one (if any) and the second one just
> ads the new value to an existing one (or create an new one if it doesn't
> exists). I use the second in order to add to my responses Cache-Control
> headers.
> 
> With something like:
> response.addHeader('Cache-Control', 'public');
> response.addHeader('Cache-Control', 'stale-if-error=xxx');
> response.addHeader('Cache-Control', 'max-age=xxx');
> response.addHeader('Cache-Control', 's-maxage=xxx');
> 
> I would expect an one line response header like Cache-Control: public,
> stale-if-error=xxx, max-age=xxx, s-maxage=xxx but what I get is three
> Cache-Control headers:
> 
> *$ telnet localhost 80*
> *HEAD / HTTP/1.1*
> *Host: some.host.com\n\n*
> 
> HTTP/1.1 200 OK
> Cache-Control: stale-if-error=172800
> Cache-Control: public
> Cache-Control: max-age=60
> Cache-Control: s-maxage=40
> ETag: "custom-etag"
> Content-Type: text/html;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Fri, 23 Jul 2010 09:00:49 GMT
> Server: CustomServerName
> 
> Is this the expected behavior? 

Yes.

> I've never seen such a response header
> before. Should I issue a bug?

No.


p






signature.asc
Description: OpenPGP digital signature


RE: manual reloading a class

2010-07-23 Thread Caldarale, Charles R
> From: michel [mailto:compu...@videotron.ca]
> Subject: manual reloading a class

If this has anything to do with Tomcat, it's not clear.

> I don't want to use the automatic class reload for performance reasons,

What "automatic class reload" are you referring to?  What performance issues 
you do perceive?

> but is there some code or such that will reload a specific class?

There is a JVMTI mechanism in the 1.5 and above JREs that allows for a class to 
be "redefined"; this is typically used by profilers to insert monitoring 
instructions.  That's about it.

Within Tomcat, you can reload a webapp, but not individual classes, other than 
those derived from JSPs.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 6 SSL configuration error

2010-07-23 Thread Caldarale, Charles R
> From: aung bar hlay [mailto:aungbarh...@gmail.com]
> Subject: Tomcat 6 SSL configuration error
> 
> I've read tomcat 6 ssl configuration and
> have gone through all the steps.

Be precise - tell us exactly what you did.  "All the steps" means nothing, 
since there are two ways to set up SSL, depending on whether or not you are 
using APR.  Show us your server.xml (with comments removed and any privileged 
information masked out).

Also include the platform you're running on, and how you installed and started 
Tomcat.

Did you look in the Tomcat logs?

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 SSL configuration error

2010-07-23 Thread Stephen Lorenz
Try "http://localhost:8443/ " (i.e. without the
https).  Perhaps the sslEnabled parameter is not configured properly?

--Steve

On Fri, Jul 23, 2010 at 6:26 AM, aung bar hlay wrote:

> hi
>
> I've read tomcat 6 ssl configuration and
> have gone through all the steps.
>
> My problem is when i open browser and
> type "https://localhost:8443/";,
> then,it takes too long and at last
> display error "connection was reset".
>
> I'm using Apache Tomcat 6.0.18,
> Mozilla Firefox 3.6, Jdk 1.6.0.
>
> Please reply to me.
>


[ANN] Apache Tomcat 6.0.29 released

2010-07-23 Thread jean-frederic clere
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 6.0.29 stable. This release includes bug-fixes over Apache
Tomcat 6.0.28.

Apache Tomcat 6.0 includes new features over Apache Tomcat 5.5,
including support for the new Servlet 2.5 and JSP 2.1 specifications, a
refactored clustering implementation, advanced IO features, and
improvements in memory usage.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-60.cgi

Migration guide from Apache Tomcat 5.5.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6 SSL configuration error

2010-07-23 Thread aung bar hlay
hi

I've read tomcat 6 ssl configuration and
have gone through all the steps.

My problem is when i open browser and
type "https://localhost:8443/";,
then,it takes too long and at last
display error "connection was reset".

I'm using Apache Tomcat 6.0.18,
Mozilla Firefox 3.6, Jdk 1.6.0.

Please reply to me.


manual reloading a class

2010-07-23 Thread michel
I don't want to use the automatic class reload for performance reasons, but is 
there some code or such that will reload a specific class?



Thank you!





Re: setHeader vs addHeader problem

2010-07-23 Thread Yoryos
I forgot to mention that I use Tomcat v6.0.20

On Fri, Jul 23, 2010 at 12:10, Yoryos  wrote:

> Hello
> looking at HttpServletResponse 
> javadoc
>  I
> can understand that the difference between setHeader and addHeader is that
> the first one overrides previous setted one (if any) and the second one just
> ads the new value to an existing one (or create an new one if it doesn't
> exists). I use the second in order to add to my responses Cache-Control
> headers.
>
> With something like:
> response.addHeader('Cache-Control', 'public');
> response.addHeader('Cache-Control', 'stale-if-error=xxx');
> response.addHeader('Cache-Control', 'max-age=xxx');
> response.addHeader('Cache-Control', 's-maxage=xxx');
>
> I would expect an one line response header like Cache-Control: public,
> stale-if-error=xxx, max-age=xxx, s-maxage=xxx but what I get is three
> Cache-Control headers:
>
> *$ telnet localhost 80*
> *HEAD / HTTP/1.1*
> *Host: some.host.com\n\n*
>
> HTTP/1.1 200 OK
> Cache-Control: stale-if-error=172800
> Cache-Control: public
> Cache-Control: max-age=60
> Cache-Control: s-maxage=40
> ETag: "custom-etag"
> Content-Type: text/html;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Fri, 23 Jul 2010 09:00:49 GMT
> Server: CustomServerName
>
> Is this the expected behavior? I've never seen such a response header
> before. Should I issue a bug?
>
>


setHeader vs addHeader problem

2010-07-23 Thread Yoryos
Hello
looking at HttpServletResponse
javadoc
I
can understand that the difference between setHeader and addHeader is that
the first one overrides previous setted one (if any) and the second one just
ads the new value to an existing one (or create an new one if it doesn't
exists). I use the second in order to add to my responses Cache-Control
headers.

With something like:
response.addHeader('Cache-Control', 'public');
response.addHeader('Cache-Control', 'stale-if-error=xxx');
response.addHeader('Cache-Control', 'max-age=xxx');
response.addHeader('Cache-Control', 's-maxage=xxx');

I would expect an one line response header like Cache-Control: public,
stale-if-error=xxx, max-age=xxx, s-maxage=xxx but what I get is three
Cache-Control headers:

*$ telnet localhost 80*
*HEAD / HTTP/1.1*
*Host: some.host.com\n\n*

HTTP/1.1 200 OK
Cache-Control: stale-if-error=172800
Cache-Control: public
Cache-Control: max-age=60
Cache-Control: s-maxage=40
ETag: "custom-etag"
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 23 Jul 2010 09:00:49 GMT
Server: CustomServerName

Is this the expected behavior? I've never seen such a response header
before. Should I issue a bug?


Re: Tomcat AJP vs mod_jk's max_pool_size

2010-07-23 Thread Rainer Jung

On 23.07.2010 04:07, Imran Khan wrote:

Hi,

I am currently using apache tomcat 5.5 using mod_jk to connect with apache
2.2.

I am curious to understand how the AJP 1.3 connector works. Basically I
would like to know if maxThreads attribute has the same meaning with the AJP
connector as it does with standard HTTP connectors. I would like to increase
the number of connectors, but I noticed there is also connection_pool_size
and connection_pool_minsize on the workers.properties file.

What is the relationship between the AJP connectors maxThreads and the
connection_pool_size?


The configuration of the connection pool size in workers.properties is 
per Apache *process*. On most platforms Apache has a dynamically managed 
number of processes, so in total there will be much more connections 
than the configured pool size. Pools are not shared over process 
boundaries. The most notable exception is Windows, since the Apache MPM 
for Windows uses a single process with lots of threads.


mod_jk will automatically detect how many threads per process you have 
and set the pool size to this value, see docs at:


http://tomcat.apache.org/connectors-doc/reference/workers.html

So you should fiddle with the pool size on the mod_jk side only, if you 
want to artificially restrict it. You might want to set the minimum pool 
size though.


For Tomcat the story is different, the max thread pool size is the 
maximum number of threads available to handle connections coming in on 
the respective Connector port. Since AJP uses persistent connections, 
you usually have much more connections, than in-flight requests. The 
numbers get even bigger, if you have a farm of Apache servers in front. 
Each one will consume Tomcat threads.


A good starting point for the mod_jk configuration is the example 
configuration contained in the mod_jk source download for version 
1.2.30. Previous versions do not include a production ready example config.


Regards,

Rainer


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Spring security configuration in web.xml results in 403 error

2010-07-23 Thread André Warnier

Ashish Jain wrote:

any takers for this Q???

On Thu, Jul 15, 2010 at 1:38 PM, Ashish Jain  wrote:


Hi,

I have an application which uses non interactive login and hence utilizes
NONLogin Authenticator in tomcat. Here is a snippet from web.xml.


contextConfigLocation
/WEB-INF/applicationContext-security.xml



springSecurityFilterChain

org.springframework.web.filter.DelegatingFilterProxy



springSecurityFilterChain
/*




org.springframework.web.context.ContextLoaderListener



   NONE
   cas-authorize




Protect JSPs
*.jsp


testUsers




testUsers


however I see that container security is invoked before any spring related
stuff. 


Exactly.  It is not specific to to spring.  The container security is invoked before even 
invoking the application, of which servlet filters are the first layer.


Since it is a Non interactive login Subject is not populated with any

principals
and hence tomcat is unable to authorize the access to resource. My Question
is

How can I revert the security mechanism so that Spring security is invoked
before tomcat security.



I don't think you can.  As they say in French, you can't have at the same time the butter, 
and the money of the butter.


If you want your first filter to be called in order to authenticate the user, then you'll 
have to remove the container security, and do your own security check in a second filter, 
invoked after the filter you already have has set the user-id.


Alternatively (but I don't know that part very well, so don't take my word for it), you 
would have to remove your first filter, and use/create a Realm which authenticates the 
user, which container-based security could then use.

See the standard
  
for an example.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: isapi_redirect.dll fail in SSO on high cpu load

2010-07-23 Thread Yun Feng Chua

Yes it is a IIS issue. 
and i think i just solve it. 

I increase the "Max number of Worker Processes" from 1 to 3 in the Default 
Application Pool. 
and it works.

It will not prompt for authentication immediately anymore, but will just try to 
serve the page when the cpu is not 100%.

I should say that the web application is very SQL intensive.

 If the application makes a large number of long blocking calls (e.g. long 
SQL/Oracle Queries), more worker 
processes

will help (assuming that the backend can handle the connection load).

> From: dbl...@dblock.org
> To: users@tomcat.apache.org
> Date: Wed, 21 Jul 2010 09:41:10 -0400
> Subject: RE: isapi_redirect.dll fail in SSO on high cpu load
> 
> I am going to guess that some policy in Windows rejects the high volume of 
> logons, too many connections or something of that kind. It's most likely not 
> a Tomcat problem. Andre suggestions are pretty good in terms of isolating it. 
> I would start by stressing IIS alone with a static page in it.
> 
> Since you're running on Windows, you might as well get rid of IIS and replace 
> it with a Waffle filter - http://waffle.codeplex.com. 
> 
> dB. @ dblock.org 
> Moscow|Geneva|Seattle|New York
> 
> 
> 
> -Original Message-
> From: Yun Feng Chua [mailto:yf_c...@hotmail.com] 
> Sent: Wednesday, July 21, 2010 3:07 AM
> To: users@tomcat.apache.org
> Subject: isapi_redirect.dll fail in SSO on high cpu load
> 
> 
> Hi, 
> 
> Currently using Tomcat 5.5 and isapi_redirect.dll 1.2.14 in IIS 6.0
> Configure with IIS integrated authentication for SSO.
> 
> Notice that under high cpu load in the server, 100% util, the website prompt 
> for authentication.
> When the cpu load subsided, the SSO is working. 
> 
> Any ideas why it prompt for authentication under heavy cpu load?
> 
> 
> 
> thank you 
> 
> yun feng, chua
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  

Re: SSL, mod_proxy_ajp and AJP connectors query

2010-07-23 Thread Brett Delle Grazie
To Christopher and Rainer,

Thanks, that resolved the issue completely.

Best Regards,

Brett

On Thu, 2010-07-22 at 17:35 -0400, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Brett,
> 
> On 7/22/2010 1:31 PM, Brett Delle Grazie wrote:
> > Tomcat 6.0.28 (binary distribution from apache).
> >
> > My question is, in the Tomcat server.xml, do I require _two_ AJP
> > connectors as follows:
> > 
> > (executor omitted for simplicity)
> > 
> > 
> >  >enableLookups="false"
> >port="8009" protocol="org.apache.coyote.ajp.AjpAprProtocol"
> >redirectPort="8010" 
> >proxyPort="80" />
> > 
> >  >enableLookups="false"
> >port="8010" protocol="org.apache.coyote.ajp.AjpAprProtocol" 
> >scheme="https" secure="true" 
> >proxyPort="443" />
> 
> In addition to Rainer's notes, I have a couple of comments:
> 
> It's not necessary to specify
> protocol="org.apache.coyote.ajp.AjpAprProtocol" in the . If
> libapr isn't available, you'll be left with no working connectors. If,
> instead, you simply have protocol="AJP/1.3", your  can
> fall-back to the BIO (i.e. blocking pure-Java connector).
> 
> Your redirectPort should point to the port that is visible to the
> outside world, not to the port that is being used for Tomcat. Probably,
> your redirectPort should be set to "443" so that requests will be
> redirected (remember, via the user agent) and hit your Apache httpd
> instance out in front of Tomcat. If you specify "8010", and that port is
> blocked to the outside world, you'll find that your users will receive a
> "cannot contact server" message. if port 8010 is /not/ blocked, they'll
> get a weird SSL error saying that the server isn't speaking HTTPS
> because it's speaking AJP!
> 
> Hope that helps,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkxIuZcACgkQ9CaO5/Lv0PBAfwCfQN9zGWDLjE8flIPh3xpmUoWx
> MrUAn1Epj1dKmzh0/SAD2KI+C44i2bvX
> =xF9L
> -END PGP SIGNATURE-
> 

-- 
Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org