Re: manager outofmemory exception

2005-10-11 Thread Tim Funk

http://jakarta.apache.org/tomcat/faq/memory.html#why

-Tim

Enrique Rodriguez wrote:


I know this is a very common issue but i want to be sure about it.

I have 5 tomcats on a 8Gb RAM machine. The number of applications
installed on tomcats are 5 to 15. All the tomcat run with -Xms128M
-Xmx512M but the manager aplication never show JVM memory higger than
128

This is the JVM memory state for the tomcat with 15 application: 


Free memory: 73.94 MB Total memory: 128.62 MB Max memory: 510.37 MB


What i don't understand is that I sometimes get OutOfMemoryException
when i upload new aplitications to the tomcat using the manager.

I Profiled my aplication and i don't have any memory issue.

Is this a manager bug? Why the Total Memory is never higger than 128 MB
but I get OutOfMemoryExceptions?
 


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



Fwd: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell
Apologies in advance for cross-posting this, but I sent this email  
out to the tomcat-dev list a couple of days ago and have received no  
replies at all...  I think this is quite  a useful feature, and I'm  
wondering how best to go about contributing it.

Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:


From: Tim Fennell [EMAIL PROTECTED]
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org


Hi,

I'll apologize in advance if this is the wrong place to post this,  
or if this has been covered before.  I had a good read through the  
Tomcat docs and faqs, searched the bug database, and googled around  
on the topic, but could not really find anything.


I've been using Tomcat for a while, and in general have found it as  
good a servlet/JSP container as any I've used.  With one exception  
(no pun intended).  A long time ago I started out using WebLogic,  
and the one thing that I loved about WebLogic, that is missing from  
Tomcat, is that when an Exception occurred in a JSP it would tell  
you what line number *in the JSP* generated the exception, and show  
you a snippet of code around the offending line.


For quite a while I'd figured that the way Tomcat was built  
prevented this from being easy/possible, but I didn't look.  Well,  
I finally got around to looking, and it only took me a couple of  
hours to implement it.  Which makes me wonder if there is some  
other reason that this isn't done in Tomcat/Jasper?


At any rate, I have code that will do this now, and I think it'd be  
a great productivity boost for anyone else developing JSPs on  
Tomcat.  It amounts to small patches to two files.  The first is  
org.apache.jasper.compiler.Compiler to make it hang on to the parse  
tree (pageNodes) if in development mode, and a getter to make this  
accessible.  The second is to  
org.apache.jasper.servlet.JspServletWrapper to do the grunt work of  
mapping a stack frame from the exception back to the line in the  
JSP that it came from.


It's all coded up to function only when in development mode, and is  
reasonably well commented.  Would any of the committers be  
interested in taking a look at this if I put together a patch and  
posted it here?  Cheers,


-Tim Fennell
http://stripes.mc4j.org

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






Re: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell
I certainly don't have a problem with that.  Obviously I'd rather  
have it in the main codebase - while I don't have a problem running a  
patched version of jasper, I'm sure that would freak out a good  
number of PHBs ;)  But since there is interest I'll clean up what I  
have, put it online and post a link here.  That should happen some  
time this evening.


-t

On Oct 11, 2005, at 2:01 PM, GB Developer wrote:

regardless how the commiters feel about it, are you willing to  
release your

patched source files? (So for example, I can compile and deploy them
myself?)   ;)  If so, I'd say a page on your wiki might be alright for
distro, with a link to the page sent to tomcat-user  ?

I'd be giving it a try about 10 minutes after you send out your  
email, since
I've often wondered about this feature. Usually right after digging  
through

the work directory for a generated java file.




-Original Message-
From: Tim Fennell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 11, 2005 12:15 PM
To: Tomcat Users List
Subject: Fwd: More helpful reporting of exceptions in JSPs


Apologies in advance for cross-posting this, but I sent this email
out to the tomcat-dev list a couple of days ago and have received no
replies at all...  I think this is quite  a useful feature, and I'm
wondering how best to go about contributing it.
Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:



From: Tim Fennell [EMAIL PROTECTED]
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org





At any rate, I have code that will do this now, and I think it'd be
a great productivity boost for anyone else developing JSPs on
Tomcat.  It amounts to small patches to two files.  The first is
org.apache.jasper.compiler.Compiler to make it hang on to


the parse


tree (pageNodes) if in development mode, and a getter to make this
accessible.  The second is to
org.apache.jasper.servlet.JspServletWrapper to do the grunt


work of


mapping a stack frame from the exception back to the line in the
JSP that it came from.




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





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



Re: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell

Hi All,

I've posted my patch for Jasper/Tomcat at the following location:
http://www.tfenne.com/jasper/

The page has a brief overview, a download link and  before and  
after screenshots so you can get an idea for what exactly the patch  
does before you decide to patch your own environment.  If you give it  
a shot and have any problems and/or suggestions for improving it  
please let me know - but please read the readme first ;)


Happy bug hunting.

-Tim Fennell
http://stripes.mc4j.org

On Oct 11, 2005, at 3:40 PM, Tim Fennell wrote:

I certainly don't have a problem with that.  Obviously I'd rather  
have it in the main codebase - while I don't have a problem running  
a patched version of jasper, I'm sure that would freak out a good  
number of PHBs ;)  But since there is interest I'll clean up what I  
have, put it online and post a link here.  That should happen some  
time this evening.


-t

On Oct 11, 2005, at 2:01 PM, GB Developer wrote:


regardless how the commiters feel about it, are you willing to  
release your

patched source files? (So for example, I can compile and deploy them
myself?)   ;)  If so, I'd say a page on your wiki might be alright  
for

distro, with a link to the page sent to tomcat-user  ?

I'd be giving it a try about 10 minutes after you send out your  
email, since
I've often wondered about this feature. Usually right after  
digging through

the work directory for a generated java file.





-Original Message-
From: Tim Fennell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 11, 2005 12:15 PM
To: Tomcat Users List
Subject: Fwd: More helpful reporting of exceptions in JSPs


Apologies in advance for cross-posting this, but I sent this email
out to the tomcat-dev list a couple of days ago and have received no
replies at all...  I think this is quite  a useful feature, and I'm
wondering how best to go about contributing it.
Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:




From: Tim Fennell [EMAIL PROTECTED]
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org







At any rate, I have code that will do this now, and I think it'd be
a great productivity boost for anyone else developing JSPs on
Tomcat.  It amounts to small patches to two files.  The first is
org.apache.jasper.compiler.Compiler to make it hang on to



the parse



tree (pageNodes) if in development mode, and a getter to make this
accessible.  The second is to
org.apache.jasper.servlet.JspServletWrapper to do the grunt



work of



mapping a stack frame from the exception back to the line in the
JSP that it came from.





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






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





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



Re: JasperException: Unable to compile class for JSP

2005-10-04 Thread Tim Funk

Put it in a package ... http://jakarta.apache.org/tomcat/faq/classnotfound.html

-Tim

Goo GGooo wrote:


On 10/4/05, Wendy Smoak wrote:


From: Goo GGooo [EMAIL PROTECTED]


An error occurred at line: 1 in the jsp file: /name.jsp
Generated servlet error:
UserData cannot be resolved or is not a type
===

Files webapps/tut/name.jsp and
webapps/tut/WEB-INF/classes/UserData.java are attached.


Try putting UserData in a package.



That works, cool! What's the reason for that? Can I make it running
without packages? (just interested, not that I'm unhappy with having
it in a package :-)



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



Re: tomcat caching issue

2005-09-30 Thread Tim Funk
Based on everything written so far - there is no evidence tomcat would be 
chaching anything.


I'd suggest placing as much debug code in your code as possible via a logging 
pacakge such as log4j/commons-logging so the log information can be turned on 
via configuration directives.


-Tim

Santosh Asbe wrote:


Hi All,

I need your help for this problem very urgently.

I have tomcat 4.1.30 on Linux. It servers as a web server and contains only
JSP  Servlets. We make a remote call to Websphere Application Server ( on
AIX) using corbaloc like 'corbaloc::ip1:2809:ip2:2809'. Now when i one of my
App server fails, the other App Server server should take over. This work
when i use a simple java client on the Linux machine, the failover occurs.
But when i use my application in tomcat, this does not work.
I am using a Service locator ( singleton) which makes the initial call to
App Server and stores in the ip cache. initially we that the issue was with
the Service locator, but then even if i don't use this Service Locator, the
problem persists.

We have talked to IBM and they say that the tomcat does some caching and the
problem is not with the App Server. Has anyone faced this issue? Can anyone
help regarding this and how can i know how and where the caching is done?
Can this issue be resolved.

If any other information is required, i will be glad to provide with the
same.



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



Re: Multiple Threads for one webapp

2005-09-30 Thread Tim Funk
It seems you have a thread started in the background during the life of the 
application.
This thread goes to some external place of storage and to look for emails to 
send.

It seems this thread is not stopped when a context is reloaded.
When the app is reloaded - a new thread is started.
In this case - the app was restarted 6 times - leaving you 7 threads all 
looking to the smae external loctation for sending emails.


Solution: Use a ServletContextListerner to detect webapp shutdown so the 
thread may be stopped.



-Tim

Mahesh S Kudva wrote:


Hi All
 
 I have setup virtual hosts for 3 apps with virtual hosts config as 
 follows. These virtual hosts are first handled by Apache and mod_jk. My 
 apps have scheduler and automated mailing services.
 
 Host name=vhost.domain.com debug=0 appBase=”deploy” 
unpackWARs=true

 Aliaswww.vhost.domain.com/Alias
 Logger className=org.apache.catalina.logger.FileLogger
 directory=${jboss.server.home.dir}/log 
prefix=vhost_log1.  suffix=.log timestamp=true/
  Context path= 
 docBase=${jboss.server.home.dir}/deploy/application.war debug=0 
 reloadable=true/

 /Host
 
This config is mailing the same mail 7 time. Further I noticed that 
there  were 7 service started of the same kind. Querying the developer, 
he said that he had coded the apps to have the mail sent once every week. 
The mails are sent once every week but as said 7 copies of the same mail 
is delivered.
 
 The request for the app results in page not found if I follow the 
 following config, even thought there is no error in startup.
 
 Context path=application 
 docBase=${jboss.server.home.dir}/deploy/application.war debug=0 
 reloadable=true/
 
 
 
 Can you guys have any idea on this and help me troubleshoot ???
 
 
 Regards  Thanks

 
 Mahesh S Kudva


---
Robosoft Technologies - Partners in Product Development


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




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



Re: Multiple Threads for one webapp

2005-09-30 Thread Tim Funk
This still seems to be a programming issue (possibly a config issue). Without 
source and config files - I don't see how the mailing list can help resolve 
this.


-Tim

Mahesh S Kudva wrote:


Hi

I have restarted Tomact and made sure no threads run in the background. 
But still the problem persists. Every time tomcat is restarted, I can see 
the notification thread start Notification thread started...32237




Regards  Thanks

Mahesh S Kudva


-Original Message-
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Fri, 30 Sep 2005 09:56:09 -0400
Subject: Re: Multiple Threads for one webapp



It seems you have a thread started in the background during the life of
the 
application.

This thread goes to some external place of storage and to look for
emails to 
send.

It seems this thread is not stopped when a context is reloaded.
When the app is reloaded - a new thread is started.
In this case - the app was restarted 6 times - leaving you 7 threads
all 
looking to the smae external loctation for sending emails.


Solution: Use a ServletContextListerner to detect webapp shutdown so
the 
thread may be stopped.



-Tim

Mahesh S Kudva wrote:



Hi All

I have setup virtual hosts for 3 apps with virtual hosts config as 
follows. These virtual hosts are first handled by Apache and mod_jk.


My 


apps have scheduler and automated mailing services.

Host name=vhost.domain.com debug=0 appBase=”deploy” 
unpackWARs=true

Aliaswww.vhost.domain.com/Alias
Logger className=org.apache.catalina.logger.FileLogger
directory=${jboss.server.home.dir}/log 
prefix=vhost_log1.  suffix=.log timestamp=true/
 Context path= 
docBase=${jboss.server.home.dir}/deploy/application.war debug=0 
reloadable=true/

/Host

This config is mailing the same mail 7 time. Further I noticed that 
there  were 7 service started of the same kind. Querying the


developer, 


he said that he had coded the apps to have the mail sent once every


week. 


The mails are sent once every week but as said 7 copies of the same


mail 


is delivered.

The request for the app results in page not found if I follow the 
following config, even thought there is no error in startup.


Context path=application 
docBase=${jboss.server.home.dir}/deploy/application.war debug=0 
reloadable=true/




Can you guys have any idea on this and help me troubleshoot ???



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



Re: Multiple Threads for one webapp

2005-09-30 Thread Tim Funk
I think JBOSS support (or mailing list) would be more helpful. Everything 
described below doesn't make any sense to those of us who don't use JBOSS.


-Tim

Mahesh S Kudva wrote:


Hi

Thanks for the note. I just happened to see something strange. As I have 
configured 3 Virtual hosts, in the jboss home/server/default/work 
folder i can see the folders of each virtual host. Within each i can see 
all the hosted apps including localhost. 

The folder jboss home/server/default/work contains webapp1.domain.com, 
webapp2.domain.com and webapp3.domain.com


The folder jboss home/server/default/work/webapp1.domain.com contains 
webapp1, webapp2, webapp3 and jmx-console.


The folder jboss home/server/default/work/webapp2.domain.com contains 
webapp1, webapp2, webapp3 and jmx-console.


The folder jboss home/server/default/work/webapp3.domain.com contains 
webapp1, webapp2, webapp3 and jmx-console.


Within each of these there are two files session and cache. 


Is this causing the issue.??? Is this normal ???

Regards  Thanks

Mahesh S Kudva


-Original Message-
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Date: Fri, 30 Sep 2005 11:55:18 -0400
Subject: Re: Multiple Threads for one webapp



This still seems to be a programming issue (possibly a config issue).
Without 
source and config files - I don't see how the mailing list can help
resolve 
this.



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



Re: https to web server, http from proxy to tomcat

2005-09-28 Thread Tim Funk
There is also a reverse proxy implemented as a webapp which can be used as 
its own webapp or easily embedded inyour own webapp. (Courtesy of the Google SoC)


http://j2ep.sourceforge.net/

-Tim

Joost de Heer wrote:

[EMAIL PROTECTED] said:


We are currently using an nsapi plugin module for our proxy component.
As far as I know, it does not support reverse-proxy setup.

Since we are using the standard Sun One Web Server, I am not familiar with
reverse proxy.



For SUN ONE webserver you can download a reverse proxy plugin on SUN's
website (http://www.sun.com/download/products.xml?id=3f567f91). It's not
extremely hard to configure, but it does require manual edits in obj.conf
and magnus.conf.


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



Re: An error about Tomcat 4.0

2005-09-27 Thread Tim Funk

See the error logs ..
 java.lang.NoClassDefFoundError at
...
org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:72) 



For some reason - a class is missing. The source of the JSP should tell you 
the missing class.


-Tim

Greece wrote:

Hi,Everyone,
 
I am using cewolf to draw chart in Tomcat 4.0. And The program has been run successfully, but when I moved the same program file and used JAR file to the web server, whose OS is Solorias, there has been appearing the error message as below:
 
javax.servlet.ServletException

at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at 
org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:262)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)




root cause 
java.lang.NoClassDefFoundError	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)	at java.lang.Class.newInstance0(Class.java:308)	at java.lang.Class.newInstance(Class.java:261)	at java.beans.Beans.instantiate(Beans.java:204)	at java.beans.Beans.instantiate(Beans.java:48)	at org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:72)	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)	at

 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)  at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247

Re: HTTP header lines

2005-09-27 Thread Tim Funk

There is a configuration parameter on the Connector called server. For example:

server='Its a secret 180/3.14'

-Tim

Wilding, Gregory wrote:


How do I limit the amount of information disclosed in the HTTP header
lines within Tomcat
 


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



Re: change path of the session cookie

2005-09-26 Thread Tim Funk


http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html

emptySessionPath=true

-Tim

cristi wrote:


Hello all

Is there any possibility of changing the path of the
session cookie ?



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



Re: HTTP trace

2005-09-26 Thread Tim Funk

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html

See the allowTrace option

-Tim

Wilding, Gregory wrote:


Does anybody know how to disable HTTP trace within Tomcat

Thanks
 


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



Re: connecting httpd with Tomcat

2005-09-26 Thread Tim Funk

development on  mod_jk2 has been abandoned, not mod_jk

-Tim

Dale, Matt wrote:


JK 1.2.13 is the latest mod_jk and the one you should use. Development on 
mod_jk has been abandoned due to lack of developer interest and most of the 
features backported to JK.

 


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



Re: Question about tomcat startup ConcurrentModificationException

2005-09-26 Thread Tim Funk
Search bugzilla.  There is a bug report about ConcurrentModificationException 
- it has to do with mx4j having a race condition. The bug describes a fix.


-Tim

Maurice Yarrow wrote:


Hello Tomcat people

When tomcat is restarted, it occasionally (1 in 25 times)
gets the below exception.  (tomcat 5.0.28, on Fedora Core 1)

What is the significance of this?

Thanks
Maurice


INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 26, 2005 9:29:19 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Sep 26, 2005 9:29:19 AM org.apache.coyote.tomcat5.MapperListener init
WARNING: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap.putAllForCreate(HashMap.java:424)
at java.util.HashMap.clone(HashMap.java:656)
at 
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at 
mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:160 


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



Re: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Tim Funk

Servlet filter.

The filter can check the database status on init. Then the filter could be 
made smart enough to let all traffic through if the database comes back to 
life. (or conversely also goes away)


-Tim

Mike Miller wrote:

Hi, 


I am looking for options to prevent my web application from being
available if our database is not available. I've used context listeners
in the past, but since you can return a bad return code they don't like
the cleanest approach.  

 


I have tried registering a context listener and then throwing a
RuntimeException if the database is not available but that seems like a
kludge.



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



Re: How to limit the size of TOMCATs stdout file

2005-09-24 Thread Tim Funk
Tomcat doesn't explicitly log to standard output. The underlying logging 
mechanism does.   The docs and faq talk about how to configure logging so 
standard out is not used.


-Tim

Leon Rosenberg wrote:

actually tomcat spams a lot in the catalina.out, this is my favorite:
[EMAIL PROTECTED]: Exception Processing ErrorPa
ge[errorCode=404, location=/down/404.html]
ClientAbortException:  java.net.SocketException: Connection reset
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.j
ava:537)


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



Re: tld processing performance at startup

2005-09-23 Thread Tim Funk

There is an option to disable TLD processing. This is nice if:
1) You precompile
2) Or don't use tld files


See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html for 
disabling them


If you place listeners in your TLD files - I am unsure if they are picked up 
if the TLD is explicitly listed in web.xml. If not - you can place the 
listener explicitly in web.xml.



-Tim

Jilles van Gurp wrote:


Hi,

I have a large site running on tomcat with some tag libs. Restarting 
tomcat can take up to 30-40 seconds which is not that bad except that 
we'd prefer to minimize this time because apache can queue a lot of 
incoming requests in this 30 seconds. We need to restart often because 
we are still tinkering with the site even though it already went live. 
In general, shorter startup times would be really nice anyhow.


Some analysis of what is taking up most of this time has shown that 
tomcat is spending a lot of time (40-50%) processing all the files in 
the web application looking for tld descriptors. In this particular web 
application there a few thousand small files (e.g. xml descriptors, 
jsps, some static stuff, lots of scripts, etc). Only a small subset is 
jar files (about 20) and only about ten of the files are actually tlds, 
all conveniently located in a subdirectory of WEB-INF. The whole thing 
is deployed as an unzipped directory rather than a war file so we can 
update stuff faster (copy some jar files, stop/start). Auto reload is 
not compatible with our web app so we don't have that enabled.


This web log post: 
http://www.webweavertech.com/costin/archives/000164.html suggests that 
the reason for the poor performance may be a design flaw in the jsp spec 
which makes it necessary to do a lot of work. The ideal way would be for 
the tld descriptors to always be in the META-INF directory. However, the 
spec doesn't require this and tlds may be located anywhere in the 
webapplication. Is this analysis of the problem still correct for tomcat 
5.0.28?


On the other hand the web.xml does specify explicitly where the tlds are 
so I don't fully understand the need to look through the whole web 
application directory.


Is there a way to optimize this problem away (even partially) by e.g. 
telling tomcat explicitly what tlds to process?




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



Re: How to limit the size of TOMCATs stdout file

2005-09-23 Thread Tim Funk

See http://jakarta.apache.org/tomcat/faq/logging.html#catalina.out

ClientAbortExceptions are thrown by tomcat when the client presses stop 
before the page is downloaded but does not log the exception. If there is 
custom code trapping exception - it might be logging it. In this case - the 
custom code is too agressive in catching exceptions and should let the 
container handle them correctly. (And probably incorrectly using 
error.printStackTrace() instead of a logger)


-Tim

[EMAIL PROTECTED] wrote:


How do you limit the size of Tomcats stdout file.
 
If you look at version 5.5, the dialog for the service lets you put in

default or some path for the stdout file.
 
But there is no option to set the limiting size or other parameters as you

would with log4j.
 
This is the stdout log file which tomcat logs to if it gets something like a

network connection reset error.
 
This is not really the applications log file per se.
 
I tried asking this to the tomcat team via bugzilla and they were not

helpful.
 
thanks
 



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



Re: RES: Problems with gzip compression with Apache/Tomcat cluster and Firefox

2005-09-22 Thread Tim Funk
You need mod_gzip or mod_deflate(?) if your using apache in front of tomcat 
(via jk)


-Tim

Acácio Furtado Costa wrote:

Hi

We're having problems to configure gzip using TC559/Apache Cluster...

We moved the compression=on and others gzip declarations from connector 80 to 8009 
in all Tomcat Servers but it seems that Apache isn't serving gzipped html...

Do we also need to make any gzip configurations (mod_gzip?) in the Apache Server itself? 



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



Re: Remote Address Valve Lets Everything Through

2005-09-20 Thread Tim Funk

Not: valve
Try: Valve

-Tim

Mark Leone wrote:

KEREM ERKAN wrote:


Hi Mark,

Is it possible that you may have mistyped allow=xxx.xxx.xxx.xxx as
allow=xxx.xxx.xxx.xxx  in your configuration? If you did not 
accidentally
delete the () from the right hand side of allow when sending to the 
list,

that may be your problem.



Thanks for the suggestion. I do have the valve entered correctly. I cut 
and pasted from the style-sheet-rendered version of server.xml- that's 
why both of my posts had errors. Here's the valve as cut out of the 
source page for server.xml, with the IP address masked:


valve className=org.apache.catalina.valves.RemoteAddrValve 
allow=xxx.xxx.xxx.xxx/


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



Re: Starting options

2005-09-20 Thread Tim Funk

See catalina.sh for options you can set on startup.

CATALINA_TMPDIR - should allow you to set your temp directory.

-Tim

Krzysztof Graczyk wrote:


Hi!

I have a question about starting options of Tomcat server.
Is there any starting option (from command line - 
org.apache.catalina.startup.Bootstrap start) or java virtual machine 
option that makes Tomcat to look for configuration file in other 
directories than $CATALINA_BASE or $CATALINA_HOME ?
And the second question - is there any possibility to make Tomcat to 
write any files it creates (like compiled jsp files and configuration 
files and temporary files) to a directory I want ?




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



Re: Mixing Form-based authentication with Public Resources

2005-09-20 Thread Tim Funk

No solution. You can filter prefix, or suffix, but not both.


-Tim

Marquez, Omar wrote:


Hi,

Im using Tomcat Form-based Authentication with a JDBC realm, this is working
ok for all my pages that are protected trough web.xml with 


  security-constraint
web-resource-collection
  web-resource-nameAll System/web-resource-name
  url-pattern*.do/url-pattern
 url-pattern*.jsp/url-pattern
 /web-resource-collection
auth-constraint
  role-namesys_user/role-name
  /auth-constraint
user-data-constraint
  transport-guaranteeNONE/transport-guarantee
/user-data-constraint
  /security-constraint

however, now I have a set of pages, report*.jps and report*.do for which I
would like to NOT require authentication. I.e. Public access. My question
is how can I declare a Public Resource in web xml that will not affect the
All System security constrain above ?
I tried, without luck, inserting  before the constrain above a new constrain
like so:

  security-constraint
web-resource-collection
  web-resource-namePublic Resources/web-resource-name
  url-pattern/includes/*/url-pattern
  url-patternreport*.do/url-pattern
 url-patternreport*.jsp/url-pattern
 /web-resource-collection
auth-constraint
  role-nameAnonymous/role-name
/auth-constraint
user-data-constraint
  transport-guaranteeNONE/transport-guarantee
/user-data-constraint
  /security-constraint

Anybody knows the solution for this problem?
Thanks,
Omar



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



Re: Starting options

2005-09-20 Thread Tim Funk
I'm surprised the CATALINA_TMPDIR trick is not working. As for changing 
(server.xml and ROOT.xml)  - I think you are stuck with those in the 
situation you are describing.


-Tim

Krzysztof Graczyk wrote:


Arup Vidyerthy wrote:


Sorry for being nosy but can I ask you exactly why do you want these
directories in different palces so that I can understand your problem a
little more?  

Yea, I have to change configuration scripts (server.xml and ROOT.xml), 
from external application, but it must be placed in somewhere where I 
have permission to change those files. In CATALINA_HOME and 
CATALINA_BASE I dont have privillages to write. I have to change this 
file because I want to set log dir paths and working paths to another 
destination.




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



Re: Tomcat on UNIX

2005-09-16 Thread Tim Funk

java 1.4

-Tim

Wei Zhao wrote:

Hi:

What's the JDK/JVM requirement for running Tomcat 5.5
on AIX 5.1 and HP-UX11?



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



Re: How to share static content across applications

2005-09-15 Thread Tim Funk
I typically create a 3rd webapp with those shared images and other similar 
assets.


Otherwise - you can import those shared assets into your webapp at build time 
by placing all the shared assets into their own version control repository.


-Tim

Ritchie Gillam wrote:

I am not sure if this is suppose to be done in the Tomcat/Java world but here 
is my question anyway.

How do I go about allowing applications to share static content in Tomcat 
5.5.7?   Some would argue that each WAR file should be self contained but 
surely there is a way to use the same image file for all applications that need 
it.  An example would be an EXIT button.

Any help in this manner is greatly appreciated.



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



Re: How to share static content across applications

2005-09-15 Thread Tim Funk
If the thing being shared are browser sepefic such as images - I create a new 
webapp. For example: for all my common images I could create an images webapp.

Context path=/images .../

Then my webapps which refernce those images can link to /images directly (and 
take it on faith that there is an /images webapp out there) or we could use a 
configuration directive in case /images was alreaddy taken in which case we 
could create a webapp called /moreimages. In this case - if your deploying in 
a file heirarchy and not war files - you can update those images and all is OK.


If you need run time config resources such as XML files or properties files - 
that is a whole different story. I typically place them in a JAR file is 
created at build time by a using a build time dependency.


-Tim

Ritchie Gillam wrote:
In fact that is sort of what I am doing. 


 I am creating a new Context element for the shared assets but the problem is by putting the 
Context element directly in  the server.xml file, I am not longer able to undeploy and redeploy the 
shared assets application without restarting the server which is not an option for us 
(According to Tomcat 5.5.7 documentation).  The recommended way from Tomcat Users is to  put the context 
inside of the app/META-INF/context.xml file.

So the shared images are being found and rendered but by using the Content 
inside of server.xml directly, I am not able to redeploy without restarting the 
server which is even a bigger problem.  This is really the reason I posted the 
question in the first place.

Did you mean you are using another Content element to find the shared 
content?  If so, where did you put it.  If not, how are you referencing with a 3rd 
app when it is not a true app but just resources to share?

Appreciate any more advice you can give.

Thanks in advance,




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



Re: Why are tag files always compiled to class files?

2005-09-13 Thread Tim Funk
Yeah, I ran into this too. It would require a refactoring of jasper to allow 
this. The last time I looked into this - at first glance, it appeared the tag 
file need compiled so that all of its properties can be looked up for pages 
which used that tag file.


-Tim

ping xu wrote:


Hi,
I hope someone could shed some light on this: I'm trying to pre-compile JSPs 
using Jasper (Jasper2 Ant task from the document). My Tomcat version is 
5.0.28. In my webapp, there are a few custom tags in tag file format. When I 
set the jasper2 comiple attribute to false, I expect only java files being 
generated by Jasper Ant task -- they shouldn't be compiled to class files. 
This is generally true for all the JSP files. However the tag files don't 
follow this rule, they always get compiled to class files. Is it possible to 
let jasper only generate the java files for tag files?


Thanks,



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



Re: URL embedded filename suggestion not working inTomcat

2005-09-13 Thread Tim Funk
You could use the Content-Disposition header to send the filename back to the 
user.


-Tim

Ron Cozad wrote:


This url is not working in Tomcat, but it works with Apache http server.

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

 


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

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



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



Re: empty lines in HTML output

2005-09-11 Thread Tim Funk

trimSpaces is a a feature of tomcat 5

-Tim

Eugeny N Dzhurinsky wrote:

On Sat, Sep 10, 2005 at 09:36:16PM +0200, Leon Rosenberg wrote:


Check for trimSpaces parameter in to the jsp servlet in conf/web.xml

But beware, combined with genStrAsCharArray option it can crash your tomcat
(at least it does with mine, at 5.0.25)



This seem to not work on 4.1.**?



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



Re: Pre-compiled JSPs?

2005-09-07 Thread Tim Funk
Yes, think of jspf like .h files in c. You don't compile .h files, but .c 
files include .h files at compile time.


-Tim

Richard Burman wrote:


Hi Tim,

Sorry, I'm sure I'm being a bit dense but I seem to be missing something
important here.

Are the jspf files included (embedded) into the class file when Jasper
compiles the jsp files to java? Essentially, the compiled class file
will include the original jsp and also the fragment?
 


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



Re: Disabling IdentityCheck (port 113)

2005-09-07 Thread Tim Funk
Odd. Are you sure its not your OS logging all incoming TCP connections? There 
is no such setting in tomcat which does this.


-Tim

Jim Doble wrote:


I am using Tomcat as a stand-alone web server, and I have noticed that
whenever my browser opens up a TCP connection to the web server, the server
attempts (unsuccessfully) to establish a TCP connection to port 113 on the
host where the browser is running.

This option can cause problems in firewall scenarios where the TCP traffic
on port 113 is discarded, because the server waits for a 30 second timeout
before proceeding. As such, I would like to disable this option, but I
haven't been able to figure out how to do that.
 


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



Re: HttpServletResponse's getOutputStream() methtod.

2005-09-06 Thread Tim Funk
If you want to disable chunked encoding - you need to determine how much data 
you will send so setContentLength can be called.


-Tim

Saminda Abeyruwan wrote:

Hi all,

I'm using tomcat 5.0.28 in Linux environment.

In doPost(...) method i'm asking HttpServletResponse's output stream.  
Tomcat provide me with
*org.apache.coyote.tomcat5.CoyoteResponseFacade *getOutputStream(), 
which gives me a chunked output stream.  Providing  a chunked output  
stream  limited the flexibility of  interoperability with other systems, 
which would not support chunked stream.



Could someone pls sujest me a work around to get through with it. To get 
a standard outputStream out of prior rather a chunked output stream.




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



Re: HttpServletResponse's getOutputStream() methtod.

2005-09-06 Thread Tim Funk
I thought if setContentLength() is used, then chunked encoding is not used. 
Is that not the case?


-Tim

Saminda Abeyruwan wrote:


Tim Funk wrote:

If you want to disable chunked encoding - you need to determine how 
much data you will send so setContentLength can be called.


-Tim



Hi Tim,

Thanks for the reply,

Is it something like,
response.setContentLength(1000);
OutputStream out = response.getOutputStream();

Yet, i would like to have a outputsteam without any chunking at all.




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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used 
without a default constructor being available.


If you are using include files which were as meant as compile time include 
fragments, rename them (the include files) to jspf and they will be ignored 
by the jsp compiler.


-Tim

Richard Burman wrote:


Ah, I thought it was all too good to be true. Now that I have an
understanding of how to put it all together, I have given it a go but
hit another snag.

Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag?
Well, of course, that means that when the JSPs were turned into Java
classes, they ignored the fact that the bean wasn't declared in that JSP
and generated the classes regardless. What about when you try to compile
the Java into a .class file? Suddenly, the Java is missing a variable
declaration and cannot compile the class. Is there a way round this? If
not, what's the point in including the flag?!
 


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



Re: How to stop Tomcat supplying HTML for statues

2005-09-06 Thread Tim Funk

http://jakarta.apache.org/tomcat/faq/misc.html#error

-Tim

David Goodenough wrote:


I have a server which is being used only for XML servlets.  I would like
to send back error responses either as an XML error or, in the case of
a non-200 status code just to send back the status code and a single
line text message.

I set the status (which seems to work) and the text, which again
seems to be sent back on the response header, but I also get a 
bunch of HTML text which gets in the way of processing the

error text which I want to do using XmlHttpRequest.

I have not included any ErrorPage tags in my web.xml nor are there
any in the global web.xml.
 


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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk

For example:

File a.jsp
% String worldVar = null; %
[EMAIL PROTECTED] file='b.jsp'%
Hello  %=worldVar%

File b.jsp
%worldVar = world%


Notice b.jsp will not precompile. But then again - no one should be calling 
b.jsp since its not a jsp - its a jsp fragment. It should be calld b.jspf.


I am guessing - your pages have a similar issue.

-Tim


Richard Burman wrote:


Sorry, I don't understand. How will my JSP compile at all if a section
(fragment) is ignored and, presumably, omitted from the resulting java
file?

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 15:05

To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is
used 
without a default constructor being available.


If you are using include files which were as meant as compile time
include 
fragments, rename them (the include files) to jspf and they will be
ignored 
by the jsp compiler.


-Tim




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



Re: compile precompile jsps at runtime

2005-09-06 Thread Tim Funk

Can't with tomcat out of the box.

-Tim

Zachi Hazan wrote:


Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they are 
deployed I still want to make changes to the jsps that will take effect 
immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?



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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
From the jasper task all the [valid] jsp's are turned into java files and 
compiled into class files. Those class files need to be a jar file in 
WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite 
web.xml so that all the mappings from the JSP -- class file are taken care of.


Once all the jsp's are compiled and mapped in web.xml. They can be deleted 
from the deployment war file (or dir).



-Tim

Richard Burman wrote:


Hi Tim,

Yeah, that's my exact issue, except the pages somewhat more complicated
than your example. ;o)

I've tried renaming one of them to jspf and, unsurprisingly, it has been
ignored by the JSP compiler. I'll have to take your word that it would
still work in the parent (once the reference had been changed to point
to jspf, not jsp) as I don't have a test bed up and running at the
moment.

Okay, so we've ascertained how to avoid the 'fragments' being compiled
because they're effectively not valid JSP pages because they use beans
that are never declared within themselves. The 'parent' page will
compile because it has all it needs to be compiled but the fragment
cannot be compiled without the presence of the parent. Does this mean
that I can only include the 'parent' JSPs in my JAR file and included in
my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
then? I'd really rather get them all together in a JAR, if possible,
which is why I'm on this voyage of discovery! :o)



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



Re: compile precompile jsps at runtime

2005-09-06 Thread Tim Funk

A lot of custom coding on your own.

You'd need a filter which traps all your precompiled servlet mappings and 
then checks to see of the jsp the file was mapped to has changed. Then you'd 
need to somehow manage compiling the JSP and loading the class file while 
ignoring the existing mapping. In a nutshell ... not pretty.


Or you can have tomcat run in production mode (for the jsp servlet) and all 
the jsp's get compiled in the background when they are changed. But this 
relies on jsps NOT being precompiled.


-Tim

Zachi Hazan wrote:


So, how can I do it with tomcat not out of the box?

Tim Funk wrote:


Can't with tomcat out of the box.

-Tim

Zachi Hazan wrote:


Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they 
are deployed I still want to make changes to the jsps that will take 
effect immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?



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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
There is no need to turn jspf into classes. The jspf are included by real jsp 
files. Those jsp files are turned into the class files.


-Tim

Richard Burman wrote:


Tim,

Is there no way of turning the fragment (jspf) file into .class files or
do they need to remain as JSPs?

Cheers,
Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 16:14

To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

 From the jasper task all the [valid] jsp's are turned into java files
and 
compiled into class files. Those class files need to be a jar file in 
WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite 
web.xml so that all the mappings from the JSP -- class file are taken

care of.

Once all the jsp's are compiled and mapped in web.xml. They can be
deleted 
from the deployment war file (or dir).



-Tim

Richard Burman wrote:



Hi Tim,

Yeah, that's my exact issue, except the pages somewhat more


complicated


than your example. ;o)

I've tried renaming one of them to jspf and, unsurprisingly, it has


been


ignored by the JSP compiler. I'll have to take your word that it would
still work in the parent (once the reference had been changed to point
to jspf, not jsp) as I don't have a test bed up and running at the
moment.

Okay, so we've ascertained how to avoid the 'fragments' being compiled
because they're effectively not valid JSP pages because they use beans
that are never declared within themselves. The 'parent' page will
compile because it has all it needs to be compiled but the fragment
cannot be compiled without the presence of the parent. Does this mean
that I can only include the 'parent' JSPs in my JAR file and included


in


my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
then? I'd really rather get them all together in a JAR, if possible,
which is why I'm on this voyage of discovery! :o)



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



Re: How to stop Tomcat supplying HTML for statues

2005-09-06 Thread Tim Funk

Then make the error page a jsp which clears the stream and prints what you want.

If your servlet already prints what you need, then force the buffer to be 
flushed so that the response is committed and an error page is not shown.


-Tim

David Goodenough wrote:


No, this is the reverse of what I want.  I want to STOP it sending an
HTML page, rather than the error-page tag to set it.

David

On Tuesday 06 September 2005 15:06, Tim Funk wrote:


http://jakarta.apache.org/tomcat/faq/misc.html#error

-Tim

David Goodenough wrote:


I have a server which is being used only for XML servlets.  I would like
to send back error responses either as an XML error or, in the case of
a non-200 status code just to send back the status code and a single
line text message.

I set the status (which seems to work) and the text, which again
seems to be sent back on the response header, but I also get a
bunch of HTML text which gets in the way of processing the
error text which I want to do using XmlHttpRequest.

I have not included any ErrorPage tags in my web.xml nor are there
any in the global web.xml.



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



Re: How to stop Tomcat supplying HTML for statues

2005-09-06 Thread Tim Funk

Don't use sendError.
- Call response.setStatus(int).
- Calculate the  size of your body text
- Call setContentLength(value from previous step)
- Send the message in the output stream
- Profit! ;)


-Tim

David Goodenough wrote:
Maybe we are talking at cross purposes.  I will try to explain what I am 
trying to achieve.


When I have a non-200 response ALL I want to send back is the status
code and the message inserted with the sendError.  Nothing else.

Currently I just do a sendError, should I also write a zero length buffer
to the OutputStream and flush it?


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



Re: Dropped response

2005-09-01 Thread Tim Funk

Tomcat should send back a 404. But the RequestDumperValve doesn't log responses.

-Tim

Rob Hunt wrote:


I saw this interesting request show up in my log file:

2005-08-28 20:11:08 RequestDumperValve[catalina]: REQUEST URI   
=/cgi-bin/jud.cgi

SNIP


And then there's nothing noting what the response was, which should have been a 
404 since I've no such host defined.  I've got a valve defined that will 
intercept requests for a host not defined in server.xml and send back a 404 
response instead of allowing the request to flow to the default host for the 
engine.



Under what conditions will Tomcat (5.0.19) not send (or log) any response?



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



Re: errors building tomcat5 from source

2005-09-01 Thread Tim Funk
The location to download junit may have changed or that version might not be 
available for download. See build.properties.default for where it is being 
downloaded and change it there OR copy that entry with a valid URL to 
build.properties.


-Tim

Michael P. Soulier wrote:


Hi,

I didn't see this in the FAQ, so I'm asking. I'm trying to build tomcat 
5.5.9 from the source tarball on my Linux box. Unfortunately, I'm 
getting this.


downloadzip:
  [get] Getting: 
http://unc.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip

  [get] To: /home/msoulier/tomcat/file.zip
[unzip] Expanding: /home/msoulier/tomcat/file.zip into 
/home/msoulier/tomcat


BUILD FAILED
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/build.xml:49: The following 
error occurred while executing this line:
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1811: 
The following error occurred while executing this line:
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1911: 
Error while expanding /home/msoulier/tomcat/file.zip


It fails here, as apparently this zip file is not a zip file.

Any suggestions?

Thanks,
Mike



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



Re: Include directive works strangely in Tomcat 4.1

2005-08-25 Thread Tim Funk
Hopefully, you are declaring fieldNames somewhere - but for some reason - the 
 scope is probably is not correct. Looking into more detail translated jsp 
for fieldNames should do the trick.


the static block is a helpful feature that lets the jsp compiler re-compile 
if on eo the files if depends on changes. (Since these are compile time 
includes, not run time includes)


-Tim


[EMAIL PROTECTED] wrote:

I was trying to include a bit of common Java code using the include
directive. But it appears to not be working as I would expect. A few places
I checked include:
  http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro8.html

The gist is that the included file should be inserted inline to the JSP at
translation time (from JSP to .java before being compiled).

But what I am seeing in the generated Java code is that the actual code is
not included/translated inline. Instead vector of includes is built  like
the following:

  static {
_jspx_includes = new java.util.Vector(9);
_jspx_includes.add(/header.jsp);
_jspx_includes.add(/authentication.jsp);
_jspx_includes.add(/sessionCheck.jsp);
_jspx_includes.add(/accessCheck.jsp);
_jspx_includes.add(/header_banner.jsp);
_jspx_includes.add(/client_admin_menu.jsp);
_jspx_includes.add(/include_add_update_member_1.jsp);
_jspx_includes.add(/include_add_update_member_2.jsp);
_jspx_includes.add(/footer.jsp);
  }


Here is the error I am getting:

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

An error occurred at line: 48 in the jsp file: /client_admin_add_member.jsp

Generated servlet error:
[javac] Compiling 1 source file

/var/tomcat-dev/work/Standalone/firedrumtestaccount.com/_/client_admin_add_m
ember_jsp.java:702: cannot find symbol
symbol  : variable fieldNames
location: class org.apache.jsp.client_admin_add_member_jsp
fieldNames = new String[cftdl.getList().size()];
^

Below is the relevant piece of the JSP. Can anyone explain this ?

Thanks - Richard



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



Re: Tomcat compileted for 64-bit Xeon machines

2005-08-25 Thread Tim Funk
The 64 bit edition has been available since the public release of tomcat 
including all 3.X releases.


Actually - to get 64bit performance - you need to be sure your JVM by 
Sun/BEA/IBM is one optimized for a 64 bit machine. The JVM byte code doesn't 
care whether your system is 32 or 64 bit.


So in a nutshell - the answer is 1.

-Tim

Philip Widan wrote:


I'd like to run Tomcat on a Xeon 64-bit machine as a 64-bit application, not
a 32-bit application.

My questions are:
1. Is there a 64-bit Tomcat download available?
2. If '1' is no, then does the Tomcat team plan to make one available soon?
3. If '2' is no, then has anyone succesfully compiled Tomcat for 64-bit, in
which case, can you give me suggestions regarding doing this?
 


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



Re: Tomcat compileted for 64-bit Xeon machines

2005-08-25 Thread Tim Funk
Ahh ... by the email - you mean the wrappers which invoke the JVM. your best 
best is to compile from source a 64 bit version. Otherwise - a 64 bit version 
would be available whenever one of the committers gets a 64 bit xeon machine.


-Tim

Philip Widan wrote:


Thanks Tim. Can you point me to where I can find the 64-bit edition, since I
can't see anything specific on the Tomcat website. Or does the download
include both 32-bit and 64-bit?



-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 25 August 2005 12:59
To: Tomcat Users List
Subject: Re: Tomcat compileted for 64-bit Xeon machines


The 64 bit edition has been available since the public
release of tomcat
including all 3.X releases.

Actually - to get 64bit performance - you need to be sure your JVM by
Sun/BEA/IBM is one optimized for a 64 bit machine. The JVM
byte code doesn't
care whether your system is 32 or 64 bit.

So in a nutshell - the answer is 1.

-Tim



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



Re: jar files

2005-08-24 Thread Tim Funk
Personally - I prefer jar files. Its one file to keep track of. Instead of 
100's of .class files. When you start building up your library - you start to 
get a large directory of WEB-INF/classes. It much easier to manage them as 
jar files.


-Tim

Mott Leroy wrote:
This probably sounds like a very newbie question, but for your own 
application classes, (not third party), is there any particular reason 
to jar them and put them into WEB-INF/lib vs compiling them as class 
files to WEB-INF/classes? The classloader won't blindly just load the 
whole jar will it? For an applet, using Jars makes some sense to avoid 
continually downloading class files, what are the advantages for web 
applications?


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



Re: JSP 2.1 support?

2005-08-23 Thread Tim Funk
There has been no talk of tomcat 6. It is expected that once the 2.5 version 
of the servlet spec is announced (in draft form) - work would begin on tomcat6.


-Tim

Jonathan Eric Miller wrote:
Does anyone know when JSP 2.1 support is expected? Will that be in 
Tomcat 6?


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



Re: Anyone familiar where SavedRequest class can be found?

2005-08-22 Thread Tim Funk

server/lib/catalina.jar

-Tim

Mark Goking wrote:


Anyone know which jar file this belongs?
I found this article, and this could be the solution to retaining
request parameters after logging in

http://sourceforge.net/tracker/?group_id=59484atid=491164func=detaila
id=766413



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



tomcat 5.0.19 randomly stops taking http requests

2005-08-15 Thread Tim Lam

   Tomcat 5.0.19 is actually still running, but stops taking http requests
   randomly. It will run just fine for one or two weeks, then in the middles
   of the night, or over the weekend when no one is using tomcat at all, it
   stops taking requests (I know when it happens because I have a standalone
   application that tries retrieving a webpage from Tomcat every half hour to
   check if it's still up).
   The catalina.out log file doesn't show anything unusual, it's actually
   still running, so is the Tomcat process. But trying to reach a web page
   will show a timeout error on any browser. And sometimes trying to shutdown
   tomcat after it's hung doesn't work, I have to manually kill the tomcat
   process.
   I am using JVM 1.4.2_02.
   Any help would be appreciated, Thanks.
   ps. I am new to using this mailing list, and have a question, is it
   required to subscribe to the tomcat-user list in order to ask questions?
   or can I just send emails to the list and replies will get sent back
   directly to my email address?

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



Re: Tomcat W3C Access Log

2005-08-12 Thread Tim Funk

See ...
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/valves/ExtendedAccessLogValve.html
Valve className=org.apache.catalina.valves.ExtendedAccessLogValve
directory=logs
pattern='c-ip cs-method cs-uri sc-status time'
prefix=localhost_access_log. suffix=.txt
resolveHosts=false/

It can be declared at the host, context, or engine level.
-Tim

Björn Andersen wrote:


Hi,

We are hosting webapplications on IIS with an Tomcat-Backend connected via 
JK2.
We analyze the IIS-Logs to supply Webstats. Now, the ISAPI-calls to the JK2 
can not be analyzed.

We see that Tomcat has a Logger-Valve for a W3C format access log.
How can we configrue our Tomcatfarm to produce W3C-conform per-application 
accesslogs?

Preferably in server.xml, so we don't have to change the apps.
If you gotta build it manually in the applcations, how is that done?
 


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



Re: Security Questions Regarding Tomcat

2005-08-11 Thread Tim Funk

The Server header can be configured in the Connector declaration.

server='Sun Solaris IIS/6.0'

To limit the HTTP methods this can be done a few ways;
1) Use a servlet filter
2) Use web.xml and security constraints on those method types
3) ???


-Tim


LFM wrote:

Hi!

I'm hardening a Web Server running Tomcat for a client, but I'm having
difficulty in finding information on how to accomplish the following
tasks (bored of googling so I decided to ask here):
1. Remove/modify the banner presented by the coyote connector on the
server header of an http reply.
2. Limit the HTTP methods available. (I wan't to disable trace, put,
delete).



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



Re: Security Questions Regarding Tomcat

2005-08-11 Thread Tim Funk

Setting the server header is a tomcat 5.5 feature.

-Tim

LFM wrote:
Tim, 


Thanks for the reply, but I can't get in working:

In conf/server.xml I added server=TEST, as shown:

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8180 minProcessors=5 maxProcessors=75
enableLookups=true acceptCount=10 debug=0
connectionTimeout=2 useURIValidationHack=false server=TEST/

Stopped, started Tomcat. nc'ed to localhost, but still got the old
server header.

$ nc localhost 8180
GET / HTTP/1.0

HTTP/1.1 302 Moved Temporarily
Location: http://localhost.localdomain:8180/index.jsp
Content-Length: 0
Date: Thu, 11 Aug 2005 20:15:38 GMT
Server: Apache-Coyote/1.1
Connection: close

What I'm I doing wrong?

Thanks!

Leandro



On Thu, 2005-08-11 at 15:56 -0400, Tim Funk wrote:


The Server header can be configured in the Connector declaration.

server='Sun Solaris IIS/6.0'

To limit the HTTP methods this can be done a few ways;
1) Use a servlet filter
2) Use web.xml and security constraints on those method types
3) ???


-Tim


LFM wrote:


Hi!

I'm hardening a Web Server running Tomcat for a client, but I'm having
difficulty in finding information on how to accomplish the following
tasks (bored of googling so I decided to ask here):
1. Remove/modify the banner presented by the coyote connector on the
server header of an http reply.
2. Limit the HTTP methods available. (I wan't to disable trace, put,
delete).



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



Re: Tomcat and workers(2).properties files

2005-08-11 Thread Tim Funk

correct.

-Tim


Nathan Hook wrote:


Greetings,

Does Tomcat itself ever use either the
workers.properties or the worker2.properties files?

My understanding is that these files are just example
property files for the Apache2 mod_jk(2) modules and
that Tomcat itself never references these files?  Is
this true?
 


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



Re: Does JspC in 5.0 rely on Hibernate?

2005-08-10 Thread Tim Funk

There is definitely no dependency on hibernate.

Since it is looking for: net/sf/hibernate/Lifecycle - I might be *guessing* 
there could be a taglib (or something) somewhere with that might by trying to 
create a net.sf.hibernate.Lifecycle. Otherwise - there might be a class which 
(indirectly) inherits from net.sf.hibernate.Lifecycle.


-Tim

Will Hartung wrote:

Hi all!

I'm working on migrating from Tomcat 4.1.x to 5.0.x, and one of the
components is JspC.

Using the ANT Task presented in the 5.0 docs as inspiration I have:

  target name=jspcx depends=ensure-jsp-src

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/../lib/tools.jar/
fileset dir=${tomcat.home}/bin
  include name=*.jar/
/fileset
fileset dir=${tomcat.home}/server/lib
  include name=*.jar/
/fileset
fileset dir=${tomcat.home}/common/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${image}
 webXmlFragment=${jsp.webapp.xml}
 outputDir=${jsp.src.dir}
 verbose=99 /

  /target

I added the verbose tag to get some debugging info.

During the build, I get this:

  [jasper2] Aug 9, 2005 4:01:56 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \Common\Calendar.jsp
  [jasper2] Aug 9, 2005 4:01:56 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \Common\CancelDialog.jsp
  [jasper2] Aug 9, 2005 4:01:56 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \Common\CCMFulfillmentRequestFilterFrame.jsp
  [jasper2] Aug 9, 2005 4:01:56 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \Common\CCMFulfillmentRequestFilterNav.jsp
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:c:/ecms/Working/WebServerCode/build.xml:385:
java.lang.NoClassDefFoundError
: net/sf/hibernate/Lifecycle

If I immediately restart Ant, if continues on it merry way, goes farther,
and then I get the NoClassDefFoundError again.

So, it's not my JSPs (which don't use hibernate), and appears to be JspC
itself!

I don't see anything resembling a Hibernate jar in the Tomcat distro, so I'm
just curious where this might cropping up.



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



Re: sendRedirect still does not handle mailto correctly

2005-08-10 Thread Tim Funk

The fix was made after 4.1.31 ...

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java?rev=1.40view=log

-Tim

[EMAIL PROTECTED] wrote:

A while back we tried to use response.sendRedirect with a
mailto:[EMAIL PROTECTED] link. It would not work, so we put together a
kluge using a separate page.

I was just checking and Bugzilla issue #18147:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=18147

This says the problem was fixed in both Tomcat 4 and 5 on June 20th of 2004.

I just downloaded and installed Tomcat 4.1.31 - the files in the archive
are dated September 25, 2004 - AFTER June 20, 2004, so I'm thinking it
should include the fix.

However when we try the redirect we still get the same result - basically
the to address gets stripped off when the link is processed by
sendRedirect.

I tried looking through the source to see if mailto is handled any
differently, but so far have not found anything.

Does anyone know if Tomcat 4.1.31 does fix this issued? If not any other
suggestions?


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



Re: sendRedirect still does not handle mailto correctly

2005-08-10 Thread Tim Funk
Who knows when a 4.1.32 will come out. The easiest thing is to get the file 
revision and compile that file and drop it into the server/classes directory.


-Tim

[EMAIL PROTECTED] wrote:

Tim, Thanks for the quick response. Is a 4.1.32 in the works at all? 


Otherwise I guess that means that we need to build 4.1 from source or
upgrade to a later version of 5.0 or 5.5. We were trying to put that off a
bit longer.

Thanks again - Richard

Original Message:
-
From: Tim Funk [EMAIL PROTECTED]
Date: Wed, 10 Aug 2005 14:15:46 -0400
To: tomcat-user@jakarta.apache.org
Subject: Re: sendRedirect still does not handle mailto correctly


The fix was made after 4.1.31 ...

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/
org/apache/coyote/tomcat4/CoyoteResponse.java?rev=1.40view=log

-Tim

[EMAIL PROTECTED] wrote:


A while back we tried to use response.sendRedirect with a
mailto:[EMAIL PROTECTED] link. It would not work, so we put together a
kluge using a separate page.

I was just checking and Bugzilla issue #18147:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=18147

This says the problem was fixed in both Tomcat 4 and 5 on June 20th of


2004.


I just downloaded and installed Tomcat 4.1.31 - the files in the archive
are dated September 25, 2004 - AFTER June 20, 2004, so I'm thinking it
should include the fix.

However when we try the redirect we still get the same result - basically
the to address gets stripped off when the link is processed by
sendRedirect.

I tried looking through the source to see if mailto is handled any
differently, but so far have not found anything.

Does anyone know if Tomcat 4.1.31 does fix this issued? If not any other
suggestions?
 


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



Re: sendRedirect still does not handle mailto correctly

2005-08-10 Thread Tim Funk

1) Download this file: (The patched revision from CVS)
http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java?rev=1.38
2) Put $CATALINA_HOME/common/lib/*.jar, $CATALINA_HOME/server/lib/*.jar in 
your CLASSPATH for compiling

3) javac -d $CATALINA_HOME/server/classes CoyoteResponse.java
4) restart tomcat
5) Done

-Tim

[EMAIL PROTECTED] wrote:


Tim,

Thanks again. Yes, that's what I'm doing I downloaded the Jakarta
connectors source, got the update file from CVS and now am going through
dependency hell getting each of the pre-required packages downloaded and
installed.

Is there an easier way? I'm probably close to done, but for a single
compiled class. Hey at least the source is available.
 


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



Re: error in CATALINA startup in UNIX

2005-08-09 Thread Tim Funk
If you used HP's tar - then the you might have some bad files. YOu need to 
use the GNU tar. To uncompress the .tgz file.


-Tim

Kurniawan Kurt wrote:

Hi, All.


We have problem in starting Tomcat 5.0.28 in one of out HP-UX.
We have installed it so many times in both HP-UX and Win, and never had problem
.
We use the exact same GZ file for installation. The same java version and the 
same JAVA_HOME directory
We use the same profile and settings, but somehow, this time it decided it 
doesn't want to start.
The environment is as follows:


Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2.08-050401-17:46)
Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.08-050401-19:33-PA_RISC2.0 PA2.0 
(aCC_AP), mixed mode)


Using CATALINA_BASE:   /opt/wm/jakarta-tomcat-5.0.28
Using CATALINA_HOME:   /opt/wm/jakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: /opt/wm/jakarta-tomcat-5.0.28/temp
Using JAVA_HOME:   /opt/java1.4


I've got this following error:


java.lang.NoSuchMethodException: 
org.apache.catalina.startup.Catalina.setAwait(boolean)
at java.lang.Class.getMethod(Class.java:986)
at org.apache.catalina.startup.Bootstrap.setAwait(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:423)




I've checked the CLASSPATH etc. Everything is okay. In all machines, We have 
all CLASSPATH setup. We tools.jar, servlet-api.jar and jsp-api.jar
I know this has something to do with class-loading in the bootstrap.jar, but 
don't have a clue of what and how to solve this.


I've compare the CLASSPATH (when it runs the catalina.sh run command, by 
ECHO-ing the env) from machine  that can load up catalina properly and this particular 
one that has problem, but couldn't find the different.


I've google-ed around, and could not find any answer. I'm sure this must have 
happened to somebody before. Could any one give me some hints ?



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



tomcat 5.0.19 randomly stops taking http requests

2005-08-08 Thread Tim Lam
   Tomcat 5.0.19 is actually still running, but stops taking http requests
   randomly. It will run just fine for one or two weeks, then in the middles
   of the night, or over the weekend when no one is using tomcat at all, it
   stops taking requests (I know when it happens because I have a standalone
   application that tries retrieving a webpage from Tomcat every half hour to
   check if it's still up).
   The catalina.out log file doesn't show anything unusual, it's actually
   still running, so is the Tomcat process. But trying to reach a web page
   will show a timeout error on any browser. And sometimes trying to shutdown
   tomcat after it's hung doesn't work, I have to manually kill the tomcat
   process.
   I am using JVM 1.4.2_02.
   Any help would be appreciated, Thanks.
   ps. I am new to using this mailing list, and have a question, is it
   required to subscribe to the tomcat-user list in order to ask questions?
   or can I just send emails to the list and replies will get sent back
   directly to my email address?


Re: suppress directory listing

2005-08-04 Thread Tim Funk

http://jakarta.apache.org/tomcat/faq/misc.html#listing

-Tim

Paul Singleton wrote:


My JSP app has a /images folder and Tomcat 5.5.9 happily
serves up a directory listing of this: how can I suppress
this?

Paul Singleton




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



Re: W3C log format in Tomcat 4?

2005-08-02 Thread Tim Funk

This page has some links ..
http://jakarta.apache.org/tomcat/bugreport.html


-Tim

Jason wrote:

Tim,

Perfect, that worked exactly like I needed it to.
Thank you VERY much!

Is there a searcable archive of all these mailing list
questions and responses?



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



Re: W3C log format in Tomcat 4?

2005-08-01 Thread Tim Funk
Try the ExtendedAccessLogValve. You'll need to look in the javadocs for the 
details.


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/valves/ExtendedAccessLogValve.html


-Tim

Jason wrote:


I'm new to Tomcat 4 and am trying to figure out how to
configure my logs so that Deepmetrix's LiveStats 7 can
import them. Does Tomcat 4 support logging to the W3C
Extended logging format? If so, could you provide me
with a link to a resource that tells how to configure
this?
 


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



Re: Forwarding Domains

2005-08-01 Thread Tim Funk
Sorry, there is no way out of the box. But there are filters which can do 
this for you. For example:

http://tuckey.org/urlrewrite/

-Tim

Justin Jaynes wrote:

Is it possible for me to host somedomain.com on my
tomcat, and as that is my prefered domain name format,
and want all users who go to www.somedomain.com (YES,
I have A records set up for both and they point to the
same tomcat server) to be re-directed to
somedomain.com, using my tomcat setup?

In other words, I want to move all my users from the
domain they enter to a domain I prefer USING my tomcat
setup.  I imagine there is some way to set up my
server.xml to do it.



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



Re: W3C log format in Tomcat 4?

2005-08-01 Thread Tim Funk

I think this will work ...
Valve className=org.apache.catalina.valves.ExtendedAccessLogValve
directory=logs
pattern='c-ip cs-method cs-uri sc-status time'
prefix=localhost_access_log. suffix=.txt
resolveHosts=false/


-Tim


Jason wrote:


Tim,

This looks like it is what I was looking for. Since
I'm very new to Tomcat, I'm struggling to figure out
how to implement this valve. Do you have an example of
a standard implementation that you could send me that
I could paste into my server.xml file?

Thanks a bunch for your help!

Jason


--- Tim Funk [EMAIL PROTECTED] wrote:



Try the ExtendedAccessLogValve. You'll need to look
in the javadocs for the 
details.





http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/valves/ExtendedAccessLogValve.html



-Tim

Jason wrote:



I'm new to Tomcat 4 and am trying to figure out


how to


configure my logs so that Deepmetrix's LiveStats 7


can


import them. Does Tomcat 4 support logging to the


W3C


Extended logging format? If so, could you provide


me


with a link to a resource that tells how to


configure


this?





-


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









Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


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




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



Re: mod_rewrite for Tomcat 5.5

2005-07-30 Thread Tim Funk

This might work ...
http://tuckey.org/urlrewrite/

-Tim

David Wall wrote:

Can anybody recommend anything like mod_rewrite for Tomcat 5.5?  I know 
the FAQ says something about why reinvent the wheel, but in this case, 
it's because we want to get rid of Apache just because we need one small 
feature.  I've got an application that now only needs Apache httpd for 
some mod_rewrites, especially for converting short URLs to longer ones, 
such as:


https://host.com/app/a?c=ehtU3vN9JWia6m=borrower

gets rewritten to:

https://host.com/app/customer/SomeBigCustomer/loanApplicationToSign.jsp?c=ehtU3vN9JWia6m=borrower 



With mod_rewrite, this is something like:

RewriteRule ^/app/a(.*)$  
https://host.com/app/customer/SomeBigCustomer/loanApplicationToSign.jsp$1 
[R,L]


In practice, I don't even need the full power of mod_rewrite to rewrite 
the domain part, so it would be okay just to map


/app/a?c=ehtU3vN9JWia6m=borrower

to

/app/customer/SomeBigCustomer/loanApplicationToSign.jsp?c=ehtU3vN9JWia6m=borrower 



and keep the https://host.com; part the same.  I won't be redirecting 
to another server (at least not initially).
 


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



Re: jsp:include params

2005-07-30 Thread Tim Funk

In this case - you probably want to use a tag file.

-Tim

Patrick Thomas wrote:


Hi All,

When jsp:include-ing a page, I see that params from the calling page
are also passed on to the called page.

Example:

caller.jsp: (hypothetically called with param1 = val1) 
jsp:include page=callee.jsp

   param name=param2 value=val2
/jsp:include

callee.jsp:
Sees request variables param2 (of course) *and* param1.

This is specified by the spec, so everything's okay in that regard,
but is there a way to have it *not* pass on the callers vars to the
callee? It seems like there are several types of situations where one
would want to use a jsp:include and be able to explicitly control the
parameters it receives.

If there isn't a way to do it, does anyone know the rationale for not
providing the option?
 


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



Re: Tomcat, getRequestURI(), and URL fragments

2005-07-30 Thread Tim Funk
The web browser never sends (or shouldn't send) #blah so the webserver will 
never see it.


-Tim

Kito D. Mann wrote:

I've noticed an interest consequence of getRequestURI() with Tomcat -- 
getRequestURI() doesn't return the URL fragment (the part after the 
#). So, if the URL is http://www.foo.com/page.html#blah, 
getRequestURI() only returns /page.html, as opposed to 
/page.html#blah. Apache, however, knows the full URL (which is 
recorded in the logs). Can anyone tell me if this is normal behavior, 
and if there's a way to retrieve the URL fragment?
  


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



Re: JNDI - TOMCAT

2005-07-27 Thread Tim Funk

Don't use docs based on 4.1 when running 5.5.

Use the 5.5 docs. The way JNDI resources are declared in 5.5 changed as 
compared to previous versions. The archives in the tomcat user list also talk 
about this too.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html

-Tim

Kane Wilson wrote:

Hi List , 
 
This is actually problem with JNDI . I'm tring to connect to mysql database via JNDI in tomcat 5.5.9. First of all 
i installed tomcat 5.5.9 in my windows 2000 advance server machine and accrding to guide of  
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html url , I  have done every thng 
according to the article.

my sql connector is mysql-connector-java-3.1.10-bin.jar C:\Tomcat\common\lib
after all the steps get done , i pointed to the  test.jsp
but i got an error saying ,
DataSource invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for 
connect URL 'null'

===
so then i surf the internet to findout a soloution , there are plenty of such issues and some closest solutions  
with crerating .war files , changing some parameters like that .

http://www.theserverside.com/tss?service=direct/0/DiscussionThread/threadViewer.bookmark.linksp=l29795
but , i would like to ask from directly  from jakarta.apache.org/tomcat  , do u have sudgested a solution for this 
matter / problem ? is it a bug in that particular version ( 5.5.9 ) ? do i have to switched for another version ?
is that problem of curruption of mysql connector ? 
can i findout any one who has already solved this issue ?
I read well FAQ's rules and regulations . i agreed with that . and i think , this issue has discussed couple of 
times in this list. but i cant findout exactly how could be the solution was ! .

Please help me , it's really appreciate if u guys can consider this problem 
deeply .
 
Thanx in advance for Tomcat and the LIST ,

Kane.


-
 Start your day with Yahoo! - make it your home page 


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



Re: ho to check if forward-target exists?

2005-07-27 Thread Tim Funk

If you are looking for a physical resource use
if (null==servletContext.getResource()) {
  ... yes it exists ...
}

-Tim

Marten Lehmann wrote:


Hello,

I can start a forward like this e.g. through a filter:

request.getRequestDispatcher(/test.html).forward(request, response);

But how can I check if the ressource really exists?

request.getRequestDispatcher(/test.html) always gives me a 
RequestDispatcher reference. Or is it possible to get the response-code 
somehow to check if the forward resulted in a file-not-found error?



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



Re: Instantiating an Application Scoped Bean

2005-07-27 Thread Tim Funk

Please don't use servlets and the load-on-startup to do this. It is a kludge.

Use a ServletContextListener(). They were intended for just this type of need.

-Tim


Raghupathy,Gurumoorthy wrote:

Define a servlet say com.guru.servlet.StartUpServlet 



And in the StartupServlet 



Overide the init() Method 



... init() {
super.init()
getServletContext().setAttribute(MyBean, MyBean);

}



And in WEB.XML 



servlet
servlet-nameStartUpServlet/servlet-name

servlet-classcom.guru.servlet.StartUpServlet/servlet-class
load-on-startup1/load-on-startup
/servlet


Regards
Guru


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 27 July 2005 14:41

To: tomcat-user@jakarta.apache.org
Subject: Instantiating an Application Scoped Bean



Hi,




I need some help on the following scenario:




As soon as I start my tomcat server, I need to populate an
application-scoped bean which will have values from the database.
Thereafter I should be able to access the bean across all JSP pages
using the jsp:useBean ... ...scope=application/ tag.




It'll be great if you guys can tell me how to initialize this bean at
server startup. Any specific web.xml entry to be recorded to map to the
servlet which does the DB operation?





Thanks!





Confidentiality Notice


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 confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

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




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



Re: injecting a new request within a filter

2005-07-27 Thread Tim Funk

1) You need to be running tomcat 5
2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - it 
discusses exactly what you need to do.


-Tim

Marten Lehmann wrote:


Hello,

from within a filter, I'm trying to do the following:

request.getRequestDispatcher(req.getServletPath() + 
index.faces).forward(request, response);


This works generally fine. The problem is, that attached filters simply 
aren't processed for this request. I have two filters in series, the 
first filter is doing the above forward-request on a conditionally basis 
and the second filter is never called in this case. How can I re-inject 
the request, so that either both filters are passed again, or at least 
the second filter (and maybe others following) is processed?
 


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



Re: Compile error in v5 but not v4

2005-07-27 Thread Tim Funk
Tomcat5 uses jasper 2 which does much better optimizations of handlng custom 
tags. If you ahve a page with a lot of custom tags - it might not compile in 
tomcat 4.


One alternative (but with a performance penalty) is to split some of the JSP 
file into a run-time include (jsp:include).


-Tim

Tom Willson wrote:

Hello;

An application I'm trying to support runs without error on Tomcat 4.1.24 on
Windows and Tomcat 4.0.3 on HPUX.

When attempting to have it run on Tomcat 5.0.28 on Windows one of the very
large JSP pages fails to compile:

Jul 27, 2005 3:02:46 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Javac exception
Compile failed; see the compiler error output for details.

jsp.java:9924: code too large for try statement
} catch (Throwable t) {

The code is large because of LOT of include statements. No doubt 9924 lines
is excessive. But, is there a setting that will allow this to run in Tomcat
5 or am I faced with refactoring this application?



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



Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature

2005-07-27 Thread Tim Funk
There is nothing in tomcat which out of the box can do this. But there are 
many 3rd party filters (or 3 liners which are easy to write) which can do this.


-Tim

Rob Hunt wrote:


Yes, I know that an internal forward would work.  I just didn't want to 
code/test/debug it.  Yes, I'm being very lazy here; but I hate to reinvent the 
feature if it already exists and it just seems to me that this is something 
that probably should already exist (since it can be done in Apache).






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



Re: Error 500 messages

2005-07-26 Thread Tim Funk

Yes, for example: %@ page buffer='128kb' %

-Tim

Adile Abbadi wrote:

Hi Tim,

Thanx for this again - sorry to be a pain - but this is good info - so the
bugger size value is a jsp page directive? I'll check into it - but if you
can confirm I would appreciate it.

Thanx

Adile


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: July 24, 2005 7:46 AM
To: Tomcat Users List
Subject: Re: Error 500 messages


The response is being comitted before the erro is being thrown. You need to
set the buffer size to be larger. Its a page directive.


-Tim


Adile Abbadi wrote:



Hi Tim,

Thank you very much - that has helped - however I discovered that the
problem still exists if I have an include within an include - ie.

I have an include called this

jsp:include page=navmenu.jsp flush=false

Inside that include I have another include also with flush set to false -
and I still get a blank page - however if I remove the includes within the
include then the exception is visible. Any ideas on this?



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



Re: Init parameter in context.xml

2005-07-26 Thread Tim Funk

Only a guess try
   Context path=/appName ...
Parameter name=paramName value=dummyValue/
   /Context

-Tim

Arash Ramin wrote:


In lieu of using web.xml, I'm trying to add an init parameter in our
application's context.xml file:

  context path=/appName ...
parameter name=paramName value=dummyValue/
  /context

According to the Tomcat docs, this is equivalent to using the following in
web.xml:

  context-param
param-nameparamName/param-name
param-valuedummyValue/param-value
  /context-param

In my JSP page, I try the following:

%= getServletContext().getInitParameter(helpAppName) %

but I get simply get 'null'.  If I move the parameter to web.xml, everything
works fine.

Our context.xml file is generated through an Ant script for different
environments, hence my need to put the parameter there instead of web.xml
 


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



Re: HTTP/1.1 GZIP compression and its impact on server

2005-07-26 Thread Tim Funk
It will eat up CPU, but you also save CPU by not having to transmit those 
extra bytes.


Its always a good idea to GZIP.

-Tim

Peddireddy Srikanth wrote:


Hi all,
Iam planning to turn on the HTTP/1.1 GZIP compression for my
application by setting the compression attribute of http connector.
Iam sure that this will reduce my bandwidth requirements.
But I have a doubt. Is Compressing the responses  will eat away many
CPU cycles and affect my throughput or performance or scalability.

Any one have used this option in production environment and what r the
results(performance etc)
 


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



Re: How to prevent JSP from creating a session by default?

2005-07-26 Thread Tim Funk
If your running tomcat5, look at the JSP spec - JSP.3.3.5 Defining Implicit 
Includes


This *might* allow you to declare %@ page session=false % in an include 
then have that be included in all your jsp's.


-Tim

Markus Kobler wrote:


We have recently introduced load balancing using JK and have been
surprised to find that by default, all JSP pages create a user session.

Adding %@ page session=false % seems to be the only way
of disabling this. I assume this is because every JSP has access to the
session object. Is there anyway to disabling this by default?
 


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



Re: Error 500 messages

2005-07-24 Thread Tim Funk
The response is being comitted before the erro is being thrown. You need to 
set the buffer size to be larger. Its a page directive.



-Tim


Adile Abbadi wrote:


Hi Tim,

Thank you very much - that has helped - however I discovered that the
problem still exists if I have an include within an include - ie.

I have an include called this

jsp:include page=navmenu.jsp flush=false

Inside that include I have another include also with flush set to false -
and I still get a blank page - however if I remove the includes within the
include then the exception is visible. Any ideas on this?

Cheers

Adile


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: July 22, 2005 12:42 PM
To: Tomcat Users List
Subject: Re: Error 500 messages


flush=false

-Tim

Adile Abbadi wrote:



Hi Tim,

Thanx for the information - I forgot about that. I guess the question is


why


did it work in Tomcat 3 and not Tomcat 4 and second is there a workaround


to


get it to work?

Adile


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: July 22, 2005 12:20 PM
To: Tomcat Users List
Subject: Re: Error 500 messages


This line jsp:include page=top.html flush=true will commit the
response
and send html back to the client. Once that is done - no error messages


will


be sent back to the client and you will end up with a blank screen.

-Tim

Adile Abbadi wrote:




Hi Rob,

Thanx for this - this is great - I may have to use this because I think I
have truly found a bug in Tomcat as this issue is not happening on my


Tomcat



3 server. I did a bit more investigation and I found some interesting
things. This is going to be a long email with code and stuff but whoever
wants to read it please do - because the results are weird.

I created the following simple JSP page

%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
  String query = select * from patient_info where ref_client = 38


and



pat_lname like '%SM'ITH%';;
  DBConnectionManager connMgr;
  connMgr = DBConnectionManager.getInstance();
  Connection Conn = connMgr.getConnection(podb);
  Statement SQLS = Conn.createStatement();
  ResultSet rs = SQLS.executeQuery(query);
  String col1 = null;
  String col2 = null;
  while(rs.next()) {
  col1 = rs.getString(pat_id);
  col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
  }
  rs.close();
  SQLS.close();
  connMgr.freeConnection(podb,Conn);
%

As you can see I did a syntax error in the query and  the error comes to


the



screen as expected

javax.servlet.ServletException: ERROR:  syntax error at or near ITH at
character 74

I said that's weird so I tried to compare my complicated JSP files to what


I



have here to see what is different (if I did something wrong)  and I found
this

If I add an include at certain parts of the page - I see the result I was
talking about. For example if I do this:

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
  String query = select * from patient_info where ref_client = 38


and



pat_lname like '%SM'ITH%';;
  DBConnectionManager connMgr;
  connMgr = DBConnectionManager.getInstance();
  Connection Conn = connMgr.getConnection(podb);
  Statement SQLS = Conn.createStatement();
  ResultSet rs = SQLS.executeQuery(query);
  String col1 = null;
  String col2 = null;
  while(rs.next()) {
  col1 = rs.getString(pat_id);
  col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
  }
  rs.close();
  SQLS.close();
  connMgr.freeConnection(podb,Conn);
%

I get the error page as I should - however If I move the include to below
the %@ page language=java - I get a blank page!!

Now here is where it gets weirder - if I force a java syntax error like as
follows (I corrected the query):

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
  String query = select * from patient_info where ref_client = 38


and



pat_lname like '%SMITH%';;
  DBConnectionManager connMgr;
  connMgr = DBConnectionManager.getInstance();
  Connection Conn = connMgr.getConnection(podb);
  Statement SQLS = Conn.createStatement();
  ResultSet rs = SQLS.executeQuery(query);
  String col1 = null;
  String col2 = null;
  if (col1.equals(yes) {
//test
 }
  while(rs.next()) {
  col1 = rs.getString(pat_id);
  col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
  }
  rs.close();
  SQLS.close();
  connMgr.freeConnection(podb,Conn);
%

An error will get thrown to the screen

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

An error occurred at line: 2 in the jsp file: /testdb.jsp

/var/lib/tomcat4/work/Standalone

Re: Limitting bandwidth: Filedownload

2005-07-22 Thread Tim Funk
Sounds like you would need to write a servlet filter to perform the 
throttling. I'd guess there are some out there that do similar.


-Tim

Lars Nielsen Lind wrote:


Hi.

 


Is there a way to make two channels with Apache / Jakarta-Tomcat regarding
to the Internet connections bandwidth?

 


One channel serving jsp, html, gif, jpg, png files, another channel serving
pdf, xls, doc files. Lets say the bandwidth totally are 512 kb is it then
possible to define for instance 384 kb for the first channel and 128 kb for
the last channel, vice versa?

 


The files are physically placed in the filesystem outside of Apache /
Jakarta-Tomcat webapp directory and is fetched with a download servlet
component.

  


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



Re: Configure email catcher for dev and stage environments?

2005-07-22 Thread Tim Funk
An easier solution is to build your own mail server which eats all the 
emails or redirects them to a test email account where you can view the results.


-Tim

Marc Guillemot wrote:


Hi,

in dev and stage environments, we are working with real data but have to 
avoid that email are really sent to the users. Our current solution is 
that the code sending emails checks what the current environment is to 
know if it should really send the email to the specified address or to a 
special configured catch address.


This is not really a clean solution and I was wondering how other are 
proceding? Is there a possibility to configure Tomcat to say that the 
provided mail Session should not really send the emails but catch them?
 


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



Re: Jsp and xml

2005-07-22 Thread Tim Koop

Two things I can think of:

1. Remember that a line that contains % ...code... %  will also 
produce an end-of-line (eol) character, so instead of something like this:

% for (int i=0; ilist.length; i++) { %
 tag name=%= list[i] %
% } %

do something like this:

% for (int i=0; ilist.length; i++) { %tag name=%= list[i] %
% } %

or this:

% for (int i=0; ilist.length; i++) {
 %tag name=%= list[i] %
% } %

2.  Maybe you are producing the xml/jsp on a Windows computer that 
produces CR + LF characters and viewing it on a computer that interprets 
these as two separate EOL characters.  This is not as likely as number 1 
above.


Tim Koop




Kiran Patel wrote:


Hello all,

I am creating a xml document using JSP.  The JAVA codes in JSP creates blank 
lines in xml document.  How can I remove this or how can I don't create.  I 
will appreciate any help.

Thank You,

Kiran Patel
Software Engineer
Solutions Inc.

 



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



Re: Request parameter data not being recognised as UTF-8

2005-07-22 Thread Tim Koop

Thanks Mark.

I entered Tübingen and I got back Data posted to this form was: 
Tübingen.  localhost_log also has Tübingen


It does this for both port 8080 (Tomcat directly), and port 80 (through 
Apache).


I checked the Tomcat 4.1.31 release notes 
(http://apache.sunsite.ualberta.ca/jakarta/tomcat-4/v4.1.31/RELEASE-NOTES) 
and the closest thing I could find is the following, which is only 
documentation.


[4.1.31] Docs:
Correctly document default value for useBodyEncodingForURI

I modified the simple jsp page to have these lines:
   %
 out.print(Char endoding =  + request.getCharacterEncoding() + p);
 request.setCharacterEncoding(utf-8);
 out.print(Data posted to this form was:  + request.getParameter(mydata) + 
p);
 out.print(Char endoding =  + request.getCharacterEncoding() + p);
   %

The response was:

Char endoding = null

Data posted to this form was: Tübingen

Char endoding = utf-8


Should I have something in my web.xml file?  Is there some way to verify 
that what I enter in the Connector tag in server.xml is actually 
sticking?  I couldn't find any errors in localhost.log nor in 
cataline.out (well, no relavent errors at least).


Thanks a lot, to anyone who has any ideas.

--
Tim Koop




Mark Thomas wrote:



1. Try accessing Tomcat directly to see if mod_jk is causing problems.
2. Try 4.1.31 - it has a bunch of bug fixes that might (I haven't 
checked the release note for details) help
3. Try the following simple test JSP and once this works, see how your 
app is different.


%@ page contentType=text/html; charset=UTF-8 %
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
  head
titleEncoding fun/title
  /head
  body
pData posted to this form was:
%
  request.setCharacterEncoding(UTF-8);
  out.print(request.getParameter(mydata));
%

/p
form method=post action=index.jsp
  enctype=application/x-www-form-urlencoded
  input type=text name=mydata
  input type=submit value=Submit /
  input type=reset value=Reset /
/form
  /body
/html

Mark


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




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



Re: Replacing a class file

2005-07-22 Thread Tim Koop

That sounds like it should work to me.  I do the same thing every day.

Perhaps this code has also been compiled into a jar and is sitting in 
WEB-INF/lib or tomcat/shared.


Or try deleting the files in the tomcat/work directory. I think 
technically this shouldn't fix it, but it doesn't hurt if you're desperate.


And of course check all the obvious things like: Are you sure you are 
copying the new class file? Are you sure you saved the java file when 
you compiled it?  Are you sure you are putting it in the right 
directory?  Perhaps you have more than one web app/web site on your 
server.  If you have more that one instance of Tomcat running maybe you 
restarted the wrong one.  Check file permissions.  Maybe the new class 
is actually running and the changes you made to the java file don't 
actually fix the problem.


Tim Koop



none none wrote:


Hello,
I am very new to tomcat, I hope someone is able to help me out.

There is a Java application sitting in one of the servers and I have been asked 
to modify some code in there.
I figured out that the code need to be changed is in one of the class files, so 
I found the java source code, modified it on my desktop, compile it then I 
simply replaced the old class file with the new one under WEB-INF.

Now, I did a service tomcat restart command, but the change didn't take 
effect. I am totally confused and don't know what to do. How do I make tomcat pick-up the 
new class file?

Any help would be great.
Thank you.

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



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



Re: Request parameter data not being recognised as UTF-8

2005-07-22 Thread Tim Koop

Thanks Mikolaj.  That did it.

For some reason running request.setCharacterEncoding(UTF-8) in my code 
does nothing, but if it gets run from a Filter it works great.


Tim Koop



Mikolaj Rydzewski wrote:


Tim Koop wrote:

I have a web page form that is expecting UTF-8 data, but when my code 
gets the data, the getParameter() methods don't return the right 
thing.  I have to run this code to get the right thing:


String value = new 
String(request.getParameter(fieldName).getBytes(ISO-8859-1), 
UTF-8);



Please take a look at SetCharacterEncodingFilter servlet in Tomcat's 
example apps. It does the job you need. Its sources are located in 
webapps/jsp-examples/WEB-INF/classes/filters (at least in Tomcat 5.5).


Regards



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



Re: Error 500 messages

2005-07-22 Thread Tim Funk
This line jsp:include page=top.html flush=true will commit the response 
and send html back to the client. Once that is done - no error messages will 
be sent back to the client and you will end up with a blank screen.


-Tim

Adile Abbadi wrote:


Hi Rob,

Thanx for this - this is great - I may have to use this because I think I
have truly found a bug in Tomcat as this issue is not happening on my Tomcat
3 server. I did a bit more investigation and I found some interesting
things. This is going to be a long email with code and stuff but whoever
wants to read it please do - because the results are weird.

I created the following simple JSP page

%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
String query = select * from patient_info where ref_client = 38 and
pat_lname like '%SM'ITH%';;
DBConnectionManager connMgr;
connMgr = DBConnectionManager.getInstance();
Connection Conn = connMgr.getConnection(podb);
Statement SQLS = Conn.createStatement();
ResultSet rs = SQLS.executeQuery(query);
String col1 = null;
String col2 = null;
while(rs.next()) {
col1 = rs.getString(pat_id);
col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
}
rs.close();
SQLS.close();
connMgr.freeConnection(podb,Conn);
%

As you can see I did a syntax error in the query and  the error comes to the
screen as expected

javax.servlet.ServletException: ERROR:  syntax error at or near ITH at
character 74

I said that's weird so I tried to compare my complicated JSP files to what I
have here to see what is different (if I did something wrong)  and I found
this

If I add an include at certain parts of the page - I see the result I was
talking about. For example if I do this:

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
String query = select * from patient_info where ref_client = 38 and
pat_lname like '%SM'ITH%';;
DBConnectionManager connMgr;
connMgr = DBConnectionManager.getInstance();
Connection Conn = connMgr.getConnection(podb);
Statement SQLS = Conn.createStatement();
ResultSet rs = SQLS.executeQuery(query);
String col1 = null;
String col2 = null;
while(rs.next()) {
col1 = rs.getString(pat_id);
col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
}
rs.close();
SQLS.close();
connMgr.freeConnection(podb,Conn);
%

I get the error page as I should - however If I move the include to below
the %@ page language=java - I get a blank page!!

Now here is where it gets weirder - if I force a java syntax error like as
follows (I corrected the query):

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
String query = select * from patient_info where ref_client = 38 and
pat_lname like '%SMITH%';;
DBConnectionManager connMgr;
connMgr = DBConnectionManager.getInstance();
Connection Conn = connMgr.getConnection(podb);
Statement SQLS = Conn.createStatement();
ResultSet rs = SQLS.executeQuery(query);
String col1 = null;
String col2 = null;
if (col1.equals(yes) {
//test
   }
while(rs.next()) {
col1 = rs.getString(pat_id);
col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
}
rs.close();
SQLS.close();
connMgr.freeConnection(podb,Conn);
%

An error will get thrown to the screen

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

An error occurred at line: 2 in the jsp file: /testdb.jsp

/var/lib/tomcat4/work/Standalone/localhost/podims/testdb_jsp.java:57: ')'
expected
if (col1.equals(yes) {

However if I try to force a null pointer error by correcting my syntax
error - I get a blank screen! If remove the include I get the null pointer
error no problem. The other behaviour I noticed as well is that as I said
before if the include is above the %@ page language piece it works
fine - only if its an html - if its another jsp file - I get a blank screen
as well.

So has anyone else seen this behaviour - is there a fix or a work around -
should I got back to Tomcat 3?? I'm going to try your suggestion Rob and see
if that helps at all, but to me its seems like an issue with the JSP
compiler.

Cheers

Adile



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



Re: Error 500 messages

2005-07-22 Thread Tim Funk

flush=false

-Tim

Adile Abbadi wrote:


Hi Tim,

Thanx for the information - I forgot about that. I guess the question is why
did it work in Tomcat 3 and not Tomcat 4 and second is there a workaround to
get it to work?

Adile


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: July 22, 2005 12:20 PM
To: Tomcat Users List
Subject: Re: Error 500 messages


This line jsp:include page=top.html flush=true will commit the
response
and send html back to the client. Once that is done - no error messages will
be sent back to the client and you will end up with a blank screen.

-Tim

Adile Abbadi wrote:



Hi Rob,

Thanx for this - this is great - I may have to use this because I think I
have truly found a bug in Tomcat as this issue is not happening on my


Tomcat


3 server. I did a bit more investigation and I found some interesting
things. This is going to be a long email with code and stuff but whoever
wants to read it please do - because the results are weird.

I created the following simple JSP page

%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
   String query = select * from patient_info where ref_client = 38


and


pat_lname like '%SM'ITH%';;
   DBConnectionManager connMgr;
   connMgr = DBConnectionManager.getInstance();
   Connection Conn = connMgr.getConnection(podb);
   Statement SQLS = Conn.createStatement();
   ResultSet rs = SQLS.executeQuery(query);
   String col1 = null;
   String col2 = null;
   while(rs.next()) {
   col1 = rs.getString(pat_id);
   col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
   }
   rs.close();
   SQLS.close();
   connMgr.freeConnection(podb,Conn);
%

As you can see I did a syntax error in the query and  the error comes to


the


screen as expected

javax.servlet.ServletException: ERROR:  syntax error at or near ITH at
character 74

I said that's weird so I tried to compare my complicated JSP files to what


I


have here to see what is different (if I did something wrong)  and I found
this

If I add an include at certain parts of the page - I see the result I was
talking about. For example if I do this:

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
   String query = select * from patient_info where ref_client = 38


and


pat_lname like '%SM'ITH%';;
   DBConnectionManager connMgr;
   connMgr = DBConnectionManager.getInstance();
   Connection Conn = connMgr.getConnection(podb);
   Statement SQLS = Conn.createStatement();
   ResultSet rs = SQLS.executeQuery(query);
   String col1 = null;
   String col2 = null;
   while(rs.next()) {
   col1 = rs.getString(pat_id);
   col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
   }
   rs.close();
   SQLS.close();
   connMgr.freeConnection(podb,Conn);
%

I get the error page as I should - however If I move the include to below
the %@ page language=java - I get a blank page!!

Now here is where it gets weirder - if I force a java syntax error like as
follows (I corrected the query):

jsp:include page=top.html flush=true
%@ page language=java
import=javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager %
%^M
   String query = select * from patient_info where ref_client = 38


and


pat_lname like '%SMITH%';;
   DBConnectionManager connMgr;
   connMgr = DBConnectionManager.getInstance();
   Connection Conn = connMgr.getConnection(podb);
   Statement SQLS = Conn.createStatement();
   ResultSet rs = SQLS.executeQuery(query);
   String col1 = null;
   String col2 = null;
   if (col1.equals(yes) {
//test
  }
   while(rs.next()) {
   col1 = rs.getString(pat_id);
   col2 = rs.getString(pat_fname);
%
%=col1%: %=col2%br
br
%
   }
   rs.close();
   SQLS.close();
   connMgr.freeConnection(podb,Conn);
%

An error will get thrown to the screen

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

An error occurred at line: 2 in the jsp file: /testdb.jsp

/var/lib/tomcat4/work/Standalone/localhost/podims/testdb_jsp.java:57: ')'
expected
if (col1.equals(yes) {

However if I try to force a null pointer error by correcting my syntax
error - I get a blank screen! If remove the include I get the null pointer
error no problem. The other behaviour I noticed as well is that as I said
before if the include is above the %@ page language piece it works
fine - only if its an html - if its another jsp file - I get a blank


screen


as well.

So has anyone else seen this behaviour - is there a fix or a work around -
should I got back to Tomcat 3?? I'm going to try your suggestion Rob and


see


if that helps at all, but to me its seems like an issue with the JSP
compiler.

Cheers

Adile

Request parameter data not being recognised as UTF-8

2005-07-21 Thread Tim Koop

Hi everyone.

___ The Problem ___

I have a web page form that is expecting UTF-8 data, but when my code 
gets the data, the getParameter() methods don't return the right thing.  
I have to run this code to get the right thing:


String value = new 
String(request.getParameter(fieldName).getBytes(ISO-8859-1), UTF-8);


Naturally I don't want to run this code every time I want a simple 
parameter.  There must be a setting somewhere.


The page itself displays fine; the form data that it gives me is not 
being interpretted as UTF-8.



___ What I have tried ___

I have searched the web and have found these possible solutions, but I 
can't get them to work for me.  I have tried all the following things:


In server.xml, I have added these lines to each Connector:
 URIEncoding=UTF-8  useBodyEncodingForURI=false
 (I have also tried useBodyEncodingForURI=true)

I have added this text to JAVA_OPTS (in my rc.d init script) and have 
confirmed that these are indeed Java system properties

-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

I have tried calling request.setCharacterEncoding(UTF-8) in my code.  
I've even made it the first line of the jsp page.  No luck.


I have restarted Tomcat many times.

I even have the environment variable LANG set to en_GB.UTF-8

I have %@ page contentType=text/html; charset=UTF-8  
pageEncoding=UTF-8 % in my jsp page.
I have meta http-equiv=Content-Type content=text/html; 
charset=utf-8 in my jsp page.


___ My questions ___

Should this actually work and I'm just doing something wrong?

Is there anything else I can try?


___ Technical details ___

I'm using Tomcat 4.1.30, Apache httpd 1.?, mod_jk, Sun JVM 1.4.2, Linux 
Fedora Core 2.4.22


A part of my server.xml file looks like this:
   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=0
  useURIValidationHack=false
  
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler

  URIEncoding=UTF-8
  useBodyEncodingForURI=false /



Thanks for any ideas.  I've tried everything I can think of.

--
Tim Koop

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



Re: RAM limity

2005-07-21 Thread Tim Funk

Nope. No limits. Just OS limits.


-Tim

Paulo Alvim wrote:

Hi,

I'm using TC559 and JVM 1.5.x with Win2003 / 2GB RAM.

I'd like upgrade to 4GB RAM...is there any JVM or Tomcat limit here?



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



Re: Unable to use Python/CGI from Tomcat....

2005-07-19 Thread Tim Diggins
Is it worth writing a quick ksh script to validate your hypothesis that 
the environment (and specifically LD_LIBRARY_PATH) isn't being passed 
through?


additionally (as a crap workaround) you could create a quick script 
which would set the LD_LIBRARY_PATH path and then invoke python, and use 
that in your shebang line...


also, might it not be an idea to a have a specific instance of 
CGIServlet that has executable=python, rather than piping to ksh and 
then to python? (ie why bother with the shebang line, if you don't 
really need it...)


just a few ideas, FWIW...

Tim


Ed Hillmann wrote:

I'm attempting to set up our Tomcat server to run
ViewCVS, which is a Python application.  I've set up
Python on my Solaris 8 box.  I've noticed that to
start python, I need to include a library
(libgdbm.so.3) in my LD_LIBRARY_PATH.  Which I do, and
Python starts up fine.

I've copied the cgi script into the appropriate
directory in my Tomcat server.  CGI is enabled,
because we have other scripts being executed from
within Tomcat.  But whenever I attempt to call the new
Python script, I get the error...

2005-07-19 14:14:32 cgi: runCGI (stderr):ld.so.1:
/ct/ctapp/python241/bin/python: fatal: libgdbm.so.3:
open failed: No such file or directory

Which looks a lot like the error I get if that library
is not in my LD_LIBRARY_PATH.

I've mucked around with startup.sh to displayed that
the processes starting the Tomcat JVM does have this
library in it's environment.  But whatever is
executing the CGI script from within the JVM is not
passing along the environment variables.

The servlet definition in my web.xml looks like...

servlet
servlet-namecgi/servlet-name
   
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class

init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valuecgi-bin/param-value
/init-param
init-param
  param-nameexecutable/param-name
  param-value/usr/bin/ksh/param-value
/init-param
init-param
 
param-namepassShellEnvironment/param-name

  param-valuetrue/param-value
/init-param
load-on-startup5/load-on-startup
/servlet

So, because passShellEnvironment is true, I expected
the shell environment to be passed along to the cgi
script.  It doesn't seem to be.

Am I missing something else?  Surely I can't be the
first one to come up against this?

Thanks for any help,
Ed



 
Do you Yahoo!? 
Messenger 7.0 beta: Free worldwide PC to PC calls

http://au.beta.messenger.yahoo.com

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






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



Re: Request too long

2005-07-18 Thread Tim Diggins

Are you doing get or post?

Yair Zohar wrote:

Hello,
I'm building a web application on tomcat 4.1.18 which is connected to 
apache 2 web server by ajp13 connector.

I get the response :


 Server Error


   The following error occurred:

   [code=HTTP_REQUEST_TOO_LONG] The HTTP request is too long.
   Contact your system administrator.

when I press the submit button of a form with an html textarea with 
large amount of text.

When I reduce the amount of text in the textarea it works fine.
I assume it's a tomcat response because the apache usually gives an 
error number.


Does anyone know if there is a place, in the conf files, to rise the 
maximal length of the request accepted by tomcat?

Or, does anyone know a solution for this problem?

Thanks ahead,
Yair.






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



Re: robots.txt

2005-07-14 Thread Tim Funk

Place a robots meta tag in the head tag of your html.

-Tim

Eric J. Pastoor wrote:
The msn bot has been hammering one of my webapps for about 2 weeks now. 
I have a calendar style transaction page that is not password protected. 
Essentially this calendar goes on forever. This means that the msn bot 
is basically going on forever.  It is making my log files insanely 
large.  Is there a way to create a robots.txt file for basically one 
servlet instead of everything?


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



Re: RFC-2047 Header Character Set Encoding JK + Tomcat 5

2005-07-13 Thread Tim Funk

You may need to add this to your Connector declaration:
URIEncoding=UTF-8

-Tim

Guernsey, Byron (GE Consumer  Industrial) wrote:


Is there a FAQ on how Tomcat 5 and JK1 implement HTTP header character
sets? (ie, does it support RFC-2047)

We use some single sign-on plugin's at the web server (apache 2) that
set specific headers which may contain international characters.  The
headers are being returned by Tomcat to jsps/servlets in such a way that
the strings decode properly only if the browser is forced to view them
as UTF-8. 


This implies that the values are actually UTF-8 encoded, but improperly
assumed to be ISO-8859-1 as some point.

I have not yet tracked down which component in the chain is at fault. It
may very well be that the SSO plugin is calling the Apache API to set
Headers with UTF-8 values when they accept only ISO-8859-1 values, or
values encoded per RFC-2047.

I'd like to find out what mod_jk expects the header values to be when it
retrieves them from Apache, and whether Tomcat supports RFC-2047
decoding of header values.

If anyone has any experience with this, or can refer me to a discussion
or thread about this very item, I'd greatly appreciate the tip.  I'm not
looking forward to the amount of inspection I'm going to have to do to
find the culprit.

thanks,
Byron


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





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



Re: 500 - Internal server error

2005-07-13 Thread Tim Funk
You'll need to check the logs. When you have such a high load, it can be any 
number of reasons.


-Tim

Ayyanar Inbamohan wrote:


Hi all,

 My web application run in an intranet site, i used
jmeter for testing the Load and performance,
 when the concurrent user is set to 500  in jmeter to
test the application i am getting  500 - Internal
server error 

 what is the cause for this problem,
 any solutions,
 


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



Re: How to set the user created tld in web.xml??

2005-07-12 Thread Tim Funk

It looks like your tld file is missing the uri element.

For example:
taglib xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
web-jsptaglibrary_2_0.xsd

version=2.0
...
urihttp://www.jiyaJobs.com//uri
...
/taglib

Also be sure the tag file is in /WEB-INF/

-Tim

IndianAtTech wrote:


 Hi All,

I am facing a problem in setting the user created tld file in web.xml

If I don't specify anything in web.xml

I am getting below error

Exception Handler
 
 
Description: An unhandled exception occurred during the execution of

the web application. Please review the following stack trace for more
information regarding the error.
 
Exception Details: org.apache.jasper.JasperException

  This absolute uri (http://www.jiyaJobs.com/) cannot be resolved in
either web.xml or the jar files deployed with this application
 
Possible Source of Error:

   Class Name: org.apache.jasper.compiler.DefaultErrorHandler
   File Name: DefaultErrorHandler.java
   Method Name: jspError
   Line Number: 105
 
Source not available. Information regarding the location of the

exception can be identified using the exception stack trace below.
 
Stack Trace:
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:159)
org.apache.jasper.compiler.JspDocumentParser.addCustomTagLibraries(JspDocumentParser.java:459)
org.apache.jasper.compiler.JspDocumentParser.startElement(JspDocumentParser.java:189)
org.apache.xerces.parsers.AbstractSAXParser.startElement( Unknown Source )
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement( Unknown Source )
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
Unknown Source )
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(
Unknown Source )
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(
Unknown Source )
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(
Unknown Source )
org.apache.xerces.parsers.XML11Configuration.parse( Unknown Source )
org.apache.xerces.parsers.XML11Configuration.parse( Unknown Source )
org.apache.xerces.parsers.XMLParser.parse( Unknown Source )
org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source )
javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:156)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:193)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.jsfcl.app.ViewHandlerImpl.renderView(ViewHandlerImpl.java:181)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995

Re: file access via HttpSession

2005-07-12 Thread Tim Funk

No, you would need to do this via a programmtic authorization.

There is no declaritive way to do this.

-Tim

Clark Slater wrote:


Hello-

I am running 5.0.19

Is there a way to restrict access to files in a directory based on a 
value in an HttpSession?


For example:

Customer c = (Customer) httpSession.getValue(Customer);
if (c.getCountryCode().equals(CAN))

their browser could display any HTML file in

/webapps/ecat/profiles/canada

but not files in

/webapps/ecat/profiles/usa

Of course, files in either of these directories
would not be viewable by the outside world.

Thanks!
Clark



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



Re: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated

2005-07-11 Thread Tim Diggins

I don't know the answer, but can you confirm you are either:

1) using jdk 1.5
or
2) using jdk 1.4 (and with the compatibility package for tomcat 5.5)

as the compatibility package (as I understand it) addresses xml parser 
versioning/instantiation issues.


-- Tim



Craig Dixon wrote:

I've encountered a strange problem with my JSPs in Tomcat. Whenever I
change one of them, then try to access it from the browser, I get the
following error:

HTTP Status 500 -
 
type Exception report
 
message
 
description The server encountered an internal error () that prevented

it from fulfilling this request.
 
exception
 
javax.servlet.ServletException: Provider

org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
root cause
 
javax.xml.parsers.FactoryConfigurationError: Provider

org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)

org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)

org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)

org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)

org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

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

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
note The full stack trace of the root cause is available in the Apache

Tomcat/5.5.9 logs.



I don't have the foggiest idea what that means, but when I stop and
restart Tomcat, everything usually works fine (until the next time I
change the file.)

I'd send relevant source code, but it seems to happen with every page
in multiple applications. I've posted this in several forums and have
yet to even get a reply. This is driving me batty! Any ideas?

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






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



  1   2   3   4   5   6   7   8   9   10   >