Bug with digest attribute/UserDatabaseRealm?

2003-01-02 Thread Sam Ewing
I set the digest attribute to "sha" in
UserDatabaseRealm, and tried adding a new user using
the admin application. It did add a user, but the
password was saved in cleartext in tomcat-users.xml
and not in its digested form.

Is this a bug or am I doing something wrong? Any help
appreciated.

/s

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JAASRealm Configuration

2003-01-02 Thread Sam Ewing
Has anyone got a successfully working JAASRealm
configuration? Would like to see the Realm
configurations.. any help appreciated. Thanks!

/s

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JK2/tomcat 4.1.18 - broken pipe problem

2003-01-02 Thread Bill Barker
The most common reason for this is that the user has hit the "stop" button
in the browser before the page has been fully loaded.  The AJP13 protocol
(currently) doesn't support out-of-band messages to notify Tomcat of this
fact, so mod_jk(2) simply drops the connection to Tomcat instead.

"Jesper Birch" <[EMAIL PROTECTED]> wrote in message
1041497967.27623.14.camel@wbirch">news:1041497967.27623.14.camel@wbirch...
> Hi,
>
> I have setup a environment with Apache 2.0.43, Tomcat 4.1.18 and JK2
> connector.
>
> Everything seems to work fine, except an error message I get time to
> time in my logs:
>
> 2003-01-02 05:55:56,681 [Thread-49] ERROR
> org.apache.jk.server.JkCoyoteHandler - Error in action code
> java.net.SocketException: Broken pipe   at
> java.net.SocketOutputStream.socketWrite0(Native Method)  at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)  at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)   at
> org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:435)  at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:627)at
> org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
at org.apache.coyote.Response.action(Response.java:222) at
org.apache.coyote.Response.finish(Response.java:343) at
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)  at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:
500) at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)  at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)   at java.lang.Thread.run(Thread.java:536)
>
> 
>
> It does not seems like the users of my site has any problems when using
> it. So I am not sure when exactly this is happening.
>
> Can somebody explain for me the condition for when this should happen -
> so I can look into this error, or maybe somebody has an idea to what the
> problem can be ?!
>
> I have built JK2 from the 4.1.18 connectors package..
>
> Thanks
>
> Jesper Birch





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Release of memory

2003-01-02 Thread Bill Barker
If you search http://nagoya.apache.org/bugzilla/buglist.cgi?product=fop you
will find several reports of memory leaks using fop.  Your best bet is to
take it up on the fop-users list.

"Øyvind Hvamstad" <[EMAIL PROTECTED]> wrote in message
000601c2b278$5dcb2810$24d2d5c1@templar">news:000601c2b278$5dcb2810$24d2d5c1@templar...
Hi, I have a servlet that is generating reports on demand from a client
program. I'm using tomcat as servlet container, xml and xsl to generate
fo and fop to give me pdf. The reports tend to be big and memory is
being exhausted.

Can anyone tell me how to make tomcat release memory after a servlet is
finished? Now tomcat simply hold it and sooner or later my server starts
to swap processes because of it. It does so even if I force GC at the
end of the servlet. If it is left idle, it frees some over time, but it
takes to long.

Please help!

Øyvind Hvamstad





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 5 and CATALINA_BASE/shared/lib problem...

2003-01-02 Thread Jacob Kjome

Bug reported here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15774

Can someone please explain why the behavior is different and/or confirm 
that it is a real bug in Tomcat5?

Thanks,

Jake

At 09:26 PM 1/2/2003 -0600, you wrote:

Just a little follow-up to what I said below.  I had surmised that maybe 
CATALINA_HOME/shared/lib libraries where simply getting loaded first and 
maybe CATALINA_BASE/shared/lib libraries that had the same packages 
wouldn't be loaded because they would only be loaded once by 
Tomcat.  Well, this is false.  CATALINA_BASE/shared/lib is entirely 
ignored and libraries from CATALINA_HOME/shared/lib are always loaded even 
if CATALINA_BASE is set to a value different from CATALINA_HOME.

This is either a bug in Tomcat5 or a conscious decision was made to change 
the behavior or Tomcat5 -vs- Tomcat-4.1.x (and probably also Tomcat-4.0.x).

Can anyone confirm this?  Should I report this as a bug in Bugzilla?

Jake

At 04:29 PM 1/2/2003 -0600, you wrote:

Hi all,

Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
that doesn't seem to be the case.

For instance, using Tomcat-4.1.18, if I have some jars in 
CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
loaded from CATALINA_BASE/shared/lib (if it exists).  This is the 
behavior I expect and love!

However, using Tomcat-5.0, if I set things up the same way, jars in 
CATALNIA_HOME/shared/lib *will* be loaded and jars in 
CATALNIA_BASE/shared/lib are completely ignoredor it could be that it 
is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
first and then looking in CATALINA_BASE/shared/lib.  If a jar in the 
latter contains the same packages that were already loaded in the former, 
then the latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no 
matter what.  This is behavior that I don't expect and don't like.

I used the ability to separate instances to run apps which required 
different versions of xerces.  I put xerces-1.4.4.jar in 
CATALINA_HOME/shared/lib for apps which I use most often.  However, I 
have other apps that need either slightly modified version of 
xerces-1.4.4 or require xerces-2.x.x.  For those cases, I run a separate 
instance of Tomcat using a custom set CATALNIA_BASE with a local 
shared/lib with the appropriately versioned jars that I need for this 
particular app.

So, this is a great feature in Tomcat-4.1.x (and, I imagine, 
Tomcat-4.0.x) but it seems to be broken in Tomcat-5.0.  Is this new 
behavior in Tomcat-5.0 a bug or was it intentional?  If it was 
intentional, can someone explain the reasons for the change in behavior 
to that of Tomcat-4.1.x?

Thanks,

Jake


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: how to get meaningful exception in JSP error page

2003-01-02 Thread Bill Barker
As it happens, JasperException (at least in 4.1 Jasper2) subclasses
ServletException.  You should be able to get this by casting to a
ServletException and calling getRootCause().

"Brian W. Young" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Happy New Year,
>
> I'm using the errorPage="my_own_error.jsp" technique.
>
> However, the "exception" object in my_own_error.jsp gives me the only
> the Jasper stack trace.  It doesn't include info on what part of my own
> code bombed.  I've tried getCause() on exception but it isn't yielding
much.
>
> I basically want the bottom most part of the trace that tomcat shows on
> its own interal error page (the one you get before you use the errorPage
> directive)
>
> Thanks for your pointers.





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JasperException

2003-01-02 Thread Bill Barker
Well, it looks like it is b*tching about 'FormBean.getTransactionID()'
returning a String [].  Arrays aren't one of the types that JSP is required
to support automatic translation for.

"Denise Mangano" <[EMAIL PROTECTED]> wrote in message
5D83C44941AFD4118B6F0002B302984F4385FC@EXCHANGE_SERVER">news:5D83C44941AFD4118B6F0002B302984F4385FC@EXCHANGE_SERVER...
> I'm having a hard time figuring out what's causing this error so I thought
> I'd post it to see if anyone has any ideas...
>
> When my form page is called, I pass two variables in the URL.  These two
> variables are hidden within the form page.  I need to maintain the value
of
> these two variables, along with what the user inputs into the form.  I am
> assuming the Java Bean can still see these since they have  tags.
> This transactionid is one of the variables.  This error occurs during form
> validation, if the user needs to retry entering a field.  The code in
Retry
> is  value='<%=formHandler.getTransactionID()%>'>
>
> Thanks :)
>
> exception
> org.apache.jasper.JasperException:
> com.complusdata.beans.FormBean.getTransactionID()Ljava/lang/String;
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 48)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:684)
> at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:432)
> at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:356)
> at
>
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
> at
> org.apache.jsp.FormValidate_jsp._jspService(FormValidate_jsp.java:75)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 04)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
> at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
> at
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
> at
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
> at
>
org.

Re: Connector Problem, has anyone seen this behavior?

2003-01-02 Thread Bill Barker
The mod_jk (V1.0) for 3.2.x doesn't have the re-try connection logic that
the later versions have.  You should upgrade to at least V1.1 (ships with TC
3.3), or, better 1.2.x (current stable release).

"Brandon Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Every once in a while, we get a strange error from tomcat when using
apache
> 1.3, tomcat 4.1.18, and mod_jk(which was compiled for tomcat 3.2.4
> initially)...
>
> [INFO] ChannelSocket - -server has been restarted or reset this connection
>
> Whenever this error shows up, the browser returns a cannot find server.
>
> Has anyone seen this happen to them?  I will try compiling a new connector
> module, but figured I would take a chance and see if anyone else has
> experienced this same behavior.
>
> Brandon





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Parse error in application web.xml

2003-01-02 Thread Jacob Kjome

Tomcat-3.3.x and above completely ignore the system classpath as far as 
webapps are concerned.  All jar files that you want your webapps to see 
will have to be in either the WEB-INF/lib of your webapp or in the 
designated library directories.  The only exception to this are the Java 
runtime classes and jars that you put in JAVA_HOME/jre/lib/endorsed or 
jre/lib/ext which, essentially, make those jars part of the Java 
runtime.  However, I don't recommend using those techniques for webapps 
unless you want to spend lots of time trying to debug classloader issues

Jake

At 08:56 PM 1/2/2003 -0800, you wrote:
Hi there,

I was reading an unrelated article on this but its possible that just
setting your CLASSPATH doesn't really pick up your new xerces parser.
Fire up tomcat with this flag

-Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed

(make sure to put the new JAR files in that directory).. check out

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-
howto.html and scroll down to the section XML Parsers and JDK 1.4
towards the bottom.

Hope that helps

Jan-Michael

- Original Message -
From: "Keshava Murthy" <[EMAIL PROTECTED]>
Date: Thursday, January 2, 2003 8:24 pm
Subject: Re: Parse error in application web.xml

> Hi Jason,
>
> I downloaded latest jar files and included them in my classpat I
> am still
> getting the same exception
>
> regards,
> keshav
>
>
> - Original Message -
> From: "Bowsher, Jason P" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 6:32 PM
> Subject: RE: Parse error in application web.xml
>
>
> > I had a very similar problem (although not eactly the same).  I
> think, for
> > me, this was a bug in xerces.  I upgraded from
> > <" target="l">http://www.jpackage.org/rpm.php?id=571> xerces-j2-
> 2.2.1-1jpp to
> > <" target="l">http://www.jpackage.org/rpm.php?id=571> xerces-j2-
> 2.2.1-2jpp from
> > jpackage.org to fix it.
> >
> > Hope it helps
> >
> >
> >
> > -Original Message-
> > From: Keshava Murthy [mailto:[EMAIL PROTECTED]]
> > Sent: 02 January 2003 12:44
> > To: [EMAIL PROTECTED]
> > Subject: Parse error in application web.xml
> >
> >
> > Hi,
> >
> > I installed Tomcat 4.1.18 and when I try to start the servlet
> engine I am
> > getting the following error -
> >
> > 003-01-02 17:44:36 ContextConfig> 2003-01-02 17:44:36
> ContextConfigweb.xml> org.xml.sax.SAXParseException: The markup
> declarations contained or
> pointed
> > to by the document type declaration must be well-formed.
> >  at
> >
> org.apache.xerces.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:118
> > 9)
> >  at org.apache.commons.digester.Digester.parse(Digester.java:1495)
> >  at
> >
> org.apache.catalina.startup.ContextConfig.applicationConfig
(ContextConfig.ja
> > va:282)
> >  at
> org.apache.catalina.startup.ContextConfig.start
(ContextConfig.java:639)
> >  at
> >
> org.apache.catalina.startup.ContextConfig.lifecycleEvent
(ContextConfig.java:
> > 243)
> >  at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSuppor
> > t.java:166)
> >  at
> >
> org.apache.catalina.core.StandardContext.start
(StandardContext.java:3567)>  at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:8
> > 21)
> >  at
> org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:807)
> >  at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>  at
> >
> org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDeployer.
> > java:529)
> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >  at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39
> > )
> >  at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
> org.apache.commons.beanutils.MethodUtils.invokeMethod
(MethodUtils.java:228)
> >  at
> org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)>
> at
> org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>  at
> >
> org.apache.xerces.parsers.AbstractSAXParser.endElement
(AbstractSAXParser.jav
> > a:585)
> >  at
> >
> org.apache.xerces.impl.XMLNamespaceBinder.endElement
(XMLNamespaceBinder.java
> > :647)
> >  at
> >
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(XMLDocu
> > mentFragmentScannerImpl.java:1008)
> >  at
> >
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
spatc
> > her.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
> >  at
> >
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocume
> > ntFragmentScannerImpl.java:329)
> >  at
> >
> org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:525)
> >  at
> >
> org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:581)
> >  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:

reference to external error-page [RBS2003010300001814]

2003-01-02 Thread techassistance
Ahoy there!

This is an automated response, to let you know
that we have received your query and will answer
your email as soon as possible.

We know you'd like to get back to playing our
state-of-the-art online games. We'd therefore like
to assure you that we are determined to keep our
service at the level that you've come to expect
from The River Belle Online Casino.

Thank you for your patience and enjoy your day!

Best wishes,

Sebastian
First Mate

RIVER BELLE ONLINE CASINO


   RIVER BELLE CASINOS ONLINE


RIVER BELLE   ACES HIGH
Enjoy Southern HospitalityFast Paced Casino Action

www.riverbelle.com/a3099  www.aceshigh.com/a3181

24/7 toll-free support24/7 toll-free support

USA:1 888 615 2383USA:1 877 566 0482
CANADA: 1 888 552 4196CANADA: 1 877 776 0549
UK: 0 800 783 4381UK: 0 800 169 8796

E-mail support:   E-mail support
[EMAIL PROTECTED][EMAIL PROTECTED]

E.&O.E.

The River Belle Online Casino respects your online time
and privacy.  If you wish to be removed from our mailing
list and not receive any promotional e-mails from us,
please send an e-mail to [EMAIL PROTECTED] and
type UNSUBSCRIBE in the subject bar.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




reference to external error-page

2003-01-02 Thread Michael Mendelson

Hello all,

I would like to use an error page for certain apache/httpd errors as well as
tomcat errors (e.g. 404). In the web.xml file though, the directive...


   
404
/error/404.html
   


...routes me to http://localhost/projectname/error/404.html.

How would I route to an error page location that might be on the same server,
but external to the project?

I'm using Apache 1.3.23 and Tomcat 4.1.18 (and mod_jk to route requests to
tomcat), if it matters.

Thanks,

Michael



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NTLM / Connection: Keep-Alive / HTTP 1.0

2003-01-02 Thread Bill Barker
There is a problem with HTTP/1.0 Keep-Alive in 4.1.12.  See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12783 for more
information.  If this looks like your problem, then upgrading to 4.1.18
should fix it.

"Endre Stølsvik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> We're having a problem surrounding Tomcat when using NTLM authentication
> (Windows NT/2000 "single sign-on" through IE), when Internet Explorer
> decides that it should use HTTP 1.0.
>
> The problem is that NTLM _must_ go three times "back-and-forth" on the
> same connection. It is a connection-level authentication mechanism, rather
> than a session-oriented mechanism, probably violating a dozen RFCs.
> However, this requires that the server does "Keep-Alive" connections.
>
> The whole system works like a charm with HTTP 1.1, where Tomcat is eager
> to do keep-alive. But, if the browser is set up to do HTTP 1.0 only (as
> you can with IE, also through the policy system for windows, as a company
> here have done!), then Tomcat refuses to do keep-alive. A RFC out there
> (http:1.0 2068) states that if the client adds the string "Connection:
> Keep-Alive", then the server should still do keep-alive, even on 1.0. This
> is not the fact with Tomcat (4.1.12); it always and still closes the
> connection if the client requests HTTP 1.0 _with_ "Connection:
> Keep-alive" (as verified using telnet).
>
> We've banged our heads against this for some time now, and would like to
> know if anyone have any ideas for solutions.
>
> One idea that haven't been exhausted yet is whether any of the connectors
> available between apache httpd and tomcat will behave differently that
> tomcat's native http connector? Is this an probable avenue?
>
> Any help would be greatly apreciated!
>
> PS: Check out the excellent jcifs project for more background on NTLM and
> CIFS, http://jcifs.samba.org/
>
> --
> Mvh,
> Endre Stølsvik   M[+47 93054050] F[+47 51625182]
> Developer @ CoreTrek AS -  http://www.coretrek.com/
> CoreTrek corporate portal / EIP -  http://www.corelets.com/





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Parse error in application web.xml

2003-01-02 Thread jmong
Hi there,

I was reading an unrelated article on this but its possible that just 
setting your CLASSPATH doesn't really pick up your new xerces parser. 
Fire up tomcat with this flag

-Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed

(make sure to put the new JAR files in that directory).. check out 

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-
howto.html and scroll down to the section XML Parsers and JDK 1.4 
towards the bottom.

Hope that helps

Jan-Michael

- Original Message -
From: "Keshava Murthy" <[EMAIL PROTECTED]>
Date: Thursday, January 2, 2003 8:24 pm
Subject: Re: Parse error in application web.xml

> Hi Jason,
> 
> I downloaded latest jar files and included them in my classpat I 
> am still
> getting the same exception
> 
> regards,
> keshav
> 
> 
> - Original Message -
> From: "Bowsher, Jason P" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 6:32 PM
> Subject: RE: Parse error in application web.xml
> 
> 
> > I had a very similar problem (although not eactly the same).  I 
> think, for
> > me, this was a bug in xerces.  I upgraded from
> > <" target="l">http://www.jpackage.org/rpm.php?id=571> xerces-j2-
> 2.2.1-1jpp to
> > <" target="l">http://www.jpackage.org/rpm.php?id=571> xerces-j2-
> 2.2.1-2jpp from
> > jpackage.org to fix it.
> >
> > Hope it helps
> >
> >
> >
> > -Original Message-
> > From: Keshava Murthy [mailto:[EMAIL PROTECTED]]
> > Sent: 02 January 2003 12:44
> > To: [EMAIL PROTECTED]
> > Subject: Parse error in application web.xml
> >
> >
> > Hi,
> >
> > I installed Tomcat 4.1.18 and when I try to start the servlet 
> engine I am
> > getting the following error -
> >
> > 003-01-02 17:44:36 ContextConfig> 2003-01-02 17:44:36 
> ContextConfigweb.xml> org.xml.sax.SAXParseException: The markup 
> declarations contained or
> pointed
> > to by the document type declaration must be well-formed.
> >  at
> >
> org.apache.xerces.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:118
> > 9)
> >  at org.apache.commons.digester.Digester.parse(Digester.java:1495)
> >  at
> >
> org.apache.catalina.startup.ContextConfig.applicationConfig
(ContextConfig.ja
> > va:282)
> >  at
> org.apache.catalina.startup.ContextConfig.start
(ContextConfig.java:639)
> >  at
> >
> org.apache.catalina.startup.ContextConfig.lifecycleEvent
(ContextConfig.java:
> > 243)
> >  at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSuppor
> > t.java:166)
> >  at
> > 
> org.apache.catalina.core.StandardContext.start
(StandardContext.java:3567)>  at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:8
> > 21)
> >  at
> org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:807)
> >  at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>  at
> >
> org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDeployer.
> > java:529)
> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >  at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39
> > )
> >  at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
> org.apache.commons.beanutils.MethodUtils.invokeMethod
(MethodUtils.java:228)
> >  at 
> org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)> 
> at 
> org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>  at
> >
> org.apache.xerces.parsers.AbstractSAXParser.endElement
(AbstractSAXParser.jav
> > a:585)
> >  at
> >
> org.apache.xerces.impl.XMLNamespaceBinder.endElement
(XMLNamespaceBinder.java
> > :647)
> >  at
> >
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(XMLDocu
> > mentFragmentScannerImpl.java:1008)
> >  at
> >
> 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
spatc
> > her.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
> >  at
> >
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocume
> > ntFragmentScannerImpl.java:329)
> >  at
> >
> org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:525)
> >  at
> >
> org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:581)
> >  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> >  at
> >
> org.apache.xerces.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:117
> > 5)
> >  at org.apache.commons.digester.Digester.parse(Digester.java:1514)
> >  at
> >
> org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDeployer.j
> > ava:335)
> >  at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
>  at
> >
> org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:452
> > )
> >  at 
> org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:409)>  at org.apache.catalina.startup.HostConfig.start
(HostConf

Fw: Tomcat 4.1.18 jspc problem.

2003-01-02 Thread Alexey Kozadaev
Hello everyone,

I'm experiencing a problem with jspc. It always returns
NullPointerException, no matter what .jsp file I compile. Although it works
thru ?jsp_precompile, unfortunately we have a very big web site where plenty
of jsp files and they are have certain, complex structured layout in
filesystem, so I think writing a script, that would connect to tomcat with
?jsp_precompile would not be a good idea.

I am using FreeBSD 4.6, Tomcat 4.1.18, j2sdk_1.4.1_01 on linux base.

Does anyone know is there still a way to work with jspc or jasper jspc on my
system???


 ==
UNIX is like a wighwam - No Gates, No Windows and Apache inside




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can tomcat listen only to unix socket?

2003-01-02 Thread Bill Barker

"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> On Thu, 2 Jan 2003, Gery Kahn wrote:
>
> > Date: Thu, 02 Jan 2003 15:29:22 +0200
> > From: Gery Kahn <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Can tomcat listen only to unix socket?
> >
> > I am trying to config Tomcat 4.1.17 to listen only unix socket,
> > without TCP sockets.
> >
> > How to config connectors in server.xml?
> >
>
> You don't.
>
> Java doesn't support Unix sockets, only TCP sockets.  Therefore, Tomcat
> only supports TCP sockets as well, unless you write some native code
> adapters.

Or, you have the Jk2 developers write it for you. :-)

However, Craig is correct that you don't configure this in server.xml.  You
do it in jk2.properties.  I haven't really tried to play with the Unix
sockets yet, so I the best that I can do is to tell you how I understand the
config process.

You need to specify the 'handlers.list' property something like (although
I'm not certain that this is exactly right):
  handlers.list=apr,request,container,channelUnix

Of course, you have to set the 'channelUnix.file' property to point to the
socket.

Now, as long as you have configured mod_jk2.so the same way (e.g. using the
same properties file), it should work.



>
> Craig





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Parse error in application web.xml

2003-01-02 Thread Keshava Murthy
Hi Jason,

I downloaded latest jar files and included them in my classpat I am still
getting the same exception

regards,
keshav


- Original Message -
From: "Bowsher, Jason P" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 6:32 PM
Subject: RE: Parse error in application web.xml


> I had a very similar problem (although not eactly the same).  I think, for
> me, this was a bug in xerces.  I upgraded from
>  xerces-j2-2.2.1-1jpp to
>  xerces-j2-2.2.1-2jpp from
> jpackage.org to fix it.
>
> Hope it helps
>
>
>
> -Original Message-
> From: Keshava Murthy [mailto:[EMAIL PROTECTED]]
> Sent: 02 January 2003 12:44
> To: [EMAIL PROTECTED]
> Subject: Parse error in application web.xml
>
>
> Hi,
>
> I installed Tomcat 4.1.18 and when I try to start the servlet engine I am
> getting the following error -
>
> 003-01-02 17:44:36 ContextConfig[/admin]: Occurred at line 1 column 3
> 2003-01-02 17:44:36 ContextConfig[/admin] Parse error in application
web.xml
> org.xml.sax.SAXParseException: The markup declarations contained or
pointed
> to by the document type declaration must be well-formed.
>  at
>
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:118
> 9)
>  at org.apache.commons.digester.Digester.parse(Digester.java:1495)
>  at
>
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
> va:282)
>  at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
>  at
>
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
> 243)
>  at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:166)
>  at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
>  at
>
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
> 21)
>  at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>  at
>
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.
> java:529)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>  at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>  at java.lang.reflect.Method.invoke(Method.java:324)
>  at
>
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
>  at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
>  at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>  at
>
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
> a:585)
>  at
>
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
> :647)
>  at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
> mentFragmentScannerImpl.java:1008)
>  at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
> her.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
>  at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
> ntFragmentScannerImpl.java:329)
>  at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
>  at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
>  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>  at
>
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
> 5)
>  at org.apache.commons.digester.Digester.parse(Digester.java:1514)
>  at
>
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
> ava:335)
>  at org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
>  at
>
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452
> )
>  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
>  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
>  at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
>  at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:166)
>  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>  at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>  at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
>  at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>  at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>  at sun.reflect.NativeMethodAccessorImpl.invoke

Problem with SERVER.XML please help!!!!!!

2003-01-02 Thread seemanto
hi

i have installed TOMCAT Version 3.2.3 for windows98. When i start up the 
server, it is exiting with an exception that goes on like this:

"Error reading server.xml...". I haven't done anything with server.xml 
after installation, so what could be the problem.plz help.

bye



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Noel J. Bergman
> My production servers are using Jserv, but I wouldn't think of using a
single
> Tomcat instance for all of my virtual hosts.

Same here, in most cases, and me neither.  Just out of curiousity, when do
you think you'll finally get off of JServ?  We're thinking of doing it
fairly soon, and I'm curious about your experiences.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat-4.0.3

2003-01-02 Thread sgv -

The prior mail was sent before I could complete.
Therefore, I am posting my question again.

I am trying to run a JSP using tomcat-4.0.3 and it
gives me an error "method flushBuffer() has protected
access in class
org.apache.jasper.runtime.JspWriterImpl". This error
does not occur when I use tomcat-4.0.1. The resulting
servlet has the following code:
public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws java.io.IOException, ServletException {

..
...
finally {
if (out instanceof
org.apache.jasper.runtime.JspWriterImpl) { 
((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer();
}
if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
}

Any help would be appreciated. Thanks in advance.

sgv 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat-4.0.3

2003-01-02 Thread sgv -
Hi,
I am trying to run a JSP using tomcat-4.0.3 and it
gives me the error 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBCRealm

2003-01-02 Thread Rick Fincher
Hi Rob,

> Ok, I tried cleartext passwords, but I came up with the same result.  I
don't
> understand why tomcat is able to start up at all, if the authentication is
> failing.

Users are authenticated not Tomcat, so starting Tomcat has nothing to do
with authentication.  Tomcat is just a Java program.

When a user tries to access a web app Tomcat will authenticate that user if
that web app's web.xml file tells it to. The manager app is set up to
require authentication .

The web.xml file for admin is in
CATALINA_HOME/server/webapps/admin/WEB-INF/web.xml, you can see how it is
set up there.  If you want to authenticate users for your own web apps, set
up their web.xml security roles in a similar fashion.

> When I run 'ps' after starting up tomcat, I see this process:
>
> 40 S postgres  2825  2758  0  75   0-  2431 schedu 18:12 pts/0
00:00:00
> postgres: tomcat template1 24.208.224.236 idle in transaction
>
> Seeing this makes me believe that Tomcat is correctlty connecting to the
> database at startup.  Is this true?  If so, why can't the admin or manager
> apps authenticate?  They are using the same Realm (it's nested inside the
>  tag) and I'm supplying the same username and password.

A couple of other things you can check:

Should  userNameCol="usename" be userNameCol="username" ?

Can you access Postgres data from that file in your web apps using that
driver and username/password?  You should be able to write a simple program
to read the role names from the database.

Within Postgres have you granted select privleges to the database table in
template1 to the user tomcat in the tables pg_shadow and pg_groupview?

Can you use a db browser tool to log in as tomcat and execute an SQL command
like: SELECT groname FROM TABLE pg_groupview WHERE usename IS 'tomcat'?

Rick

>
> --
> Robert Abernethy IV
> Dynamic Edge, Inc.
> 734.975.0460
>
> > Hi Rob,
> >
> > Try it in clear text without the MD5 digest, to verify that your
> > password, username, role, etc are correct.
> >
> > I had a lot of problems with digesting.
> >
> > Also some databases return column names in upper case even if they
> > are in lower case so you may want to try all caps on your db column
> > names.  I think you would get a different eror message if this was
> > the case, though.
> >
> > Rick
> >
> > - Original Message -
> >
> > > I'm trying to set up a JDBCRealm for use with the admin and manager
> > webapps.
> > > The problem is that I am unable to authenticate any users.
> > >
> > > - Tomcat 4.1.18
> > > - Postgresql 7.3.1
> > > - JDBC driver is in $CATALINA_HOME/common/lib
> > > - Tomcat starts up fine, I just can't authenticate
> > > - I can directly connect to my database with the username and password
> > > - I have created the 'admin' and 'manager' groups in the database
> > > - I have added the users to both groups
> > >
> > > Realm:
> > >  > >driverName="org.postgresql.Driver"
> > > connectionURL="jdbc:postgresql://bilbo.dynedge.com/template1"
> > >connectionName="tomcat" connectionPassword="tomcat"
> > > userTable="pg_shadow" userNameCol="usename"
userCredCol="passwd"
> > > userRoleTable="pg_groupview" roleNameCol="groname"
> > >digest="MD5" />
> > >
> > > Log:
> > > 2003-01-02 12:34:34 JDBCRealm[Standalone]: Username tomcat NOT
> > successfully
> > > authenticated
> > >
> > > Any ideas?
> > >
> > > --
> > > Robert Abernethy IV
> > > Dynamic Edge, Inc.
> > > 734.975.0460
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Turner, John

We use the Sun tool, it used to be called Forte.  It's free, I think it is
called SunONE or something now.

Oracle's tool is free (certain editions) as well, but if you code with it
you have to follow special instructions to deploy to Tomcat (instructions
are on the Oracle site). 

There is also eclipse from IBM, also free, I believe.

John


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 4:49 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Thanks Drew - I will definitely check it out because I am NOT happy with
JBuilder at all.

I would be lost without this list!!  Thanks :)

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 4:42 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


I use NetBeans www.netbeans.org.  It is a nice java IDE.  It is open source
so does have its issues.  But it does a lot of stuff for you.  You just have
to take some time to get used to it.

Drew

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:37 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


That seemed to do it.  I know of naming conventions when writing Java
programs, but have never seen an instance that the naming convention was an
absolute rule.  

Thanks for your help :)

Completely off topic - but can you suggest a good JSP editor?  Coding in a
plain text editor like notepad can get frustrating.  I have a trial version
of JBuilder Enterprise, but it's a CPU hog, and it doesn't seem to help much
in the JSP department.

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:54 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Denise,

The first thing that immediately came to mind is to check your setters and
form parameters for the appropriate case usage.  Your "PostalCode" should be
"postalCode" in both the form and the JSP actions.  If you don't understand,
I'll go into more detail regarding naming conventions for bean properties.

--- Noel


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Turner, John

I think you're overthinking it.  Tomcat != Apache.  Webapps != Document
Roots.

Tomcat needs to do what it needs to do because a web app is more than just a
directory that has content in it.

You can't map a.myhost.com to /examples/a and b.myhost.com to examples/b for
a very good reason.  There's no such thing as /examples/a and /examples/b.
If you want that you setup /examples-a and /examples-b, which you CAN do
with the auto-deploy function.

Don't make Apache = Tomcat...they're completely different, not just in name
and codebase, but also in purpose, intent, and design.

On that note, anyone who tries to do power hosting with Tomcat in a single
instance is being foolish, but that's my own personal opinion.  My
production servers are using Jserv, but I wouldn't think of using a single
Tomcat instance for all of my virtual hosts.  Doesn't make any sense at all.
>From a user standpoint, if I was paying $30 a month or whatever for hosting,
and my ISP told me that they couldn't restart my application because it
would effect others, or that my application was going to be down because
someone else's application was causing problems, I'd be pretty upset.  From
that perspective, Tomcat does virtual hosting just fine, using separate
instances, provided you have the resources.

John


-Original Message-
From: Joseph Shraibman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 4:49 PM
To: Tomcat Users List
Subject: Re: can tomcat do dynamic virtual hosts?


Turner, John wrote:
> Hmmm...you lost me there.  Yes, you do map to a Context directly, at 
> least you do with JK.  That's exactly what having a JK block for 
> "/examples", does, for example.  With Apaches 'apachectl restart' or 
> 'apachectl graceful' you can pick up both new virtual hosts and new 
> JkMounts for those virtual hosts.
> 
> On the Apache side, what more does there need to be?

That means that all myhost.com/examples can be passed to tomcat, who looks
at 
myhost.com/examples and does its own mapping to find the right context.  It
doesn't mean 
that you can map myhost.com/some/arbirtray/path to the examples webapp
(unless you also 
change the tomcat config) and it doesn't mean you can map a.myhost.com to
/examples/a and 
b.myhost.com to /examples/b and it doesn't mean you can map *.myhost.com to
/examples/%0 
where %0 is what is in *.  Or not as far as I can tell, anyway. JServ is
much more 
flexible in this regard.

On another note I've totally given up on the apache autoconfiguration
because of its 
inconsistant behavior.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 5 and CATALINA_BASE/shared/lib problem...

2003-01-02 Thread Jacob Kjome

Just a little follow-up to what I said below.  I had surmised that maybe 
CATALINA_HOME/shared/lib libraries where simply getting loaded first and 
maybe CATALINA_BASE/shared/lib libraries that had the same packages 
wouldn't be loaded because they would only be loaded once by Tomcat.  Well, 
this is false.  CATALINA_BASE/shared/lib is entirely ignored and libraries 
from CATALINA_HOME/shared/lib are always loaded even if CATALINA_BASE is 
set to a value different from CATALINA_HOME.

This is either a bug in Tomcat5 or a conscious decision was made to change 
the behavior or Tomcat5 -vs- Tomcat-4.1.x (and probably also Tomcat-4.0.x).

Can anyone confirm this?  Should I report this as a bug in Bugzilla?

Jake

At 04:29 PM 1/2/2003 -0600, you wrote:

Hi all,

Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
that doesn't seem to be the case.

For instance, using Tomcat-4.1.18, if I have some jars in 
CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
loaded from CATALINA_BASE/shared/lib (if it exists).  This is the behavior 
I expect and love!

However, using Tomcat-5.0, if I set things up the same way, jars in 
CATALNIA_HOME/shared/lib *will* be loaded and jars in 
CATALNIA_BASE/shared/lib are completely ignoredor it could be that it 
is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
first and then looking in CATALINA_BASE/shared/lib.  If a jar in the 
latter contains the same packages that were already loaded in the former, 
then the latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no matter 
what.  This is behavior that I don't expect and don't like.

I used the ability to separate instances to run apps which required 
different versions of xerces.  I put xerces-1.4.4.jar in 
CATALINA_HOME/shared/lib for apps which I use most often.  However, I have 
other apps that need either slightly modified version of xerces-1.4.4 or 
require xerces-2.x.x.  For those cases, I run a separate instance of 
Tomcat using a custom set CATALNIA_BASE with a local shared/lib with the 
appropriately versioned jars that I need for this particular app.

So, this is a great feature in Tomcat-4.1.x (and, I imagine, Tomcat-4.0.x) 
but it seems to be broken in Tomcat-5.0.  Is this new behavior in 
Tomcat-5.0 a bug or was it intentional?  If it was intentional, can 
someone explain the reasons for the change in behavior to that of Tomcat-4.1.x?

Thanks,

Jake


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


tomcat binds only to localhost??

2003-01-02 Thread Ronny Haryanto
Hi everyone,

I have a strange problem with Tomcat 4.1.18 on Windows 2000. The
machine has one ethernet, dhcp enabled, and the primary ip is
192.168.1.2 (LAN) and it is also accessible via 202.157.154.130 
and seatech.com.

I can only access Tomcat via http://localhost:8080 from the machine
itself, but not http://seatech.com:8080 even though seatech.com
clearly resolves to 202.157.154.130 and I don't configure Tomcat to
listen to one specific address/interface in server.xml (the default is
that Tomcat listens to any available address, right?). I also checked
the logs for errors, but I didn't see any.

Am I missing something? I would greatly appreciate any help or
suggestions. Thank you for your time.

Regards,

Ronny

PS. Here's the server.xml file.


  
  
  



  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  

  
  



  
  
  
www.seatech.com



  

  


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: reducing tomcat & jasper memory footprint

2003-01-02 Thread Will Hartung
> From: "Julian Löffelhardt" <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 5:38 PM
> Subject: Re: reducing tomcat & jasper memory footprint


> Thanks for your Feedback!

Sure!

> I will look into your suggested approch using filters.
>
> answers inline

with comments...

> As of 4.0.4 tomcat keeps a reference to every generated servlet, so
> increasing the memory size only delays the OutOfMemoryError.

Yeah, I saw that blurb. That's unfortunate, because in truth this is the
crux of your problem. It is not so bad that a popular JSP gets cached into
RAM, that is a good thing. That is what RAM is for. However, in this case,
even the rarest and most unpopular of your JSPs are getting cached
permanently. Owie.

> In fact we are using loadbalancing using apache 1.3.26, mod_jk, and 3
tomcat
> instances.
> Every night one tomcat get's restarted. Basically we use the lb-options
> local_worker  & local_worker_only to disable a tomcat instance at midnight
> and restart it at 4:00.
>
> Otherwise the big problem with restarting tomcat is loss of our
> session-data.
> Saving and restoring the data in the SESSIONS.ser file doesn't help, since
> the loadbalancer routes the web clients to another tomcat instance where
> they get another sessionId.

Are you able to isolate a particular instance/server so that current users
can continue with the site, while no new users go there? If that is possible
with your configuration, then you do not really have a session problem as
they should be invalid by the user logging out/going away/timing out.

> I thought about converting the documents into velocity templates or
> something like that using a postprocessor but decided against it:
>
> 1) Would be quite comlicated, due to the complex structure of the pages.
> 2) First I would need to "proove" that my suggested different design would
> work better.

To be fair, replacing JSP with Velocity, particularly a JSP generated by
another program (i.e. not written directly by a CBL (Carbon Based Lifeform))
implies that the execution of the compiled JSP page is slower than the
intpretation of the Velocity template (modulo the fact that Tomcat does not
GC JSPs, but that is a detail for this discussion). I do not have any data
either way as to which is faster.

> We get about 400.000 PageImpressions/day and under high load many
> concepts/designs/applications just dont't "deliver"
> For example, we performed extensive stress-tests on our application but
the
> tests didn't reveal the problems with too many different jsp-Files since
our
> tests where mainly focused on performance issues and we only used about
100
> pages for testing.

In truth, there is not anything really wrong with your overall design. Most
complaints about JSP focus on maintainability of the JSP files, and the
intermixing of code and HTML etc. Velocity implicity suffers from that same
issue, though perhaps its syntax and model may be better. But these are not
direct issues with your system, as your JSPs are derivative products of your
CMS system. In my opinion, your use of JSPs here is no different from using
something akin to the Olde Tyme Server Side Includes. The facts seem to be
that save for the memory issue, you system is behaving fine, and, as you
noted, your JSP solution appears to scale better.

And well it should with all of your pages cached in RAM :-).

So, I would look at the other message in the list that mentioned the Jasper
class loaders hash table and perhaps changing that to support an LRU queue
rather than a hash table.

I know it is a complicated and not necessarily well understood area for most
developers, but it IS the source of your problem. I think that if you spend
a little bit of time in that section of code, you have a better chance for
success in a shorter amount of time. Also, once you load test the heck out
of if and stress it as best as you can, it is probably much safer as from a
logical or even implementation point of view, your application does not
change at all. Ideally, it can simply be a change from a HashTable (or
HashMap, whatever they are using) to an LRUMap (of somekind, this is left as
an exercise for the reader :-) -- maybe you can safely use WeakReferences
here), with all of the Real Hard Work (tm) done by the surrounding code.

Granted, this means you must go through the nightmare of actually BUILDING
Tomcat (not for the meek).

The code in place already deals with loading class files, checking the map
for loaded classes, synchronization issues, etc. So what is the difference
between checking a HashMap for a class and loading it if it does not exist
(in this case the first time the page is loaded), and seeing that the class
is not there because it happened to drop off the end of the queue? It should
not matter why the class is not in the map, but simply that it is not there.

For normal operations and classes, this is less of an issue, but your
classes are really content so they suck up an extraordinary amount of
memory. 

Re: Memory Usage and Garbage Collection

2003-01-02 Thread Craig R. McClanahan


On Fri, 3 Jan 2003, Julian Löffelhardt wrote:

> Date: Fri, 3 Jan 2003 02:01:58 +0100
> From: Julian Löffelhardt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Memory Usage and Garbage Collection
>
> Looking at the jasper source of tomcat 4.0.4 releasing jsp's seems to be
> reasonable easy to implement:
> The Jsp's classloader, the class and the actual jsp-servlet instance  are
> all put together in a JspServletWrapper-Object which itself is stored in the
> JspServlet (the Servlet used to executing jsps) using a Hashtable.
> One could replace the hashtable with a LRU-Cache or anything.
>
> Since each jsp is loaded using a separate classloader, removing the Wrapper
> removes the reference to the instance, it's class and it's loader, which
> should enable the class garbage collector to remove the class.
>
> Do you think this approach is reasonable?
> Does this part of the implementation differ with Jasper2?
>

You'd best examine the sources to figure that out :-).  But Jasper2 is
radically different than Jasper1.

But remember, it's not just a matter of throwing away the reference to the
compiled servlet class.  You also need to ensure that the destroy() method
gets called as the servlet API requires -- all the while ensuring that no
additional requests start getting processed through the service method.

And, don't forget that this will harm performance for the vast majority of
users who *do* have adequate memory on their servers, so nothing like this
should be enabled by default.

> This is a feature I could really use well.
>
> llap,
> julian

Craig

>
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, January 03, 2003 1:12 AM
> Subject: Re: Memory Usage and Garbage Collection
>
>
> >
> >
> > On Thu, 2 Jan 2003, Brandon Cruz wrote:
> >
> > > Date: Thu, 2 Jan 2003 16:16:23 -0600
> > > From: Brandon Cruz <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> > >  [EMAIL PROTECTED]
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: Memory Usage and Garbage Collection
> > >
> > > Do loaded jsp pages and/or class files ever get garbage collected when
> > > tomcat is running?
> > >
> >
> > It's legal for servlet containers to destroy and release servlets and JSP
> > pages while the server is running, but Tomcat doesn't currently do so.
> > Once a servlet or JSP is loaded, it stays loaded until you reload that
> > particular webapp or you shut Tomcat down.
> >
> > > We have a production server with several hundred virtual hosts per host,
> > > each with a fair share of jsp pages and with moderate to low traffic per
> > > host.  As time goes on, the amount of memory being used constantly
> grows.
> > > It starts off around 60MB, then goes higher and higher, getting up to
> around
> > > 100MB after a couple days.
> > >
> > > The regular GC seems to usually clean up around 2MB ([GC
> > > 99493K->97502K(204544K), 0.0243521 secs]) and the Full GC seems to clean
> up
> > > less than that ([Full GC 97388K->97187K(204544K), 2.4269915 secs]).
> > >
> > > Since I have the -Xmx and -Xms set to 200MB, the 204544K number never
> gets
> > > resized, but the number before the -> seems to slowly and steadily rise.
> > >
> > > Full GC seems to run quite often, every few seconds, GC runs once in a
> > > while, but spits out about 50 lines at once every time it runs.  Is this
> > > normal?  Shouldn't Full GC only run once in a while?
> > >
> > > I am starting to think that as classes and jsp's are loaded, they stay
> in
> > > memory and are never released until tomcat is restarted, which means
> that
> > > there is eventually a point where all the classes will load and I just
> need
> > > to have enough memory to support that without having to use swap space.
> > >
> >
> > It's not just the classes -- it's the object instances created from those
> > classes that take up space (the bytecodes of the class itself exist only
> > once).
> >
> > > The problem occurs when the memory usage number before the -> gets up to
> > > about 130.  The system is using swap space and eventually out of memory
> > > errors start showing up.
> > >
> > > Any ideas?  More Ram, more tuning, different site architecture?
> > >
> >
> > If you're using swap space, you probably have your max heap size (-Xmx)
> > too large for the amount of physical memory that is available.  I'd
> > definitely start by either reducing -Xmx or increasing the amount of
> > physical RAM.  If reducing -Xmx gives you OutOfMemoryException errors,
> > then increasing RAM is the only option.
> >
> > The second thing I'd do is review my applications for places where they
> > might be maintaining references to data in between requests, either in
> > instance variables of the servlet or JSP class or by keeping too many
> > things in the user's session for t

Did someone manage to use a non default channel port for tomcat4.1.18 JK2/ajp13 ?

2003-01-02 Thread Lacoste (Frisurf)
I finally solved the problem I described in my emails titled:
"tomcat/apache connector startup failure: NCDFE fpr
org/apache/commons/logging/LogFactory"

sent both to the tomcat-user and tomcat-dev list.

I was trying to use a non-default channel port (8019) in my
configuration, following a working worklog of someone that had been
using tomcat 4.1.12.

Reverting to port 8009 solved the problem.

When I look at the logs it seems that the configuration file doesn't
seem to be used. If I set channelSocket.port=8019 in the jk2.properties,
it has no impact. I get an exception as described in my former emails
(pasted below). Using 8009, no exception is thrown and apr initializes
correctly.

So I am wondering if somebody else has tried using a different channel
port than the default 8009 with tomcat (lite) 4.1.18.

Thanks a lot for those whose can test their working config, using a
different port.

Cheers,

Jerome


On Mon, 2002-12-30 at 20:45, Jerome Lacoste (Frisurf) wrote:
> Having trouble to make ajp13 connector work (jk2 with Apache 2).
> 
> Tomcat fails connecting initializing with the following error:
> 
> SEVERE: Can't create apr
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> 
> As a consequence of this problem (I think it is related), I cannot
> access the dynamic pages from apache. Tomcat works great
> (http://localhost:8080/examples/) while http://localhost/examples/
> returns a 500 Error (Connection refused on port 8019 - errno 111).
> 
> (nb: I modified the default port to be 8019 instead of 8009).
> 
> I've tried several variations of the jk2.properties and
> workers2.properties without success. Spent a lot of time on the mailing
> lists archives without success neither.
> 
> I moved the commons-logging.jar from $TOMCAT/server/lib/ to
> $TOMCAT/common/lib as advised in some mails. This didn't work.
> Even if if had worked, it seems it would have been  inapropriate:
> see http://issues.apache.org/bugzilla/show_bug.cgi?id=13689
> 
> I also used the attached jsp deployed in $TOMCAT/webapps/ROOT to see the
> CLASSPATH which is outputed as 
>   /usr/local/java/lib/tools.jar:/opt/tomcat/bin/bootstrap.jar
> which seems normal to me.
> 
> I didn't try to modify the CLASSPATH in catalina.sh as it doesn't seem
> like the correct thing to do neither. 
> 
> It seems like this is a ClassLoader problem. If there is a way to enable
> debugging for the class loader, I am also interested. I found this: 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/loader.html
> But didn't find yet how to use it.
> 
> It seems that I am not the only one to have had this problem. I spent
> already too much time on it so I will accept any idea/hints on how to
> make this work. 
> 
> I am using 
> - linux OS (Mandrake 9.0)
> - JDK 1.4.1_01-b01
> - tomcat-4.1.18-LE-jdk14.jar
> - jakarta-tomcat-connectors-4.1.18-src.tar.gz
> - Apache 2.0.43 
> 
> Error details:
> 
> INFO: Starting Coyote HTTP/1.1 on port 8080
> Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain newHandler
> SEVERE: Can't create apr
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
>   at org.apache.jk.apr.AprImpl.(AprImpl.java:340)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:140)
>   at org.apache.jk.server.JkMain.newHandler(JkMain.java:556)
>   at org.apache.jk.server.JkMain.start(JkMain.java:341)
>   at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:169)
>   at
> org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056)
>   at
> org.apache.catalina.core.StandardService.start(StandardService.java:506)
>   at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>   at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:324)
>   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> Dec 30, 2002 8:58:03 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=2/239  config=/opt/tomcat/conf/jk2.properties
-- 
Jerome Lacoste (Frisurf) <[EMAIL PROTECTED]>
CoffeeBreaks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Memory Usage and Garbage Collection

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Brandon Cruz wrote:

> Date: Thu, 2 Jan 2003 19:04:55 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: Memory Usage and Garbage Collection
>
> Craig,
>
> Thanks for your comments, I still have a few clarification questions.
>
> 1)It's not just the classes -- it's the object instances created from those
> classes that take up space (the bytecodes of the class itself exist only
> once).  ---does this mean that every object instance is never garbage
> collected, or are these instances collected?
>

Instances can be garbage collected IF AND ONLY IF there are no live
references to that object in a static/instance/local variable of some
other object that is also in memory.  Only instances that are no longer
referenced from other object instances can be recycled.

In the case at hand, Tomcat (obviously) has references to all the servlets
that it has loaded.  Therefore, those servlet instances cannot be garbage
collected.  Furthermore, any object that is referenced by static or
instance variables of your servlet class can *also* not be garbage
collected, because live references still exist.  Same thing for session
attributes.

In the very early days of Java, classes themselves could be GC'd if there
were no live instances of that class.  However, this caused more grief
than it was worth, so that went away (about JDK 1.1 or so).  In today's
world, the only way to throw away a class instance is to throw away the
class loader that loaded it (which is how Tomcat implements webapp
reloading).

> 2)What about instances of the classes, does every instance stay in memory
> forever?  Are they loaded into the sessions, or are they pooled somehow?
> What about the instance variables of these classes, I assume they get
> collected after the class instances would be collected.

As above, instances ALWAYS stay in memory as long as there are live
references.  If there are no live references, the GC is free to clean them
up if and when it feels like it.

>
> If class instances stay in memory forever, I would think there is no
> possible way to ever keep the system running without a restart.
>

As above, you can throw away references to a ClassLoader, and that will
ultimately cause all the instances to be collected -- but ONLY if there
are not any references to any instances of classes loaded by that
ClassLoader somewhere else.

Phew, that doesn't make sense -- can we describe a sample use case?

Sure.  Consider the fact that Tomcat provides more than one class loader
(see
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html).
The common and shared class loaders are never thrown away, so any classes
loaded from there will stay in memory for the lifetime of Tomcat.  But
wait, there's more.

Assume that you've got a class, loaded from a library in common/lib, that
maintains a collection as a static variable.  Now, assume you've called a
method on this class, and passed it a reference to a bean (or something)
that is loaded from your webapp (i.e. it's in WEB-INF/classes or
WEB-INF/lib), and this reference gets added to the static collection.
Now, ask Tomcat to reload this application.  What happens?

Tomcat dutifully throws away its reference to the webapp class loader.
Normally, that means everything loaded from that class loader is now
garbage and can be collected.  HOWEVER, because there is still a live
reference to one of the objects from your old webapp in the static
collection.  Therefore, GC cannot process:
* The instance of your bean class that was referenced
* The class of your bean
* The webapp class loader
* Any other objects referenced by the webapp class loader.

In short, the above scenario just created a memory leak.

The best thing you can do to avoid problems like this is to make your
webapps self contained, and to always release references to objects you
don't need any longer.

> Brandon

Craig


>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 6:12 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Re: Memory Usage and Garbage Collection
>
>
>
>
> On Thu, 2 Jan 2003, Brandon Cruz wrote:
>
> > Date: Thu, 2 Jan 2003 16:16:23 -0600
> > From: Brandon Cruz <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> >  [EMAIL PROTECTED]
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Memory Usage and Garbage Collection
> >
> > Do loaded jsp pages and/or class files ever get garbage collected when
> > tomcat is running?
> >
>
> It's legal for servlet containers to destroy and release servlets and JSP
> pages while the server is running, but Tomcat doesn't currently do so.
> Once a servlet or JSP is loaded, it stays loaded until you reload that
> particular webapp or you shut Tomcat down.
>
> > We have a production server with several hundred virtual hosts per host,
> > each with a fair share of j

Re: reducing tomcat & jasper memory footprint

2003-01-02 Thread Julian Löffelhardt
Thanks for your Feedback!

I will look into your suggested approch using filters.

answers inline



- Original Message -
From: "Will Hartung" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 11:27 PM
Subject: Re: reducing tomcat & jasper memory footprint


> There are a lot of issues that show up here.
>
> 1) Using the JSP means that the entire article text (among other things)
is
> being cached into RAM.
> 2) Some of the pages are "popular" enough that they are getting moved into
> the permanent area of memory, and thus avoiding the routine, "cheap" GCs.
> 3) The question whether Tomcat is somehow "holding on" to the JSP
references
> to prevent them from being GC'd at all (I don't think this is the case,
but
> you never know).

As of 4.0.4 tomcat keeps a reference to every generated servlet, so
increasing the memory size only delays the OutOfMemoryError.

>
> As for solutions, there are several, none of which are particularly
elegant
> I don't think.
>
> First, of course, "Buy more RAM", also pronounced "Let's make our Full
GC's
> take even LONGER!".
>
> Another is to simply reboot Tomcat during a "quiet" time. At least this
way,
> the down time is predictable rather than having it "Crash" at an
unscheduled
> time. If the restart time is fast enough, and the site quiet enough, this
> may effectively solve the issue. You mentioned that the system is running
> several days reliably now, so, perhaps a nightly restart is not a horrible
> concession.
>
> Another is to mirror the site behind some kind of load balancer so that
> restarting the site does not actually affect users, and then go to
solution
> one. Oh boy, more hardware to configure.
>

In fact we are using loadbalancing using apache 1.3.26, mod_jk, and 3 tomcat
instances.
Every night one tomcat get's restarted. Basically we use the lb-options
local_worker  & local_worker_only to disable a tomcat instance at midnight
and restart it at 4:00.


Otherwise the big problem with restarting tomcat is loss of our
session-data.
Saving and restoring the data in the SESSIONS.ser file doesn't help, since
the loadbalancer routes the web clients to another tomcat instance where
they get another sessionId.

I once experimented with tomcat clustering using the source from
http://www.filip.net/tomcat/ but this was some months ago and didn't work
very well at this early stage .



> You can "rengineer" the site.
>
> If your JSPs are reasonably regular to the point where you can write
fairly
> simple filters to extract the actual content without resorting to crafting
a
> JSP parser, then that is a good first step.
>
> So, going on the crass assumption that getting the article text out of
your
> generated JSPs is not an onerous task, then the next step, to me, would be
> to stick a servlet Filter in front of every request.
>
> This Magic Filter (a notable anti-pattern, but...) is configured so that
you
> will not have to actually update and rewrite all of the zillion URLs
> scattered throughout the site.
>
> So, www.yoursite.com/area/document.jsp in the "old" site is the same in
the
> "new" site.
>
> The Magic Filter determines if the JSP file is a "real" jsp (no doubt you
> have some JSPs that do something other than dump static articles), versus
> one of your generated documents.
>
> If it is one of your generated documents, then the Magic Filter rips it
> apart, caches it perhaps (the ripped text), and then serves it up in a new
> shiny generic way as should have been done originally. If not, you let the
> Filter drop through and pass on so the container can handle the JSP
requiest
> and go its merry way.
>
> Ideally, this can be done with very little change to the site, and
certainly
> no change to the production CMS, it's ignorant of the change. Your web.xml
> "simply" has a new Filter element, and voila!
>
> I am not suggesting that this is easy or painless, but if your generated
> JSPs are able to be easily torn apart, then I think it's viable and
> practical.
>
> Perhaps your CMS JSP template can be recoded to add some comments (like
> 
> This is my article
> ) that makes it easy to find articles. Perhaps
you
> can then REGENERATE all of your older content to use the new template.
You'd
> like to think that your CMS will allow this (kind of the whole point of a
> CMS at some level, isn't it?).
>
> Or, if you can not regenerate your older content, have the Magic Filter
> "detect" old vs. new and simply "execute" the old ones (as noted above),
and
> filter the new ones. If your site is mostly newer content, then the old
> stuff will drift away and be less of a problem over time.
>
> Once up and running, your Magic Filter can cache and keep track of the
> status of various JSPs it encounters so as not to have to rework them each
> time.
>
> I would vote for the "restart nightly" technique and look into ways of
> tweaking the CMS system to spit out something you can use, but that's me.
>
> The other problem wi

Re: Memory Usage and Garbage Collection

2003-01-02 Thread Julian Löffelhardt
Looking at the jasper source of tomcat 4.0.4 releasing jsp's seems to be
reasonable easy to implement:
The Jsp's classloader, the class and the actual jsp-servlet instance  are
all put together in a JspServletWrapper-Object which itself is stored in the
JspServlet (the Servlet used to executing jsps) using a Hashtable.
One could replace the hashtable with a LRU-Cache or anything.

Since each jsp is loaded using a separate classloader, removing the Wrapper
removes the reference to the instance, it's class and it's loader, which
should enable the class garbage collector to remove the class.

Do you think this approach is reasonable?
Does this part of the implementation differ with Jasper2?

This is a feature I could really use well.

llap,
julian

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 1:12 AM
Subject: Re: Memory Usage and Garbage Collection


>
>
> On Thu, 2 Jan 2003, Brandon Cruz wrote:
>
> > Date: Thu, 2 Jan 2003 16:16:23 -0600
> > From: Brandon Cruz <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> >  [EMAIL PROTECTED]
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Memory Usage and Garbage Collection
> >
> > Do loaded jsp pages and/or class files ever get garbage collected when
> > tomcat is running?
> >
>
> It's legal for servlet containers to destroy and release servlets and JSP
> pages while the server is running, but Tomcat doesn't currently do so.
> Once a servlet or JSP is loaded, it stays loaded until you reload that
> particular webapp or you shut Tomcat down.
>
> > We have a production server with several hundred virtual hosts per host,
> > each with a fair share of jsp pages and with moderate to low traffic per
> > host.  As time goes on, the amount of memory being used constantly
grows.
> > It starts off around 60MB, then goes higher and higher, getting up to
around
> > 100MB after a couple days.
> >
> > The regular GC seems to usually clean up around 2MB ([GC
> > 99493K->97502K(204544K), 0.0243521 secs]) and the Full GC seems to clean
up
> > less than that ([Full GC 97388K->97187K(204544K), 2.4269915 secs]).
> >
> > Since I have the -Xmx and -Xms set to 200MB, the 204544K number never
gets
> > resized, but the number before the -> seems to slowly and steadily rise.
> >
> > Full GC seems to run quite often, every few seconds, GC runs once in a
> > while, but spits out about 50 lines at once every time it runs.  Is this
> > normal?  Shouldn't Full GC only run once in a while?
> >
> > I am starting to think that as classes and jsp's are loaded, they stay
in
> > memory and are never released until tomcat is restarted, which means
that
> > there is eventually a point where all the classes will load and I just
need
> > to have enough memory to support that without having to use swap space.
> >
>
> It's not just the classes -- it's the object instances created from those
> classes that take up space (the bytecodes of the class itself exist only
> once).
>
> > The problem occurs when the memory usage number before the -> gets up to
> > about 130.  The system is using swap space and eventually out of memory
> > errors start showing up.
> >
> > Any ideas?  More Ram, more tuning, different site architecture?
> >
>
> If you're using swap space, you probably have your max heap size (-Xmx)
> too large for the amount of physical memory that is available.  I'd
> definitely start by either reducing -Xmx or increasing the amount of
> physical RAM.  If reducing -Xmx gives you OutOfMemoryException errors,
> then increasing RAM is the only option.
>
> The second thing I'd do is review my applications for places where they
> might be maintaining references to data in between requests, either in
> instance variables of the servlet or JSP class or by keeping too many
> things in the user's session for too long.  If there are such references,
> your user data objects cannot be GC'd and you'll end up with exactly the
> pattern you describe (slowly increasing memory use).
>
> > Thanks in advance?
> >
> > Brandon
>
> Craig
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Memory Usage and Garbage Collection

2003-01-02 Thread Brandon Cruz
Craig,

Thanks for your comments, I still have a few clarification questions.

1)It's not just the classes -- it's the object instances created from those
classes that take up space (the bytecodes of the class itself exist only
once).  ---does this mean that every object instance is never garbage
collected, or are these instances collected?

2)What about instances of the classes, does every instance stay in memory
forever?  Are they loaded into the sessions, or are they pooled somehow?
What about the instance variables of these classes, I assume they get
collected after the class instances would be collected.

If class instances stay in memory forever, I would think there is no
possible way to ever keep the system running without a restart.

Brandon

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 6:12 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Memory Usage and Garbage Collection




On Thu, 2 Jan 2003, Brandon Cruz wrote:

> Date: Thu, 2 Jan 2003 16:16:23 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Memory Usage and Garbage Collection
>
> Do loaded jsp pages and/or class files ever get garbage collected when
> tomcat is running?
>

It's legal for servlet containers to destroy and release servlets and JSP
pages while the server is running, but Tomcat doesn't currently do so.
Once a servlet or JSP is loaded, it stays loaded until you reload that
particular webapp or you shut Tomcat down.

> We have a production server with several hundred virtual hosts per host,
> each with a fair share of jsp pages and with moderate to low traffic per
> host.  As time goes on, the amount of memory being used constantly grows.
> It starts off around 60MB, then goes higher and higher, getting up to
around
> 100MB after a couple days.
>
> The regular GC seems to usually clean up around 2MB ([GC
> 99493K->97502K(204544K), 0.0243521 secs]) and the Full GC seems to clean
up
> less than that ([Full GC 97388K->97187K(204544K), 2.4269915 secs]).
>
> Since I have the -Xmx and -Xms set to 200MB, the 204544K number never gets
> resized, but the number before the -> seems to slowly and steadily rise.
>
> Full GC seems to run quite often, every few seconds, GC runs once in a
> while, but spits out about 50 lines at once every time it runs.  Is this
> normal?  Shouldn't Full GC only run once in a while?
>
> I am starting to think that as classes and jsp's are loaded, they stay in
> memory and are never released until tomcat is restarted, which means that
> there is eventually a point where all the classes will load and I just
need
> to have enough memory to support that without having to use swap space.
>

It's not just the classes -- it's the object instances created from those
classes that take up space (the bytecodes of the class itself exist only
once).

> The problem occurs when the memory usage number before the -> gets up to
> about 130.  The system is using swap space and eventually out of memory
> errors start showing up.
>
> Any ideas?  More Ram, more tuning, different site architecture?
>

If you're using swap space, you probably have your max heap size (-Xmx)
too large for the amount of physical memory that is available.  I'd
definitely start by either reducing -Xmx or increasing the amount of
physical RAM.  If reducing -Xmx gives you OutOfMemoryException errors,
then increasing RAM is the only option.

The second thing I'd do is review my applications for places where they
might be maintaining references to data in between requests, either in
instance variables of the servlet or JSP class or by keeping too many
things in the user's session for too long.  If there are such references,
your user data objects cannot be GC'd and you'll end up with exactly the
pattern you describe (slowly increasing memory use).

> Thanks in advance?
>
> Brandon

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Memory Usage and Garbage Collection

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Brandon Cruz wrote:

> Date: Thu, 2 Jan 2003 16:16:23 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Memory Usage and Garbage Collection
>
> Do loaded jsp pages and/or class files ever get garbage collected when
> tomcat is running?
>

It's legal for servlet containers to destroy and release servlets and JSP
pages while the server is running, but Tomcat doesn't currently do so.
Once a servlet or JSP is loaded, it stays loaded until you reload that
particular webapp or you shut Tomcat down.

> We have a production server with several hundred virtual hosts per host,
> each with a fair share of jsp pages and with moderate to low traffic per
> host.  As time goes on, the amount of memory being used constantly grows.
> It starts off around 60MB, then goes higher and higher, getting up to around
> 100MB after a couple days.
>
> The regular GC seems to usually clean up around 2MB ([GC
> 99493K->97502K(204544K), 0.0243521 secs]) and the Full GC seems to clean up
> less than that ([Full GC 97388K->97187K(204544K), 2.4269915 secs]).
>
> Since I have the -Xmx and -Xms set to 200MB, the 204544K number never gets
> resized, but the number before the -> seems to slowly and steadily rise.
>
> Full GC seems to run quite often, every few seconds, GC runs once in a
> while, but spits out about 50 lines at once every time it runs.  Is this
> normal?  Shouldn't Full GC only run once in a while?
>
> I am starting to think that as classes and jsp's are loaded, they stay in
> memory and are never released until tomcat is restarted, which means that
> there is eventually a point where all the classes will load and I just need
> to have enough memory to support that without having to use swap space.
>

It's not just the classes -- it's the object instances created from those
classes that take up space (the bytecodes of the class itself exist only
once).

> The problem occurs when the memory usage number before the -> gets up to
> about 130.  The system is using swap space and eventually out of memory
> errors start showing up.
>
> Any ideas?  More Ram, more tuning, different site architecture?
>

If you're using swap space, you probably have your max heap size (-Xmx)
too large for the amount of physical memory that is available.  I'd
definitely start by either reducing -Xmx or increasing the amount of
physical RAM.  If reducing -Xmx gives you OutOfMemoryException errors,
then increasing RAM is the only option.

The second thing I'd do is review my applications for places where they
might be maintaining references to data in between requests, either in
instance variables of the servlet or JSP class or by keeping too many
things in the user's session for too long.  If there are such references,
your user data objects cannot be GC'd and you'll end up with exactly the
pattern you describe (slowly increasing memory use).

> Thanks in advance?
>
> Brandon

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBCRealm

2003-01-02 Thread Rob Abernethy IV
Ok, I tried cleartext passwords, but I came up with the same result.  I don't
understand why tomcat is able to start up at all, if the authentication is
failing.  When I run 'ps' after starting up tomcat, I see this process:

40 S postgres  2825  2758  0  75   0-  2431 schedu 18:12 pts/000:00:00
postgres: tomcat template1 24.208.224.236 idle in transaction

Seeing this makes me believe that Tomcat is correctlty connecting to the
database at startup.  Is this true?  If so, why can't the admin or manager
apps authenticate?  They are using the same Realm (it's nested inside the
 tag) and I'm supplying the same username and password.

--
Robert Abernethy IV
Dynamic Edge, Inc.
734.975.0460

> Hi Rob,
> 
> Try it in clear text without the MD5 digest, to verify that your 
> password, username, role, etc are correct.
> 
> I had a lot of problems with digesting.
> 
> Also some databases return column names in upper case even if they 
> are in lower case so you may want to try all caps on your db column 
> names.  I think you would get a different eror message if this was 
> the case, though.
> 
> Rick
> 
> - Original Message -
> 
> > I'm trying to set up a JDBCRealm for use with the admin and manager
> webapps.
> > The problem is that I am unable to authenticate any users.
> >
> > - Tomcat 4.1.18
> > - Postgresql 7.3.1
> > - JDBC driver is in $CATALINA_HOME/common/lib
> > - Tomcat starts up fine, I just can't authenticate
> > - I can directly connect to my database with the username and password
> > - I have created the 'admin' and 'manager' groups in the database
> > - I have added the users to both groups
> >
> > Realm:
> >  >driverName="org.postgresql.Driver"
> > connectionURL="jdbc:postgresql://bilbo.dynedge.com/template1"
> >connectionName="tomcat" connectionPassword="tomcat"
> > userTable="pg_shadow" userNameCol="usename" userCredCol="passwd"
> > userRoleTable="pg_groupview" roleNameCol="groname"
> >digest="MD5" />
> >
> > Log:
> > 2003-01-02 12:34:34 JDBCRealm[Standalone]: Username tomcat NOT
> successfully
> > authenticated
> >
> > Any ideas?
> >
> > --
> > Robert Abernethy IV
> > Dynamic Edge, Inc.
> > 734.975.0460
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Easy question - Java Beans

2003-01-02 Thread Noel J. Bergman
Denise,

Start with your basic  tag, and then in your code that emits the
list of  tags, do something like this:

  " + stateName + ""

In other words, emit the

  New York

tag, or the

  New York

variant, depending upon whether the option you are about to emit is the
currently selected option.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Noel J. Bergman
Denise,

When dealing with introspection and reflection, conventions become rules.
:-)  The code has to know how to map property names to methods.

My pleasure to help.  I know that area pretty well, having worked on the
GNUJSP implementation of that code, and written a database layer that works
analogously to the JSP property actions.

As for a JSP editor, I probably can't help you there.  emacs cures all ills.
The only time I use even an XML editor is for DTD/schema validation.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat 5 and CATALINA_BASE/shared/lib problem...

2003-01-02 Thread Jacob Kjome

Hi all,

Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
that doesn't seem to be the case.

For instance, using Tomcat-4.1.18, if I have some jars in 
CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
loaded from CATALINA_BASE/shared/lib (if it exists).  This is the behavior 
I expect and love!

However, using Tomcat-5.0, if I set things up the same way, jars in 
CATALNIA_HOME/shared/lib *will* be loaded and jars in 
CATALNIA_BASE/shared/lib are completely ignoredor it could be that it 
is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
first and then looking in CATALINA_BASE/shared/lib.  If a jar in the latter 
contains the same packages that were already loaded in the former, then the 
latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no matter 
what.  This is behavior that I don't expect and don't like.

I used the ability to separate instances to run apps which required 
different versions of xerces.  I put xerces-1.4.4.jar in 
CATALINA_HOME/shared/lib for apps which I use most often.  However, I have 
other apps that need either slightly modified version of xerces-1.4.4 or 
require xerces-2.x.x.  For those cases, I run a separate instance of Tomcat 
using a custom set CATALNIA_BASE with a local shared/lib with the 
appropriately versioned jars that I need for this particular app.

So, this is a great feature in Tomcat-4.1.x (and, I imagine, Tomcat-4.0.x) 
but it seems to be broken in Tomcat-5.0.  Is this new behavior in 
Tomcat-5.0 a bug or was it intentional?  If it was intentional, can someone 
explain the reasons for the change in behavior to that of Tomcat-4.1.x?

Thanks,

Jake


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: reducing tomcat & jasper memory footprint

2003-01-02 Thread Will Hartung
There are a lot of issues that show up here.

1) Using the JSP means that the entire article text (among other things) is
being cached into RAM.
2) Some of the pages are "popular" enough that they are getting moved into
the permanent area of memory, and thus avoiding the routine, "cheap" GCs.
3) The question whether Tomcat is somehow "holding on" to the JSP references
to prevent them from being GC'd at all (I don't think this is the case, but
you never know).

As for solutions, there are several, none of which are particularly elegant
I don't think.

First, of course, "Buy more RAM", also pronounced "Let's make our Full GC's
take even LONGER!".

Another is to simply reboot Tomcat during a "quiet" time. At least this way,
the down time is predictable rather than having it "Crash" at an unscheduled
time. If the restart time is fast enough, and the site quiet enough, this
may effectively solve the issue. You mentioned that the system is running
several days reliably now, so, perhaps a nightly restart is not a horrible
concession.

Another is to mirror the site behind some kind of load balancer so that
restarting the site does not actually affect users, and then go to solution
one. Oh boy, more hardware to configure.

You can "rengineer" the site.

If your JSPs are reasonably regular to the point where you can write fairly
simple filters to extract the actual content without resorting to crafting a
JSP parser, then that is a good first step.

So, going on the crass assumption that getting the article text out of your
generated JSPs is not an onerous task, then the next step, to me, would be
to stick a servlet Filter in front of every request.

This Magic Filter (a notable anti-pattern, but...) is configured so that you
will not have to actually update and rewrite all of the zillion URLs
scattered throughout the site.

So, www.yoursite.com/area/document.jsp in the "old" site is the same in the
"new" site.

The Magic Filter determines if the JSP file is a "real" jsp (no doubt you
have some JSPs that do something other than dump static articles), versus
one of your generated documents.

If it is one of your generated documents, then the Magic Filter rips it
apart, caches it perhaps (the ripped text), and then serves it up in a new
shiny generic way as should have been done originally. If not, you let the
Filter drop through and pass on so the container can handle the JSP requiest
and go its merry way.

Ideally, this can be done with very little change to the site, and certainly
no change to the production CMS, it's ignorant of the change. Your web.xml
"simply" has a new Filter element, and voila!

I am not suggesting that this is easy or painless, but if your generated
JSPs are able to be easily torn apart, then I think it's viable and
practical.

Perhaps your CMS JSP template can be recoded to add some comments (like

This is my article
) that makes it easy to find articles. Perhaps you
can then REGENERATE all of your older content to use the new template. You'd
like to think that your CMS will allow this (kind of the whole point of a
CMS at some level, isn't it?).

Or, if you can not regenerate your older content, have the Magic Filter
"detect" old vs. new and simply "execute" the old ones (as noted above), and
filter the new ones. If your site is mostly newer content, then the old
stuff will drift away and be less of a problem over time.

Once up and running, your Magic Filter can cache and keep track of the
status of various JSPs it encounters so as not to have to rework them each
time.

I would vote for the "restart nightly" technique and look into ways of
tweaking the CMS system to spit out something you can use, but that's me.

The other problem with this technique is that it is doing processing at run
time which could best be done statically.

For example, the fact that your CMS is generating JSPs, perhaps you can
place a step in the production step that performs the parsing for you, that
way it is done at production time versus request time. It depends on how
easily you can modify your work flow from the CMS into the site proper.

Regards,

Will Hartung
([EMAIL PROTECTED])

- Original Message -
From: "Luc Foisy" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 31, 2002 7:44 AM
Subject: RE: reducing tomcat & jasper memory footprint


Since your jsp's are generated, they should all have the same formatting.
Write some code to rewrite your own non jsp pages that you can then later
insert into a single jsp. Sure its some work, but in the long run it will
save you some aggravation.

If tomcat can rewrite your jsp on the fly, so can you.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Connector Problem, has anyone seen this behavior?

2003-01-02 Thread Brandon Cruz
Every once in a while, we get a strange error from tomcat when using apache
1.3, tomcat 4.1.18, and mod_jk(which was compiled for tomcat 3.2.4
initially)...

[INFO] ChannelSocket - -server has been restarted or reset this connection

Whenever this error shows up, the browser returns a cannot find server.

Has anyone seen this happen to them?  I will try compiling a new connector
module, but figured I would take a chance and see if anyone else has
experienced this same behavior.

Brandon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Memory Usage and Garbage Collection

2003-01-02 Thread Brandon Cruz
Do loaded jsp pages and/or class files ever get garbage collected when
tomcat is running?

We have a production server with several hundred virtual hosts per host,
each with a fair share of jsp pages and with moderate to low traffic per
host.  As time goes on, the amount of memory being used constantly grows.
It starts off around 60MB, then goes higher and higher, getting up to around
100MB after a couple days.

The regular GC seems to usually clean up around 2MB ([GC
99493K->97502K(204544K), 0.0243521 secs]) and the Full GC seems to clean up
less than that ([Full GC 97388K->97187K(204544K), 2.4269915 secs]).

Since I have the -Xmx and -Xms set to 200MB, the 204544K number never gets
resized, but the number before the -> seems to slowly and steadily rise.

Full GC seems to run quite often, every few seconds, GC runs once in a
while, but spits out about 50 lines at once every time it runs.  Is this
normal?  Shouldn't Full GC only run once in a while?

I am starting to think that as classes and jsp's are loaded, they stay in
memory and are never released until tomcat is restarted, which means that
there is eventually a point where all the classes will load and I just need
to have enough memory to support that without having to use swap space.

The problem occurs when the memory usage number before the -> gets up to
about 130.  The system is using swap space and eventually out of memory
errors start showing up.

Any ideas?  More Ram, more tuning, different site architecture?

Thanks in advance?

Brandon



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Carl
Denise,

I use Dreamweaver for presentation, SunOne (which is based on NetBeans) to
manage the project and CodeWright from StarBase as the text editor (it is
far and away better than the editor in JBuilder or SunOne.)

Carl

- Original Message -
From: "Denise Mangano" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 4:49 PM
Subject: RE: Code works in editor, but not through Tomcat - Please help!


> Thanks Drew - I will definitely check it out because I am NOT happy with
> JBuilder at all.
>
> I would be lost without this list!!  Thanks :)
>
> Denise Mangano
> Help Desk Analyst
> Complus Data Innovations, Inc.
>
>
> -Original Message-
> From: Hamilton, Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 4:42 PM
> To: Tomcat Users List
> Subject: RE: Code works in editor, but not through Tomcat - Please help!
>
>
> I use NetBeans www.netbeans.org.  It is a nice java IDE.  It is open
source
> so does have its issues.  But it does a lot of stuff for you.  You just
have
> to take some time to get used to it.
>
> Drew
>
> -Original Message-
> From: Denise Mangano [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 4:37 PM
> To: 'Tomcat Users List'
> Subject: RE: Code works in editor, but not through Tomcat - Please help!
>
>
> That seemed to do it.  I know of naming conventions when writing Java
> programs, but have never seen an instance that the naming convention was
an
> absolute rule.
>
> Thanks for your help :)
>
> Completely off topic - but can you suggest a good JSP editor?  Coding in a
> plain text editor like notepad can get frustrating.  I have a trial
version
> of JBuilder Enterprise, but it's a CPU hog, and it doesn't seem to help
much
> in the JSP department.
>
> Denise Mangano
> Help Desk Analyst
> Complus Data Innovations, Inc.
>
>
> -Original Message-
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 3:54 PM
> To: Tomcat Users List
> Subject: RE: Code works in editor, but not through Tomcat - Please help!
>
>
> Denise,
>
> The first thing that immediately came to mind is to check your setters and
> form parameters for the appropriate case usage.  Your "PostalCode" should
be
> "postalCode" in both the form and the JSP actions.  If you don't
understand,
> I'll go into more detail regarding naming conventions for bean properties.
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Easy question - Java Beans

2003-01-02 Thread Charles Baker

--- Denise Mangano <[EMAIL PROTECTED]> wrote:
> Just curious if anyone knows how to use bean
> properties so that on a retry
> of a form, the previously selected item in a select
> list is maintained if
> validated. For example, for "Select Your State".  If
> I select NY, but
> something else on my form is wrong, when Retry.jsp
> is brought up, the State
> select box is still on "NY".
> 
> Is this possible?  I am currently using the same
> code as I do for the text
> fields, but the state is not being maintained.
> 
> Thanks!

You should probably give Struts a try. It can help you
out with this sort of thing.

http://jakarta.apache.org/struts/

=
[EMAIL PROTECTED]
http://www.charleshbaker.com/~chb/
If you cannot in the long run tell everyone what you have been doing,
your doing was worthless. -- Edwim Schrodinger

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ManagedBean is not found

2003-01-02 Thread David Orriss Jr
John,

Say, don't I know you?  ;)

John Turner answered this exact same question for me...

> If you're using Ajp13Connector, comment out (disable) the lines in
> server.xml having to do with MBeans.

> Or, leave the MBeans lines alone, and use CoyoteConnector which is fine for
> JK or JK2.

> John

On Thursday, January 02, 2003 1:43 PM,
John B. Moore <[EMAIL PROTECTED]> wrote:

> Tomcat 4.1.18
> Apache 2.0.43
> Connectors - 4.1.18 (mod_jk.so)
> (all build from source)
> (followed the J Turner Howto's)
> 
> Getting the error..
> 
> "ManagedBean is not found with Ajp13Connector"
> 
> Anyone have some suggestions on what might be configured wrong.. We
> keep looking at it and is all seems to be there.. (going blind..)
> 
> Thanks...
> 
> John..



-- 
David Orriss Jr.
[EMAIL PROTECTED]
http://www.davenet.net
Want ICQ/AIM/MSN ID's? Just Ask...
Linux - Chicken Soup for the Unix Soul



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Easy question - Java Beans

2003-01-02 Thread Brandon Cruz
Here's a sample from a form that uses states.  The states are generated from
a class to keep less java on the jsp page, but you can see how the options
are generated and set to selected if they match the value in the bean.




Choose a State

<%State[] states = State.getAll();
  for(int i=0; i

<%if(ab.equals(setupBean.getAgentState())){%>selected<%}%>><%=nm%>
<%}%>
  


Hope that helps!

Brandon

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 3:48 PM
To: 'Tomcat Users List'
Subject: Easy question - Java Beans


Just curious if anyone knows how to use bean properties so that on a retry
of a form, the previously selected item in a select list is maintained if
validated. For example, for "Select Your State".  If I select NY, but
something else on my form is wrong, when Retry.jsp is brought up, the State
select box is still on "NY".

Is this possible?  I am currently using the same code as I do for the text
fields, but the state is not being maintained.

Thanks!

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Joseph Shraibman
Turner, John wrote:

Hmmm...you lost me there.  Yes, you do map to a Context directly, at least
you do with JK.  That's exactly what having a JK block for "/examples",
does, for example.  With Apaches 'apachectl restart' or 'apachectl graceful'
you can pick up both new virtual hosts and new JkMounts for those virtual
hosts.

On the Apache side, what more does there need to be?  

That means that all myhost.com/examples can be passed to tomcat, who looks at 
myhost.com/examples and does its own mapping to find the right context.  It doesn't mean 
that you can map myhost.com/some/arbirtray/path to the examples webapp (unless you also 
change the tomcat config) and it doesn't mean you can map a.myhost.com to /examples/a and 
b.myhost.com to /examples/b and it doesn't mean you can map *.myhost.com to /examples/%0 
where %0 is what is in *.  Or not as far as I can tell, anyway. JServ is much more 
flexible in this regard.

On another note I've totally given up on the apache autoconfiguration because of its 
inconsistant behavior.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
Thanks Drew - I will definitely check it out because I am NOT happy with
JBuilder at all.

I would be lost without this list!!  Thanks :)

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 4:42 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


I use NetBeans www.netbeans.org.  It is a nice java IDE.  It is open source
so does have its issues.  But it does a lot of stuff for you.  You just have
to take some time to get used to it.

Drew

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:37 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


That seemed to do it.  I know of naming conventions when writing Java
programs, but have never seen an instance that the naming convention was an
absolute rule.  

Thanks for your help :)

Completely off topic - but can you suggest a good JSP editor?  Coding in a
plain text editor like notepad can get frustrating.  I have a trial version
of JBuilder Enterprise, but it's a CPU hog, and it doesn't seem to help much
in the JSP department.

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:54 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Denise,

The first thing that immediately came to mind is to check your setters and
form parameters for the appropriate case usage.  Your "PostalCode" should be
"postalCode" in both the form and the JSP actions.  If you don't understand,
I'll go into more detail regarding naming conventions for bean properties.

--- Noel


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ManagedBean is not found

2003-01-02 Thread John B. Moore
Tomcat 4.1.18
Apache 2.0.43
Connectors - 4.1.18 (mod_jk.so)
(all build from source)
(followed the J Turner Howto's)

Getting the error..

"ManagedBean is not found with Ajp13Connector"

Anyone have some suggestions on what might be configured wrong.. We keep 
looking at it and is all seems to be there.. (going blind..)

Thanks...

John..



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Easy question - Java Beans

2003-01-02 Thread Denise Mangano
Just curious if anyone knows how to use bean properties so that on a retry
of a form, the previously selected item in a select list is maintained if
validated. For example, for "Select Your State".  If I select NY, but
something else on my form is wrong, when Retry.jsp is brought up, the State
select box is still on "NY".

Is this possible?  I am currently using the same code as I do for the text
fields, but the state is not being maintained.

Thanks!

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Hamilton, Andrew
I use NetBeans www.netbeans.org.  It is a nice java IDE.  It is open source
so does have its issues.  But it does a lot of stuff for you.  You just have
to take some time to get used to it.

Drew

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:37 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


That seemed to do it.  I know of naming conventions when writing Java
programs, but have never seen an instance that the naming convention was an
absolute rule.  

Thanks for your help :)

Completely off topic - but can you suggest a good JSP editor?  Coding in a
plain text editor like notepad can get frustrating.  I have a trial version
of JBuilder Enterprise, but it's a CPU hog, and it doesn't seem to help much
in the JSP department.

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:54 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Denise,

The first thing that immediately came to mind is to check your setters and
form parameters for the appropriate case usage.  Your "PostalCode" should be
"postalCode" in both the form and the JSP actions.  If you don't understand,
I'll go into more detail regarding naming conventions for bean properties.

--- Noel


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
That seemed to do it.  I know of naming conventions when writing Java
programs, but have never seen an instance that the naming convention was an
absolute rule.  

Thanks for your help :)

Completely off topic - but can you suggest a good JSP editor?  Coding in a
plain text editor like notepad can get frustrating.  I have a trial version
of JBuilder Enterprise, but it's a CPU hog, and it doesn't seem to help much
in the JSP department.

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:54 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Denise,

The first thing that immediately came to mind is to check your setters and
form parameters for the appropriate case usage.  Your "PostalCode" should be
"postalCode" in both the form and the JSP actions.  If you don't understand,
I'll go into more detail regarding naming conventions for bean properties.

--- Noel


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Turner, John

Hmmm...you lost me there.  Yes, you do map to a Context directly, at least
you do with JK.  That's exactly what having a JK block for "/examples",
does, for example.  With Apaches 'apachectl restart' or 'apachectl graceful'
you can pick up both new virtual hosts and new JkMounts for those virtual
hosts.

On the Apache side, what more does there need to be?  

John

-Original Message-
From: Joseph Shraibman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:10 PM
To: Tomcat Users List
Subject: Re: can tomcat do dynamic virtual hosts?


Apache already supports dynamic virtual hosting. See 
http://httpd.apache.org/docs-2.0/vhosts/mass.html. That's what I'm talking
about. The 
problem is that when connecting apache to tomcat you can't map into a
contect directly, 
you only pass the request along to tomcat so somcat has to find the proper
 based on 
the requested host name. If the connector could map directly into a context
then Apache 
could do something like:
JkMount /* worker1:mycontext/%0/

Craig R. McClanahan wrote:
> 

> As for the web connectors, you'll need to ask someone who understands 
> and works on them what the plans are for supporting dynamic 
> configuration changes.  Given that Apache doesn't appear to support 
> them, I would guess this is going to be a challenge -- but that's 
> outside my area of expertise.
> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat, Apache and PHP

2003-01-02 Thread John Bell
John,

I changed the order of Virtual Hosts in httpd.conf
and put the PHP site as the first one - which becomes the default - and now
the JSP site is served by Tomcat and the  PHP site is at least found  by
Apache.
I guess there is something not quite right as the site should have been
picked up without it
being the default and now although the site (phpMyAdmin) is found it is not
being served quite correctly.

John

- Original Message -
From: "Turner, John" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 1:10 PM
Subject: RE: Tomcat, Apache and PHP


>
> OK, conversely, is there configuration for PHP that would skip picking up
a
> URL that is IP-only for the PHP processor?  I'm not that familiar with PHP
> configuration, I'm assuming it's done by file extension.  Is that
extension
> map happening for all of Apache, or just specific virtual hosts?
>
> John
>
>
> > -Original Message-
> > From: John Bell [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 02, 2003 1:36 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat, Apache and PHP
> >
> >
> > Thanks John,
> >
> > No JkMount /* ajp13.
> > I suspect that my config in httpd.conf needs to be changed.
> >
> > - Original Message -
> > From: "Turner, John" <[EMAIL PROTECTED]>
> > To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 01, 2003 11:00 PM
> > Subject: RE: Tomcat, Apache and PHP
> >
> >
> > >
> > > Do you have a wildcard JkMount statement somewhere, that
> > would take effect
> > > for that IP address?  Something like "JkMount /* ajp13"?
> > >
> > > John
> > >
> > >
> > > -Original Message-
> > > From: John Bell [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 01, 2003 7:52 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Tomcat, Apache and PHP
> > >
> > >
> > > I use mod_jk to connect Apache and Tomcat.
> > > I want Apache to serve PHP resources.
> > >
> > > If I do http://localhost/myPHP then Apache serves the PHP
> > application
> > which
> > > is what I want to do remotely but
> > >
> > > if I do http/213.120.114.94/myPHP then the request is sent
> > onto Tomcat
> > which
> > > does'nt serve PHP.
> > >
> > >
> > > I try and use Vitual Hosts in the Apache httpd.conf file as
> > many sites wil
> > > ne hosted on the server.
> > >
> > > NameVirtualHost 213.120.114.94
> > >
> > > 
> > >
> > > ServerAdmin [EMAIL PROTECTED]
> > >
> > > DocumentRoot /coffeemy
> > >
> > > ServerName www.capucino.co.uk
> > >
> > > ErrorLog logs/capucino.error_log
> > >
> > > CustomLog logs/capucino.co.uk-access_log combined
> > >
> > > 
> > >
> > >
> > > Can anyone help please.
> > >
> > > John
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JDBCRealm

2003-01-02 Thread Rick Fincher
Hi Rob,

Try it in clear text without the MD5 digest, to verify that your password,
username, role, etc are correct.

I had a lot of problems with digesting.

Also some databases return column names in upper case even if they are in
lower case so you may want to try all caps on your db column names.  I think
you would get a different eror message if this was the case, though.

Rick

- Original Message -

> I'm trying to set up a JDBCRealm for use with the admin and manager
webapps.
> The problem is that I am unable to authenticate any users.
>
> - Tomcat 4.1.18
> - Postgresql 7.3.1
> - JDBC driver is in $CATALINA_HOME/common/lib
> - Tomcat starts up fine, I just can't authenticate
> - I can directly connect to my database with the username and password
> - I have created the 'admin' and 'manager' groups in the database
> - I have added the users to both groups
>
> Realm:
> driverName="org.postgresql.Driver"
> connectionURL="jdbc:postgresql://bilbo.dynedge.com/template1"
>connectionName="tomcat" connectionPassword="tomcat"
> userTable="pg_shadow" userNameCol="usename" userCredCol="passwd"
> userRoleTable="pg_groupview" roleNameCol="groname"
>digest="MD5" />
>
> Log:
> 2003-01-02 12:34:34 JDBCRealm[Standalone]: Username tomcat NOT
successfully
> authenticated
>
> Any ideas?
>
> --
> Robert Abernethy IV
> Dynamic Edge, Inc.
> 734.975.0460


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




OT - java:comp/env issues in standalone unit testing

2003-01-02 Thread Mark
I'm trying to set up standalone Ant-JUnit testing for our model objects 
which can be tested independent of our controller/view components. Problem 
is we have a lot of environment  properties in web.xml, such as 
DAO class names used in factories and other run-time stuffso we have 
many instances of code like this:

   Context initCtx = new InitialContext();
   propertyXYZValue = (String)initCtx.lookup("java:comp/env/propertyXYZ");

From what I understand the container establishes a java:comp/env 
context-subcontext per web app, so attempting to get properties w/o using 
Tomcat fails.

Has anyone else run into this situation, and if so how'd you get around it, 
ie. manually create a java:comp/env context and add necessary env entries? 
Other suggestions?  Am I looking at this from a really screwed up 
perspective?  I've looked at Cactus a little and it seems like it's 
something we'd want eventually, but also seems more complex than what we 
need today.

Any thoughts will be appreciated.

Thanks
Mark


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Noel J. Bergman
Denise,

The first thing that immediately came to mind is to check your setters and
form parameters for the appropriate case usage.  Your "PostalCode" should be
"postalCode" in both the form and the JSP actions.  If you don't understand,
I'll go into more detail regarding naming conventions for bean properties.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: can tomcat do dynamic virtual hosts? [RBS2003010200005188]

2003-01-02 Thread techassistance
Ahoy there!

This is an automated response, to let you know
that we have received your query and will answer
your email as soon as possible.

We know you'd like to get back to playing our
state-of-the-art online games. We'd therefore like
to assure you that we are determined to keep our
service at the level that you've come to expect
from The River Belle Online Casino.

Thank you for your patience and enjoy your day!

Best wishes,

Sebastian
First Mate

RIVER BELLE ONLINE CASINO


   RIVER BELLE CASINOS ONLINE


RIVER BELLE   ACES HIGH
Enjoy Southern HospitalityFast Paced Casino Action

www.riverbelle.com/a3099  www.aceshigh.com/a3181

24/7 toll-free support24/7 toll-free support

USA:1 888 615 2383USA:1 877 566 0482
CANADA: 1 888 552 4196CANADA: 1 877 776 0549
UK: 0 800 783 4381UK: 0 800 169 8796

E-mail support:   E-mail support
[EMAIL PROTECTED][EMAIL PROTECTED]

E.&O.E.

The River Belle Online Casino respects your online time
and privacy.  If you wish to be removed from our mailing
list and not receive any promotional e-mails from us,
please send an e-mail to [EMAIL PROTECTED] and
type UNSUBSCRIBE in the subject bar.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Joseph Shraibman
Sorry, having a bad keyboard day. 'contect' should be context and 'somcat' should be tomcat.

Joseph Shraibman wrote:

Apache already supports dynamic virtual hosting. See 
http://httpd.apache.org/docs-2.0/vhosts/mass.html. That's what I'm 
talking about. The problem is that when connecting apache to tomcat you 
can't map into a contect directly, you only pass the request along to 
tomcat so somcat has to find the proper  based on the requested 
host name. If the connector could map directly into a context then 
Apache could do something like:
JkMount /* worker1:mycontext/%0/



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
I will look into all that you suggested.  The weird thing is though, that it
only happens with those three parameters.  Everything else goes through
fine.  I checked the form code for differences between other parameters and
the three offending parameters, but everything is the same

Thanks.

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 3:01 PM
To: Tomcat Users List
Subject: RE: Code works in editor, but not through Tomcat - Please help!


Denise,

I had the same problem once.  All my calls to getProperties were coming back
null.  It turned out to be a pathing issue in my form.  I'm not sure why it
even ran the JSP with the incorrect path inside ACTION parameter of the form
but it did run and it returned null values for all the properties.  It
nearly drove me to drink(at work) and I screamed several times and said many
bad words until I figured it out.  It had to do with my JkMount statement,
my default classpath(tomcat), and my path inside the ACTION parameter.  You
might try calling it different ways to see if that helps.

Drew

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 2:34 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


I tried to "echo print" the value of the PostalCode after it has been picked
up by the bean, by calling .  And I get an error message stating :

org.apache.jasper.JasperException: Cannot find any information on property
'PostalCode' in a bean of type 'com.complusdata.beans.FormBean'

When I complete the Form, I type in 12345 in the input box and yet it seems
as if the value of PostalCode is "lost" in the bean.  

Any thoughts?  

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:46 PM
To: 'Tomcat Users List'
Subject: Code works in editor, but not through Tomcat - Please help!
Importance: High


Hi all.  This one's kind of urgent because its holding up the rest of my
project...

I'm not sure I understand why this is happening. I have a bean that I use
for form validation.  When I test the code locally using an editor and hard
coding variable values, the code runs perfect and all information is
validated (i.e. check zip code length =5, check zip code is a number, check
credit card number is a number, check all fields are filled in etc").
However, when I try to validate my form through Tomcat I keep getting errors
on the same fields over and over.

Any idea why this would be happening?  I have posted my code below just in
case, but since it worked when I ran it in the editor, I do not think the
problem is my code.  The only thing I can think of is that somehow,
something screwy is happening when my bean properties are being set

Thanks in advance!
Denise

Errors (only get these over Tomcat):

I enter 12345 as zip code, and I get "Please enter a valid zip code." error
message (The second error only comes up when I try a non numeric zip so that
part works ok). Input type is text and bean variable is string. The Code:
 if (PostalCode.equals("") || PostalCode.length() != 5 )
{
errors.put("PostalCode","Please enter a valid zip code.");
PostalCode="";
allOk=false;
}
else
{
  try {
int x = Integer.parseInt(PostalCode);
  } catch (NumberFormatException e) {
errors.put("PostalCode","Please enter a valid 5 digit zip
code.");
PostalCode="";
allOk=false;
  }
}

I enter 12/03 for Expiration date, and keep getting invalid message.  Input
type is text, and bean variable in bean is a String. The Code:
if (Expires.equals(""))
{
   errors.put("Expires","Please enter expiration date as
MM/YY.");
   Expires="";
   allOk=false;
}

I try [EMAIL PROTECTED] for both email and retype email.  Input type is text
and bean variable is string. Here is the code:
if (Email.equals("") || (Email.indexOf("@") <= 0))
{
errors.put("Email","Please enter a valid email address.");
Email="";
allOk=false;
}
else if (!Email.equals(retypeemail))
{
errors.put("Email","The emails entered do not match.");
Email = "";
retypeemail="";
allOk=false;
}

--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail: 
For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To un

Re: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Joseph Shraibman
Apache already supports dynamic virtual hosting. See 
http://httpd.apache.org/docs-2.0/vhosts/mass.html. That's what I'm talking about. The 
problem is that when connecting apache to tomcat you can't map into a contect directly, 
you only pass the request along to tomcat so somcat has to find the proper  based on 
the requested host name. If the connector could map directly into a context then Apache 
could do something like:
JkMount /* worker1:mycontext/%0/

Craig R. McClanahan wrote:




As for the web connectors, you'll need to ask someone who understands and
works on them what the plans are for supporting dynamic configuration
changes.  Given that Apache doesn't appear to support them, I would guess
this is going to be a challenge -- but that's outside my area of
expertise.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat, Apache and PHP

2003-01-02 Thread John Bell
John,

I changed the order of Virtual Hosts in httpd.conf
and put the PHP site as the first one - which becomes the default - and now
the JSP site is served by Tomcat and the  PHP site is at least found  by
Apache.
I guess there is something not quite right as the site should have been
picked up without it
being the default and now although the site (phpMyAdmin) is found it is not
being served quite correctly.

John


- Original Message -
From: "Turner, John" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 1:10 PM
Subject: RE: Tomcat, Apache and PHP


>
> OK, conversely, is there configuration for PHP that would skip picking up
a
> URL that is IP-only for the PHP processor?  I'm not that familiar with PHP
> configuration, I'm assuming it's done by file extension.  Is that
extension
> map happening for all of Apache, or just specific virtual hosts?
>
> John
>
>
> > -Original Message-
> > From: John Bell [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 02, 2003 1:36 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat, Apache and PHP
> >
> >
> > Thanks John,
> >
> > No JkMount /* ajp13.
> > I suspect that my config in httpd.conf needs to be changed.
> >
> > - Original Message -
> > From: "Turner, John" <[EMAIL PROTECTED]>
> > To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 01, 2003 11:00 PM
> > Subject: RE: Tomcat, Apache and PHP
> >
> >
> > >
> > > Do you have a wildcard JkMount statement somewhere, that
> > would take effect
> > > for that IP address?  Something like "JkMount /* ajp13"?
> > >
> > > John
> > >
> > >
> > > -Original Message-
> > > From: John Bell [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 01, 2003 7:52 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Tomcat, Apache and PHP
> > >
> > >
> > > I use mod_jk to connect Apache and Tomcat.
> > > I want Apache to serve PHP resources.
> > >
> > > If I do http://localhost/myPHP then Apache serves the PHP
> > application
> > which
> > > is what I want to do remotely but
> > >
> > > if I do http/213.120.114.94/myPHP then the request is sent
> > onto Tomcat
> > which
> > > does'nt serve PHP.
> > >
> > >
> > > I try and use Vitual Hosts in the Apache httpd.conf file as
> > many sites wil
> > > ne hosted on the server.
> > >
> > > NameVirtualHost 213.120.114.94
> > >
> > > 
> > >
> > > ServerAdmin [EMAIL PROTECTED]
> > >
> > > DocumentRoot /coffeemy
> > >
> > > ServerName www.capucino.co.uk
> > >
> > > ErrorLog logs/capucino.error_log
> > >
> > > CustomLog logs/capucino.co.uk-access_log combined
> > >
> > > 
> > >
> > >
> > > Can anyone help please.
> > >
> > > John
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: jdbc, mysql and character encoding

2003-01-02 Thread Anastasios Angelidis
Well I know for a fact that if you are using windows, the console window 
canot display extended characters. Only the standard ASCII chars...

It doesnt really matter, as long as you get the desired result in your 
application...

All characters in the end are bytes, a byte is a byte it all depends how 
each application interprets the bytes and displays them. So if the the 
console application uses the standard printf functions etc... you will 
see the weird characters ;)

[EMAIL PROTECTED] wrote:

I've my jsp, where I simply want to fill a table with some "italian" characters:

<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection ("jdbc:mysql://localhost:3306/jdbctest?useUnicode=true&characterEncoding=ISO-8859-1", "usrjdbc", "pwd");
Statement stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO table (text) VALUES ('àèìùò')");
ResultSet rs = stmt.executeQuery("SELECT * FROM table");
while (rs.next()) {
  int id = rs.getInt("id");
  String text = rs.getString("text");
  out.print("row#" + rs.getRow() + ": id=" + id + ", text=" + text);
  out.println("");
}
stmt.close();
conn.close();
%>

Everything works fine, and when I print the content of the db with the getString mehotd, I see my characters.
The problem is that when I go to the MySQL prompt, I can see strange characters isntead of the ones I tried to write.

MySQL uses the default ISO-8859-1 encoding, and since I'm telling to the JDBC driver to use ISO-8859-1, I can't explain what's wrong


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Hamilton, Andrew
Denise,

I had the same problem once.  All my calls to getProperties were coming back
null.  It turned out to be a pathing issue in my form.  I'm not sure why it
even ran the JSP with the incorrect path inside ACTION parameter of the form
but it did run and it returned null values for all the properties.  It
nearly drove me to drink(at work) and I screamed several times and said many
bad words until I figured it out.  It had to do with my JkMount statement,
my default classpath(tomcat), and my path inside the ACTION parameter.  You
might try calling it different ways to see if that helps.

Drew

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 2:34 PM
To: 'Tomcat Users List'
Subject: RE: Code works in editor, but not through Tomcat - Please help!


I tried to "echo print" the value of the PostalCode after it has been picked
up by the bean, by calling .  And I get an error message stating :

org.apache.jasper.JasperException: Cannot find any information on property
'PostalCode' in a bean of type 'com.complusdata.beans.FormBean'

When I complete the Form, I type in 12345 in the input box and yet it seems
as if the value of PostalCode is "lost" in the bean.  

Any thoughts?  

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:46 PM
To: 'Tomcat Users List'
Subject: Code works in editor, but not through Tomcat - Please help!
Importance: High


Hi all.  This one's kind of urgent because its holding up the rest of my
project...

I'm not sure I understand why this is happening. I have a bean that I use
for form validation.  When I test the code locally using an editor and hard
coding variable values, the code runs perfect and all information is
validated (i.e. check zip code length =5, check zip code is a number, check
credit card number is a number, check all fields are filled in etc").
However, when I try to validate my form through Tomcat I keep getting errors
on the same fields over and over.

Any idea why this would be happening?  I have posted my code below just in
case, but since it worked when I ran it in the editor, I do not think the
problem is my code.  The only thing I can think of is that somehow,
something screwy is happening when my bean properties are being set

Thanks in advance!
Denise

Errors (only get these over Tomcat):

I enter 12345 as zip code, and I get "Please enter a valid zip code." error
message (The second error only comes up when I try a non numeric zip so that
part works ok). Input type is text and bean variable is string. The Code:
 if (PostalCode.equals("") || PostalCode.length() != 5 )
{
errors.put("PostalCode","Please enter a valid zip code.");
PostalCode="";
allOk=false;
}
else
{
  try {
int x = Integer.parseInt(PostalCode);
  } catch (NumberFormatException e) {
errors.put("PostalCode","Please enter a valid 5 digit zip
code.");
PostalCode="";
allOk=false;
  }
}

I enter 12/03 for Expiration date, and keep getting invalid message.  Input
type is text, and bean variable in bean is a String. The Code:
if (Expires.equals(""))
{
   errors.put("Expires","Please enter expiration date as
MM/YY.");
   Expires="";
   allOk=false;
}

I try [EMAIL PROTECTED] for both email and retype email.  Input type is text
and bean variable is string. Here is the code:
if (Email.equals("") || (Email.indexOf("@") <= 0))
{
errors.put("Email","Please enter a valid email address.");
Email="";
allOk=false;
}
else if (!Email.equals(retypeemail))
{
errors.put("Email","The emails entered do not match.");
Email = "";
retypeemail="";
allOk=false;
}

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: is this normal??

2003-01-02 Thread Ben Ricker
I found a trick that might help: up your sar reports to take a snapshot
every minute. Then, when you notice the CPU pegging, go through the sar
reports for CPU usage and try to find the minute that they start. Then,
you can go back through the Apache access logs (mod_jk.log perhaps),
etc. to see if you can correlate a specific request with the the
problem.

Good Luck,

Ben Ricker
Wellinx.com


On Thu, 2003-01-02 at 13:07, Randy Paries wrote:
> I am running 
> 
> jakarta-tomcat-4.0.4  jdk1.3.1_04 apache-1.3.27-2 
> 
> I have enabled server stats (thanks Jan)
> 
> I stop and started and it is back to normal. So when this does this
> again, I will see if the server status helps
> 
> Thanks for all the suggestions
> 
> Randy
> 
> -Original Message-
> From: Brandon Cruz [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 02, 2003 1:19 PM
> To: Tomcat Users List
> Subject: RE: is this normal??
> 
> 
> Are you using tomcat 3.x by any chance?  We had a CPU problem with 3.2.4
> that we could never resolve.  The problem went away with our recent
> upgrade to 4.1.x
> 
> 
> 
> -Original Message-
> From: Randy Paries [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 11:37 AM
> To: 'Tomcat Users List'
> Subject: RE: is this normal??
> 
> 
> I have a pretty busy web server
> It has apache and tomcat
> What I am trying to find out if I have a problem or not
> I am linux guy but not at the tuning level
> When I do a top I get: These top 4 are always at the top
> 29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
>  2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
>   460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
>  2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd
> 
> What makes me suspicious is that it is only after some time.
> 
> When I do a sar, I have no idle time on the CPU
> 
> I realize that this may be a linux or apache question, but I think it
> has to do with tomcat as well
> 
> Thanks for any help
> 
> Randy
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Ben Ricker <[EMAIL PROTECTED]>
Wellinx.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Setting root web app. How?

2003-01-02 Thread Anastasios Angelidis
When you start tomcat and then navigate with your browser to 
http://localhost:8080, you get the tomcat default web app/info pages etc...

I want it to go to my web application, so what I did is I backed up the 
ROOT folder and put my web app in the ROOT folder.

Is this the correct method or is there a better way?

Thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
I tried to "echo print" the value of the PostalCode after it has been picked
up by the bean, by calling .  And I get an error message stating :

org.apache.jasper.JasperException: Cannot find any information on property
'PostalCode' in a bean of type 'com.complusdata.beans.FormBean'

When I complete the Form, I type in 12345 in the input box and yet it seems
as if the value of PostalCode is "lost" in the bean.  

Any thoughts?  

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:46 PM
To: 'Tomcat Users List'
Subject: Code works in editor, but not through Tomcat - Please help!
Importance: High


Hi all.  This one's kind of urgent because its holding up the rest of my
project...

I'm not sure I understand why this is happening. I have a bean that I use
for form validation.  When I test the code locally using an editor and hard
coding variable values, the code runs perfect and all information is
validated (i.e. check zip code length =5, check zip code is a number, check
credit card number is a number, check all fields are filled in etc").
However, when I try to validate my form through Tomcat I keep getting errors
on the same fields over and over.

Any idea why this would be happening?  I have posted my code below just in
case, but since it worked when I ran it in the editor, I do not think the
problem is my code.  The only thing I can think of is that somehow,
something screwy is happening when my bean properties are being set

Thanks in advance!
Denise

Errors (only get these over Tomcat):

I enter 12345 as zip code, and I get "Please enter a valid zip code." error
message (The second error only comes up when I try a non numeric zip so that
part works ok). Input type is text and bean variable is string. The Code:
 if (PostalCode.equals("") || PostalCode.length() != 5 )
{
errors.put("PostalCode","Please enter a valid zip code.");
PostalCode="";
allOk=false;
}
else
{
  try {
int x = Integer.parseInt(PostalCode);
  } catch (NumberFormatException e) {
errors.put("PostalCode","Please enter a valid 5 digit zip
code.");
PostalCode="";
allOk=false;
  }
}

I enter 12/03 for Expiration date, and keep getting invalid message.  Input
type is text, and bean variable in bean is a String. The Code:
if (Expires.equals(""))
{
   errors.put("Expires","Please enter expiration date as
MM/YY.");
   Expires="";
   allOk=false;
}

I try [EMAIL PROTECTED] for both email and retype email.  Input type is text
and bean variable is string. Here is the code:
if (Email.equals("") || (Email.indexOf("@") <= 0))
{
errors.put("Email","Please enter a valid email address.");
Email="";
allOk=false;
}
else if (!Email.equals(retypeemail))
{
errors.put("Email","The emails entered do not match.");
Email = "";
retypeemail="";
allOk=false;
}

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
I tried to "echo print" the value of the PostalCode after it has been picked
up by the bean, by calling .  And I get an error message stating :

org.apache.jasper.JasperException: Cannot find any information on property
'PostalCode' in a bean of type 'com.complusdata.beans.FormBean'

When I complete the Form, I type in 12345 in the input box and yet it seems
as if the value of PostalCode is "lost" in the bean.  

Any thoughts?  

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:46 PM
To: 'Tomcat Users List'
Subject: Code works in editor, but not through Tomcat - Please help!
Importance: High


Hi all.  This one's kind of urgent because its holding up the rest of my
project...

I'm not sure I understand why this is happening. I have a bean that I use
for form validation.  When I test the code locally using an editor and hard
coding variable values, the code runs perfect and all information is
validated (i.e. check zip code length =5, check zip code is a number, check
credit card number is a number, check all fields are filled in etc").
However, when I try to validate my form through Tomcat I keep getting errors
on the same fields over and over.

Any idea why this would be happening?  I have posted my code below just in
case, but since it worked when I ran it in the editor, I do not think the
problem is my code.  The only thing I can think of is that somehow,
something screwy is happening when my bean properties are being set

Thanks in advance!
Denise

Errors (only get these over Tomcat):

I enter 12345 as zip code, and I get "Please enter a valid zip code." error
message (The second error only comes up when I try a non numeric zip so that
part works ok). Input type is text and bean variable is string. The Code:
 if (PostalCode.equals("") || PostalCode.length() != 5 )
{
errors.put("PostalCode","Please enter a valid zip code.");
PostalCode="";
allOk=false;
}
else
{
  try {
int x = Integer.parseInt(PostalCode);
  } catch (NumberFormatException e) {
errors.put("PostalCode","Please enter a valid 5 digit zip
code.");
PostalCode="";
allOk=false;
  }
}

I enter 12/03 for Expiration date, and keep getting invalid message.  Input
type is text, and bean variable in bean is a String. The Code:
if (Expires.equals(""))
{
   errors.put("Expires","Please enter expiration date as
MM/YY.");
   Expires="";
   allOk=false;
}

I try [EMAIL PROTECTED] for both email and retype email.  Input type is text
and bean variable is string. Here is the code:
if (Email.equals("") || (Email.indexOf("@") <= 0))
{
errors.put("Email","Please enter a valid email address.");
Email="";
allOk=false;
}
else if (!Email.equals(retypeemail))
{
errors.put("Email","The emails entered do not match.");
Email = "";
retypeemail="";
allOk=false;
}

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Turner, John wrote:

> Date: Thu, 2 Jan 2003 13:51:42 -0500
> From: "Turner, John" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: can tomcat do dynamic virtual hosts?
>
>
> H...interesting point.  What does the admin webapp do, then, that you
> couldn't do from the command line?

When server.xml is parsed at Tomcat startup time, the executed code
creates instances of the internal Catalina objects that correspond to each
element -- for example, a  declaration causes the creation of a new
instance of "org.apache.catalina.core.StandardHost" -- that is then
configured with the properties and attached to the owning object (in the
case of a host, it's the o.a.c.c.StandardEngine instance that corresponds
to the  element).

The admin webapp simply performs the same operation, but at runtime (no
restart required).

>  Is there something similar to Apache's
> 'apachectl restart' for Tomcat?
>

No there's not.  Even if it were to be implemented, I'm betting that the
time required would be essentially equivalent to shutdown/restart.  It's
also irrelevant for the things that can be changed dynamically (such as
adding a virtual host), except for the fact that the web connector stuff
probably doesn't respect dynamic changes like this (I don't have a clue on
that part).

> Can you call the admin webapp with a URL and have it do things?  If so,
> that's the answer to the original post...you would just need a script to
> send the appropriate command, much like ant would or whatever, to the admin
> webapp.

In principle, it would be pretty straightforward to extend the manager
webapp to do things like this (so that it would be easily scriptable from
a command line or Ant script).  In fact, there's discussion on the
developer list, with respect to Tomcat 5, to enabling pretty much all of
the administrative change type features via JMX (which is what the admin
webapp is already using) and making them available remotely.  A small
amount of refactoring inside Catalina will be required to make this work
(such as making the startup code that reads server.xml just use the same
JMX operations instead of duplicating things), but that's not a huge
amount of work.

As for the web connectors, you'll need to ask someone who understands and
works on them what the plans are for supporting dynamic configuration
changes.  Given that Apache doesn't appear to support them, I would guess
this is going to be a challenge -- but that's outside my area of
expertise.

>
> John
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: is this normal??

2003-01-02 Thread Randy Paries
I am running 

jakarta-tomcat-4.0.4  jdk1.3.1_04 apache-1.3.27-2 

I have enabled server stats (thanks Jan)

I stop and started and it is back to normal. So when this does this
again, I will see if the server status helps

Thanks for all the suggestions

Randy

-Original Message-
From: Brandon Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:19 PM
To: Tomcat Users List
Subject: RE: is this normal??


Are you using tomcat 3.x by any chance?  We had a CPU problem with 3.2.4
that we could never resolve.  The problem went away with our recent
upgrade to 4.1.x



-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 11:37 AM
To: 'Tomcat Users List'
Subject: RE: is this normal??


I have a pretty busy web server
It has apache and tomcat
What I am trying to find out if I have a problem or not
I am linux guy but not at the tuning level
When I do a top I get: These top 4 are always at the top
29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
 2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
  460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
 2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd

What makes me suspicious is that it is only after some time.

When I do a sar, I have no idle time on the CPU

I realize that this may be a linux or apache question, but I think it
has to do with tomcat as well

Thanks for any help

Randy


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: is this normal??

2003-01-02 Thread Brandon Cruz
Are you using tomcat 3.x by any chance?  We had a CPU problem with 3.2.4
that we could never resolve.  The problem went away with our recent upgrade
to 4.1.x



-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 11:37 AM
To: 'Tomcat Users List'
Subject: RE: is this normal??


I have a pretty busy web server
It has apache and tomcat
What I am trying to find out if I have a problem or not
I am linux guy but not at the tuning level
When I do a top I get: These top 4 are always at the top
29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
 2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
  460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
 2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd

What makes me suspicious is that it is only after some time.

When I do a sar, I have no idle time on the CPU

I realize that this may be a linux or apache question, but I think it
has to do with tomcat as well

Thanks for any help

Randy


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Jakarta Connectors build error

2003-01-02 Thread David Orriss Jr

Hi,

When I try to build the libjkjni.so library I'm getting this set messages/errors:

 -lcrypt -L/usr/local/apache2/lib -lapr  -Wl,-soname -Wl,libjkjni.so -o
.libs/libjkjni.so
   [so] StdErr:
   [so] /usr/bin/ld: cannot find -lapr
   [so] collect2: ld returned 1 exit status

BUILD FAILED
file:/home/davidjr/downloads/jakarta-tomcat-connectors-4.1.18-src/jk/native2/build.xml:341:
Link failed libjkjni


Suggestions would be most appreciated.  I'm really stumped as to why it can't
find this apr library.  FWIW, my Apache 2 installation is in /usr/local/apache2
and tomcat 4.1 is in /usr/local/jakarta-tomcat-4.1.18/

Thanks.




-- 


David Orriss Jr.
[EMAIL PROTECTED]
http://www.davenet.net

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jdbc, mysql and character encoding

2003-01-02 Thread [EMAIL PROTECTED]
I've my jsp, where I simply want to fill a table with some "italian" characters:

<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection 
("jdbc:mysql://localhost:3306/jdbctest?useUnicode=true&characterEncoding=ISO-8859-1", 
"usrjdbc", "pwd");
Statement stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO table (text) VALUES ('àèìùò')");
ResultSet rs = stmt.executeQuery("SELECT * FROM table");
while (rs.next()) {
   int id = rs.getInt("id");
   String text = rs.getString("text");
   out.print("row#" + rs.getRow() + ": id=" + id + ", text=" + text);
   out.println("");
}
stmt.close();
conn.close();
%>

Everything works fine, and when I print the content of the db with the getString 
mehotd, I see my characters.
The problem is that when I go to the MySQL prompt, I can see strange characters 
isntead of the ones I tried to write.

MySQL uses the default ISO-8859-1 encoding, and since I'm telling to the JDBC driver 
to use ISO-8859-1, I can't explain what's wrong


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache 2+Tomcat 4.1.12: how to disable the Coyote HTTP connector?

2003-01-02 Thread Turner, John

He wants Ajp13Connector to be his only connector.  He wants to disable
CoyoteConnector on port 8080, but is getting an error message when he tries
to do so.

John


> -Original Message-
> From: Jerry Ford [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 11:30 AM
> To: Tomcat Users List
> Subject: Re: Apache 2+Tomcat 4.1.12: how to disable the Coyote HTTP
> connector?
> 
> 
> Looks like you conmmented out the wrong connector.  The one you have 
> removed is identified as the one for port 8009, which is the 
> one Apache 
> uses.  Restore that connector and comment out the one that is 
> identified 
> as for port 8080.
> 
> Jerry
> 
> Manuel González Castro wrote:
> 
> >Hi,
> >
> >I'm running Apache HTTP Server 2.0.43 + Tomcat 4.1.12 + mod_jk and
> >everything is working fine, Apache can talk to Tomcat to 
> serve *.jsp pages.
> >
> >Now I'd like to disable the default "non-SSL Coyote HTTP/1.1 
> Connector on
> >port 8080" because I don't like everybody getting into
> >http://mydomain.com:8080 and seeing the Tomcat congratulations page,
> >manager, admin page, ... I just want Tomcat to serve JSP 
> pages to Apache
> >using mod_jk.
> >
> >I commented the default Coyote HTTP/1.1 Connector and leaved 
> the AJP 1.3 as
> >the only Connector in my server.xml file:
> >
> >
> > >   port="8009" minProcessors="5" maxProcessors="75"
> >   acceptCount="10" debug="0"/>
> >
> >But when I request a JSP file to Apache, Tomcat doesn't 
> answer, I get this
> >error:
> >"Internal Server Error The server encountered an internal error or
> >misconfiguration and was unable to complete your request."
> >
> >Is there any way to prevent people from accesing 
http://mydomain:8080 and
>leave AJP 1.3 as the only Connector ?
>
>Thanks in advance!
>Manuel
>
>
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:

>  
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Turner, John

H...interesting point.  What does the admin webapp do, then, that you
couldn't do from the command line?  Is there something similar to Apache's
'apachectl restart' for Tomcat?

Can you call the admin webapp with a URL and have it do things?  If so,
that's the answer to the original post...you would just need a script to
send the appropriate command, much like ant would or whatever, to the admin
webapp.

John


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 12:27 PM
> To: Tomcat Users List
> Subject: RE: can tomcat do dynamic virtual hosts?
> 
> 
> 
> 
> On Thu, 2 Jan 2003, Turner, John wrote:
> 
> > Date: Thu, 2 Jan 2003 08:05:18 -0500
> > From: "Turner, John" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: can tomcat do dynamic virtual hosts?
> >
> >
> > Since a virtual host in Tomcat requires a Host element in 
> server.xml, that
> > means a restart.
> 
> In 4.1, at least for Tomcat standalone, this is not actually 
> required --
> for example, you can add new hosts (and the corresponding contexts)
> through the admin webapp and it becomes effective immediately 
> without a
> restart.  I don't know how that impacts the web server 
> connectors though
> (since I never use them).
> 
> >  If you use the ApacheConfig option for JK, adding the new
> > Host is picked up automatically , and the corresponding 
> Apache config
> > directives are generated.  Then a 
> "/path/to/apache/bin/apachectl graceful"
> > will pick those up without effecting other requests.
> >
> > How do you envision dynamic virtual hosts working?  I think 
> it's a huge
> > issue, not only from a usage POV, but from a 
> design/architecture POV.  I
> > doubt doing this is trivial, but I'm no developer so maybe 
> it is.  In any
> > case, I'm sure tomcat-dev would have better answers, suggestions or
> > guidance.
> >
> > John
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Code works in editor, but not through Tomcat - Please help!

2003-01-02 Thread Denise Mangano
Hi all.  This one's kind of urgent because its holding up the rest of my
project...

I'm not sure I understand why this is happening. I have a bean that I use
for form validation.  When I test the code locally using an editor and hard
coding variable values, the code runs perfect and all information is
validated (i.e. check zip code length =5, check zip code is a number, check
credit card number is a number, check all fields are filled in etc").
However, when I try to validate my form through Tomcat I keep getting errors
on the same fields over and over.

Any idea why this would be happening?  I have posted my code below just in
case, but since it worked when I ran it in the editor, I do not think the
problem is my code.  The only thing I can think of is that somehow,
something screwy is happening when my bean properties are being set

Thanks in advance!
Denise

Errors (only get these over Tomcat):

I enter 12345 as zip code, and I get "Please enter a valid zip code." error
message (The second error only comes up when I try a non numeric zip so that
part works ok). Input type is text and bean variable is string.
The Code:
 if (PostalCode.equals("") || PostalCode.length() != 5 )
{
errors.put("PostalCode","Please enter a valid zip code.");
PostalCode="";
allOk=false;
}
else
{
  try {
int x = Integer.parseInt(PostalCode);
  } catch (NumberFormatException e) {
errors.put("PostalCode","Please enter a valid 5 digit zip
code.");
PostalCode="";
allOk=false;
  }
}

I enter 12/03 for Expiration date, and keep getting invalid message.  Input
type is text, and bean variable in bean is a String.
The Code:
if (Expires.equals(""))
{
   errors.put("Expires","Please enter expiration date as
MM/YY.");
   Expires="";
   allOk=false;
}

I try [EMAIL PROTECTED] for both email and retype email.  Input type is text
and bean variable is string.
Here is the code:
if (Email.equals("") || (Email.indexOf("@") <= 0))
{
errors.put("Email","Please enter a valid email address.");
Email="";
allOk=false;
}
else if (!Email.equals(retypeemail))
{
errors.put("Email","The emails entered do not match.");
Email = "";
retypeemail="";
allOk=false;
}

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




top command shows memory usage of java process is two times more than what actually java heap is taking

2003-01-02 Thread Venkat Reddy Valluri

Hi,
When I run top command on linux, it is showing  memory usage of java process is 
two times more than what java heap is taking, I got java heap size inside java program 
using "Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();"
I didn't understand why it is showing like this, Can anybody explain me

Thks,
--Venkat  

<>--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: RE: is this normal??

2003-01-02 Thread jmong
I have to concur with the following observation.

Try to check what the apache processes are doing. If you've enabled 
server-status on your box and have installed GET (as part of the perl 
LWP) grep for the pid

GET /server-status | grep 

or access it http:///server-status

On older tomcat versions (i.e. 3.2.1), it would seem that older 
clients (i.e. HTTP/1.0) would hang up on the POST part

ie.

POST /path/to/form/process.jsp HTTP/1.0

Typically my only recourse is to kill the offending process and/or 
restart tomcat and apache.

kill -9 

Hope that helps

-Jan-Michael


- Original Message -
From: Ben Ricker <[EMAIL PROTECTED]>
Date: Thursday, January 2, 2003 9:56 am
Subject: RE: is this normal??

> There is probably a problem going on there. I find it strange that 
you
> have so much cumulative CPU time on the httpd processes. To me, they
> look hung (in so far as I can tell). Since most apps are 
transactional
> in nature (i.e., individual requests being fulfilled rather quickly),
> you would expect to see the Apache processes using CPU, then 
> giving it
> up rather quickly. Of course, other httpd processes will also pop 
> in and
> out of CPU usage as individual requests pop in.
> 
> How long has this Apache/Tomcat been running? You might try a 
> restart of
> both and see if the same behavior comes right back or if it takes 
> time.You may have an issue in the app which is triggering a hang.
> 
> Of course, on a "pretty busy web server", you may get such cumulative
> times, but you should still see httpd processes popping in and out of
> CPU usage as they handle their respective requests. If the same 
> PIDs sit
> there pegging the CPU incessently, you most likely have an issue.
> 
> HTH,
> 
> Ben Ricker
> 
> 
> On Thu, 2003-01-02 at 11:37, Randy Paries wrote:
> > I have a pretty busy web server
> > It has apache and tomcat
> > What I am trying to find out if I have a problem or not
> > I am linux guy but not at the tuning level
> > When I do a top I get: These top 4 are always at the top
> > 29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
> >  2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
> >   460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
> >  2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd
> > 
> > What makes me suspicious is that it is only after some time.
> > 
> > When I do a sar, I have no idle time on the CPU
> > 
> > I realize that this may be a linux or apache question, but I 
> think it
> > has to do with tomcat as well
> > 
> > Thanks for any help
> > 
> > Randy
> > 
> > 
> > --
> > To unsubscribe, e-mail:    [EMAIL PROTECTED]>> For additional commands, e-mail: 
> 
> -- 
> Ben Ricker <[EMAIL PROTECTED]>
> Wellinx.com
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JDBCRealm

2003-01-02 Thread Rob Abernethy IV
I'm trying to set up a JDBCRealm for use with the admin and manager webapps. 
The problem is that I am unable to authenticate any users.

- Tomcat 4.1.18
- Postgresql 7.3.1
- JDBC driver is in $CATALINA_HOME/common/lib
- Tomcat starts up fine, I just can't authenticate
- I can directly connect to my database with the username and password
- I have created the 'admin' and 'manager' groups in the database
- I have added the users to both groups

Realm:


Log:
2003-01-02 12:34:34 JDBCRealm[Standalone]: Username tomcat NOT successfully
authenticated

Any ideas?

--
Robert Abernethy IV
Dynamic Edge, Inc.
734.975.0460

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Release of memory

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Øyvind Hvamstad wrote:

>
> But if tomcat releases the reference to the servlet, the hole thing
> should be garbage collected.

Tomcat does not release references to the servlet.  In fact, it's totally
up to the container (not to you) to decide how long a servlet instance
will stay initialized.

What you want to do is make sure that your *servlet* does not maintain any
references to the report results for the previously generated report.
Then, those objects can get GC'd.

Of course, you're still going to have problems when multiple users ask for
reports to be generated at the same time, if you've only got enough memory
to do one -- but that's a separate issue.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: is this normal??

2003-01-02 Thread Ben Ricker
There is probably a problem going on there. I find it strange that you
have so much cumulative CPU time on the httpd processes. To me, they
look hung (in so far as I can tell). Since most apps are transactional
in nature (i.e., individual requests being fulfilled rather quickly),
you would expect to see the Apache processes using CPU, then giving it
up rather quickly. Of course, other httpd processes will also pop in and
out of CPU usage as individual requests pop in.

How long has this Apache/Tomcat been running? You might try a restart of
both and see if the same behavior comes right back or if it takes time.
You may have an issue in the app which is triggering a hang.

Of course, on a "pretty busy web server", you may get such cumulative
times, but you should still see httpd processes popping in and out of
CPU usage as they handle their respective requests. If the same PIDs sit
there pegging the CPU incessently, you most likely have an issue.

HTH,

Ben Ricker


On Thu, 2003-01-02 at 11:37, Randy Paries wrote:
> I have a pretty busy web server
> It has apache and tomcat
> What I am trying to find out if I have a problem or not
> I am linux guy but not at the tuning level
> When I do a top I get: These top 4 are always at the top
> 29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
>  2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
>   460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
>  2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd
> 
> What makes me suspicious is that it is only after some time.
> 
> When I do a sar, I have no idle time on the CPU
> 
> I realize that this may be a linux or apache question, but I think it
> has to do with tomcat as well
> 
> Thanks for any help
> 
> Randy
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Ben Ricker <[EMAIL PROTECTED]>
Wellinx.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Release of memory

2003-01-02 Thread Øyvind Hvamstad
> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
> 
> It may not be another tomcat thread.  And conversely, it may be a
> different (possibly new) instance of your servlet.  Does your servlet
> implement SingleThreadModel?

No it does not! That would mean bad performance. I can not have my
clients block.

> Tomcat doesn't hold on to these objects.  Make sure nothing in your
code
> does either.   That way they will be garbage collected.

But if tomcat releases the reference to the servlet, the hole thing
should be garbage collected. The standard way of doing that is by
reference counting, right? And that should be enough, but apparently
not. How does incremental (I run 1.3) gc differ from ref counting? My
code sets variables to null before I "suggest" it to do gc.

> Have you tried any of the other garbage collection tuning parameters
> mentioned in my previous message?   It's worth trying a few runs,
> recording your results, and analyzing them.  You can get vastly
> different memory profiles with the Java runtime options previously
> mentioned.

I might try this when I start optimizing. Now am trying to get it to not
hold all my memory. Could it be a bug? Doesn't tomcat drop the reference
to the hole servlet when do_GET returns? To me it seems that it holds
every thing.

Øyvind Hvamstad


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Realm not working now I've moved from Win2K to Linux

2003-01-02 Thread Gary Gwin
Ben,

Can you see in your Tomcat log files if you are being forwarded back to 
the original request page after authentication? If yes, and you are 
being authenticated as you indicate, this sounds like the state is 
somehow being lost. In this case, you might be in a forwarding loop 
between the protected resources and the login page. I'm not sure on why 
this would be happening.

You might take a look at our Cams product: http://www.cafesoft.com

Cams unifies Apache and Tomcat security under a centralized security 
policy umbrella. It is tested under Windows and Linux to work via JDBC.

Good luck,

Gary

Ben Jessel wrote:

Hi,

I have a JDBC realm set up that interfaces with a mysql database in tomcat 4.0 on a windows 2000 server. This has been working fine - I place my pages under the security constraint, and I am forwarded to the login page o.k. Entering my details then puts me to the 'login correct' page, and all is good. Now I have now migrated to tomcat 4.0 on Mandrake 9, and I cannot log in. I have turned up debugging to full, and I can see that authorization is fine. I can see the sql and see the results being returned, however, I keep getting forwarded back to the login page. My configurations are very similar! Though, strangely enough, the RPM that I got from RPM finder has different ports configured to the win2k ones. I've replaced the server.xml with the one from the win2k distribution of Tomcat 4.0.

Thanks

Ben

 


--

Gary Gwin
http://www.cafesoft.com

*
*   *
*   The Cafesoft Access Management System, Cams, is security*
*   software that provides single sign-on authentication and*
*   centralized access control for Apache, Tomcat, and custom   *
*   resources.  *
*   *
*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JK2/tomcat 4.1.18 - broken pipe problem

2003-01-02 Thread Jesper Birch
Hi

Thx for the suggestion...

I forgot to write that I have the problem on Solaris 7...

/Jesper Birch


-Original Message-

Even I too got the same problem with configuraion of apache 2.0.40,
tomcat 4.0.4 and  j2sdk1.4.1(sun jvm) on redhat 7.3
 but when I replaced sun jvm with ibm jvm, surprisingly I didn't get
this problem, I am not sure here but what I thought is sun jvm   can't
support green threads on redhat linux but supports only native threads
where as ibm jvm can support green threads on linux machines

Thks,
-Venkat


-Original Message-
Hi, 

I have setup a environment with Apache 2.0.43, Tomcat 4.1.18 and JK2
connector. 

Everything seems to work fine, except an error message I get time to
time in my logs: 

2003-01-02 05:55:56,681 [Thread-49] ERROR
org.apache.jk.server.JkCoyoteHandler - Error in action code 
java.net.SocketException: Broken pipe   at
java.net.SocketOutputStream.socketWrite0(Native Method)  at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)  at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)   at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:435)  at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:627)at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
at org.apache.coyote.Response.action(Response.java:222) at
org.apache.coyote.Response.finish(Response.java:343) at
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)  at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.j
ava:500) at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
590) at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:530)   at java.lang.Thread.run(Thread.java:536) 

 

It does not seems like the users on my site has any problems when it
appears. So I am not sure when exactly this is happening. 

Can somebody explain for me the condition for when this should happen -
so I can look into this error, or maybe somebody has an idea to what the
problem can be ?! Or it should be in that way ?! :-)

Thanks

Jesper Birch



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: is this normal??

2003-01-02 Thread Randy Paries
I have a pretty busy web server
It has apache and tomcat
What I am trying to find out if I have a problem or not
I am linux guy but not at the tuning level
When I do a top I get: These top 4 are always at the top
29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
 2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
  460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
 2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd

What makes me suspicious is that it is only after some time.

When I do a sar, I have no idle time on the CPU

I realize that this may be a linux or apache question, but I think it
has to do with tomcat as well

Thanks for any help

Randy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can tomcat listen only to unix socket?

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Gery Kahn wrote:

> Date: Thu, 02 Jan 2003 15:29:22 +0200
> From: Gery Kahn <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Can tomcat listen only to unix socket?
>
> I am trying to config Tomcat 4.1.17 to listen only unix socket,
> without TCP sockets.
>
> How to config connectors in server.xml?
>

You don't.

Java doesn't support Unix sockets, only TCP sockets.  Therefore, Tomcat
only supports TCP sockets as well, unless you write some native code
adapters.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Release of memory

2003-01-02 Thread Shapira, Yoav
Howdy,
Not much clearer, but I'll try to explain a bit more ;)

>I have to specify that the servlet is done! And the next time the
>servlet is run (another tomcat thread) the memory usage starts at the

It may not be another tomcat thread.  And conversely, it may be a
different (possibly new) instance of your servlet.  Does your servlet
implement SingleThreadModel?

>percentage used by the former run. Say, if I want a report and that
>takes up about 50% of memory, and then you want the same. Then you will
>take the memory up to 100%, because tomcat still holds 50% from my run,
>even though it has terminated!

Keep in mind a couple of things:

The amount of allocated memory always increases until it's garbage
collection.  So if you have a run of your servlet, allocating some
memory, and hold on to those objects, they won't be garbage collected.
Then on the next run of your servlet, the VM has no choice but to
allocate more memory.

Tomcat doesn't hold on to these objects.  Make sure nothing in your code
does either.   That way they will be garbage collected.

Have you tried any of the other garbage collection tuning parameters
mentioned in my previous message?   It's worth trying a few runs,
recording your results, and analyzing them.  You can get vastly
different memory profiles with the Java runtime options previously
mentioned.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: can tomcat do dynamic virtual hosts?

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Turner, John wrote:

> Date: Thu, 2 Jan 2003 08:05:18 -0500
> From: "Turner, John" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: can tomcat do dynamic virtual hosts?
>
>
> Since a virtual host in Tomcat requires a Host element in server.xml, that
> means a restart.

In 4.1, at least for Tomcat standalone, this is not actually required --
for example, you can add new hosts (and the corresponding contexts)
through the admin webapp and it becomes effective immediately without a
restart.  I don't know how that impacts the web server connectors though
(since I never use them).

>  If you use the ApacheConfig option for JK, adding the new
> Host is picked up automatically , and the corresponding Apache config
> directives are generated.  Then a "/path/to/apache/bin/apachectl graceful"
> will pick those up without effecting other requests.
>
> How do you envision dynamic virtual hosts working?  I think it's a huge
> issue, not only from a usage POV, but from a design/architecture POV.  I
> doubt doing this is trivial, but I'm no developer so maybe it is.  In any
> case, I'm sure tomcat-dev would have better answers, suggestions or
> guidance.
>
> John

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Release of memory

2003-01-02 Thread Øyvind Hvamstad
I have to specify that the servlet is done! And the next time the
servlet is run (another tomcat thread) the memory usage starts at the
percentage used by the former run. Say, if I want a report and that
takes up about 50% of memory, and then you want the same. Then you will
take the memory up to 100%, because tomcat still holds 50% from my run,
even though it has terminated!

I don't know if that was any clearer?

Øyvind Hvamstad


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ERROR: Receiving from Tomcat failed recoverable operation, err=0

2003-01-02 Thread Rob Cartier
Found it:)







> -Original Message-
> From: Rob Cartier [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 11:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: ERROR: Receiving from Tomcat failed recoverable operation,
> err=0
>
>
> [ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (681)]: ERROR:
> can't receive the response message from tomcat, network
> problems or tomcat is down.
> [ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (1050)]: Error
> reading reply from tomcat. Tomcat is down or network problems.
> [ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (1187)]: ERROR:
> Receiving from tomcat failed, recoverable operation. err=0
> [ Wed Jan 01 22:15:32 2003 ]HTTP/1.1 GET 200 /fsa/index.jsp
> [ Wed Jan 01 22:15:32 2003 ] [jk_ajp_common.c (681)]: ERROR:
> can't receive the response message from tomcat, network
> problems or tomcat is down.
>
>
> I am seeing many of these in my mod_jk.log file
> but I am able to render all links and pages
> what is wrong
>
> I am running tomcat 4.1.18 with apache 1.3.22-6
> with mod_jk-1.3-eapi.so
>
> thanks
>
> Rob
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-01-02 Thread Anastasios Angelidis
Doh! Teach me for staying up so late :P

Thanks it works.

shawn wrote:


Try changing this value 


Shouldn't it be jdbc/InfectedDB ?

That's my guess.

Shawn

On Thu, 2003-01-02 at 12:29, Anastasios Angelidis wrote:
 

Hi I downloaded the MySQL Connector/J 2.0.14 JDBC drivers and I copied 
the mysql-connector-java-2.0.14-bin.jar to the common/lib folder...

Here is my server.xml  config...


   
   
   
   
factoryorg.apache.commons.dbcp.BasicDataSourceFactory
   maxActive100
   maxIdle30
   maxWait1
   usernamexx
   passwordxx
   
driverClassNamecom.mysql.jdbc.Driver
   
urljdbc:mysql://localhost:3306/infected
   


Here is my web.xml...


   infected rhythms
 infected rhythms web site
 
   DB Connection
   jdbc/InfectedDB
   javax.sql.DataSource
   Container
   



Then I worte this simple JSP code...

try
{
   Context ctx = new InitialContext();

   DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/InfectedDB");

   Connection conn = ds.getConnection();

   The rest of the code...
}
catch(Exception ex)
{
   ex.printStackTrace();
}

The exception os caught whne trying to get the connection Connection 
conn = ds.getConnection(); Any ideas? Thanks
The stack trace...

java.sql.SQLException: Cannot load JDBC driver class 'null'
   at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
   at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
   at org.apache.jsp.artists_jsp._jspService(artists_jsp.java:57)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   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:260)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
   at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
   at java.lang.Thread.run(Thread.java:536)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 
   




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Apache 2+Tomcat 4.1.12: how to disable the Coyote HTTP connector?

2003-01-02 Thread Jerry Ford
Looks like you conmmented out the wrong connector.  The one you have 
removed is identified as the one for port 8009, which is the one Apache 
uses.  Restore that connector and comment out the one that is identified 
as for port 8080.

Jerry

Manuel González Castro wrote:

Hi,

I'm running Apache HTTP Server 2.0.43 + Tomcat 4.1.12 + mod_jk and
everything is working fine, Apache can talk to Tomcat to serve *.jsp pages.

Now I'd like to disable the default "non-SSL Coyote HTTP/1.1 Connector on
port 8080" because I don't like everybody getting into
http://mydomain.com:8080 and seeing the Tomcat congratulations page,
manager, admin page, ... I just want Tomcat to serve JSP pages to Apache
using mod_jk.

I commented the default Coyote HTTP/1.1 Connector and leaved the AJP 1.3 as
the only Connector in my server.xml file:

   
   
  port="8009" minProcessors="5" maxProcessors="75"
  acceptCount="10" debug="0"/>

But when I request a JSP file to Apache, Tomcat doesn't answer, I get this
error:
"Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request."

Is there any way to prevent people from accesing http://mydomain:8080 and
leave AJP 1.3 as the only Connector ?

Thanks in advance!
Manuel



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 
 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ERROR: Receiving from Tomcat failed recoverable operation, err=0

2003-01-02 Thread Rob Cartier
[ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (681)]: ERROR: can't receive
the response message from tomcat, network problems or tomcat is down.
[ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (1050)]: Error reading reply
from tomcat. Tomcat is down or network problems.
[ Wed Jan 01 22:15:31 2003 ] [jk_ajp_common.c (1187)]: ERROR: Receiving from
tomcat failed, recoverable operation. err=0
[ Wed Jan 01 22:15:32 2003 ]HTTP/1.1 GET 200 /fsa/index.jsp
[ Wed Jan 01 22:15:32 2003 ] [jk_ajp_common.c (681)]: ERROR: can't receive
the response message from tomcat, network problems or tomcat is down.


I am seeing many of these in my mod_jk.log file
but I am able to render all links and pages
what is wrong

I am running tomcat 4.1.18 with apache 1.3.22-6
with mod_jk-1.3-eapi.so

thanks

Rob



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Release of memory

2003-01-02 Thread Shapira, Yoav
Hi,

>Can anyone tell me how to make tomcat release memory after a servlet is

You can't.

>finished? Now tomcat simply hold it and sooner or later my server
starts
>to swap processes because of it. It does so even if I force GC at the

You can't force GC.  System.gc() is only a suggestion to the collector
and may be completely ignored.

>end of the servlet. If it is left idle, it frees some over time, but it
>takes to long.

What you can do:

- Allocate more memory to the heap, using the Java -Xmx parameter.
- Better tune your memory profile by changing the ratio of new
generation to old generation.  Sounds like you're 90% new generation.
See the -XX:MaxNewSize, -XX:NewSize (for JDK 1.3 and before) and also
-XX:NewRatio parameter for JDK 1.4 and later.
- Use a different, e.g. incremental (-Xincgc) or concurrent (on JDK 1.4
and later, -Xconcgc) garbage collector.
- Ensure you don't keep references to object you don't need.  If you
keep strong references, the collecto won't deallocate these objects.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Release of memory

2003-01-02 Thread Øyvind Hvamstad
Hi, I have a servlet that is generating reports on demand from a client
program. I'm using tomcat as servlet container, xml and xsl to generate
fo and fop to give me pdf. The reports tend to be big and memory is
being exhausted.

Can anyone tell me how to make tomcat release memory after a servlet is
finished? Now tomcat simply hold it and sooner or later my server starts
to swap processes because of it. It does so even if I force GC at the
end of the servlet. If it is left idle, it frees some over time, but it
takes to long.

Please help!

Øyvind Hvamstad


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: running tomcat as a non-root user?

2003-01-02 Thread Ben Ricker
On Tue, 2002-12-31 at 18:13, waimun wrote:

> P.S. Btw, does anyone know is there a way where I could run w/o login/su'ing to 
>normal user; ie as root, fire up startup.sh but processes created will be by owner of 
>the tomcat files?

Just create a init-like script that calls the startup.sh using 'su'. The
line would read something like: 'su tomcat -c "/path/to/startup.sh".
Then, you can run the init script as root and, well, use it as an init
script!

Ben Ricker
Wellinx.com

> On Wed, Jan 01, 2003 at 02:21:47AM +0530, karthikeyan.balasubramanian wrote:
> > Hi can you tell what are all the steps you followed.
> > 
> > Would be helpful for me in future when i do this.
> > 
> > karthikeyan.
> > - Original Message -
> > From: "waimun" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 31, 2002 8:41 AM
> > Subject: Re: running tomcat as a non-root user?
> > 
> > 
> > >
> > > Thanks to all those who responded; John, Mike, Jerry, Ben, Noel. Yes, I
> > got it working.
> > >
> > > Season greetings.
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Ben Ricker <[EMAIL PROTECTED]>
Wellinx.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how to get meaningful exception in JSP error page

2003-01-02 Thread Brian W. Young
Happy New Year,

I'm using the errorPage="my_own_error.jsp" technique.

However, the "exception" object in my_own_error.jsp gives me the only 
the Jasper stack trace.  It doesn't include info on what part of my own 
code bombed.  I've tried getCause() on exception but it isn't yielding much.

I basically want the bottom most part of the trace that tomcat shows on 
its own interal error page (the one you get before you use the errorPage 
directive)

Thanks for your pointers.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Problem with startup

2003-01-02 Thread seemanto
hi

i am new to tomcat. The problem is i am not able to startup the server and 
it is exiting with an exception which says : Error loading server.xml.
I haven't touched server.xml after installation. what could be the problem.

bye


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JasperException

2003-01-02 Thread Denise Mangano
I'm having a hard time figuring out what's causing this error so I thought
I'd post it to see if anyone has any ideas... 

When my form page is called, I pass two variables in the URL.  These two
variables are hidden within the form page.  I need to maintain the value of
these two variables, along with what the user inputs into the form.  I am
assuming the Java Bean can still see these since they have  tags.
This transactionid is one of the variables.  This error occurs during form
validation, if the user needs to retry entering a field.  The code in Retry
is 

Thanks :)

exception 
org.apache.jasper.JasperException:
com.complusdata.beans.FormBean.getTransactionID()Ljava/lang/String;
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:356)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
at
org.apache.jsp.FormValidate_jsp._jspService(FormValidate_jsp.java:75)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

javax.servlet.ServletException:
com.complusdata.beans.FormBean.getTransactionID()Ljava/lang/String;
at
org.apache.jasper.runt

RE: Two instances of servlet gets created

2003-01-02 Thread Gavin, Rick
I have also been seeing this, I think since I have upgraded 
from 4.1.12.  I have a startup servlet that creates a 
singleton object i use for system properties, and it calls
the createInstance of the singleton twice at startup now.

Rick

-Original Message-
From: Mohit Garg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 3:52 AM
To: Tomcat Users List
Subject: Two instances of servlet gets created


I have startup servlet for which one instance is created as soon as my
tomcat starts. But on the first request to the servlet there is another
instance created. i.e Another time init() is called for the servlet.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JK2/tomcat 4.1.18 - broken pipe problem

2003-01-02 Thread Venkat Reddy Valluri
Even I too got the same problem with configuraion of apache 2.0.40, tomcat 4.0.4 and  
j2sdk1.4.1(sun jvm) on redhat 7.3
 but when I replaced sun jvm with ibm jvm, surprisingly I didn't get this problem, 
I am not sure here but what I thought is sun jvm   can't support green threads on 
redhat linux but supports only native threads where as ibm jvm can support green 
threads on linux machines

Thks,
-Venkat

 

  
 


-Original Message-
From:   Jesper Birch [mailto:[EMAIL PROTECTED]]
Sent:   Thu 1/2/2003 6:01 AM
To: [EMAIL PROTECTED]
Cc: 
Subject:JK2/tomcat 4.1.18 - broken pipe problem
Hi, 

I have setup a environment with Apache 2.0.43, Tomcat 4.1.18 and JK2
connector. 

Everything seems to work fine, except an error message I get time to
time in my logs: 

2003-01-02 05:55:56,681 [Thread-49] ERROR
org.apache.jk.server.JkCoyoteHandler - Error in action code 
java.net.SocketException: Broken pipe   at
java.net.SocketOutputStream.socketWrite0(Native Method)  at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)  at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)   at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:435)  at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:627)at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)at 
org.apache.coyote.Response.action(Response.java:222) at 
org.apache.coyote.Response.finish(Response.java:343) at 
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)  at 
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:500) 
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)  at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)  at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590) at 
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)  at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)   
at java.lang.Thread.run(Thread.java:536) 

 

It does not seems like the users on my site has any problems when it
appears. So I am not sure when exactly this is happening. 

Can somebody explain for me the condition for when this should happen -
so I can look into this error, or maybe somebody has an idea to what the
problem can be ?! Or it should be in that way ?! :-)

Thanks

Jesper Birch


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





<>--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Time Out

2003-01-02 Thread Richard Johnstone
Hi,

I have just built a new webserver and I am having a strange problem.
The first few times I try to call a servlet it times out.
Then eventually it will just call as normal and run ok.
Then when I leave it for a while and come back I get the same issue.
I looked in the logs and this was the only thing I could see that
seemed to be an error.
All the example servlets run fine and straight away.

2003-01-02 14:31:15 HttpProcessor[8080][4] process.finish
java.lang.IllegalStateException: Current state = FLUSHED, new state =
CODING_END
at
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933)
at
java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
at
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356)
at
sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:412)
at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
at
java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
at java.io.PrintWriter.close(PrintWriter.java:137)
at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:482)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:237)
at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:287)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1054)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)

The information contained in this communication is intended solely for the use of the 
individual or entity to whom it is addressed and others authorized to receive it.  It 
may contain confidential or legally privileged information.  If you are not the 
intended recipient you are hereby notified that any disclosure, copying, distribution 
or taking any action in reliance on the contents of this information is strictly 
prohibited and may be unlawful. If you received this communication in error, please 
notify us immediately by responding to this email and then delete it from your system.
Appleyard Finance Holdings Ltd or its subsidiaries are neither liable for the proper 
and complete transmission of the information contained in this communication nor for 
any delay in its receipt.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


  1   2   >