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]



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)
at 

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]



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]



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

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: 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 and SQL Server

2005-07-11 Thread Tim Funk

FWIW .. there is a new version of the SQLServer JDBC driver from Microsoft.

-Tim

Mitchell Teixeira wrote:

Hi - I've heard nothing but bad things about the Microsoft JDBC driver for
SQL Server. I don't have any suggestions how to fix your problem in-place,
just a suggestion to switch drivers.

I've been using this JTDS open souce JDBC driver, suggested by our vendor
and it is very stable:

http://jtds.sourceforge.net/

It was super easy to install and configure.  I hope it will help you!

Regards,
MitchellT



--- Anderson, M. Paul [EMAIL PROTECTED] wrote:



I am running Tomcat 5.5 with SQL Server on a separate machine.

I am getting the following error at random times:

Java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]Connection rest by peer: socket write error.

I have been unable to determine a trigger for this error - it just seems
to happen randomly.  When it occurs, no user can then log in to the
application - I must reboot the SQL server machine to get a connection
to be made for subsequent logins.

Has anyone seen this and can point me to a solution?

Thanks,
Paul




-
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: Using Single Sign on to access another webapp.

2005-07-08 Thread Tim Funk


One way to do SSO is to utilize a  cookie (lets call it SSO, and to be really 
secure - it should only be transfered over https). The existence of a cookie 
says the person might be logged in. The value of the cookie needs to be 
checked. The value of the cookie shold NOT be the user id. It can be an 
encrytped form of the user id, or it can be a token which the web server 
would use in a hash lookup to get the real user id. In the case of the hash - 
you'd need a service to be be able to handle maintenance of getting 
userids/tokens into the hash.


Luckily for you, there are some projects out there that do this. Google is 
your friend here.


-Tim

Ben Bookey wrote:

Dear List,

We are using Tomcat 4.1.xx. We are NOT using the built in security 
framework which comes with TC. In the login.jsp page the user/password 
is validated by an external organisation wide process, which returns 
simply true or false. If the user is valid, the user is forwarded to the 
application JSP pages. The user can not access the application pages at 
will, because the pages check to see if a particular session flag is 
checked.


Now my problem. I have been asked to assess if single sign On (SSO) 
could be used to create a URL link to another similar webapp's JSP page 
(TC with no security framework), where the user doesnt need to login for 
a second time. There is not so much info. about SSO around, but from 
what I gather it persists login info. inside a session which is passed 
between web applications. My first problem is that my application 
never knows what the password is.  Can anyone see a possibilty of using 
SSO for me, allowing direct access to another webapps JSP page with out 
re-login ?


Would really appreciate any help on this. Especially ones with info. 
more than simply No ;-)


kind regards,
Ben
p.s. might be that the 2nd app has to create a web-service or something 
to provide the information for us!!




-
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: 2 apps

2005-07-07 Thread Tim Funk
The safest way is to run 2 instances of tomcat on the device. Once instance 
runs on port 80 for the world to see. Then a firewall can block all access to 
any other port from the outside.


The other instance runs on a high port for internal use.


Otherwise, look at RemoteAddressValve:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/engine.html


-Tim

Sergey Livanov wrote:


I have 2 applications. The first is to be allowed from internet, the second
is to enter data. Two apps are in the webapps. How can I configure tomcat
to make cms unvisible from outside.





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



Re: Turning off jsessionid on URL?

2005-07-07 Thread Tim Funk

Please stop posting the same question 4 times and please wait for a response.

The answer to the question below is no. There is no switch. To not use URL 
rewriting, do not utilize the method HttpServletResponse.encodeURL(). Of 
course - this requires a code rewrite.


The easier solution is to implement a servlet filter which creates a 
HttpServletResponseWrapper which overrides encodeURL and encodeRedirectURL


-Tim

William Stranathan wrote:


Is there a configuration parameter to ONLY send the jsessionid by
cookie, not on the URL bar?

Picture this, user goes to your site http://www.yoursite.com/yourapp
yoursite redirects to the menu page, which gives a jsessionid.  That
page is under an auth-constraint and requires login, so you get
displayed the login page, but the URL you've been redirected to
includes the jsessionid - like:
http://www.yoursite.com/yourapp/Menu.do;jessionid=D2DC09EB64CBC7690BCEA68CA484B4C3
User wants to share the site with their friends, so they copy/paste
from the URL bar.  Then they log in - their session is now logged in,
AND they have the same session ID.

And yes, this does work - I'm able to copy/paste between different
browsers (exploder and firefox) and the session works fine.

Is there a way to turn that feature off?



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



Re: How do you set up JMX remote for Tomcat 5.5.9?

2005-07-07 Thread Tim Funk

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

-Tim

andy gordon wrote:

 Help, 
 
How do you set up JMX remote for Tomcat 5.5.9? 
 
For instance where do you specify the JVM startup option 
 
-Dcom.sun.management.jmxremote.port=9998 
 
that enables remote monitoring and management? 
 


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



Re: making clear

2005-06-30 Thread Tim Funk

Tomcat can be used with any version of apache.

-Tim

ganesan malairaja wrote:


hi guys

i already have apache 2,

java jdk 1.4.2 .. i need to know can i use tomcat version 5.0.x or must 
have version 4..





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



Re: jsp include/RequestDispatcher incompatible?

2005-06-29 Thread Tim Funk
Try flush first, otherwise you might need to pass a 
HttpServletResponseWrapper() to include() where the wrapper oversrides 
getOutputStream() (or getWriter()


-Tim

George Finklang wrote:

So before each request dispatcher call I need to call a flush on the
out in the JspPage?  How do I get access to it?

Do I also need to call flush at the end of each request dispatcher call?

--George

On 6/28/05, Tim Funk [EMAIL PROTECTED] wrote:


The out from the jspwriter is NOT the same out as receieved by
response.getWriter();

The out in the JspPage is  buffered.

-Tim

George Finklang wrote:



have the following code in my jsp, which is called by a forward from my
Controller servlet. The various Dispatchers are either servlets or jsps declared
in my web.xml.

All the servlets and jsps get run correctly. The problem is the output. The
output of the root jsp and the 3-4 included jsps are arbitrarily rearranged, see
below. Bizarre shuffling, not reverse order, but a different order and not
interleaved with the text from the jsp.

If I translate the jsp into servlet code, and use RequestDispatchers
for all the components,
the page works.  The documentation says something about flushing buffers, but I
can't see how to do this with RequestDispatchers.


Code:

BODY
jsp:include page=WEB-INF/jsps/portal/header.jsp flush=true/
% if(option1) {
   application.getNamedDispatcher(Option1Servlet).include(request,response);
   } else { %
tabletr
% if(option2) { %
td%

application.getNamedDispatcher(Option2Servlet).include(request,response);
%/td
%  } %
td%
  application.getNamedDispatcher(page).include(request,response); %/td
td%
  application.getNamedDispatcher(InfoServlet).include(request,response);
%/td
/tr/table
%  } %
/BODY



generated html:

BODY


Page text  // from the page dispatcher

Info servlet text   // from the infoservlet dispatcher

Header form text // from the header.jsp dispatcher


tabletr

td/td
td/td
/tr/table

/BODY

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





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



Re: naming of individual Context files

2005-06-29 Thread Tim Funk

No - the name does not matter.

I haven't tries more than one context decalration in a file. If it would work 
- It doesn't feel like a good idea.


-Tim

Paul Singleton wrote:


If I store Context elements...

 * in individual files (with a .xml extension) in the
   $CATALINA_HOME/conf/[enginename]/[hostname]/ directory

(to quote the current Server Configuration Reference
docs), do the names of the files (apart from .xml) matter?

Must I have only one Context element per file?

Paul Singleton




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



Re: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

2005-06-28 Thread Tim Funk
Connection reset by peer means the client disconnected before all the data 
was sent.


-Tim


Adriana Suarez wrote:

Hello,

I got this exception and I don't know how to solve it, I have a web
application with a servlet which sends video with formats avi, mpeg,
and mov, it shows the video but the tomcat throws this exception:

ClientAbortException:  java.net.SocketException: Connection reset by
peer: socket write error
at 
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:373)


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



Re: single session id

2005-06-28 Thread Tim Funk
Set emptySessionPath=true on your connector declaration. This is a tomcat 
5.5 feature only.


-Tim

Rogerio Baldini das Neves wrote:


Hi,

I need to have a single session id in all my contexts in my host ?
Is it possible ?

My problem: 
I have a cluster this 1 Apache and 2 Tomcats.
In each Tomcat, I have 5 apps. 
I do a request to app1, Apache sends me to Tomcat1. If I request to app2, I need Apache sends me to Tomcat1 again.


Thanks
Rogerio


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



Re: jsp include/RequestDispatcher incompatible?

2005-06-28 Thread Tim Funk
The out from the jspwriter is NOT the same out as receieved by 
response.getWriter();


The out in the JspPage is  buffered.

-Tim

George Finklang wrote:


have the following code in my jsp, which is called by a forward from my
Controller servlet. The various Dispatchers are either servlets or jsps declared
in my web.xml.

All the servlets and jsps get run correctly. The problem is the output. The
output of the root jsp and the 3-4 included jsps are arbitrarily rearranged, see
below. Bizarre shuffling, not reverse order, but a different order and not
interleaved with the text from the jsp. 


If I translate the jsp into servlet code, and use RequestDispatchers
for all the components,
the page works.  The documentation says something about flushing buffers, but I
can't see how to do this with RequestDispatchers.


Code:

BODY
jsp:include page=WEB-INF/jsps/portal/header.jsp flush=true/
% if(option1) {
application.getNamedDispatcher(Option1Servlet).include(request,response);
} else { %
tabletr
% if(option2) { %
td% 
  
application.getNamedDispatcher(Option2Servlet).include(request,response);

%/td
%  } %
td% 
   application.getNamedDispatcher(page).include(request,response); %/td
td% 
   application.getNamedDispatcher(InfoServlet).include(request,response);

%/td
/tr/table
%  } %
/BODY



generated html:

BODY
 
 
Page text  // from the page dispatcher
 
Info servlet text   // from the infoservlet dispatcher
 
Header form text // from the header.jsp dispatcher
 
 
tabletr
 
td/td

td/td
/tr/table
 
/BODY


-
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: Is there a DTD/XML Schema available for the Context.xml files?

2005-06-28 Thread Tim Funk

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

-Tim

Behrang Saeedzadeh wrote:


Hi

I'm searching for the DTD or the XML Schema for the Context.xml files.
Does anybody know where can I find them?

-Behrang



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



Re: website stops answering requests from time to time

2005-06-23 Thread Tim Funk

Looks like a race condition with JDBCStore.

-Tim


Ayyanar Inbamohan wrote:


This is a production site. We use Tomcat 4.1.

website stops answering requests from time to time

Our website is under very high daily volume. Several
times a week, no  
requests are answered. 


Here is the log exception:

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.writeObject(HashMap.java:976)

at
sun.reflect.GeneratedMethodAccessor133.invoke(Unknown
Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeWriteObject

(ObjectStreamClass.java:809)

at java.io.ObjectOutputStream.writeSerialData

(ObjectOutputStream.java:1296)

at java.io.ObjectOutputStream.writeOrdinaryObject

(ObjectOutputStream.java:1247)

at java.io.ObjectOutputStream.writeObject0

(ObjectOutputStream.java:1052)

at java.io.ObjectOutputStream.writeObject

(ObjectOutputStream.java:278)

at
org.apache.catalina.session.StandardSession.writeObject

(StandardSession.java:1429)

at
org.apache.catalina.session.StandardSession.writeObjectData

(StandardSession.java:852)

at org.apache.catalina.session.JDBCStore.save

(JDBCStore.java:690)

at

org.apache.catalina.session.PersistentManagerBase.writeSession

(PersistentManagerBase.java:

739)

at 


org.apache.catalina.session.PersistentManagerBase.processMaxIdleBackups

(PersistentManagerBase.java

:1063)

at 


org.apache.catalina.session.PersistentManagerBase.processPersistenceChecks(PersistentManagerBase.ja

va:477)

at
org.apache.catalina.session.PersistentManagerBase.run

(PersistentManagerBase.java:1141)

at java.lang.Thread.run(Thread.java:534)



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



  1   2   3   4   5   6   7   8   9   10   >