Help on Clustering Tomcat 5.5.12 on Fedora Core 4

2005-12-04 Thread Kim Brianne Go
Good Day,  I am trying to make the clustering configuration work.  Based on
the documentation for basic cluster setup, I can just remove the comment
from server.xml.  When I did this... Tomcat Started... btw.. I am using 2
Linux Boxes (Fedora Core 4) somehow even if both tomcat started, they dont
replicate session information.  If I understand it correctly, it should have
replicated information across tomcat servers and if one went down the other
server will assume the dropped server and maintain session information.  Can
anyone give an idea how to start with clustering.

Specs:

2 Linux Boxes
2 Tomcat Servers
1 Apache 2
Java 1.5
1 network
with private address 192.x.x.x / 255.255.255.0

--
Brian <[EMAIL PROTECTED]>


HP -UNIX JDK1.2 /TOMCAT 41

2005-12-04 Thread Karthik

Hi Form

 Our development Env is as below

O/s=  Win2000
JDK  = 1.4.1
 TOMCAT =1 4.1.27
 RAM=  1 GB
 ORACLE = 9i
 LOAD on the DB is 150 tx /sec


   Our Production Env is as below

O/s=  HP-UNIX
JRE  = 1.2.2..10
TOMCAT =1 4.1.27
RAM=  1.5 GB
ORACLE = 9i
LOAD on the DB is 700 tx /sec

   In both cases the DB is installed on same server.


  Problems

 1) The Tomcat Hangs for some times in production Server but not for the
same in  Develoment Servrer

 2) Are there any  imcompatabilities  for between the  S/w 's  Installed
between the 2 servers


===
java.lang.IllegalStateException: Cannot create a session after the response
has been committed
at
org.apache.coyote.tomcat4.CoyoteRequest.doGetSession(CoyoteRequest.java:1884
)
at
org.apache.coyote.tomcat4.CoyoteRequest.getSession(CoyoteRequest.java:1731)
at
org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade
.java:365)
at
org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade
.java:370)
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr
apper.java:268)
at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1
38)
at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:11
4)
at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryIm
pl.java:175)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:
154)
at
org.apache.jsp.ErrorPageClose_jsp._jspService(ErrorPageClose_jsp.java:34)
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
10)
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.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:503)
at 
org.apache.jsp.UserHomePage_jsp._jspService(UserHomePage_jsp.java:388)
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
10)
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:256)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:494)
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.StandardContext.invoke(StandardContext.java:2416)
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:171)
at
org.apache.catali

RE: SSL InvalidKeystore Format?

2005-12-04 Thread Nate Rock
I think the issue Scott is getting caught up on is the same issue I have
been having for the last week:

Using APR + SSL with anything but a self signed certificate isn't
clearly defined as of yet.

Scott, my recommendation to you at this point is to uninstall tomcat,
and then reinstall it making sure to NOT check the "native" checkbox
when given installation options. This will install tomcat without the
APR connector and the steps listed on Verisign (and on the tomcat site)
using java keytores will work fine.

I know Carl and Dhaval have been giving awesome information about how to
generate csrs/keystores etc. but none of us (including me) has a rock
solid example using an actual verisign certificate that they have set up
and have running right now in production using APR. (Remy?) I think that
using OpenSSL for generating the private key/csr will end up being the
"way it's done" because of the difference between RSA and PKCS8 private
key encodings. (OpenSSL vs java keystore default encodings)

If any of you have actually used a verisign (NOT a self signed OpenSSL
certificate from
http://www.fatofthelan.com/articles/articles.php?pid=12.) with APR+SSL
please post the exact steps you used from generating the primary key/csr
file down to the connector you used. We would also like to know exactly
what encoding the primary key/cert is in because as I found out this
week, PEM is different if you are using OpenSSL vs JSSE. =P

I will be getting a verisign certificate early this week to try out some
things I discovered over the weekend involving some un-documented APR
params that are part of mod_ssl that may be the missing link
(SSLCACertificateFile attribute ;).

I think part of the issue with APR + verisign certificates is the
location for the trusted CA certificates. How does one point the APR
connector so that it trusts the verisign root CA cert(s) (the APR
doesn't use the cacerts java keystore... Where is it getting it's list
of trusted CAs?) The mod_ssl doc points to the attribute
SSLCACertificateFile for giving it a list of trusted CAs.

http://httpd.apache.org/docs/2.0/mod/mod_ssl.html#sslcacertificatefile

But it's not listed on the APR page under the SSL section. After
checking out the source code, it looks like this attribute is
"supported" just not documented so I decided to try it out using my self
signed certificate as the CA certificate.

Using my self-signed server.crt, I copied it and renamed it to ca.crt
(it can be it's own ca, since it's self signed ;)



No errors were thrown and I was indeed prompted for a client
certificate. I can experiment with this a bit more later on this week
but for now I am recommending to our company to hold off on the APR
connector under windows until the APR+SSL thing is ironed out a bit
more.

Guess I get to go uninstall/re-install tomcat(without the APR connector)
on our test server bright and early tommorrow morning. Thanks to Carl,
Dhaval and Remey for all their input this week... I know I have learned
a lot and have hopefully thrown out some something informative. I know
we can get it figured out, I just have a few other projects I put off
towards the end of last week that need to get done before wed but I will
still try to monitor the SSL threads.

   -rOcK



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



Re: Anyone tried mixing Jk2 & Php resources within the same virtual host ?

2005-12-04 Thread hv @ Fashion Content
Ok, thanks.

Guess I will have to work until I upgrade the server to Fedora Core 4.

"Bill Barker" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
>
> "hv @ Fashion Content" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>> It could be that I just need to fix my httpd.conf, but I am a bit stuck.
>>
>> I basicly have a virtualhost like this:
>>
>> DocumentRoot /var/www/site1
>> 
>> Allow from all
>> 
>>
>> 
>> JkUriSet worker ajp13:localhost:8009
>> 
>>
>> I want all requests to /ldapadmin.* to be served by apache+php and the 
>> rest to be served by tomcat, but somehow they all seem to be passed to 
>> tomcat.
>>
>
> I don't think you can do this with mod_jk2.  You would need mod_jk for 
> this:
>  JkMount !/ldapadmin/* worker
>
>> Henrik 




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



Re: Verisign Certificate Still Giving Me Troubles:

2005-12-04 Thread Bill Barker

"Scott Purcell" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Thanks Bill for the info.
>
> Verisign gave me a cert.cer file. So I am not sure how to handle this. My
> connector currently is this:
> 
>   
>  // here is what I am working with that is currently commented out
> // I was able to add the cert to the keystore using  this:
>
> keytool -import -alias  -keystore
>  -trustcacerts -file 
>
>   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>   enableLookups="false" disableUploadTimeout="true"
>   acceptCount="100" scheme="https" secure="true"
>   clientAuth="false" sslProtocol="TLS" />
>
> // but this is the one that is working using openSSL and the certificate
> made from the below link:
> maxThreads="15" minSpareThreads="25"
> maxSpareThreads="75"
> enableLookups="false" disableUploadTimeout="true"
> scheme="https" secure="true"
> SSLEngine="on"
> SSLCertificateFile="C:\Tomcat\bin\server.crt"
> SSLCertificateKeyFile="C:\Tomcat\bin\server.key" />
>
> I am getting messed up because I am not sure what is the private key and
> what is the public key as I am reading.
> Verisign made me create a "keystore", then a "csr" file which I posted to
> them, and then I received a "cert.cer" file back.

Ok, then your private key is living in the keystore file that you created. 
This strongly suggests that you should give up on the APR Connector (on 
Windows, the performance improvement is minimal from all of the benchmarks 
I've seen posted on [EMAIL PROTECTED]).  If you want to go this route, then 
rename 
the tcnative-1.dll file in $CATALINA_HOME/bin to anything else.  Then if you 
imported your Verisign cert into the same keystore that you used to create 
the CSR (and imported the int-cert as well, for good measure :), you should 
be good to go using keystoreFile="c:\path\to\keystore\file"

If you want to continue with APR, then you'll have to write a Java program 
that loads the keystore file, calls getKey(...).getEncoded(), base64 encodes 
it, and writes it to another file.  You can see now why I'm recommeding 
using the Java Connector ;-).

> Originally I tried just doing this:
>   keystoreFile="C:/Tomcat/bin/uniqueKeystore"
>  keystorePass="unique10"
>  truststoreFile="C:/Tomcat/bin/cert.cer"
>   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>   enableLookups="true" disableUploadTimeout="true"
>   acceptCount="100" scheme="https" secure="true"
>   clientAuth="true" sslProtocol="TLS" />
>
> But it hung and never responded. That is when I tried doing the example 
> from
> the openssl notes.
>
> ?Thanks
> Scott
>
>
> - Original Message -
> From: "Bill Barker" <[EMAIL PROTECTED]>
> To: 
> Sent: Saturday, December 03, 2005 6:09 PM
> Subject: Re: Verisign Certificate Still Giving Me Troubles:
>
>
>> Well, firstly, Verisign should have given you a cert.crt file :).
>>
>> Verisign uses an intermediate cert to sign with (available from their
> site).
>> Based on configuring mod_ssl I'm guessing that you need to download it 
>> and
>> set:
>>   SSLCertificateChainFile="/path/to/int/cert.crt"
>> in your  element.
>>
>> From the previous threads, I'm assuming that you are still using the APR
>> connector.  If you are using the Java connector, then simply import the
>> intermediate cert into your keystore (and ignore the above).
>>
>> "Scott Purcell" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>
>>
>>
>> Hello,
>>
>> A few people helped me out last week, to get simple SSL running. IN
>> particular Dhaval, Remy and Nate. Anyway, I have followed the directions
>> from here: http://www.fatofthelan.com/articles/articles.php?pid=12 
>> section
> 3
>> and all works well.
>>
>> So that means my tomcat is all configured and happy.
>>
>> But this was a "generic" certificate. I gave Verisign a certreq.csr file
> and
>> they gave me a certificate last week and it was called cert.cer.
>>
>> I cannot for the life of me figure out how to get the certreq.csr 
>> working?
>>
>> I have been following these steps here:
>>  Based upon my knowledge,to incorporate Verisign certificate, steps are 
>> as
>> follows:
>> (Derived from http://www.fatofthelan.com/articles/articles.php?pid=12 )
>> (1) openssl req -new -out server.csr (This will generate csr and private
>> key. Make sure you feel
>> the values correctly on openssl command prompt. )
>> (2) openssl rsa -in privkey.pem -out server.key (This removes the
> passphrase
>> from the private key.
>> Also delete generated .rnd file)
>> (3) Here there are two (either or) possibilities:
>>
>>
>> But honestly do not know where to substitute my "certreq.csr" that
> verisign
>> gave me in this equation.
>>
>> Regards
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED] 

Re: Apache Portable Runtime

2005-12-04 Thread M A
Has this problem also you need to include the library path in the start up
to catalina i.e. it becomes part of the command ..

so something like -Djava.library.path=<>

That should do it ..




On 12/4/05, Robert Palmer <[EMAIL PROTECTED]> wrote:
>
> I tried this. Should libtcnative-1.so be in $CATALINA_HOME/bin? 'make'
> put it in .libs and I tried moving it. I also
> downloaded 5.5.13 which results in the same message.
>
> Thanks.
>
> Bill Barker wrote:
>
> >"Robert Palmer" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >
> >
> >>Is this something that I should worry about? Is it easily resolved? I
> have
> >>downloaded and installled Apache Portable Runtiime. It did not install
> in
> >>the Java path though?
> >>
> >>
> >>
> >
> >The message has been fixed in 5.5.13.  What Tomcat is really looking for
> is
> >libtcnative-1.so.  To get that, you unpack tomcat-native.tar.gz (in
> >$CATALINA_HOME/bin), then cd to the directory.  From there do:
> > $ ./configure --with-apr=/path/to/apr --with-ssl=/path/to/OpenSSL
> > $ make
> > $ cp libtcnative-1.so ..
> >
> >
> >
> >>Thanks
> >>
> >>Using CATALINA_BASE:   /usr/local/tomcat
> >>Using CATALINA_HOME:   /usr/local/tomcat
> >>Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> >>Using JRE_HOME:   /opt/jdk1.5.0_04/
> >>Dec 2, 2005 5:20:25 PM org.apache.catalina.core.AprLifecycleListener
> >>lifecycleEvent
> >>INFO: The Apache Portable Runtime which allows optimal performance in
> >>production environments
> >>was not found on the java.library.path:
> >>/opt/jdk1.5.0_04/jre/lib/i386/client:/opt/jdk1.5.0_0
> >>4/jre/lib/i386:/opt/jdk1.5.0_04/jre/../lib/i386
> >>Dec 2, 2005 5:20:25 PM org.apache.coyote.http11.Http11BaseProtocol init
> >>INFO: Initializing Coyote HTTP/1.1 on http-8080
> >>Dec 2, 2005 5:20:25 PM org.apache.catalina.startup.Catalina load
> >>INFO: Initialization processed in 2370 ms
> >>Dec 2, 2005 5:20:26 PM org.apache.catalina.core.StandardService start
> >>INFO: Starting service Catalina
> >>Dec 2, 2005 5:20:26 PM org.apache.catalina.core.StandardEngine start
> >>INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
> >>Dec 2, 2005 5:20:26 PM org.apache
> >>
> >>
> >
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>


Re: Anyone tried mixing Jk2 & Php resources within the same virtual host ?

2005-12-04 Thread Bill Barker

"hv @ Fashion Content" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> It could be that I just need to fix my httpd.conf, but I am a bit stuck.
>
> I basicly have a virtualhost like this:
>
> DocumentRoot /var/www/site1
> 
> Allow from all
> 
>
> 
> JkUriSet worker ajp13:localhost:8009
> 
>
> I want all requests to /ldapadmin.* to be served by apache+php and the 
> rest to be served by tomcat, but somehow they all seem to be passed to 
> tomcat.
>

I don't think you can do this with mod_jk2.  You would need mod_jk for this:
  JkMount !/ldapadmin/* worker

> Henrik 




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



Re: Jsvc Debian Tomcat standalone APR connector startup question

2005-12-04 Thread Bill Barker
No.  The root one stays, but doesn't do anything except to wait for the 
shutdown signal.  That way, you need to be root to shutdown.

"M A" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hi,

I am trying to set up a production server setup is as follows

1. JSVC (commons-daemon)
2. jdk1.5.0_05
3. tomcat 5.5.12
4. Apr (latest stable).
5. Debian sarge


The problem is this, I am using jsvc to start up tomcat as per the
Tomcat5.sh
script, problem is this, Tomcat starts ok, port 80 and 443 all work however
when i
check the processes running there is a jsvc process owned by root, running.

Is this normal, isnt that process supposed to disappear.

ps -F -e output is  shown below.

root   26410 1  00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641126410   00:00:04 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641226411   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641326412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641426412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641526412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641626412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -

Does anyone have any ideas on how to get rid of the root process, isnt it
supposed to
disappear.

Cheers

Mo




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



Re: NullPointer Exception in HostConfig

2005-12-04 Thread hv @ Fashion Content
For anyone unfortunate enough to get the same NullPointerException, what 
seems to happen is the following:

In Tomcat 5.5.9 if an exception is thrown in ServletFilter.init it may not 
produce any logging output of any sort.
In this case I use Spring which tends to be pretty good at reporting errors, 
so I suspect that it is more severe than a lack of logging statements.
I didn't get any logged exceptions under 5.5.9, but under 5.5.12 I did.

"hv @ Fashion Content" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
>I have xerxesImpl and xml-apis in tomcat/common/endorsed
>
> might that be causing some trouble?
>
> Upgraded to 5.5.12 but the config failure persists
>
> "hv @ Fashion Content" <[EMAIL PROTECTED]> skrev i en meddelelse 
> news:[EMAIL PROTECTED]
>> The error information on context.xml parsing is very sparse to say the 
>> least...
>>
>> SEVERE: Error deploying configuration descriptor ROOT.xml
>> java.lang.NullPointerException
>>at 
>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:574)
>>at 
>> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
>>at 
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
>>at 
>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
>>at 
>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>>at 
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>at 
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>>at 
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>>at 
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>>at 
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>>at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>>at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
>>at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>at java.lang.reflect.Method.invoke(Method.java:585)
>>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
>>
>> As I have 3 different hosts defined, I am not sure which one it refers 
>> to. It seems though that all three fail with this message. Even so the 
>> third seems to be working fine, while the other two are not.
>>
>> This is the content of one of them
>> >   path="" docBase="ROOT" reloadable="true">
>> 
>>   >  directory="logs"  prefix="blingon_test_log." 
>> suffix=".txt"
>>  pattern="common" resolveHosts="false"/>
>>
>> Any ideas as to what makes HostConfig fail ? I assume it is a parsing 
>> error, but since there is no logging statement in line 566, I don't know 
>> which. 




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



Re: Integrating tomcat 5.5.9 w/ Apache 2.0.54 --- which mod_jk

2005-12-04 Thread Seak, Teng-Fong
George Sexton wrote:

>Mod_jk2 is deprecated (at least it was a month ago). Use mod_jk.
>  
>
It's quite funny to notice that a deprecated stuff is called mod_jk2
while a newer one is called mod_jk :)

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



Re: Apache Portable Runtime

2005-12-04 Thread Robert Palmer
I tried this. Should libtcnative-1.so be in $CATALINA_HOME/bin? 'make' 
put it in .libs and I tried moving it. I also

downloaded 5.5.13 which results in the same message.

Thanks.

Bill Barker wrote:

"Robert Palmer" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
 

Is this something that I should worry about? Is it easily resolved? I have 
downloaded and installled Apache Portable Runtiime. It did not install in 
the Java path though?


   



The message has been fixed in 5.5.13.  What Tomcat is really looking for is 
libtcnative-1.so.  To get that, you unpack tomcat-native.tar.gz (in 
$CATALINA_HOME/bin), then cd to the directory.  From there do:

$ ./configure --with-apr=/path/to/apr --with-ssl=/path/to/OpenSSL
$ make
$ cp libtcnative-1.so ..

 


Thanks

Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:   /opt/jdk1.5.0_04/
Dec 2, 2005 5:20:25 PM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in 
production environments
was not found on the java.library.path: 
/opt/jdk1.5.0_04/jre/lib/i386/client:/opt/jdk1.5.0_0

4/jre/lib/i386:/opt/jdk1.5.0_04/jre/../lib/i386
Dec 2, 2005 5:20:25 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 2, 2005 5:20:25 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2370 ms
Dec 2, 2005 5:20:26 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 2, 2005 5:20:26 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
Dec 2, 2005 5:20:26 PM org.apache 
   






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

 



Anyone tried mixing Jk2 & Php resources within the same virtual host ?

2005-12-04 Thread hv @ Fashion Content
It could be that I just need to fix my httpd.conf, but I am a bit stuck.

I basicly have a virtualhost like this:

DocumentRoot /var/www/site1

Allow from all



JkUriSet worker ajp13:localhost:8009


I want all requests to /ldapadmin.* to be served by apache+php and the rest 
to be served by tomcat, but somehow they all seem to be passed to tomcat.

Henrik 




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



Deploying new virtual hosts

2005-12-04 Thread Terence M. Bandoian
Hi-

I'd suggest searching the Internet for "web hosting control panel". 
You'll likely need to sort through the features provided and select
according to the requirements of your project.  As you might imagine,
support is included, sometimes optionally, for a wide range of services
including Tomcat.

-Terence M. Bandoian

>Can you recommend a commercial hosting application that would manage tomcat
>and meet my needs?
>
>George Sexton
>MH Software, Inc.
>http://www.mhsoftware.com/
>Voice: 303 438 9585
>

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



Jsvc Debian Tomcat standalone APR connector startup question

2005-12-04 Thread M A
Hi,

I am trying to set up a production server setup is as follows

1. JSVC (commons-daemon)
2. jdk1.5.0_05
3. tomcat 5.5.12
4. Apr (latest stable).
5. Debian sarge


The problem is this, I am using jsvc to start up tomcat as per the
Tomcat5.sh
script, problem is this, Tomcat starts ok, port 80 and 443 all work however
when i
check the processes running there is a jsvc process owned by root, running.

Is this normal, isnt that process supposed to disappear.

ps -F -e output is  shown below.

root   26410 1  00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641126410   00:00:04 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641226411   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641326412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641426412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641526412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -
tomcat   2641626412   00:00:00 jsvc.exec -user tomcat -home
/usr/local/jdk1.5.0_05 -

Does anyone have any ideas on how to get rid of the root process, isnt it
supposed to
disappear.

Cheers

Mo


RE: Integrating tomcat 5.5.9 w/ Apache 2.0.54 --- which mod_jk

2005-12-04 Thread George Sexton
Mod_jk2 is deprecated (at least it was a month ago). Use mod_jk.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Kyle [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, December 03, 2005 9:54 PM
> To: TomCat
> Subject: Integrating tomcat 5.5.9 w/ Apache 2.0.54 --- which mod_jk
> 
> 
> Hi folks,
> 
> Can I still use (reliably and stable[y] ) mod_jk  1.2.14.1 when 
> integrating TC 5.5.9 with Apache 2?
> 
> Or am I going to be forced to use mod_jk2?
> 
> 
> MTiA
> 
> Kyle
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



RE: Re: NullPointer Exception in HostConfig

2005-12-04 Thread Caldarale, Charles R
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of hv @ 
> Fashion Content
> Subject: Re: NullPointer Exception in HostConfig
> 
> I have xerxesImpl and xml-apis in tomcat/common/endorsed
> might that be causing some trouble?

They are the 1.4 compatibility package, and must be there if you're
running on a 1.4 JRE/JDK.  If you're on 1.5, they must be removed, since
they're part of the 1.5 JRE.  You could experience classloader conflicts
if those are present in a 1.5 environment.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: SSL InvalidKeystore Format?

2005-12-04 Thread Carl Olivier
Greetings.

Not sure if this will help, but I spent a lot of time fighting with
certificates for use with Tomcat - from CSRs to issued certificates from the
CAs - as well as using PFX files as exported from other webservers etc..

I have however got it working great, and thought to give you my steps,
commands, and pointers - hopefully they will assist!

Scenario 1:  CSR with issued Cert from CA

1.  Generate the CSR.

Important - generating the CSR requires a private key (which resides in the
keystore used for the generation) to be present when importing the actual
certificate from the CA (in response to the CSR).  Thus I have a number of
different keystores I use.  

Generate the Private Key I will be using to generate the CSR (using my
'privatestore' keystore):

"keytool -genkey -keyalg RSA -dname cn=www.site.com ou=My Deptartment o=My
Company l=My City s=My province c=GBR -alias certrequest -keypass mypasswd
-keystore /ssl/privatestore -storepass mystorepwd -validity 365"

This generates the private key, and generates the CSR ready for extraction
to be submitted to the CA.

I use the following code snippet to extract the private key - bearing in
mind that I will be wanting to use the private key later when I wish to
import the public key (cert) as returned by the CA.  Useful to note that I
create a keystore per connector (per site) for use in Tomcat.

=== code snippet ===

//this first snippet extracts the private key - as I wish to
persist it in Base64 encoding
//for use when I import the certificate later
//I resuse this keystore for private key/CSR generation 

//load the privatestore keystore used for privatekey/CSR
generation
File workingkeystore = new File( "/ssl/privatestore" );
KeyStore workingStore = KeyStore.getInstance( "JKS" );
workingStore.load( new FileInputStream( workingkeystore ),
"mystorepwd".toCharArray() );

//extract the keypair (private key is what we want)
KeyPair kp = getPrivateKey( workingStore, "certrequest",
"mypasswd".toCharArray() );
PrivateKey pkey = kp.getPrivate();
//get the private key binary
byte[] binary = pkey.getEncoded();
//base64 encoder - in package sun.misc
BASE64Encoder myB64 = new BASE64Encoder();
//encode the private key binary as a Base64 string
String b64 = myB64.encode( binary );

//persist the private key for later use
PrintWriter out = new PrintWriter( new FileWriter( new
File("/ssl/privatekeys/www.mysite.com.pkey") ) );

try
{
out.println( "-BEGIN PRIVATE KEY-" );
out.println( b64 );
out.println( "-END PRIVATE KEY-" );
}
finally
{
out.close();
}

=== end snippet ===

Now I use the keytool to generate the CSR with the private key generated
above (note I use the same alias I used when generating the private key to
ensure correct processing).  Note that this will generate the Base64
representation of the CSR to the specified location using the -file switch.

"keytool -certreq -file /ssl/csrs/www.site.com.csr -alias certrequest
-keypass mypasswd -keystore /ssl/privatestore -storepass mystorepwd"

The Base64 string which is the contents of the CSR above can then be
submitted to the CA.  Be sure to keep the private key generated for use when
importing the CA issued certificate.  I will now go over how I go about
importing/setting up the actual certificate keystore for use with Tomcat:

Using a Base64 String representation of the Certificate returned by the CA:

Before I run the code below however I run the Private Key we generated to
create the CSR through the openssl to get it into the correct format -
namely pkcs8 (DER) format using the openssl command as follows:

"openssl pkcs8 -topk8 -nocrypt -in /ssl/privatekeys/www.mysite.com.pkey -out
/ssl/temp/www.mysite.com.tempkey -outform der"

=== code snippet ===

//first create the keystore we will be using for the cert
//the actual keystore file path - ensure this does not exist
String keyFilePath =
"/ssl/keystores/www.mysite.com.keystore";
KeyStore ks;
try {
ks = KeyStore.getInstance("JKS", "SUN");
ks.load( null, "mypasswd".toCharArray() );
ks.store(new FileOutputStream ( new
File(keyFilePath)  ), "mypasswd".toCharArray());
} catch (Exception e) {
//handle as you require
throw new RuntimeException("Failed to create new
Keysto

Re: SSL InvalidKeystore Format?

2005-12-04 Thread Dhaval Patel
Hi Scott,

Let me start from beginning so that it will be easy for you to understand 
everything by reading
this email only.

Enviroment:
Tomcat 5.5.12
J2SE 1.5.x


Overview:

(1) Generate key and certificate request (csr).
(2) Submit csr (and may be key) to Verisign or Thawte to get signed 
certificate. If you dont want
to use paid service, then you have to use self-signed certificate. This is 
either-or ways. You
dont need to generate self-signed certificate if you get one from Verisign or 
Thawte. After this
step, you have key and certificate (either selfsigned or Versign-signed) with 
you. 
(3) Configure tomcat according to key and certificate that you have.
(4) Restart the tomcat and SSL is enabled. Test it.
(5) Read the documentation for more configuration option or how to use SSL in 
your webapplication.


Explanation:

  There are two ways of configuring SSL with Tomcat:
(1) Using JSSE (which is included in J2SE 1.4 or higher.
  In this method, you have to generate key and certificate request (csr) using 
keytool which is
provied by J2SE. After you have generated certificate request, you have to 
submit that csr to
Verisign or Thawte for real signed certificate. Then you have to use that 
certificate in your
Tomcat SSL configuration. I will mention how to configure tomcat using later in 
this email.
  Based upon my understanding, this is good for testing purpose. For production 
environment, you
need something more stable and secure. That's when OpenSSL comes in.
  Also if you want to use JSSE, you can't able to use APR (Apache Portable 
Runtime) with your
Tomcat 5.5.12 because APR uses OpenSSL to provide SSL service.
(2) Using OpenSSL
  Here you have to use SSL to generate key and csr. Again you have to submit it 
to Verisign or
Thawte to get signed certificate or you can generate self-sign certificate 
using OpenSSL too.
  This option is more secure then JSSE and it is preferrable in production 
environment. It is not
difficult to configure. 
  Using this option, you can use APR but for that you need OpenSSL and other 
libraries. It is not
difficult but few more steps, which we will see later in this email.



  I believe that you generated key and csr using JSSE (keytool). Then you have 
submitted that csr
to Verisign. You got certificate from them. So this cerficate is actually 
generated using JSSE. It
means that you can't use this cerficate to configure Tomcat with APR. Also you 
can't mix above two
SSL opentions (ie. generate key/csr and obtained certificate from Verisign 
using JSSE and use it
in APR configuration).

  Now let's take alook at how to configure it using both ways.


Configuration:

(1) Using JSSE
  The configuration using JSSE is relatively easy. Follow Tomcat documentation 
page at
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html and you will be able to 
make it enable.
  One excellent link that I found on Tomcat mailing list is
http://marc.theaimsgroup.com/?l=tomcat-user&m=106293430225790&w=2 . It 
describes hybrid technique
of OpenSSL and JSSE to generate keystore.
  APR can NOT be used in this configuration. You must be thinking that if it 
uses OpenSSL why I
can't use APR. This document is very old (though it works) and when it was 
written there was not
any APR. So it does not reflact APR. Also this is hybrid technique to generate 
and self-sign
certificate. If you want to use APR, you have to use ONLY OpenSSL. There is no 
JSSE involved in
this process.

(2) Using OpenSSL (with APR)
  You already know the configuration but I am listing here one more time. Also 
this is standalone
tomcat configuration, no apache or mod_jk is involved.
(Derived from http://www.fatofthelan.com/articles/articles.php?pid=12 )
(a) openssl req -new -out server.csr (This will generate csr and private key. 
Make sure you feel
the values correctly on openssl command prompt.)
(b) openssl rsa -in privkey.pem -out server.key (This removes the passphrase 
from the private key.
Also delete generated .rnd file)
(c) Here there are two (either or) possibilities: 
   (i) save the key and submit this csr to Verisign. They will sign it and give 
you the final
certificate (.crt format may be). You may also need to give them key. (this is 
paid option but
mostly used in production environment)
   (ii) create self-signed certificate.
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
   (this is free but it can be used in production environment. You dont need to 
perform this step
if you have certificate from Versign)
(d) After step-(c) you have key and certificate. Now let's configure tomcat 
5.5.12. Download
openssl.exe and tcnative-1.dll from http://tomcat.heanet.ie/native/ . Make sure 
you select
appropriate windows platform. (32bit or 64 bit). Put those file in 
TOMCAT_HOME\bin.
(e)

Re: Session crash problem. Please help!

2005-12-04 Thread Alessandro Colantoni
Hi Martin.
Thanks for interest!.

I have tomcat 5.5.7 not running as service (I have it at work and now
I'm at home) and I don't have /logs/stderr.log (??).
Stdout is my MS-DOS windows and I don't think that's important.
I have a preprocessor that just checks if
request.getSession(false)==null or isnew() to redirect to the
expired-session page. So I don't get anything strange as everything go
as session was expired.
On linux (tomcat 5.5.12) I have  in logs folder the following:
catalina.out (I think it is stdout.log) localhost..log, 
manager..log, catalina..log, admin..log,
hostmanager..log
I think you need localhost..log. I don't see stderr.log
I can produce error on linux just tomorrow at work 'cause I have DB on
windows partition.
On tomcat on windows I don't know why I don't have stderr.log
My Tomcat-home/logs is empty. What have I to set to have it?
What should I look for in stderr.log??

Thanks a lot!
 Alessandro



On 12/2/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Allesandro
> can you attach the
> stderr_20051202.log
> stdout_20051202.log
> Ciao
> Martin-
> - Original Message -
> From: "Alessandro Colantoni" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, December 02, 2005 5:47 AM
> Subject: Session crash problem. Please help!
>
>
> Hi All
> I configured on conf/web.xml session timeout on 180 minutes and on my
> web.xml too.
> I have the following context.xml
>  relodable="false" crossContext="false" privileged="true" debug="99">
>
>
>debug="0"
>checkInterval="60"
>
> entropy="asdfghjklASDFGHJKLwefgbnmASDFGHJKLwedfgbhnxcvfghjukifgbhn"
>maxActiveSessions="-1"
>pathname =""
>maxInactiveInterval="-1">
>
> debug="99"
> pathname="webapps/trayectorias/WEB-INF/classes/resources/trayectorias-users.xml"/>
>
> 
>
> session crash very often.
> it crashes while working too, without leaving any inactivity as well
>
> I tried with tomcat 4.1, 5.5.5, 5.5.7,5.5.12 on windows  xp and  on linux
> I tried with session.PersistentManager too.
>
> I'm working with struts and problem deals when I deal with a big
> object in session
> I though it was an heap size problem.
> I allocated 500m to the heap and I noticed it crashed when tomcat had 400M
> free.
> Session get destroyed without any apparent reason so user is just trowed out
>
> I've been dealing with this for 2 months, and it looks as just me I
> have this problem.
> So probably I'm doing some stupid thing, but I can't get it
>
> Please help
>
> Thanks for attention
>
>  Alessandro!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



/

2005-12-04 Thread Martin Gainty
Hello All

This is intended for george sexton as he was having similar problems about a 
week ago
I have the following specification in a java web application which causes 
"error No mapping found for / "

 when it attempts to resolve context-root via this specification in 
application.xml


jmc-app.war

/





Any suggestions?

Thanks,
Martin-




Re: NullPointer Exception in HostConfig

2005-12-04 Thread hv @ Fashion Content
I have xerxesImpl and xml-apis in tomcat/common/endorsed

might that be causing some trouble?

Upgraded to 5.5.12 but the config failure persists

"hv @ Fashion Content" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
> The error information on context.xml parsing is very sparse to say the 
> least...
>
> SEVERE: Error deploying configuration descriptor ROOT.xml
> java.lang.NullPointerException
>at 
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:574)
>at 
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
>at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
>at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
>at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:585)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
>
> As I have 3 different hosts defined, I am not sure which one it refers to. 
> It seems though that all three fail with this message. Even so the third 
> seems to be working fine, while the other two are not.
>
> This is the content of one of them
>path="" docBase="ROOT" reloadable="true">
> 
> directory="logs"  prefix="blingon_test_log." 
> suffix=".txt"
>  pattern="common" resolveHosts="false"/>
>
> Any ideas as to what makes HostConfig fail ? I assume it is a parsing 
> error, but since there is no logging statement in line 566, I don't know 
> which. 




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



Re: tomcat 5.5.9 w/ Apache 2.0.54 --- 'className=' no longer needed????

2005-12-04 Thread Mark Thomas
Kyle wrote:
> Cheers Mark.
> 
> I do realise it's all community based and GOD knows how you all find the
> time you all do already;
> 
> But the docs really do get left well behind the reality sometimes.  And
> even when they do "appear" to be uptodate,
> they conflict with other info on tomcat.apache.org.

Point out the discrepancies, better yet file a bug report with a patch
to fix them, and someone will take a look. A lot of the problem, which
we have been trying to do something about where we can, is duplication.

> As a novice Open-Sourcer, it can be difficult to know where to look to
> whom to listen.

Very true. All I can really say is it gets easier with experience.

> Thanks again.

You're welcome.

Mark


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



Re: servet-dircetory

2005-12-04 Thread Sebastian Funk


On Dec 4, 2005, at 4:19 PM, Wendy Smoak wrote:


On 12/4/05, Sebastian Funk <[EMAIL PROTECTED]> wrote:


I've read a book about servlets called "Java Servlet Progamming".
This book says I can access all my servlets - additionally to that
what I declared in web.xml - via
http://tomcat-server:8080/servlet/myServlet
but I can't.
I get "404 Not Found". Why?


http://tomcat.apache.org/faq/misc.html#invoker

thanks for that.

Best regards,
Sebastian Funk

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



Re: servet-dircetory

2005-12-04 Thread Wendy Smoak
On 12/4/05, Sebastian Funk <[EMAIL PROTECTED]> wrote:

> I've read a book about servlets called "Java Servlet Progamming".
> This book says I can access all my servlets - additionally to that
> what I declared in web.xml - via
> http://tomcat-server:8080/servlet/myServlet
> but I can't.
> I get "404 Not Found". Why?

http://tomcat.apache.org/faq/misc.html#invoker

--
Wendy

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



servet-dircetory

2005-12-04 Thread Sebastian Funk

(Sorry if I sent this message twice, I didn't get the first one)
Hi,

I've read a book about servlets called "Java Servlet Progamming".  
This book says I can access all my servlets - additionally to that  
what I declared in web.xml - via

http://tomcat-server:8080/servlet/myServlet
but I can't.
I get "404 Not Found". Why?

Best Regards,
Sebastian


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



Re: Missing application web.xml

2005-12-04 Thread hv @ Fashion Content
I had the same experience.

Just to illustrate here is my build target, quite straightforward:


   
  

   

   

   
   

   
   
  
  
  
  
   

   
  
  
  
  
  
  
  
  
  
   

  
   



   
  
   
   
  
   
  

   


"Rob Hills" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
> Hi Henrik,
>
> On 4 Dec 2005 at 4:38, hv @ Fashion Content wrote:
>
>> > context.xml:
>> > 
>>
>> Where is this context.xml file located?  The docBase attribute must
>> not be used unless the  tag is inside server.xml or
>> conf/Catalina//.xml; the only time a file named
>> context.xml is valid is inside the META-INF directory of a webapp.
>>
>> it is in META-INF. Ok, so I tried to remove the docBase. Made no
>> difference whatsoever.
>
> Please excuse the brief digression into the Ant world, but it is about 
> building WAR files for Tomcat...
>
> Another gotcha I found when putting together my Ant war-build scripts is 
> that initially I just created a (working) web app on my
> development machine file system and then "zipped" that all up into a WAR 
> file using the Ant WAR task.  However, I discovered after
> much fiddling and googling that you can't just zip in the "special" 
> folders (WEB-INF, META-INF, WEB-INF/lib etc.) you have to exclude
> them from the files being zipped into the WAR file and then specify the 
> files to go into them via the   and 
> enclosed tags.
>
> Never worked out what structural difference this made to the WAR file, 
> since it looked the same as my previous ones when I unzipped it,
> but functionally it made the difference between it working and not working 
> with Tomcat (WRT auto-deploy anyway).
>
> Check your Ant documentation of the WAR task for details.
>
> HTH,
>
> Rob Hills
> MBBS, Grad Dip Com Stud, MACS
> Senior Consultant
> Netpaver Web Solutions
> Tel: (08) 9485 2555
> Mob: (0412) 904 357
> Fax: (08) 9485 2555 




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



Re: tomcat 5.5.9 w/ Apache 2.0.54 --- 'className=' no longer needed????

2005-12-04 Thread Kyle

Cheers Mark.

I do realise it's all community based and GOD knows how you all find the 
time you all do already;


But the docs really do get left well behind the reality sometimes.  And 
even when they do "appear" to be uptodate,

they conflict with other info on tomcat.apache.org.

As a novice Open-Sourcer, it can be difficult to know where to look to 
whom to listen.


Thanks again.

K



There was a big clean up on the connectors between 4.x and 5.x. A lot
of the old, deprecated connectors were removed including
org.apache.ajp.tomcat4.Ajp13Connector

The Coyote connector is now used for HTTP and AJP. As documented at
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html className is
no longer required. You are correct that you must specify AJP as the
protocol.

 




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



Tomcat 4.1 and J2SE SDK 1.4.1_07 hangs

2005-12-04 Thread R�kos Attila
Hi!

  I've installed Java SDK 1.4.1_07 and Tomcat 4.1.31 on a Win XP Prof
  SP 2. There were no problems during the install (I set JAVA_HOME to
  the Java SDK before installing Tomcat), but I cannot access any page
  through localhost:8080 (static, JSP or a servlet). If I try to look
  a page in the browser, the process simply hangs: the progress bar
  moves on slowly, but nothing happens (for even 10-20 minutes).
  I set also CATALINA_HOME to my Tomcat home directory (C:\Tomcat41).
  There are no other software listening on port 8080 (I tried also
  other ports, unfortunatelly with the same result).

  Before installing Java 1.4.1_07 and Tomcat 4.1.31 I had a J2SE SDK
  5.0 and Tomcat 5.0.28, and both worked perfectly. Even a Tomcat 4.1
  installed beside 5.0.28 was working properly. But I need a Tomcat
  4.1 and Java 1.4 (or even earlier) combo, because this is the target
  platform for one of my current developments.

  I read several installation guides on Tomcat, but I found nothing
  wrong in my installation steps. Do you have any suggestions
  concerning the proper launch?

Thank you in advance!

  Attila


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



Re: tomcat5 stop auto after started.

2005-12-04 Thread Mike Zang
> Have a look in your server.xml. Try replacing all instances of
> "org.apache.ajp.tomcat5.config.ApacheConfig" with
> "org.apache.jk.config.ApacheConfig"
I did it, but the result is same, tomcat5 stoped soon. 

by the way, I also got message as below both in two cases (original and
your suggestion):
Starting tomcat5: lock file found but no process running for pid 14744,
continuing
find: warning: you have specified the -mindepth option after a non-option
argument -type, but options are not positional (-mindepth affects tests
specified before it as well as those specified after it).  Please specify
options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option
argument -type, but options are not positional (-maxdepth affects tests
specified before it as well as those specified after it).  Please specify
options before other arguments.

Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME:   /usr/lib/jvm/java




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



Re: tomcat5 stop auto after started.

2005-12-04 Thread Mark Thomas
Have a look in your server.xml. Try replacing all instances of
"org.apache.ajp.tomcat5.config.ApacheConfig" with
"org.apache.jk.config.ApacheConfig"

HTH,

Mark

Mike Zang wrote:
>>Do you have some more logs to provide ?
> 
> Here is from catalina.out:
> Created MBeanServer with ID: [UID:
> 300464,1133693145747,-32768]:server1.zangland.com:1
> 4-Dec-05 7:46:11 PM org.apache.commons.digester.Digester
> startElement(java.lang.String, java.lang.String, java.lang.String,
> org.xml.sax.Attributes)
> SEVERE: Begin event threw exception
> Catalina.start using conf/server.xml: java.lang.ClassNotFoundException:
> org.apache.ajp.tomcat5.config.ApacheConfig
> java.lang.ClassNotFoundException:
> org.apache.ajp.tomcat5.config.ApacheConfig
>at
> org.apache.commons.digester.Digester.createSAXException(java.lang.String,
> java.lang.Exception) (/usr/lib/libjakarta-commons-digester-1.6.jar.so)
>at
> org.apache.commons.digester.Digester.createSAXException(java.lang.Exception)
> (/usr/lib/libjakarta-commons-digester-1.6.jar.so)
>at org.apache.commons.digester.Digester.startElement(java.lang.String,
> java.lang.String, java.lang.String, org.xml.sax.Attributes)
> (/usr/lib/libjakarta-commons-digester-1.6.jar.so)
>at
> org.apache.catalina.util.CatalinaDigester.startElement(java.lang.String,
> java.lang.String, java.lang.String, org.xml.sax.Attributes)
> (/usr/lib/libcatalina-5.0.30.jar.so)
>at
> org.apache.xerces.parsers.AbstractSAXParser.startElement(org.apache.xerces.xni.QName,
> org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(org.apache.xerces.xni.QName,
> org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement()
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(boolean)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(boolean)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at org.apache.xerces.parsers.XML11Configuration.parse(boolean)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.parsers.XML11Configuration.parse(org.apache.xerces.xni.parser.XMLInputSource)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.parsers.XMLParser.parse(org.apache.xerces.xni.parser.XMLInputSource)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at
> org.apache.xerces.parsers.AbstractSAXParser.parse(org.xml.sax.InputSource)
> (/usr/lib/libxerces-j2-2.6.2.jar.so)
>at org.apache.commons.digester.Digester.parse(org.xml.sax.InputSource)
> (/usr/lib/libjakarta-commons-digester-1.6.jar.so)
>at org.apache.catalina.startup.Catalina.load()
> (/usr/lib/libcatalina-5.0.30.jar.so)
>at org.apache.catalina.startup.Catalina.load(java.lang.String[])
> (/usr/lib/libcatalina-5.0.30.jar.so)
>at java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
> (/usr/lib/libgcj.so.6.0.0)
>at org.apache.catalina.startup.Bootstrap.load(java.lang.String[])
> (/usr/lib/libtomcat-bootstrap-5.0.30.jar.so)
>at org.apache.catalina.startup.Bootstrap.main(java.lang.String[])
> (/usr/lib/libtomcat-bootstrap-5.0.30.jar.so)
>at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
>at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
> 4-Dec-05 7:46:11 PM org.apache.commons.digester.Digester
> startElement(java.lang.String, java.lang.String, java.lang.String,
> org.xml.sax.Attributes)
> 
> Can you help me?
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



Re: tomcat5 stop auto after started.

2005-12-04 Thread Mike Zang
> Do you have some more logs to provide ?
Here is from catalina.out:
Created MBeanServer with ID: [UID:
300464,1133693145747,-32768]:server1.zangland.com:1
4-Dec-05 7:46:11 PM org.apache.commons.digester.Digester
startElement(java.lang.String, java.lang.String, java.lang.String,
org.xml.sax.Attributes)
SEVERE: Begin event threw exception
Catalina.start using conf/server.xml: java.lang.ClassNotFoundException:
org.apache.ajp.tomcat5.config.ApacheConfig
java.lang.ClassNotFoundException:
org.apache.ajp.tomcat5.config.ApacheConfig
   at
org.apache.commons.digester.Digester.createSAXException(java.lang.String,
java.lang.Exception) (/usr/lib/libjakarta-commons-digester-1.6.jar.so)
   at
org.apache.commons.digester.Digester.createSAXException(java.lang.Exception)
(/usr/lib/libjakarta-commons-digester-1.6.jar.so)
   at org.apache.commons.digester.Digester.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
(/usr/lib/libjakarta-commons-digester-1.6.jar.so)
   at
org.apache.catalina.util.CatalinaDigester.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
(/usr/lib/libcatalina-5.0.30.jar.so)
   at
org.apache.xerces.parsers.AbstractSAXParser.startElement(org.apache.xerces.xni.QName,
org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(org.apache.xerces.xni.QName,
org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement()
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at org.apache.xerces.parsers.XML11Configuration.parse(boolean)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.parsers.XML11Configuration.parse(org.apache.xerces.xni.parser.XMLInputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.parsers.XMLParser.parse(org.apache.xerces.xni.parser.XMLInputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at
org.apache.xerces.parsers.AbstractSAXParser.parse(org.xml.sax.InputSource)
(/usr/lib/libxerces-j2-2.6.2.jar.so)
   at org.apache.commons.digester.Digester.parse(org.xml.sax.InputSource)
(/usr/lib/libjakarta-commons-digester-1.6.jar.so)
   at org.apache.catalina.startup.Catalina.load()
(/usr/lib/libcatalina-5.0.30.jar.so)
   at org.apache.catalina.startup.Catalina.load(java.lang.String[])
(/usr/lib/libcatalina-5.0.30.jar.so)
   at java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
(/usr/lib/libgcj.so.6.0.0)
   at org.apache.catalina.startup.Bootstrap.load(java.lang.String[])
(/usr/lib/libtomcat-bootstrap-5.0.30.jar.so)
   at org.apache.catalina.startup.Bootstrap.main(java.lang.String[])
(/usr/lib/libtomcat-bootstrap-5.0.30.jar.so)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
4-Dec-05 7:46:11 PM org.apache.commons.digester.Digester
startElement(java.lang.String, java.lang.String, java.lang.String,
org.xml.sax.Attributes)

Can you help me?



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



Re: tomcat 5.5.9 w/ Apache 2.0.54 --- 'className=' no longer needed????

2005-12-04 Thread Mark Thomas
Kyle wrote:
> It sems (to me anyway) that tomcat 5.5.9  has changed in recent months
> and documentation is in somewhat of a transition period.
> So, I'm now a little lost w/r to integrating an AJP connector for Apache.
> 
> In TC v4.1, server.xml had a connector;
> 
>enableLookups="false" redirectPort="8453" acceptCount="500"
> minProcessors="10"
>maxProcessors="200"/>
> 
> But the only information I can find for TC 5.5 is;
> 
>   enableLookups="false" redirectPort="8453"
> protocol="AJP/1.3" />
> 
> I did find one mention of a
> className="org.apache.ajp.tomcat.Ajp13Connector", but I can't find this
> Class in any jar file I've looked in so far.
> 
> Is className really no longer necessary, needed or required?? Is the
> connector now bundled/integrated with Tomcat???

There was a big clean up on the connectors between 4.x and 5.x. A lot
of the old, deprecated connectors were removed including
org.apache.ajp.tomcat4.Ajp13Connector

The Coyote connector is now used for HTTP and AJP. As documented at
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html className is
no longer required. You are correct that you must specify AJP as the
protocol.

Note that jk2 has also been deprecated and many features of jk2 ported
back to jk.

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



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



Re: tomcat5 stop auto after started.

2005-12-04 Thread Mike Zang
> Do you have some more logs to provide ?
Thanks for your reply. 
Do you need what logs? access_log or error_log? or any log else?




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



Re: When does 408 happen ?

2005-12-04 Thread Mark Thomas
hv @ Fashion Content wrote:
> On the default page of the site I put a login form as descibed in the 
> Servlet spec.
> I then specified the default page to be the login page and listed all other 
> pages on the site(Except access denied page) as protected.
> 
> The behaviour that I expected was:
> 1) If a user visits the site he has the option to log in.
> 2) If he returns to the site via an old link/favourite, the default page 
> will be shown for him to log in.
> 
> As I understand it now, this setup cannot be achieved using form 
> authentication.

How about this.
- Set any page in your app as the welcome page
- Protect all pages

This should give the following behaviour:
1) User visiting sites requests welcome page and is redirected to
login page. After successful auth user is redirected to welcome page.
2) User visiting site via link/favourite is redirected to login page.
After successful auth user is redirected to welcome page.

> In my mind that makes form authentication completely useless.

Hopefully not ;). The one thing that will not work, is if a user book
marks the login page. If they try to use a book marked login page they
will get the 408. Another problem is if you want authentication over
https but the rest of the site over http you will need to do some
extra things to achieve this. Search the user list as there has been
some posts about this recently.

> Hopefully I got it all wrong, and there is a way to achieve my goal.

I think there is. see above.


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