Upgrade from mod_jk to mod_proxy_ajp

2007-11-09 Thread Gmail User
I am having a problem with file uploads after upgrading from httpd-2.0.5x  
to httpd-2.2.6 and from mod_jk to mod_proxy_ajp. The Tomcat version is  
5.15--for what it is worth--but that is one thing that has NOT changed. I  
am getting this error:



"Processing of multipart/form-data request failed. Stream ended  
unexpectedly"



I searched the mailing archives, but nothing seems to help.

Before I used to be able to upload megabyte-sized files; now, the only  
test that worked was 4KB (40KB file failed). I am guessing, the problem  
has more to do with change to mod_proxy_ajp than with httpd upgrade, but I  
may be wrong (a ProxyPass that worked correctly in 2.0.5x, no longer works  
under 2.2.6). Anyone has any ideas of what I have missed in change-over?  
Does this have anything to do with 8KB mod_proxy buffer?



My httpd config is trivial (?):


	ProxyPass	/	balancer://cluster/	stickysession=JSESSIONID|jsessionid  
nofailover=On


BalancerMember ajp://localhost:8009



I also tried adding:

SetEnv  proxy-sendcl1
SetEnv  proxy-sendchunked   1

then:

SetEnv  force-proxy-request-1.0 1
SetEnv  proxy-nokeepalive 1

but neither the first two nor all four settings do anything different.


Any ideas would be appreciated.


TIA,

Ed

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and Redirects

2007-11-09 Thread Bill Barker

"Dwebb" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi All,
>
> I have a question about how Tomcat handles redirects.  We have a vendor
> who wrote an application for us and they tell us that they always use
> the same method of issuing redirects in their code.
>
> What we have seen is on certain requests from a WAP handset the
> application will issue a redirect and Tomcat will issue it as an HTTP
> 302 redirect.  On other handsets for some reason these same redirects
> are issued as an HTTP 200 with an embedded link that the user has to
> click on to redirect.
>
> We believe this may be to the POST headers that the handset is sending
> but haven't managed to narrow it down to which.
>
> We would like all of these redirects to be done with the automatic 302
> redirect.
>

Tomcat always sends a 302 redirect when response.sendRedirect(newURL); is 
called.  However, a lot of user-agents wrongly follow the redirect with a 
GET when the initial request was a POST.  I'm guessing that your vendor has 
some special code that is attempting to work around this.

> Is there any way to force these redirects to be done with the HTTP 302?
>
> We are running Tomcat 5.5.11, Java 1.4.2_04-b05 on Linux 2.6.9-34.ELsmp
>
> Cheers,
>
> Danny
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp done processing!

2007-11-09 Thread Bill Barker

"renen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi Folks,
>
> I want to tell the browser / Tomcat that I'm done processing my JSP page
> (ie, the little spinning icon in Firefox should stop spinning!).
>
> However, I still want to log a couple of things (duration, browser info
> etc). But, the users' browser doesn't need to be tied up while this 
> happens.
>
> One way to do that would seem to be to call response.flush(). However,
> Tomcat seems to have issues with this (google: response.flush tomcat).
> Indeed, it doesn't seem to do anything at all.
>
> The one way I did manage to communicate that I was done was to call:
>
> response.getWriter().flush();
> response.getWriter().close();
>
> But, on certain (tiny) pages, it seems to kill all the content. Which is a
> bit unfortunate!
>
> Is there a way that I can signal to Tomcat / the browser / the servlet
> filters, that my JSP page is done?
>

<% out.close(); %>

The problem is that your page is writing to the JspWriter implicit object 
"out", which on the page below is buffering the first 8Kb (the default 
value) of the page before sending it to the request.getWriter().  So when 
you close request.getWriter(), you prevent the JspWriter from sending it's 
buffered output.  Also note, that you have to make certain that there are no 
characters in the file (not even a newline) after the expression <% 
out.close() %>, or you will start filling up your logs with IOExceptions.

This will tell Tomcat to tell the browser that this is all the output it 
will receive.  Unless you are doing fancy Response wrapping, your Filters 
will find out that you are done in the usual way when you fall off the end 
of the page.



>
> The page that doesn't render when those two lines of code are included is 
> as
> follows:
>
> <%@ page language="java" import="za.co.oneTwoOne.web.*"
> pageEncoding="ISO-8859-1"%>
> <%
> Session myPage = new Session(request, response);
> pageContext.setAttribute("myPage", myPage);
> %>
> 
> 
>  
>ProcessID <%=myPage.getParameter("ProcessID") %> took
> <%=myPage.getInt("exec ProcessGetExecutionTime ?", "ProcessID*") %> ms to
> serve.
>  
> 
>
> <%
> myPage.terminate();
> %>
>
>
> I really appreciate your input!
>
> Renen.
>
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 contractor...

2007-11-09 Thread Mike Cronin
We're looking to contract a specialist to assist us in our move to Tomcat
6.0.

 

Please feel free to email me directly at [EMAIL PROTECTED]

 

Thank you for your interest.

 

Best regards,

 

Mike Cronin

 

Fax.com

"The New Way To Fax!"

  www.fax.com

 

Confidential: This electronic message and all contents contain information
from Fax.com, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee(s) only.  If you are not an addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender by
reply e-mail and destroy the original message and all copies. Thank you.

 



Re: Security-Manager problem

2007-11-09 Thread Mark Thomas
Leucht, Axel wrote:
> Hi, 
> 
> I'm having a weird problem with my webApp under Tomact with a SecurityManager 
> (SM).
> 
> When no SM is enabled, my app runs fine. When I do start tomcat with a 
> security manager I encounter one AccessControlException left which is:
> java.security.AccessControlException: access denied (java.io.FilePermission 
> $(catalina_home)\common\lib\servlet-api.jar read)
>   at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
>   at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>   at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

Where is the Jar with these classes located?

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat and Redirects

2007-11-09 Thread Caldarale, Charles R
> From: Tony Fountain [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat and Redirects
> 
> Just to clarify, you can run Java programs compiled in 1.4, 
> but the JVM installed on the machine running the app should
> be 1.5 or greater.

That's not true either.  All you need to run Tomcat 5.5 on a 1.4 JVM is
the small compatibility kit available on the Tomcat download page.
Tomcat 5.5 works perfectly well on JRE 1.4.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat and Redirects

2007-11-09 Thread Tony Fountain
Just to clarify, you can run Java programs compiled in 1.4, but the JVM
installed on the machine running the app should be 1.5 or greater.  I'm
doing that now with a commercial app we purchased (Apache Tomcat 5.5.23,
JVM 1.5.0_12-b04 but the application itself is compiled under Java 1.4
and runs just fine.

Thanks,
Tony Fountain
Manager, Database Administration
Benefit Concepts, Inc.
(419) 244-9936 x9010 (office)
(419) 249-7221 (fax)

-Original Message-
From: Michael [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 1:45 PM
To: Tomcat Users List
Subject: Re: Tomcat and Redirects

Dwebb wrote:
> We are running Tomcat 5.5.11, Java 1.4.2_04-b05 on Linux 
> 2.6.9-34.ELsmp

Hi Danny,

you shouldn't run tomcat 5.5.x with JAva 1.4.
It's designed to work with Java 5 and up.

bye
-- 

 OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This Email has been scanned for all viruses by PAETEC Email Scanning
Services, utilizing MessageLabs proprietary SkyScan infrastructure. For
more information on a proactive anti-virus service working around the
clock, around the globe, visit http://www.paetec.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and Redirects

2007-11-09 Thread Michael

Dwebb wrote:

We are running Tomcat 5.5.11, Java 1.4.2_04-b05 on Linux 2.6.9-34.ELsmp


Hi Danny,

you shouldn't run tomcat 5.5.x with JAva 1.4.
It's designed to work with Java 5 and up.

bye
--
 OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: speed up the server

2007-11-09 Thread mgainty
+1
also..to monitor memory usage run 
%JAVA_HOME%/bin/JConsole
(and watch the individual memory categories..)

M--
- Original Message - 
Wrom: CXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBO
To: "Tomcat Users List" 
Sent: Friday, November 09, 2007 12:45 PM
Subject: Re: speed up the server


> Just I need more info about where it was deployed
> before it was deployed. You can not run a web app
> without the container so the question might be the
> differences in the previous environment and the the
> one you "deployed" into.
> Same questions as below but for "both" environments.
> The one where it was performing better and the one
> where the performance is poor or not meeting
> expectations.
> 
> Regards,
> -Tony
> 
> --- David kerber <[EMAIL PROTECTED]> wrote:
> 
> > The first place I'd look is the database...
> > 
> > tbt wrote:
> > > Hi,
> > >
> > > The OS is windows XP
> > > tomcat version 6
> > > java version 1.5
> > > database mysql
> > > memory: 3GB
> > > processor: 2.3GHz
> > >
> > > it was working very fast before being deployed.
> > About 30 people login
> > > simultaneously to this application. Once this
> > happens the application is
> > > very slow.
> > >
> > >
> > >
> > > ben short-2 wrote:
> > >   
> > >> So your webapp ran pretty fast before it was
> > deployed?
> > >>
> > >> Your going to need to provide much more
> > information. Like OS and
> > >> versions of tomcat, java, database etc and maybe
> > some metrics on how
> > >> long it takes to process the requests.
> > >>
> > >> Also you will want to use a profiler to figure
> > out what part of the
> > >> app is 'taking' so long.
> > >>
> > >> With out knowing such things all we can really
> > say is...
> > >>
> > >> Buy a faster machine.
> > >> Code you app so it works faster.
> > >>
> > >> ;)
> > >>
> > >> Ben
> > >>
> > >>
> > >> On Nov 7, 2007 10:21 AM, tbt
> > <[EMAIL PROTECTED]> wrote:
> > >> 
> > >>> Hi
> > >>>
> > >>> I'm a newbie to tomcat and i'm using it for a
> > web application. But
> > >>> currently
> > >>> the application is running a bit slow once
> > deployed. Are there any ways
> > >>> to
> > >>> speed up the request/response time in tomcat.
> > >>>
> > >>> Thanks
> > >>> --
> > >>> View this message in context:
> > >>>
> >
> http://www.nabble.com/speed-up-the-server-tf4763782.html#a13624531
> > >>> Sent from the Tomcat - User mailing list archive
> > at Nabble.com.
> > >>>
> > >>>
> > >>>
> >
> -
> > >>> To start a new topic, e-mail:
> > users@tomcat.apache.org
> > >>> To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >>> For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >>>
> > >>>
> > >>>   
> > >>
> >
> -
> > >> To start a new topic, e-mail:
> > users@tomcat.apache.org
> > >> To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >> For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >>
> > >>
> > >>
> > >> 
> > >
> > >   
> > 
> > 
> > 
> >
> -
> > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and Redirects

2007-11-09 Thread Martin Gainty
the quick answer is to handle the response-code in web.xml e.g.


  302
  /axis2-web/Error/error302.jsp


M--
- Original Message - 
From: "Dwebb" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 09, 2007 11:35 AM
Subject: Tomcat and Redirects


> Hi All,
> 
> I have a question about how Tomcat handles redirects.  We have a vendor
> who wrote an application for us and they tell us that they always use
> the same method of issuing redirects in their code.  
> 
> What we have seen is on certain requests from a WAP handset the
> application will issue a redirect and Tomcat will issue it as an HTTP
> 302 redirect.  On other handsets for some reason these same redirects
> are issued as an HTTP 200 with an embedded link that the user has to
> click on to redirect.  
> 
> We believe this may be to the POST headers that the handset is sending
> but haven't managed to narrow it down to which.
> 
> We would like all of these redirects to be done with the automatic 302
> redirect.  
> 
> Is there any way to force these redirects to be done with the HTTP 302?
> 
> We are running Tomcat 5.5.11, Java 1.4.2_04-b05 on Linux 2.6.9-34.ELsmp
> 
> Cheers,
> 
> Danny
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp done processing!

2007-11-09 Thread Lucas Galfaso
Hi,
  Never do a
response.getWriter().close();
  A good design would not ask you to close something that you did not
open, and this is one of those cases.
  The full response is sent when your page "releases the thread" that
is working on this request. This is, if you want to do some processing
and you want to send the response to the browser at the same time, you
have to create a new thread.

Regards,
 -lg


On Nov 9, 2007 12:09 PM, renen <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I want to tell the browser / Tomcat that I'm done processing my JSP page
> (ie, the little spinning icon in Firefox should stop spinning!).
>
> However, I still want to log a couple of things (duration, browser info
> etc). But, the users' browser doesn't need to be tied up while this happens.
>
> One way to do that would seem to be to call response.flush(). However,
> Tomcat seems to have issues with this (google: response.flush tomcat).
> Indeed, it doesn't seem to do anything at all.
>
> The one way I did manage to communicate that I was done was to call:
>
> response.getWriter().flush();
> response.getWriter().close();
>
> But, on certain (tiny) pages, it seems to kill all the content. Which is a
> bit unfortunate!
>
> Is there a way that I can signal to Tomcat / the browser / the servlet
> filters, that my JSP page is done?
>
>
> The page that doesn't render when those two lines of code are included is as
> follows:
>
> <%@ page language="java" import="za.co.oneTwoOne.web.*"
> pageEncoding="ISO-8859-1"%>
> <%
> Session myPage = new Session(request, response);
> pageContext.setAttribute("myPage", myPage);
> %>
> 
> 
>   
> ProcessID <%=myPage.getParameter("ProcessID") %> took
> <%=myPage.getInt("exec ProcessGetExecutionTime ?", "ProcessID*") %> ms to
> serve.
>   
> 
>
> <%
> myPage.terminate();
> %>
>
>
> I really appreciate your input!
>
> Renen.
>
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: speed up the server

2007-11-09 Thread Tony Anecito
Just I need more info about where it was deployed
before it was deployed. You can not run a web app
without the container so the question might be the
differences in the previous environment and the the
one you "deployed" into.
Same questions as below but for "both" environments.
The one where it was performing better and the one
where the performance is poor or not meeting
expectations.

Regards,
-Tony

--- David kerber <[EMAIL PROTECTED]> wrote:

> The first place I'd look is the database...
> 
> tbt wrote:
> > Hi,
> >
> > The OS is windows XP
> > tomcat version 6
> > java version 1.5
> > database mysql
> > memory: 3GB
> > processor: 2.3GHz
> >
> > it was working very fast before being deployed.
> About 30 people login
> > simultaneously to this application. Once this
> happens the application is
> > very slow.
> >
> >
> >
> > ben short-2 wrote:
> >   
> >> So your webapp ran pretty fast before it was
> deployed?
> >>
> >> Your going to need to provide much more
> information. Like OS and
> >> versions of tomcat, java, database etc and maybe
> some metrics on how
> >> long it takes to process the requests.
> >>
> >> Also you will want to use a profiler to figure
> out what part of the
> >> app is 'taking' so long.
> >>
> >> With out knowing such things all we can really
> say is...
> >>
> >> Buy a faster machine.
> >> Code you app so it works faster.
> >>
> >> ;)
> >>
> >> Ben
> >>
> >>
> >> On Nov 7, 2007 10:21 AM, tbt
> <[EMAIL PROTECTED]> wrote:
> >> 
> >>> Hi
> >>>
> >>> I'm a newbie to tomcat and i'm using it for a
> web application. But
> >>> currently
> >>> the application is running a bit slow once
> deployed. Are there any ways
> >>> to
> >>> speed up the request/response time in tomcat.
> >>>
> >>> Thanks
> >>> --
> >>> View this message in context:
> >>>
>
http://www.nabble.com/speed-up-the-server-tf4763782.html#a13624531
> >>> Sent from the Tomcat - User mailing list archive
> at Nabble.com.
> >>>
> >>>
> >>>
>
-
> >>> To start a new topic, e-mail:
> users@tomcat.apache.org
> >>> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >>> For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>>
> >>>
> >>>   
> >>
>
-
> >> To start a new topic, e-mail:
> users@tomcat.apache.org
> >> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>
> >>
> >>
> >> 
> >
> >   
> 
> 
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat and Redirects

2007-11-09 Thread Dwebb
Hi All,

I have a question about how Tomcat handles redirects.  We have a vendor
who wrote an application for us and they tell us that they always use
the same method of issuing redirects in their code.  

What we have seen is on certain requests from a WAP handset the
application will issue a redirect and Tomcat will issue it as an HTTP
302 redirect.  On other handsets for some reason these same redirects
are issued as an HTTP 200 with an embedded link that the user has to
click on to redirect.  

We believe this may be to the POST headers that the handset is sending
but haven't managed to narrow it down to which.

We would like all of these redirects to be done with the automatic 302
redirect.  

Is there any way to force these redirects to be done with the HTTP 302?

We are running Tomcat 5.5.11, Java 1.4.2_04-b05 on Linux 2.6.9-34.ELsmp

Cheers,

Danny


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Security-Manager problem

2007-11-09 Thread Leucht, Axel
Hi, 

I'm having a weird problem with my webApp under Tomact with a SecurityManager 
(SM).

When no SM is enabled, my app runs fine. When I do start tomcat with a security 
manager I encounter one AccessControlException left which is:
java.security.AccessControlException: access denied (java.io.FilePermission 
$(catalina_home)\common\lib\servlet-api.jar read)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
at 
org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352)
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at 
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:122)
at 
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:144)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:738)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

I assumed that files under $(catalina_home)/common do have all permissions 
granted due to 
grant codeBase "file:${catalina.home}/common/-" {
permission java.security.AllPermission;
};

But this doesn't work and also it doesn't work when I enable the permission 
explicitly for my webApp.
permission java.io.FilePermission 
"$(catalina_home)\common\lib\servlet-api.jar","read";
TC then does "Marking this application unavailable due to previous error(s)".

PS: $(catalina_home) is an absolute path on my windows machine to that 
tc-directory.

/Axel

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jsp done processing!

2007-11-09 Thread renen
Hi Folks,

I want to tell the browser / Tomcat that I'm done processing my JSP page
(ie, the little spinning icon in Firefox should stop spinning!). 

However, I still want to log a couple of things (duration, browser info
etc). But, the users' browser doesn't need to be tied up while this happens.

One way to do that would seem to be to call response.flush(). However,
Tomcat seems to have issues with this (google: response.flush tomcat).
Indeed, it doesn't seem to do anything at all.

The one way I did manage to communicate that I was done was to call:

response.getWriter().flush();
response.getWriter().close();

But, on certain (tiny) pages, it seems to kill all the content. Which is a
bit unfortunate!

Is there a way that I can signal to Tomcat / the browser / the servlet
filters, that my JSP page is done?


The page that doesn't render when those two lines of code are included is as
follows:

<%@ page language="java" import="za.co.oneTwoOne.web.*"
pageEncoding="ISO-8859-1"%>
<%
Session myPage = new Session(request, response);
pageContext.setAttribute("myPage", myPage);
%>


  
ProcessID <%=myPage.getParameter("ProcessID") %> took
<%=myPage.getInt("exec ProcessGetExecutionTime ?", "ProcessID*") %> ms to
serve.
  


<%
myPage.terminate();
%>


I really appreciate your input!

Renen.





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: speed up the server

2007-11-09 Thread David kerber

The first place I'd look is the database...

tbt wrote:

Hi,

The OS is windows XP
tomcat version 6
java version 1.5
database mysql
memory: 3GB
processor: 2.3GHz

it was working very fast before being deployed. About 30 people login
simultaneously to this application. Once this happens the application is
very slow.



ben short-2 wrote:
  

So your webapp ran pretty fast before it was deployed?

Your going to need to provide much more information. Like OS and
versions of tomcat, java, database etc and maybe some metrics on how
long it takes to process the requests.

Also you will want to use a profiler to figure out what part of the
app is 'taking' so long.

With out knowing such things all we can really say is...

Buy a faster machine.
Code you app so it works faster.

;)

Ben


On Nov 7, 2007 10:21 AM, tbt <[EMAIL PROTECTED]> wrote:


Hi

I'm a newbie to tomcat and i'm using it for a web application. But
currently
the application is running a bit slow once deployed. Are there any ways
to
speed up the request/response time in tomcat.

Thanks
--
View this message in context:
http://www.nabble.com/speed-up-the-server-tf4763782.html#a13624531
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: How to configure ssl vhosts in server.xml?

2007-11-09 Thread Mike Schmelzer
As I've wrote I already did it like Apache says. It works somehow but it 
collides with the virtual hosts in the mod_jk.conf.

Mike

 Original-Nachricht 
> Datum: Fri, 9 Nov 2007 09:51:29 +
> Von: Nuno Manuel Martins <[EMAIL PROTECTED]>
> An: Tomcat Users List 
> Betreff: RE: How to configure ssl vhosts in server.xml?

> 
> Hi,
> 
> Try to do as Apache says and define it like this:
> 
> NameVirtualHost *:443
> 
>   ServerName devsecure.bla.com
> [...]
> 
> 
> 
> ServerName tstsecure.bla.com
> [...]
> 
> 
> Hope it helps.
> 
> Regards,
> Nuno
> 
> -Original Message-
> From: Mike Schmelzer [mailto:[EMAIL PROTECTED]
> Sent: sexta-feira, 9 de Novembro de 2007 9:10
> To: users@tomcat.apache.org
> Subject: How to configure ssl vhosts in server.xml?
> 
> Hi!
> 
> I have a Apache Tomcat configuration with vhosts in Tomcats server.xml.
> Those vhost entries will be generated in the mod_jk.conf during Tomcat start.
> 
> So far so good, it works pretty good.
> 
> Now I have to configure ssl. At my first try I did that in the
> ssl_vhost.conf of the Apache:
> 
> 
> ServerName devsecure.bla.com
> DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
> ErrorLog /var/log/apache2/error_log
> TransferLog /var/log/apache2/access_log
> SSLEngine on
> SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
> SSLCertificateKeyFile
> /etc/apache2/ssl.key/devwww.bla.com_server.key
> CustomLog /var/log/apache2/ssl_request_log  ssl_combined
> 
> 
> This works too - somehow... However there is a conflict with the vhost
> definitions in my mod_jk.conf. A warning is displayed when Apache starts:
> 
> [warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost
> devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost
> directive
> 
> I guess it would be helpful to implement the ssl vhosts in my server.xml.
> This should generate another vhost entry in the mod_jk.conf including the
> needed ssl properties.
> 
> The problem is, I don't know how (parameters, attributes, syntax). Please
> help! Maybe there is an example or something.
> 
> Cheers,
> Mike
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to configure ssl vhosts in server.xml?

2007-11-09 Thread Nuno Manuel Martins

Hi,

Try to do as Apache says and define it like this:

NameVirtualHost *:443

  ServerName devsecure.bla.com
[...]



ServerName tstsecure.bla.com
[...]


Hope it helps.

Regards,
Nuno

-Original Message-
From: Mike Schmelzer [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 9 de Novembro de 2007 9:10
To: users@tomcat.apache.org
Subject: How to configure ssl vhosts in server.xml?

Hi!

I have a Apache Tomcat configuration with vhosts in Tomcats server.xml. Those 
vhost entries will be generated in the mod_jk.conf during Tomcat start.

So far so good, it works pretty good.

Now I have to configure ssl. At my first try I did that in the ssl_vhost.conf 
of the Apache:


ServerName devsecure.bla.com
DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine on
SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/devwww.bla.com_server.key
CustomLog /var/log/apache2/ssl_request_log  ssl_combined


This works too - somehow... However there is a conflict with the vhost 
definitions in my mod_jk.conf. A warning is displayed when Apache starts:

[warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost 
devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost 
directive

I guess it would be helpful to implement the ssl vhosts in my server.xml. This 
should generate another vhost entry in the mod_jk.conf including the needed ssl 
properties.

The problem is, I don't know how (parameters, attributes, syntax). Please help! 
Maybe there is an example or something.

Cheers,
Mike
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: speed up the server

2007-11-09 Thread Pid
Peter Crowther wrote:
>> From: tbt [mailto:[EMAIL PROTECTED]
>> it was working very fast before being deployed. About 30 people login
>> simultaneously to this application. Once this happens the
>> application is very slow.
> 
> How many concurrent users do you test with, before you deploy?  30?  Or one 
> developer checking the functionality using a web browser?

... and a Tomcat install on his own computer, (classic blunder #238).

p


> What happens if you use a tool like JMeter to generate a load on your test 
> server that's similar to the load on your real server?  Is the test server 
> fast or slow?  If the test server's fast, the issue is probably to do with 
> the configuration of the production server.  If the test server's slow... my 
> guess is that the issue is to do with your application :-).
> 
> Have you tried:
> 
> - Profiling your application to see whether any parts are particularly slow;
> 
> - Checking the load on the mysql database to see whether you're saturating 
> the database with queries, or whether concurrency issues are limiting the 
> throughput on the database;
> 
> - Running the Performance Monitor from Administrative Tools and seeing 
> whether you're short of CPU (sustained CPU load over 80%), RAM (Pages/sec 
> consistently high or Memory/Available Bytes consistently below 10% of system 
> RAM) or disk I/O (physical disk queue length often greater than 2 per spindle 
> in your disk subsystem)?  This will give you a much better clue as to where 
> to start looking for the problem.
> 
> - Peter
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: speed up the server

2007-11-09 Thread Peter Crowther
> From: tbt [mailto:[EMAIL PROTECTED]
> it was working very fast before being deployed. About 30 people login
> simultaneously to this application. Once this happens the
> application is very slow.

How many concurrent users do you test with, before you deploy?  30?  Or one 
developer checking the functionality using a web browser?

What happens if you use a tool like JMeter to generate a load on your test 
server that's similar to the load on your real server?  Is the test server fast 
or slow?  If the test server's fast, the issue is probably to do with the 
configuration of the production server.  If the test server's slow... my guess 
is that the issue is to do with your application :-).

Have you tried:

- Profiling your application to see whether any parts are particularly slow;

- Checking the load on the mysql database to see whether you're saturating the 
database with queries, or whether concurrency issues are limiting the 
throughput on the database;

- Running the Performance Monitor from Administrative Tools and seeing whether 
you're short of CPU (sustained CPU load over 80%), RAM (Pages/sec consistently 
high or Memory/Available Bytes consistently below 10% of system RAM) or disk 
I/O (physical disk queue length often greater than 2 per spindle in your disk 
subsystem)?  This will give you a much better clue as to where to start looking 
for the problem.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to configure ssl vhosts in server.xml?

2007-11-09 Thread Mike Schmelzer
Hi!

I have a Apache Tomcat configuration with vhosts in Tomcats server.xml. Those 
vhost entries will be generated in the mod_jk.conf during Tomcat start.

So far so good, it works pretty good.

Now I have to configure ssl. At my first try I did that in the ssl_vhost.conf 
of the Apache:


ServerName devsecure.bla.com
DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine on
SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/devwww.bla.com_server.key
CustomLog /var/log/apache2/ssl_request_log  ssl_combined


This works too - somehow... However there is a conflict with the vhost 
definitions in my mod_jk.conf. A warning is displayed when Apache starts:

[warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost 
devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost 
directive

I guess it would be helpful to implement the ssl vhosts in my server.xml. This 
should generate another vhost entry in the mod_jk.conf including the needed ssl 
properties.

The problem is, I don't know how (parameters, attributes, syntax). Please help! 
Maybe there is an example or something.

Cheers,
Mike
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: j_security_check redirect after login

2007-11-09 Thread Pid
Nicholas Sushkin wrote:
> On Thursday 08 November 2007, you wrote: 
> 
>> The question I had was what happens when you directly request the login
>> form and successfully login.
> 
> Tomcat will give you an error page saying something along the lines "the 
> login page was accessed directly". It won't let you login successfully. 
> Tomcat does not know where to redirect you.
> 

Easiest way to prevent direct access of the login page is to put it
somewhere inaccessible, like "WEB-INF/login/form.jsp".  Tomcat
authentication valves will still forward to the page, but it won't be
available to request.


It still won't prevent attempts to access the submission URL
(j_security_check) directly, which causes the 'invalid direct reference
to login form' error that has been referred to, earlier in the thread.

This is usually the result of requesting a protected page, then not
submitting the form until session timeout has occurred, after which the
original saved request may have been purged.


There's another variation, where "/protected/resource/j_security_check"
is accessed as by GET and is assigned as the url of the saved request
which on restore, produces a 404.  I've seen this in our logs, but am
not sure how it occurs.


p

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: virtual host for subdomains

2007-11-09 Thread Pid
Kwok Ng wrote:
> Hi folks,
> 
> I notice some BLOG websites assign the subdomains to the registered users, 
> like
> 
> user1.mydomain.com
> user2.mydomain.com
> 
> If I use the tomcat to do this, do I use the virtual host
> configuration?  If so, do I use the same docBase to point to one war
> file with different host names?

or, put a single ROOT.war in the host you assign as the defaultHost and
have the war parse the domain name to determine the user/blogname.

p


> Thanks!
> 
> Billy
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]