Re: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
 Hi,
 I had written some code to dynamically add a servlet to a context in a
 deployed applicaiton in Tomcat 4.1. This code basically uses the catalina
 loader to obtain the server-engine-host-and context, and invokes the
 addChild method after configuring a StandardWwrapper to represent the
 servlet I am adding. This all works fine in Tomcat4.1 and I am able to
 access the servlet through the right url immediately, without having to
 restart Tomcat.
 However, I tried the same code in Tomcat 5.5 and it does not work. It does
 not throw any errors, but simply does not recognize the url pattern once i
 actually try to invoke the new servlet. I was wondering if anyone had
 tried this before, and if so if they have any suggestions as to why this
 does not work in Tomcat 5.5?

Are you calling addServletMapping() on the context after you have added the
wrapper? It looks like this was unnecessary in 4.1.x but is required in 5.5.x.

If that isn't it, I would suggest attaching you favourite IDE and debugging
your way through the request mapping process to see where it is going
wrong. This certainly should be possible.

As an aside, version 3 of the servlet spec is expected to include this sort
of functionality in the Servlet API.

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: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Mark Thomas
Johnny Kewl wrote:
 I'd luv to see that code... the stuff you playing with is in Tomcat
 core... must have been difficult to debug... perhaps its an embedded app?
 
 But I think this answers your question...
 
public void addChild(Container child) {
 
throw new IllegalStateException
(sm.getString(standardWrapper.notChild));
 
}
 
is what addChild now looks like in 6... if they did allow it, now
 they dont (;

I don't know where you found that code but that isn't the
StandardContext.addChild() code for 6.0.x. Even if it was, the OP was
asking about 5.5.x, not 6.0.x

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: Jasper compiler version, how to configure

2008-10-05 Thread Juha Laiho
Dave wrote:
 In my development environment using JDK 1.5, the jsp compilation is fine. But 
 after deploy to JBoss 4.0.5(w/ tomcat 5.5), the JSP compiler complains 
 templates such as 
 List 
 
 I started JBoss using jdk 1.5, configured in run.sh (JAVA_HOME). It seems 
 that the JSP compiler is not using the java version 1.5. 
 
 How to configure the JSP compiler java version, using the same version JDK 
 1.5 that starts Tomcat? 

The compiler Java version is most probably fine, but the compiler is
being told that the source code conforms to 1.4 language specification,
as opposed to 1.5.

See http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html and there
especially compilerSourceVM parameter (and it's best to set
compilerTargetVM at the same time).
-- 
..Juha

-
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 with support for asyn servlets (3.0)?

2008-10-05 Thread Clemens Eisserer
Hi,

Is there some version of tomcat which implements support for
suspend/resume servlet functionality currently discussed in the JSR?
I know Jetty6/NIO has a proprietary API for this, but if possible I
would prefer to build it arround the expected standard way.

Thank you in advance, Clemens

-
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: JK and IIS - troubles?

2008-10-05 Thread Rainer Jung
br1 schrieb:
 Rainer Jung-3 wrote:
 Yes, if the notion of worker is an IIS worker and not an isapi plugin
 worker. A plugin worker in the sense of a worker configuration item in
 workers.properties is 1:1 with a connection pool, and a connection pool
 doesn't create threads. It will grow at most as the lower of thread
 number and configured pool size.

 Well, no, maybe we need to go some steps back.
 I am talking about JK workers (isapi plugin workers), and I have no IIS
 workers: the problem is on IIS 5. 
 As I said I have a connection_pool_size currently set to 300 on the JK
 worker (IIS side) and a matching maxThreads set to 300 on the Tomcat side. 
 
 What you are telling me is that I don't have 300 threads on this IIS/JK
 worker side, but simply (a maximum of) 300 tcp connections to the Tomcat
 instance, is this right? So maybe I am just out of connections..

But if you are really actively using 300 connections, it means there are
300 requests processed in parallel inside Tomcat. So you should first
check with the thread dump, what those are actually doing, and whether
it's a good idea to send even more requests there. If the web server
can't acquire another connection from the pool, further requests should
fail, not block.

Regards,

Rainer

-
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: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Martin Gainty

thank you for the code send
i see deploymentDescriptor as a string attribute of mbean 
org.apache.catalina.core.StandardContext
I also see com.sun.xml.rpc.tools.wsdeploy.DeploymentDescriptorParser class
but I am unable to locate the javadoc documentation for DeploymentDescriptor
could you display link for DeploymentDescriptor

thanks,
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Sat, 4 Oct 2008 23:12:11 -0600
 Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 
 Hi Johnny,
 
 Th code i used is basically the one you have in your last email...
 I have an app running in privileged mode, and it has to add a servlet
 definition on the fly to another app...so in my app i call a method and
 pass the description of the other application as well as the servlet
 definition i want to add:
 
 public void addServlet(WebAppConfiguration webApp, DeploymentDescriptor
 descriptor) {
 org.apache.catalina.Server server = ServerFactory.getServer();
 String contextRoot = webApp.getContextRoot();
 Service[] services = server.findServices();
 Context context = null;
 String initParamName = descriptor.getInitParamName();
 String initParamValue = descriptor.getInitParamValue();
 String servletName = descriptor.getServletName();
 String servletClass = descriptor.getServletClass();
 
 for (int i = 0; i  services.length; i++) {
   Engine engine = (Engine) services[i].getContainer();
   Host host = (Host) engine.findChild(engine.getDefaultHost());
   context = (Context) host.findChild(contextRoot);
   if (context != null){
 break;
   }
 }
 if (context == null)
   return;
 StandardWrapper
 w = (StandardWrapper)context.createWrapper();
   w.setName(servletName);
   w.setServletName(servletName);
 
   w.setServletClass(servletClass);
   w.addInitParameter(initParamName, initParamValue);
   context.addChild(w);
   context.addServletMapping(descriptor.getUrlPattern(), servletName);
   }
 
 
 
  - Original Message -
  From: Johnny Kewl [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Sunday, October 05, 2008 5:40 AM
  Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5
 
 
 
  - Original Message -
  From: Martin Gainty [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Saturday, October 04, 2008 11:39 PM
  Subject: RE: adding servlet definition to context on the fly :Tomcat 5.5
 
 
 
  doctor john
 
  to followup with the addChild method and if an exception is thrown and
  you
  determine your container doesnt support child containers..what then?
 
  your diagnosis doctor..
 
  Martin
  ---
  I dont know the history... too young to remember TC 4 ;)
  He probably lost his call when filters or something like that was
  introduced... but heres the coders explanation, perhaps it makes sense
  to
  you...
  I just looked at what he was calling before... and its gone ;)
  addChild is still functional in container... but in wrapper its an
  exception... some history here somewhere... risk one takes if they work
  outside the intended API... unless that is in the servlet spec... doubt
  it...
 
  /**
  * A bWrapper/b is a Container that represents an individual servlet
  * definition from the deployment descriptor of the web application.  It
  * provides a convenient mechanism to use Interceptors that see every
  single
  * request to the servlet represented by this definition.
  * p
  * Implementations of Wrapper are responsible for managing the servlet
  life
  * cycle for their underlying servlet class, including calling init() and
  * destroy() at appropriate times, as well as respecting the existence of
  * the SingleThreadModel declaration on the servlet class itself.
  * p
  * The parent Container attached to a Wrapper will generally be an
  * implementation of Context, representing the servlet context (and
  * therefore the web application) within which this servlet executes.
  * p
  * Child Containers are not allowed on Wrapper implementations, so the
  * codeaddChild()/code method should throw an
  * codeIllegalArgumentException/code.
  *
  * @author Craig R. McClanahan
  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar.,
  24
  oct. 2006) $
  */
 
  .
 
  A little more homework... would actuall be much easier if we saw the
  code...
  but the only thing that I can find in TC that is doing more or less what
  he
  may be doing is in the 

RE: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread ram . sriharsha
Hi Martin,

DeploymentDescriptor is simply a bean that holds the web.xml info we want
to add on the fly , its not a Tomcat class.

basically it holds the init params, servlet name/class and servlet
mapping...those were the only aspects of web.xml we wanted to add on the
fly.

Similarly WebAppConfiguration is another bean that contains application
context root, repository information etc.

Ram

PS: As Mark suggested I am stepping thro the Tomcat code usingremote
debugging in Eclipse...will post more info if i can find out what exactly
I am missing in the Tomcat 5.5 case




 thank you for the code send
 i see deploymentDescriptor as a string attribute of mbean
 org.apache.catalina.core.StandardContext
 I also see com.sun.xml.rpc.tools.wsdeploy.DeploymentDescriptorParser class
 but I am unable to locate the javadoc documentation for
 DeploymentDescriptor
 could you display link for DeploymentDescriptor

 thanks,
 Martin
 __
 Disclaimer and confidentiality note
 Everything in this e-mail and any attachments relates to the official
 business of Sender. This transmission is of a confidential nature and
 Sender does not endorse distribution to any party other than intended
 recipient. Sender does not necessarily endorse content contained within
 this transmission.


 Date: Sat, 4 Oct 2008 23:12:11 -0600
 Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org

 Hi Johnny,

 Th code i used is basically the one you have in your last email...
 I have an app running in privileged mode, and it has to add a servlet
 definition on the fly to another app...so in my app i call a method and
 pass the description of the other application as well as the servlet
 definition i want to add:

 public void addServlet(WebAppConfiguration webApp, DeploymentDescriptor
 descriptor) {
 org.apache.catalina.Server server = ServerFactory.getServer();
 String contextRoot = webApp.getContextRoot();
 Service[] services = server.findServices();
 Context context = null;
 String initParamName = descriptor.getInitParamName();
 String initParamValue = descriptor.getInitParamValue();
 String servletName = descriptor.getServletName();
 String servletClass = descriptor.getServletClass();

 for (int i = 0; i  services.length; i++) {
   Engine engine = (Engine) services[i].getContainer();
   Host host = (Host) engine.findChild(engine.getDefaultHost());
   context = (Context) host.findChild(contextRoot);
   if (context != null){
 break;
   }
 }
 if (context == null)
   return;
 StandardWrapper
 w = (StandardWrapper)context.createWrapper();
   w.setName(servletName);
   w.setServletName(servletName);

   w.setServletClass(servletClass);
   w.addInitParameter(initParamName, initParamValue);
   context.addChild(w);
   context.addServletMapping(descriptor.getUrlPattern(),
 servletName);
   }


 
  - Original Message -
  From: Johnny Kewl [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Sunday, October 05, 2008 5:40 AM
  Subject: Re: adding servlet definition to context on the fly :Tomcat
 5.5
 
 
 
  - Original Message -
  From: Martin Gainty [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Saturday, October 04, 2008 11:39 PM
  Subject: RE: adding servlet definition to context on the fly :Tomcat
 5.5
 
 
 
  doctor john
 
  to followup with the addChild method and if an exception is thrown
 and
  you
  determine your container doesnt support child containers..what then?
 
  your diagnosis doctor..
 
  Martin
  ---
  I dont know the history... too young to remember TC 4 ;)
  He probably lost his call when filters or something like that was
  introduced... but heres the coders explanation, perhaps it makes
 sense
  to
  you...
  I just looked at what he was calling before... and its gone ;)
  addChild is still functional in container... but in wrapper its an
  exception... some history here somewhere... risk one takes if they
 work
  outside the intended API... unless that is in the servlet spec...
 doubt
  it...
 
  /**
  * A bWrapper/b is a Container that represents an individual
 servlet
  * definition from the deployment descriptor of the web application.
 It
  * provides a convenient mechanism to use Interceptors that see every
  single
  * request to the servlet represented by this definition.
  * p
  * Implementations of Wrapper are responsible for managing the servlet
  life
  * cycle for their underlying servlet class, including calling init()
 and
  * destroy() at appropriate times, as well as respecting the existence
 of
  * the SingleThreadModel declaration on the servlet class itself.
  * p
  * The parent Container attached to a Wrapper will generally be an
  * implementation of Context, representing the servlet context 

Re: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Johnny Kewl


- Original Message - 
From: [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 05, 2008 7:12 AM
Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5



Hi Johnny,

Th code i used is basically the one you have in your last email...
I have an app running in privileged mode, and it has to add a servlet
definition on the fly to another app...so in my app i call a method and
pass the description of the other application as well as the servlet
definition i want to add:

public void addServlet(WebAppConfiguration webApp, DeploymentDescriptor
descriptor) {
   org.apache.catalina.Server server = ServerFactory.getServer();
   String contextRoot = webApp.getContextRoot();
   Service[] services = server.findServices();
   Context context = null;
   String initParamName = descriptor.getInitParamName();
   String initParamValue = descriptor.getInitParamValue();
   String servletName = descriptor.getServletName();
   String servletClass = descriptor.getServletClass();

   for (int i = 0; i  services.length; i++) {
 Engine engine = (Engine) services[i].getContainer();
 Host host = (Host) engine.findChild(engine.getDefaultHost());
 context = (Context) host.findChild(contextRoot);
 if (context != null){
   break;
 }
   }
   if (context == null)
 return;
   StandardWrapper
   w = (StandardWrapper)context.createWrapper();
 w.setName(servletName);
 w.setServletName(servletName);

 w.setServletClass(servletClass);
 w.addInitParameter(initParamName, initParamValue);
 context.addChild(w);
 context.addServletMapping(descriptor.getUrlPattern(), servletName);
 }



ok now see what you up to... will give it a little try... stand back... 
doing a kidney transplant.. ha ha

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
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: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Martin Gainty

hello ram-

i could'nt locate javadoc for either the WebAppConfiguration or 
DeploymentDescriptor classes

thanks for the explanation

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Sun, 5 Oct 2008 08:19:19 -0600
 Subject: RE: adding servlet definition to context on the fly :Tomcat 5.5
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 
 Hi Martin,
 
 DeploymentDescriptor is simply a bean that holds the web.xml info we want
 to add on the fly , its not a Tomcat class.
 
 basically it holds the init params, servlet name/class and servlet
 mapping...those were the only aspects of web.xml we wanted to add on the
 fly.
 
 Similarly WebAppConfiguration is another bean that contains application
 context root, repository information etc.
 
 Ram
 
 PS: As Mark suggested I am stepping thro the Tomcat code usingremote
 debugging in Eclipse...will post more info if i can find out what exactly
 I am missing in the Tomcat 5.5 case
 
 
 
 
  thank you for the code send
  i see deploymentDescriptor as a string attribute of mbean
  org.apache.catalina.core.StandardContext
  I also see com.sun.xml.rpc.tools.wsdeploy.DeploymentDescriptorParser class
  but I am unable to locate the javadoc documentation for
  DeploymentDescriptor
  could you display link for DeploymentDescriptor
 
  thanks,
  Martin
  __
  Disclaimer and confidentiality note
  Everything in this e-mail and any attachments relates to the official
  business of Sender. This transmission is of a confidential nature and
  Sender does not endorse distribution to any party other than intended
  recipient. Sender does not necessarily endorse content contained within
  this transmission.
 
 
  Date: Sat, 4 Oct 2008 23:12:11 -0600
  Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5
  From: [EMAIL PROTECTED]
  To: users@tomcat.apache.org
 
  Hi Johnny,
 
  Th code i used is basically the one you have in your last email...
  I have an app running in privileged mode, and it has to add a servlet
  definition on the fly to another app...so in my app i call a method and
  pass the description of the other application as well as the servlet
  definition i want to add:
 
  public void addServlet(WebAppConfiguration webApp, DeploymentDescriptor
  descriptor) {
  org.apache.catalina.Server server = ServerFactory.getServer();
  String contextRoot = webApp.getContextRoot();
  Service[] services = server.findServices();
  Context context = null;
  String initParamName = descriptor.getInitParamName();
  String initParamValue = descriptor.getInitParamValue();
  String servletName = descriptor.getServletName();
  String servletClass = descriptor.getServletClass();
 
  for (int i = 0; i  services.length; i++) {
Engine engine = (Engine) services[i].getContainer();
Host host = (Host) engine.findChild(engine.getDefaultHost());
context = (Context) host.findChild(contextRoot);
if (context != null){
  break;
}
  }
  if (context == null)
return;
  StandardWrapper
  w = (StandardWrapper)context.createWrapper();
w.setName(servletName);
w.setServletName(servletName);
 
w.setServletClass(servletClass);
w.addInitParameter(initParamName, initParamValue);
context.addChild(w);
context.addServletMapping(descriptor.getUrlPattern(),
  servletName);
}
 
 
  
   - Original Message -
   From: Johnny Kewl [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Sunday, October 05, 2008 5:40 AM
   Subject: Re: adding servlet definition to context on the fly :Tomcat
  5.5
  
  
  
   - Original Message -
   From: Martin Gainty [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Saturday, October 04, 2008 11:39 PM
   Subject: RE: adding servlet definition to context on the fly :Tomcat
  5.5
  
  
  
   doctor john
  
   to followup with the addChild method and if an exception is thrown
  and
   you
   determine your container doesnt support child containers..what then?
  
   your diagnosis doctor..
  
   Martin
   ---
   I dont know the history... too young to remember TC 4 ;)
   He probably lost his call when filters or something like that was
   introduced... but heres the coders explanation, perhaps it makes
  sense
   to
   you...
   I just looked at what he was calling before... and its gone ;)
   addChild is still functional in container... but in wrapper its an
   exception... some history here somewhere... risk one takes if 

Regd....ASF Bugzilla - Bug 45015 (Quoting in attributes)

2008-10-05 Thread subir.sasikumar
Hi Friends,



I am quite new to tomcat users list. This is my first post. Please
help!!



I happened to see this page
https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 where in the
comment 7 have provided references to the system property which could
relax this check in JSPs.



We use precompiled JSPs and at compile time I get this error with
apache-tomcat-6.0.18 and java 1.5 in windows xp (Our deployment target
is RHEL 5

).



Can you help me out in how I can set this system property in the tomcat
6.0.18 or build.xml jspc ant task?





Thanks

Subir




Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com


RE: Regd....ASF Bugzilla - Bug 45015 (Quoting in attributes)

2008-10-05 Thread Martin Gainty

the referenced example was fixed 3 months ago and commited to trunk

which problem are you experiencing?

Martin Gainty 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Subject: RegdASF Bugzilla - Bug 45015 (Quoting in attributes)
 Date: Sun, 5 Oct 2008 20:55:32 +0530
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 
 Hi Friends,
 
  
 
 I am quite new to tomcat users list. This is my first post. Please
 help!!
 
  
 
 I happened to see this page
 https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 where in the
 comment 7 have provided references to the system property which could
 relax this check in JSPs.
 
  
 
 We use precompiled JSPs and at compile time I get this error with
 apache-tomcat-6.0.18 and java 1.5 in windows xp (Our deployment target
 is RHEL 5
 
 ). 
 
  
 
 Can you help me out in how I can set this system property in the tomcat
 6.0.18 or build.xml jspc ant task?
 
  
 
  
 
 Thanks
 
 Subir
 
  
 
 
 Please do not print this email unless it is absolutely necessary. 
 
 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 
 
 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email. 
 
 www.wipro.com

_
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

Re: Tomcat with support for asyn servlets (3.0)?

2008-10-05 Thread Mark Thomas
Clemens Eisserer wrote:
 Hi,
 
 Is there some version of tomcat which implements support for
 suspend/resume servlet functionality currently discussed in the JSR?
 I know Jetty6/NIO has a proprietary API for this, but if possible I
 would prefer to build it arround the expected standard way.

There is a draft 3.0 spec but no APIs at present. Once there is a draft
with some APIs I image there will be a Tomcat 7 branch that will remain
alpha at least until the spec is final.

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: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Johnny Kewl


- Original Message - 
From: [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 05, 2008 7:12 AM
Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5



Hi Johnny,

Th code i used is basically the one you have in your last email...
I have an app running in privileged mode, and it has to add a servlet
definition on the fly to another app...so in my app i call a method and
pass the description of the other application as well as the servlet
definition i want to add:


Ram... just want to understand the plain functionality...

You have one web app running... WebApp MAIN

Then you are able to drop another web app in WebApp EXTRA
You have some kind of invoker in MAIN, that you Add EXTRA servlets to.

So Main in the end is running EXTRA servlets that are dropped in late... 
neat idea.


Its not unlike the invoker servlet idea, but you working cross context and 
still have cool things available like init params...
Problem is that it heart surgery... which means normal debugging is an 
issue, thus the problem, its hard to see.


If this is the scheme?
I'm just wondering if maybe its something silly... like in the old TC you 
have crossContext=true setup, and thats not setup now...
I know Chuck always says... no more in servlet config, now must be in 
webapps... so just wondering if its forgotten or changed.

I'm thinking the classloaders will have to share if I get the overall idea.

???

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---




-
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: Deploying to a subfolder

2008-10-05 Thread Mark Thomas
I can repeat this now. It looks like I missed this combination in my
testing. I'll get it fixed for 6.0.19+

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: adding servlet definition to context on the fly :Tomcat 5.5

2008-10-05 Thread Johnny Kewl


- Original Message - 
From: [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, October 05, 2008 7:12 AM
Subject: Re: adding servlet definition to context on the fly :Tomcat 5.5



Hi Johnny,

Th code i used is basically the one you have in your last email...
I have an app running in privileged mode, and it has to add a servlet
definition on the fly to another app...so in my app i call a method and
pass the description of the other application as well as the servlet
definition i want to add:


Ram... listen I got it going, but not on TC 5... it works on TC 6.
Got to tell you I cant see how this ever worked on TC 4 or 5... the reason 
is the class loader structure doesnt lend itself to it.
Webapps cant see the Container... so I'm wondering how you structured it 
without changing TC completely?

Possibly this code came out of an embedded app

Anyway... the tip is, if you want to make your life relatively easy... move 
to TC 6 its has a flat classloader structure, so you only got to jump thru a 
few hoops...
The code looks OK... but I'd suggest you add much more debugging points... 
so you can watch what its doing...


And then my first gut feel stands... I would much rather go for a 
specialized invoker type servlet with my own custom classloader... 
possibly too much work but a much better solution...


... if anyone knows how one can structure this sort of code in TC 4 or 5 
I'd luv to hear it.


But its an excellent idea... this idea of Servlet Injection or Servlet 
Late Binding... if there is anything out there that does this, I'd be keen 
to hear it.
Otherwise its something we going to add to the our PAS drop a servlet in 
one TC, it runs in others idea...

... thanks nice idea

Good Luck!


public void addServlet(WebAppConfiguration webApp, DeploymentDescriptor
descriptor) {
   org.apache.catalina.Server server = ServerFactory.getServer();
   String contextRoot = webApp.getContextRoot();
   Service[] services = server.findServices();
   Context context = null;
   String initParamName = descriptor.getInitParamName();
   String initParamValue = descriptor.getInitParamValue();
   String servletName = descriptor.getServletName();
   String servletClass = descriptor.getServletClass();

   for (int i = 0; i  services.length; i++) {
 Engine engine = (Engine) services[i].getContainer();
 Host host = (Host) engine.findChild(engine.getDefaultHost());
 context = (Context) host.findChild(contextRoot);
 if (context != null){
   break;
 }
   }
   if (context == null)
 return;
   StandardWrapper
   w = (StandardWrapper)context.createWrapper();
 w.setName(servletName);
 w.setServletName(servletName);

 w.setServletClass(servletClass);
 w.addInitParameter(initParamName, initParamValue);
 context.addChild(w);
 context.addServletMapping(descriptor.getUrlPattern(), servletName);
 }


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
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: useSendFile=true skips compression

2008-10-05 Thread Shaun Senecal
Thanks for the explaination.   So either I take the performance hit if I
have high volumes, or the clients take a performance hit if I dont use
compression.  Is there some way I could get the best of both worlds?  Maybe
compress the files on the filesystem, then use a filter to programatically
change the content type of those specific files to gzip?  I suppose that
would save some CPU as well, since the files wouldnt need to be recompressed
with every request.  Of course that also means that browsers without gzip
abilities are SOL, but then again, this is a GWT app, so I am assuming a new
browser (sorry lynx, no support).

On Sat, Oct 4, 2008 at 11:43 AM, Bill Barker [EMAIL PROTECTED] wrote:


 Shaun Senecal [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Could someone explain to me why the NIO Connector will ignore the
  compression settings for large files if useSendFile is enabled (it is by
  default)?  It seems to me that if compression is enabled you would
  specifically want to use it when sendFile is enabled, but that might just
  be
  because I don't really understand what sendFile means/does :)
 

 In normal mode, Tomcat reads the file into its own memory buffer,
 optionally compresses it, and then writes it out again to the socket.  In
 sendFile mode, Tomcat tells the O/S to transfer the contents of the file
 directly to the socket (bypassing reading it in to Tomcat memory).  On a
 modern O/S, this allows the O/S to transfer data using kernel memory only,
 instead of copying the kernel memory to program memory first (which has a
 significant cost on high-volume servers).

  It looks like my solution is to simply disable this option, but I was
  curious about why this is the case.  I am trying to deploy a large GWT
  app,
  and I want to ensure that my massive JavaScript files get compressed
  before
  being sent to the client.
 




 -
 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: useSendFile=true skips compression

2008-10-05 Thread Martin Gainty

if you're implementing with xml you *may* want to consider result-set data 
format which utilises less bandwidth such as json..start here
http://gwt-rest.googlecode.com/svn/trunk/README

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Mon, 6 Oct 2008 09:20:21 +0900
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: useSendFile=true skips compression
 
 Thanks for the explaination.   So either I take the performance hit if I
 have high volumes, or the clients take a performance hit if I dont use
 compression.  Is there some way I could get the best of both worlds?  Maybe
 compress the files on the filesystem, then use a filter to programatically
 change the content type of those specific files to gzip?  I suppose that
 would save some CPU as well, since the files wouldnt need to be recompressed
 with every request.  Of course that also means that browsers without gzip
 abilities are SOL, but then again, this is a GWT app, so I am assuming a new
 browser (sorry lynx, no support).
 
 On Sat, Oct 4, 2008 at 11:43 AM, Bill Barker [EMAIL PROTECTED] wrote:
 
 
  Shaun Senecal [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Could someone explain to me why the NIO Connector will ignore the
   compression settings for large files if useSendFile is enabled (it is by
   default)?  It seems to me that if compression is enabled you would
   specifically want to use it when sendFile is enabled, but that might just
   be
   because I don't really understand what sendFile means/does :)
  
 
  In normal mode, Tomcat reads the file into its own memory buffer,
  optionally compresses it, and then writes it out again to the socket.  In
  sendFile mode, Tomcat tells the O/S to transfer the contents of the file
  directly to the socket (bypassing reading it in to Tomcat memory).  On a
  modern O/S, this allows the O/S to transfer data using kernel memory only,
  instead of copying the kernel memory to program memory first (which has a
  significant cost on high-volume servers).
 
   It looks like my solution is to simply disable this option, but I was
   curious about why this is the case.  I am trying to deploy a large GWT
   app,
   and I want to ensure that my massive JavaScript files get compressed
   before
   being sent to the client.
  
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

_
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

RE: Regd....ASF Bugzilla - Bug 45015 (Quoting in attributes)

2008-10-05 Thread subir.sasikumar
Hi,

Actually our code base too huge to modify this quotes thing!
So we want to disable this validation?

But I do not understand how I can make the compiler ignore this
validation.
We use precompiled JSPs.

Thanks
Subir

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2008 9:12 PM
To: Tomcat Users List
Subject: RE: RegdASF Bugzilla - Bug 45015 (Quoting in attributes)


the referenced example was fixed 3 months ago and commited to trunk

which problem are you experiencing?

Martin Gainty
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.


 Subject: RegdASF Bugzilla - Bug 45015 (Quoting in attributes)
 Date: Sun, 5 Oct 2008 20:55:32 +0530
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org

 Hi Friends,



 I am quite new to tomcat users list. This is my first post. Please
 help!!



 I happened to see this page
 https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 where in the
 comment 7 have provided references to the system property which could
 relax this check in JSPs.



 We use precompiled JSPs and at compile time I get this error with
 apache-tomcat-6.0.18 and java 1.5 in windows xp (Our deployment target
 is RHEL 5

 ).



 Can you help me out in how I can set this system property in the
tomcat
 6.0.18 or build.xml jspc ant task?





 Thanks

 Subir




 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

 www.wipro.com

_
See how Windows Mobile brings your life together-at home, work, or on
the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.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: Regd....ASF Bugzilla - Bug 45015 (Quoting in attributes)

2008-10-05 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: RE: RegdASF Bugzilla - Bug 45015 (Quoting in attributes)

 But I do not understand how I can make the compiler ignore this
 validation. We use precompiled JSPs.

If you're using the suggested ant script for precompilation:
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Web%20Application%20Compilation

then simply add the following system property to the command line:

-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

 - 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: Problem with jasper-compiler when ported web application from tomcat 5.5.9 to 5.5.26

2008-10-05 Thread Bhagwat, Vinit (Vinit)
Even after clearing work directory on 5.5.9 this code works. 

I have 2 workarounds for this problem
1) Use following jars from tomcat 5.5.9 in tomcat 5.5.26
jasper-compiler.jar,  jasper-compiler-jdt.jar, jasper-runtime.jar.
2) Keep def.jsp at same location as test1.jsp and abc.jsp.

With both these workarounds my application works fine.

I wanted to know what change has happened in above mentioned jars from
tomcat 5.5.9 to 5.5.26 which is breaking my code?

Thanks and Regards,

Vinit
-Original Message-
From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2008 7:08 PM
To: Tomcat Users List
Subject: Re: Problem with jasper-compiler when ported web application
from tomcat 5.5.9 to 5.5.26

2008/10/3 Bhagwat, Vinit (Vinit) [EMAIL PROTECTED]:
 Hi,

 I am getting following exception

 org.apache.jasper.JasperException: ServletException in
 '/testapp/dir1/test1.jsp': File /testapp/dir2/def.jsp not found

 when I ported my web application from tomcat 5.5.9 to 5.5.26

 Following is code snippet from test1.jsp page under 
 webapps/testapp/dir1

 t:panelTabbedPane
  t:panelTab id=tabpane-1 label=abc rendered=true  jsp:include

 page=abc.jsp /  /t:panelTab  t:panelTab id=tabpane-1 
 label=def rendered=false  jsp:include page=def.jsp /  
 /t:panelTab /t:panelTabbedPane

 here abc.jsp is under directory webapps/testapp/dir1 (same directory 
 of
 test1.jsp) and def.jsp is under directory webapps/testapp/dir2.

 This used to work with tomcat 5.5.9 but with tomcat 5.5.26 I am 
 getting following exception

 org.apache.jasper.JasperException: ServletException in
 '/testapp/dir1/test1.jsp': File /testapp/dir2/def.jsp not found.


If abc.jsp and def.jsp are in different directories, then it should be
jsp:include page=../dir2/def.jsp

It might be that on your 5.5.9 there is some old compiled copy of
def.jsp in the wrong place. I.e. it might be if you clear your work
directory on your 5.5.9 host the problem will reappear there.

-
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]