RE: Tomcat 4.0 and Windows XP

2002-03-18 Thread Ilya Khandamirov

Works for me since December. I have not noticed any problems so far.

Ilya


-Original Message-
From: Marc Chamberlin [mailto:[EMAIL PROTECTED]] 
Sent: Montag, 18. März 2002 07:50
To: [EMAIL PROTECTED]
Subject: Fw: Tomcat 4.0 and Windows XP


I think I am going to resend this, I didn't see show up the first
time...

- Original Message - 
From: Marc Chamberlin 
To: [EMAIL PROTECTED] 
Sent: Sunday, March 17, 2002 3:34 PM
Subject: Tomcat 4.0 and Windows XP


Hate to ask a straightfoward question, but can't seem to find any
answers and the FAQ is down

I currently am running Tomcat 4.0 under Win98 and am thinking of
upgrading to Windows XP Pro.  Has anyone encountered any problems or
know of any hitches I should be aware of to do this? Has Tomcat 4.0 been
tested under Windows XP?  Thanks for any/all replies, just trying to
forsee any roadblocks! ;-)

   Marc..





Do you think the software industry will ever make software that is as
easy and reliable for a user to use 
as the automobile industry makes a car easy and reliable for a user to
drive?


A man said unto the universe -  "Sir, I exist!"
"However," replied the universe  "I do not see where that creates in me
a sense of an obligation."
  - Stephen Crane


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Problem with run Tomcat 4.0.3 as a service on windows 2000

2002-03-18 Thread Galbayar

u must download tomcat.exe
an run it this

"%CATALINA_HOME%\bin\tomcat.exe" -install Tomcat4
"%JAVA_HOME%"\jre\bin\hotspot\jvm.dll -Djava.class.path="%CATALINA_HOME%\bin
\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" -Dcatalina.home="%CATALINA_HOME%" 
-Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%CATALINA_HOME%"\logs\stderr.log


- Original Message -
From: "Valera Molyakov" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 15:10
Subject: Re: Problem with run Tomcat 4.0.3 as a service on windows 2000


> Hi !
>
> Tomcat 4.x different Tomact 3ÀÞ
> See windows system reestr HKLM/CurrentControlSet/Services/Apache Tomcat.
>
>
> - Original Message -
> From: "Lev Zak" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Thursday, March 14, 2002 9:48 AM
> Subject: Problem with run Tomcat 4.0.3 as a service on windows 2000
>
>
> > Hello,
> > My %JAVA_HOME% is D:\jdk1.3.1_01.
> > I unzip jakarta-tomcat-4.0.3.zip into d:\tomcat of my Windows2000
machine.
> > I unzip jk_nt_service.zip into D:\tomcat\jakarta-tomcat-4.0.3\bin.
> > I copied wrapper.properties from tomcat 3.3a to
> > D:\tomcat\jakarta-tomcat-4.0.3\conf\jk.
> > I update the wrapper.properties with the following strings:
> >
> > wrapper.tomcat_home=D:\tomcat\jakarta-tomcat-4.0.3
> > wrapper.java_home=D:\jdk1.3.1_01
> > wrapper.tomcat_policy=$(wrapper.tomcat_home)\conf\catalina.policy
> >
> > I successfully run the following command:
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -I jakarta -A
> > D:\tomcat\jakarta-tomcat-4.0.3\conf\jk\wrapper.properties
> >
> > But when I run after this the following command:
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -S jakarta
> >
> > I receive the following message:
> > Asked (and given) winsock 1.1
> > Starting jakarta.
> > jakarta failed to start.
> >
> > If I try to start the "jakarta" service from Control Panel, I receive
the
> > following message:
> > Could not start the jakarta service on Local Computer.
> > Error 1067: The process terminated unexpectedly.
> >
> > But I can successfully start catalina through
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\startup.bat , it means the problem is
> not
> > a default port.
> > What I did wrong?
> > Sorry about a long letter.
> > Regards.
> > Lev.
> >
> >
> > This email and any files transmitted with it are confidential and
intended
> > solely for the use of the individual or entity to whom they are
addressed.
> > If you have received this email in error please notify us immediately
and
> > delete this communication.
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




URL Re-writting

2002-03-18 Thread Gurmeet

Please tell me what is the default behaviour that Tomcat uses for
maintaining session i.e. using cookies or URL re-writting. and how do switch
to a different mode i.e. from cookies how do I switch to URL rewritting.

-Original Message-
From: Valera Molyakov [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:34 PM
To: Tomcat Users List
Subject: Re: URL Length


Hi !

See your brouser preferences -> Cookies ( must be enabled, otherwise session
ID append for URL).
- Original Message -
From: "Gurmeet" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 7:01 AM
Subject: URL Length


> Dear ALL,
>
> When I submit a page , tomcat is appending the sessionID to the URL, which
> causing me a lot of problem.
>
> Please help me, how can I avoid this.
>
> Thanks
> Gurmeet
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




https - javax.net.ssl.SSLException: untrusted server cert chain

2002-03-18 Thread David G. Powers

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm using Tomcat 3.3a with the IBM JDK v1.3 and Sun's JSSE 1.0.2.  

I can successfully fetch http and https content using the Jetspeed 
WebPagePortlet (http://jakarta.apache.org/jetspeed) as long as the 
certificate is issued by a trusted CA in the JSSE cacerts file.  If the 
cert is not trusted I see an SSLException:

https - javax.net.ssl.SSLException: untrusted server cert chain

I have created a custom SSLSocketFactory which uses a custom 
SSLTrustManager that "knows" about my self-signed certificates and lets 
them pass.

It all works from an application.  I inject my SSLSocketFactory provider 
and open an HttpURLConnection.  "https://"; urls work fine - I can post 
urlencoded form data and get back the expected response.  My self-signed 
certs pass as expected.

URL url = new URL("https://www.verisign.com";);
System.setProperty("java.protocol.handler.pkgs",
 "com.sun.net.ssl.internal.www.protocol");
Security.setProperty( "ssl.SocketFactory.provider",
 "com.pssp.net.security.SSLSocketFactory");
HttpURLConnection con = (HttpURLConnection)url.openConnection();

When I attempt to instantiate my "WebScraper" class within Tomcat, despite 
the request to set the SSLSocketFactory provider, I get an untrusted server 
cert chain exception telling me that my SSLSocketFactory is not being used.

Does someone out there know how I can tell Tomcat to use my 
SSLSocketFactory for Client sockets?  I am simply not wealthy enough to pay 
for "trusted" certificates, especially when I already trust the content 
providers.  I am also too lazy to gather and maintain a bunch of 
certificates in the cacerts keystore.  The SSLTrustManager I created would 
be idea for my needs ... if only I could get Tomcat to recognize it.

I appreciate any tips, links, or suggestions you can offer.

Thanks,

DP
-BEGIN PGP SIGNATURE-
Comment: Verify the authenticity of this message with the public key available at 
http://pssp.com/dgp_pk.asc

iD8DBQE8lbNjjmjAPDT0/nERAsHDAJ9JHko17MPsNSryn1e2AesoyXQNsQCgjM+U
nBlATqQugrizCcIvCWoBvIQ=
=qU0o
-END PGP SIGNATURE-

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: URL Re-writting

2002-03-18 Thread Gabriel Gajdos

| Please tell me what is the default behaviour that Tomcat uses for
| maintaining session i.e. using cookies or URL re-writting. and how do
| switch
| to a different mode i.e. from cookies how do I switch to URL rewritting.

Tomcat uses non-persistent cookies (for Session ID) such as other server scripting 
engines do...

If there is user with cookie enabled browser, everything works just fine with 
non-persistent cookie JSESSIONID...
If there is not possible to use cookies, Tomcat automaticaly uses URL rewriting...

At the server side, you should allways use method response.encodeURL(String url) which 
returns correct form for URL as
needed!
It means, all ,  and similar links must be retrieved from this 
method...

As far as I know, it is not possible to switch URL-rewriting and using cookie.
I have not found any purpose to use this behaviour yet (except testing).

You are just allways using response.encodeURL() and you do not need to care whether 
client is using cookies or not. You
do not really need to care about that as a WebApp developper.

GG


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: URL Re-writting

2002-03-18 Thread Gurmeet

That's been really a great help.Further can I control the length of this
sessionID as I am working on a project for mobile devices and these devices
dont support very long URLs.

Thanks

-Original Message-
From: Gabriel Gajdos [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 3:07 PM
To: Tomcat Users List
Subject: Re: URL Re-writting


| Please tell me what is the default behaviour that Tomcat uses for
| maintaining session i.e. using cookies or URL re-writting. and how do
| switch
| to a different mode i.e. from cookies how do I switch to URL rewritting.

Tomcat uses non-persistent cookies (for Session ID) such as other server
scripting engines do...

If there is user with cookie enabled browser, everything works just fine
with non-persistent cookie JSESSIONID...
If there is not possible to use cookies, Tomcat automaticaly uses URL
rewriting...

At the server side, you should allways use method response.encodeURL(String
url) which returns correct form for URL as
needed!
It means, all ,  and similar links must be retrieved
from this method...

As far as I know, it is not possible to switch URL-rewriting and using
cookie.
I have not found any purpose to use this behaviour yet (except testing).

You are just allways using response.encodeURL() and you do not need to care
whether client is using cookies or not. You
do not really need to care about that as a WebApp developper.

GG


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Problem with run Tomcat 4.0.3 as a service on win2k

2002-03-18 Thread Lev Zak

Hello,
I described my problem about one week ago and I'm still not received any
answer. 
Could you please answer me what is wrong in what I did (look the following
attached previous mail).
I tried also the ServiceJava package from www.alexandriasc.com (advice from
'Tomcat Users List') but It is not very stable. It work fine in one win2k
machine and does not work in other win2k machine without any logs. On the
both machines the same configuration instead of different computer name.
Please help me.
Lev.

>  -Original Message-
> From: Lev Zak  
> Sent: Thursday, March 14, 2002 9:48 AM
> To:   'Tomcat Users List'
> Subject:  Problem with run Tomcat 4.0.3 as a service on 
> windows 2000
> 
> Hello, 
> My %JAVA_HOME% is D:\jdk1.3.1_01.
> I unzip jakarta-tomcat-4.0.3.zip into d:\tomcat of my 
> Windows2000 machine.
> I unzip jk_nt_service.zip into D:\tomcat\jakarta-tomcat-4.0.3\bin.
> I copied wrapper.properties from tomcat 3.3a to 
> D:\tomcat\jakarta-tomcat-4.0.3\conf\jk.
> I update the wrapper.properties with the following strings:
> 
> wrapper.tomcat_home=D:\tomcat\jakarta-tomcat-4.0.3
> wrapper.java_home=D:\jdk1.3.1_01
> wrapper.tomcat_policy=$(wrapper.tomcat_home)\conf\catalina.policy
> 
> I successfully run the following command:
> D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -I 
> jakarta -A D:\tomcat\jakarta-tomcat-4.0.3\conf\jk\wrapper.properties
> 
> But when I run after this the following command:
> D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -S jakarta 
> 
> I receive the following message:
>   Asked (and given) winsock 1.1
>   Starting jakarta.
>   jakarta failed to start.
> 
> If I try to start the "jakarta" service from Control Panel, I 
> receive the following message:
>   Could not start the jakarta service on Local Computer.
>   Error 1067: The process terminated unexpectedly.
> 
> But I can successfully start catalina through 
> D:\tomcat\jakarta-tomcat-4.0.3\bin\startup.bat , it means the 
> problem is not a default port.
> What I did wrong?
> Sorry about a long letter.
> Regards.
> Lev.
> 
> 
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify us immediately and
delete this communication.

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Problem with run Tomcat 4.0.3 as a service on win2k

2002-03-18 Thread Galbayar

See Attached Files
and copy all into $TOMCAT_HOME\bin directory
- Original Message -
From: "Lev Zak" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 18:22
Subject: Problem with run Tomcat 4.0.3 as a service on win2k


> Hello,
> I described my problem about one week ago and I'm still not received any
> answer.
> Could you please answer me what is wrong in what I did (look the following
> attached previous mail).
> I tried also the ServiceJava package from www.alexandriasc.com (advice
from
> 'Tomcat Users List') but It is not very stable. It work fine in one win2k
> machine and does not work in other win2k machine without any logs. On the
> both machines the same configuration instead of different computer name.
> Please help me.
> Lev.
>
> >  -Original Message-
> > From: Lev Zak
> > Sent: Thursday, March 14, 2002 9:48 AM
> > To: 'Tomcat Users List'
> > Subject: Problem with run Tomcat 4.0.3 as a service on
> > windows 2000
> >
> > Hello,
> > My %JAVA_HOME% is D:\jdk1.3.1_01.
> > I unzip jakarta-tomcat-4.0.3.zip into d:\tomcat of my
> > Windows2000 machine.
> > I unzip jk_nt_service.zip into D:\tomcat\jakarta-tomcat-4.0.3\bin.
> > I copied wrapper.properties from tomcat 3.3a to
> > D:\tomcat\jakarta-tomcat-4.0.3\conf\jk.
> > I update the wrapper.properties with the following strings:
> >
> > wrapper.tomcat_home=D:\tomcat\jakarta-tomcat-4.0.3
> > wrapper.java_home=D:\jdk1.3.1_01
> > wrapper.tomcat_policy=$(wrapper.tomcat_home)\conf\catalina.policy
> >
> > I successfully run the following command:
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -I
> > jakarta -A D:\tomcat\jakarta-tomcat-4.0.3\conf\jk\wrapper.properties
> >
> > But when I run after this the following command:
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -S jakarta
> >
> > I receive the following message:
> > Asked (and given) winsock 1.1
> > Starting jakarta.
> > jakarta failed to start.
> >
> > If I try to start the "jakarta" service from Control Panel, I
> > receive the following message:
> > Could not start the jakarta service on Local Computer.
> > Error 1067: The process terminated unexpectedly.
> >
> > But I can successfully start catalina through
> > D:\tomcat\jakarta-tomcat-4.0.3\bin\startup.bat , it means the
> > problem is not a default port.
> > What I did wrong?
> > Sorry about a long letter.
> > Regards.
> > Lev.
> >
> >
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify us immediately and
> delete this communication.
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>

<>
<>
<>

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


RE: Problem with run Tomcat 4.0.3 as a service on win2k

2002-03-18 Thread Chris Pheby

I had exceptional problems running Tomcat 4.0.3 as a service. After days of
headaches, testing tomcat/javaservice.exe and
then jk_nt_service I found that jk_nt_service works, but cannot properly set
Apache up as a dependency  - very annoying because it means the two servers
are not integrated at boot.

The solution is to use Tomcat 4.0.4 beta 1, which works very well with
tomcat.exe/javaservice.exe.

Also useful is service+ from activeservice.com which lets you configure
arbitrary dependencies for services (thus Apache can depend on Tomcat)

Hope this helps,


Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
Behalf Of Lev Zak
Sent: 18 March 2002 10:23
To: 'Tomcat Users List'
Subject: Problem with run Tomcat 4.0.3 as a service on win2k


Hello,
I described my problem about one week ago and I'm still not received any
answer.
Could you please answer me what is wrong in what I did (look the following
attached previous mail).
I tried also the ServiceJava package from www.alexandriasc.com (advice from
'Tomcat Users List') but It is not very stable. It work fine in one win2k
machine and does not work in other win2k machine without any logs. On the
both machines the same configuration instead of different computer name.
Please help me.
Lev.

>  -Original Message-
> From: Lev Zak
> Sent: Thursday, March 14, 2002 9:48 AM
> To:   'Tomcat Users List'
> Subject:  Problem with run Tomcat 4.0.3 as a service on
> windows 2000
>
> Hello,
> My %JAVA_HOME% is D:\jdk1.3.1_01.
> I unzip jakarta-tomcat-4.0.3.zip into d:\tomcat of my
> Windows2000 machine.
> I unzip jk_nt_service.zip into D:\tomcat\jakarta-tomcat-4.0.3\bin.
> I copied wrapper.properties from tomcat 3.3a to
> D:\tomcat\jakarta-tomcat-4.0.3\conf\jk.
> I update the wrapper.properties with the following strings:
>
> wrapper.tomcat_home=D:\tomcat\jakarta-tomcat-4.0.3
> wrapper.java_home=D:\jdk1.3.1_01
> wrapper.tomcat_policy=$(wrapper.tomcat_home)\conf\catalina.policy
>
> I successfully run the following command:
> D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -I
> jakarta -A D:\tomcat\jakarta-tomcat-4.0.3\conf\jk\wrapper.properties
>
> But when I run after this the following command:
> D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -S jakarta
>
> I receive the following message:
>   Asked (and given) winsock 1.1
>   Starting jakarta.
>   jakarta failed to start.
>
> If I try to start the "jakarta" service from Control Panel, I
> receive the following message:
>   Could not start the jakarta service on Local Computer.
>   Error 1067: The process terminated unexpectedly.
>
> But I can successfully start catalina through
> D:\tomcat\jakarta-tomcat-4.0.3\bin\startup.bat , it means the
> problem is not a default port.
> What I did wrong?
> Sorry about a long letter.
> Regards.
> Lev.
>
>
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify us immediately and
delete this communication.

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: exception.getMessage() returns null?

2002-03-18 Thread Randy Layman


Two possibilities:
1.  The exception that you are catching is a NullPointerException
(which has null as its message).  You can check this by adding
exception.getClass().getName() to your output.
2.  The exception that you are catching is not one provided by Sun
and the developer didn't set the message properly.

Randy

> -Original Message-
> From: Juan J. Merelo [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 6:48 PM
> To: [EMAIL PROTECTED]
> Subject: exception.getMessage() returns null?
> 
> 
> Hi,
>   I'm trying to set up an error page, which looks like this:
> <%@ page isErrorPage="true" %>
> 
> Se ha producido un error
> <%@ include file ="cabecera.jsp" %>
> Se ha producido un error
> 
> Endeluego, que a ver si tenemos cuidaico, que se ha producido el 
> siguiente error:
> <%= exception.getMessage() %>
> 
> (basically cut/paste from the JSP book by Bergsten). I would 
> like it to 
> display an exception thrown from a bean, but it displays 
> null. What can 
> be the problem here? Do I need to set up something else? Besides, 
> exception prints just JasperException or suchlike; I would like it to 
> print the message I included in the RuntimeException
> 
> Thanks for any info...
> 
> J
> -- 
> PPSN2002 => http://ppsn2002.ugr.es
> Home => http://geneura.ugr.es/~jmerelo
> Tutorial Perl => http://granavenida.com/perl
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




When context docBase is a Windows UNC path it fails to load class es

2002-03-18 Thread Morteo, Karl (AFIS)

Environment: Tomcat 4.02 , JDK 1.4  on Windows 2000
 
In server.xml, I have mounted an application context from a windows UNC
share like this 
 


The context appears to be loaded ok, indeed static pages are served fine.
 
However the application fails to load classes from \\server1\
 share2\mydir\WEB-INF\classes

 
If I map the windows UNC share to a drive letter everything functions ok.
This is not a fix as the drive is not mapped when the tomcat service starts.
 
Any ideas ? 
 
Karl.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: When context docBase is a Windows UNC path it fails to load classes

2002-03-18 Thread Morteo, Karl (AFIS)


Apologies for the last message that seems to have been garbled by outlook 
Here is unscrambled  

Environment: Tomcat 4.02 , JDK 1.4  on Windows 2000
 
In server.xml, I have mounted an application context from a windows UNC
share like this 
 


The context appears to be loaded ok, indeed static pages are served fine.
 
However the application fails to load classes from
\\server1\share2\mydir\WEB-INF\classes

If I map the windows UNC share to a drive letter everything functions ok.
This is not a fix as the drive is not mapped when the tomcat service starts.
 
Any ideas ? 
 
Karl.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




SSL with tomcat

2002-03-18 Thread Victor Lopes

Hi,

  I'm using tomcat 3.3 working under apache 1.3 , and
it's working just fine, but when I make a https
request to my apliction , it works , but I don't have
any information about the SSL conection , like the
cipher suite or the key size.
  When tomcat is running stand alone I've got
javax.servlet.request.cipher_suite and 
javax.servlet.request.key_size as parameters of the
httpservletrequest, but when it's running with apache
I don't. I'm using mod_jk to connect tomcat to apache.
 Could anyone tell me if I'm doing something wrong or
if it's possible to get these parameters when I've got
tomcat running under apache.

please help me.

here is a part of my httpd.conf file where I configure
apache to communicate with apache.

###

Include
/usr/local/jakarta-tomcat-3.3a/conf/auto/mod_jk.conf

###


and here is my mod_jk.conf

## Auto generated on Mon Mar 04 16:15:05 BRT
2002##


  LoadModule jk_module modules/mod_jk-3.3-ap13-eapi.so


JkWorkersFile
"/usr/local/jakarta-tomcat-3.3a/conf/jk/workers.properties"
JkLogFile
"/usr/local/jakarta-tomcat-3.3a/logs/mod_jk.log"

JkLogLevel emerg

JkMount /admin ajp13
JkMount /admin/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /myAplication ajp13
JkMount /myAplication/* ajp13

thank's everyone

  Victor D. Lopes  

___
Yahoo! Empregos
O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no Yahoo! Empregos 
e tenha acesso a milhares de vagas abertas!
http://br.empregos.yahoo.com/

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Lib placement problem

2002-03-18 Thread Alexander Reifinger

Hello all,

In our JSP application I included an dynamic output as PDF, done via Cocoon
on tomcat 3.2.

This has worked once, but somehow does not anymore. After fiddling around
and reading FAQ's and so on I decided to try Cocoon 2 and Tomcat 4, but
could not get it to work again.

Anyway, right now I am back to cocoon 1.8.2 on tomcat 4.0.3 and I seem to be
stuck to the following error message no matter what I try:

java.lang.RuntimeException: Error loading logicsheet at
resource://org/apache/cocoon/processor/xsp/library/java/util.xsl due to
java.lang.Exception: Resource not found or retrieving error.
at org.apache.cocoon.processor.xsp.XSPProcessor.init(XSPProcessor.java:302)
[...]
at org.apache.cocoon.Cocoon.init(Cocoon.java:157)
[...]

This util.xsl is included in the cocoon.jar, which he obviously found, as
the Cocoon.init() line shows.

I thought it might have something to do with the placement of the jars (in
WEB-INF/lib, in tomcat/lib, in tomcat/common/lib...), but the error shows no
matter where I place the jars. Also renaming cocoon.jar to acocoon.jar or
zcocoon.jar to try to alter its position in the Classpath does not change
anything.

What else could I look at to find what's going wrong? I was wondering
whether to post this here or in the cocoon list, but I think it has
something to do with a problem in (my understanding of) searching the
classpath so I decided to post it here. In case you think this was a wrong
decision, tell me so and I will contact the cocoon group.

Thanks in advance,
Alexander Reifinger


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




AW: When context docBase is a Windows UNC path it fails to load c lasses

2002-03-18 Thread Alexander Reifinger

> Environment: Tomcat 4.02 , JDK 1.4  on Windows 2000
>
> In server.xml, I have mounted an application context from a windows UNC
> share like this
>
>   docBase=" \\server1\share2\mydir\mydir"
>  reloadable="true"
>  debug="0"/>
>
> The context appears to be loaded ok, indeed static pages are served fine.

Hi Karl,

I do not think Java does know how to handle UNC pathes as this is not done
transparently in the Windows OS, UNC pathes are handled in a different way
"normal" pathes are handled.
(Not sure about this, I just don't think it could work)

Try altering a context based on your local machine to \\127.0.0.1\path to
see whether it works at all. In case it does really work - which, as I said,
I do not think - maybe it helps to use a IP adress instead of a machine
name, maybe host resolving is not yet started/ready at the moment tomcat is
started.

Bye,
Alexander


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Case of paths in JAR created on Windows

2002-03-18 Thread Larry Isaacs

If you are using WinZip, note that where the path is
just "WEB-INF\", it is always displayed in lower case.
Elsewhere, it is the expected upper case, such as in 
"WEB-INF/classes/".  So far, I have never seen any incorrect
behavior with war files that display in this manner.  It
appears to be a quirk in WinZip.

Cheers,
Larry

> -Original Message-
> From: Jim Cobban [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, March 17, 2002 5:37 PM
> To: [EMAIL PROTECTED]
> Subject: Case of paths in JAR created on Windows
> 
> 
> I am working on Windows and I notice that when I look inside 
> the .war file I create for my servlet that sometimes the 
> WEB-INF directory in a path appears as WEB-INF and sometimes 
> as web-inf.  I know this will not make any difference to the 
> copy of TomCat that I am running on Windows, but it strikes 
> me that if I hand that .war file to a copy of TomCat running 
> on UNIX that it will not deploy correctly.
> 
> Am I worrying about nothing?  I am using jar from jdk1.3.1.
> 
> Jim Cobban   [EMAIL PROTECTED]
> 34 Palomino Dr.
> Kanata, ON, CANADA
> K2M 1M1
> +1-613-592-9438
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: tomcat 4, default XML parser, XSLT, Xalan Configuration

2002-03-18 Thread Dave Makower

We had exactly the same problem.  Turns out it's a known bug (or perhaps
"mis-feature") in Tomcat 4.0.3.  We downloaded 4.0.4b1, and it worked again
without us having to change anything in our code.

On 3/17/02 9:54 AM, "Brendan Colthurst" <[EMAIL PROTECTED]> wrote:

> 
> I had a simple XML  / XSLT transform utility working with tomcat 3.2.3
> using the xalan and xerces libraries.
> 
> I upgraded to tomcat 4.0.3, and now the utility throws configuration
> exceptions.  I'm having trouble getting the details of the exceptions
> because they're all wrapped up in servlet exception wrappers...
> 
> I've read some posts with complaints about the inability to use other XML
> parsers.  My problem is, I wouldn't mind using the standard xerces parser
> that comes with tomcat 4.0 -- I just can't seem to get it to work...
> 
> I'm assuming that I don't have to change anything in my tomcat installation
> directory, but that I do have to provide some xslt libraries in my
> webapps/webapp/WEB-INF/lib directory.
> 
> Does anyone have an example configuration using xalan XSLT and Tomcat 4?
> 
> Thanks for your help,
> Brendan
> 
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

-- 
+---+
| Dave Makower<[EMAIL PROTECTED]> |
| http://www.davemak.com/   |
+---+



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: MacOS X - Changing JAVA_OPTS for 8859_1 encoding

2002-03-18 Thread Dave Makower

I think the correct syntax would be:

JAVA_OPTS="-Dfile.encoding=8859_1"

The quotes aren't really important, but the -D is.  If that was just a typo
in your message, then I'm not really sure what the problem is.  But if that
was actually what's in your script, it won't have the effect of setting a
system property in Java unless the -D is there.

(I really don't know anything about the file.encoding property in
particular, or it's behavior, so I can't help you there.)

On 3/17/02 4:03 AM, "Steven Elliott" <[EMAIL PROTECTED]> wrote:
> Sorry if this is off topic but I know there are OSX, Tomcat users here who
> may be able to shed some light on my problem.
> 
> The problem has to do with ASCII characters >128 for locale character
> support such as tilde, circumflex, etc. while running Tomcat (4.0.3) on
> MacOS 10.1.3 w/ java version 1.3.1
> 
> I have set my JAVA_OPTS env variable to file.encoding=8859_1 but am still
> having problems with ResultSet values which continue to be  MacRoman
> decoding of 8859_1 chars.
> 
> I am accessing a MSSQL running on Windows 2000 via a JDirect Type 4 driver.
> Some of the data has Portuguese and Spanish characters and when I output a
> ResultSet returned by Tomcat running on the Windows machine everything looks
> correct.  When I output the same ResultSet from Tomcat running on the
> Macintosh accessing the same database on the Windows machine, I get the
> characters MacRoman encoded whether or not I have run the startup.sh from a
> terminal with JAVA_OPTS=file.encoding=8859_1.  Actually there is NO
> difference which seems to indicate that either file.properties is not the
> correct system env variable or I am not using JAVA_OPTS correctly?
> 
> So I'm fishing for any ideas of how to fix this problem.  If you have any
> suggestions please mail me off list as well as I am on the digest.
> 
> Thanks for the help.
> 
> Steven
> 
> //* 
> * VTV Learning Corporation
> *Los Angeles  -  Boston  -  Lisbon
> *   (http://www.vtvLearning.com/)
> */
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

-- 
+---+
| Dave Makower<[EMAIL PROTECTED]> |
| http://www.davemak.com/   |
+---+



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Apache2 (SSL) with Tomcat4.0.4 with mod_jk problem, please help

2002-03-18 Thread Gabriel Lopez

Hi. I need help.
My configuration is:
Apache-2.0.32(SSL)
Tomcat-4.0.4
mod-jk
jdk1.4

When I try to run some servlet I get:


Server error!
El servidor encontro un error interno y fue imposible completar su solicitud. 
Mensaje de error: 
handler "jakarta-servlet" not found for: HelloWorldExample 
Favor de contactar al webmaster en caso de que usted crea que existe un error en el 
servidor. 
Error 500
london.dif.um.es 
Mon Mar 18 13:35:59 2002 
Apache/2.0.32 (Unix) DAV/2 mod_ssl/3.0a0 OpenSSL/0.9.6b 
**

This seems to be that ajp connector is not found¡¡
This is my configuratión:
server.xml:
***
  


 

 




  

  

  

  


  
  

  











  
  
  
  
  
  
usersa
password
driverClassName
  org.hsql.jdbcDriver
driverName
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  




  
  
  

  
  
  
  
usersa
password
driverClassName
  org.hsql.jdbcDriver
driverName
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  


  



  


***

my worker.properties:


workers.tomcat_home=/usr/local/jakarta/tomcat4.0

workers.java_home=/usr/local/j2sdk1.4.0

ps=/
worker.list=ajp13 ,ajp14, inprocess
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp14.port=8010
worker.ajp14.host=localhost
worker.ajp14.type=ajp14
worker.ajp14.secretkey=secret
worker.ajp14.credentials=myveryrandomentropy

worker.ajp14.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13

worker.inprocess.type=jni

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/catalina.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat-util.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat-jk2.jar 
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
**

my httpd.conf:

***
ServerRoot "/usr/local/apache2"


LoadModulejk_module  modules/mod_jk.so
JkWorkersFile /usr/local/jakarta/tomcat4.0/conf/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevelinfo
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

Alias /myappp "/usr/local/jakarta/tomcat4.0/webapps/myapp"

Options Indexes FollowSymLinks

 
JkMount /manager ajp13
JkMount /manager/* ajp13
 
JkMount /examples ajp13
JkMount /examples/* ajp13
 
JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

JkMount /myapp/servlet/* ajp13

JkMount /myapp ajp13
JkMount /myapp/* ajp13


ServerName london.dif.um.es

DocumentRoot "/usr/local/apache2/htdocs"



Include conf/ssl.conf




my ssl.conf 
*



Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl.crl
SSLPassPhraseDialog  builtin

SSLSessionCacheTimeout  300

SSLMutex  file:logs/ssl_mutex

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog  logs/ssl_engine_log
SSLLogLevel info



DocumentRoot "/usr/local/apache2/htdocs"
ServerName london.dif.um.es
ServerAdmin [EMAIL PROTECTED]
ErrorLog logs/error_log
TransferLog logs/access_log

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /usr/local/...
SSLCertificateKeyFile /usr/local/...
SSLCACertificateFile /usr/local/
SSLVerifyClient optional
SSLOptions +ExportCertData +StdEnvVars

SSLOptions +StdEnvVars


SSLOptions +StdEnvV

SSL + soap message

2002-03-18 Thread nomorems


I Try to convert my program to handle with SSL but I get this error: cannot opening 
socket...
Who can help me?
Every tip is useful...
Thanx, nomorems

  System.setProperty("javax.net.ssl.trustStore","C:\\client2.keystore");

  System.setProperty("javax.net.ssl.keyStorePassword","changeit");

  
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
   
  Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
  
  //SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
  //SSLSocket socket = (SSLSocket)factory.createSocket("localhost", 8443);

  // What can I do here??

  Envelope msgEnv = Envelope.unmarshall (doc1.getDocumentElement ());
  Message msg = new Message();

//msg.send (new URL ("http://localhost:8080/soap/servlet/messagerouter";), "", 
msgEnv);


// ** SSL supply *
  msg.send (new URL ("https://localhost:8443/soap/servlet/messagerouter";), "", 
msgEnv);
// ** SSL supply ***  

  SOAPTransport st = msg.getSOAPTransport();
  
  // Resonse
  BufferedReader br = st.receive();
   
  InputSource inpSource = new InputSource(br);
  inpSource.setCharacterStream(br);.

  ... etc...



-
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage


RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

Did you add a Census context to your server.xml file?

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:51 AM
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: security-constraint and error-page

2002-03-18 Thread rsequeira


Thanks Craig. But I was wondering if there was some way where we could
intercept the container generated 401 response before it is sent to the
browser. And after a certain count, send a 200 OK response with some page
describing that the user does not have access to that resource.
Correct me if I'm wrong, but my understanding was that the number of times
the server responds with a 401 is dependent on the server (Tomcat, in our
case). Or is it actually? Tomcat sends a 401 Unauthorized response twice
(if the userid/password is incorrect) and after the third incorrect
attempt, Tomcat sends a page back. Is the status code associated with the
fourth response a "401 Unauthorized" still or is it some other code since I
thought if the browser receives a 401, it displays the login dialog box.
According to the HTTP/1.1 rfc:
"If the 401 response contains the same challenge as the prior response, and
the user agent has already attempted authentication at least once, then the
user SHOULD be presented the entity that was given in the response, since
that entity MAY include relevant diagnostic information."
With regards to the above quote, does this mean that the browser on
receiving the fourth "401 Unauthorized" displays the page that came along
with it?

Thanks.
RS





"Craig R. McClanahan" <[EMAIL PROTECTED]> on 03/16/2002 04:16:31 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   Tomcat Users List <[EMAIL PROTECTED]>
cc:

Subject:  Re: security-constraint and error-page



On Sat, 16 Mar 2002 [EMAIL PROTECTED] wrote:

> Date: Sat, 16 Mar 2002 15:18:34 -0600
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: security-constraint and error-page
>
>
> HAFAIK, when the webserver responds with a 401 Unauthorized
error,
> the browser shows up an authentication dialog box. But since you have
> configured an 401 error page directive in the web.xml, I think Tomcat
> generates a 401 UnAuthorized response but then like a 404 custom error
page
> redirect,  it redirects to the notauthorized.jsp instead of sending a 401
> response to the client.
> I think what you desire is something like this (correct me if I'm wrong):
> Tomcat should send a 401 response atleast 3 times (or more) and then
> display a "You are Unauthorized" page back.
> I don't know how to do this in web.xml. Maybe writing a wrapper or filter
> would help. Need to check the code that does Basic Authentication. I
think
> it should have some clues. Craig McClanahan is the author of the code.
> Hopefully he throws some light on this topic. I know he's online :-)
>

:-)

Tomcat 4.0.1 had a problem with creating a custom error page for
container-generated status messages like a 401.  This was fixed in 4.0.2
and 4.0.3.

However, it's not going to do you any good if you are using BASIC
authentication -- browsers generally just pop up the login dialog box and
don't show the page that came along with it -- and there's nothing Tomcat
can do about that.  If you really want to control the look and feel of the
login page, you should use form-based authentication instead of BASIC.

> Thanks.
> RS

Craig

>
>
>
>
>
> [EMAIL PROTECTED] on 03/12/2002 09:33:47 PM
>
> Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  security-constraint and error-page
>
> I've setup a security constraint, with basic authentication, in a memory
> realm.  It works as expected until I add an error page for the 401 error
> code (unauthorized). Then, when I request the page, I get the 401 error
> page automatically and am never prompted to login.  I was expecting to
get
> the 401 error page only if I supplied an incorrect login.
>
> What am I doing wrong?  (Win2000pro, Tomcat 4.0.3, jdk 1.4)   Here is a
> portion of my web.xml:
>
>   
> 401
> /notauthorized.jsp
>   
>
>   
> 
>   BrawnerLau Website
>   /adminentry.jsp
> 
> 
>   brawnerlau
> 
>   
>
>   
> BASIC
> BrawnerLau Website
>   
>
>
> Thanks,
>
> Jason E. Brawner
> Silenus Group
> (248) 735-8077
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Running 2 Tomcat server and making one intranet

2002-03-18 Thread Keith Ng




Hi

Please guide me on the following

I need to run two tomcat server for my sch assignment, one being Internet
and the other Intranet on the same machine(different ports , 1 8080 the
other 9080).
Im using 4.0.2. I need to noe the steps for running 2 tomcat servers on the
same machine and the configuration.

next, how to make 1 of the server accessible only to local intranet and
network? den means ppl from internet are able to access the server at
abc.abc.abc.abc:8080 but not abc.abc.abc.abc:9080

another way is to make both of the web app running in 1 server, which one
can be accessed by internet and the other intranet. Can someone guide me
please? Thanks...






_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Chris Pheby

Do you have a web.xml???

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Jim Cobban
Sent: 18 March 2002 14:51
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Running 2 Tomcat server and making one intranet

2002-03-18 Thread Edward Elsics

I would think the easiest way to do this is with a
single server and use public and private ip addresses
for your public and private sites. I think you can
also do it with valves that would restrict access
based on the client ip number.  Never tried it though.

Eel


- Original Message -
From: "Keith Ng" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 6:58 AM
Subject: Running 2 Tomcat server and making one intranet


>
>
>
> Hi
>
> Please guide me on the following
>
> I need to run two tomcat server for my sch assignment, one being Internet
> and the other Intranet on the same machine(different ports , 1 8080 the
> other 9080).
> Im using 4.0.2. I need to noe the steps for running 2 tomcat servers on
the
> same machine and the configuration.
>
> next, how to make 1 of the server accessible only to local intranet and
> network? den means ppl from internet are able to access the server at
> abc.abc.abc.abc:8080 but not abc.abc.abc.abc:9080
>
> another way is to make both of the web app running in 1 server, which one
> can be accessed by internet and the other intranet. Can someone guide me
> please? Thanks...
>
>
>
>
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




WebAppDeply and UseCanonicalNames

2002-03-18 Thread Brent Johnson

Tomcat Version:  4.0.x (not sure which exact release - I think its
4.0.2)

I've got a pretty serious problem right now that I'm having trouble
fixing.  I've got a production website running and I need to change the
header of the pages on the website depending on the hostname in the URL.

I've got UseCanonicalNames set to off for the default, and for each
virtual host.  Lets say I've got this...

ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/www/docs/development/blah.com
UseCanonicalName Off
ServerName doh.blah.com
ServerAlias homer homer.blah.com

RewriteEngine on
RewriteRule ^.*\.xsl$ / [R]

WebAppDeploy pctidev conn /

ErrorLog logs/homer-error_log
CustomLog logs/homer-access_log common

Options All
AllowOverride All
Order allow,deny
Allow from all



I'm using Cocoon1 along with Tomcat (but I dont think it has anything to
do with Cocoon).  If I try to go to the following URL with these
settings:
http://homer.blah.com/index.xml

It works fine that way - BUT - if I try going to the following (keep in
mind I have index.xml set as one of my DirectoryIndex settings):
http://homer.blah.com/

It changes the URL to be http://doh.blah.com/index.xml

If I comment out the WebAppDeploy in the VirtualHost and just stick in
an index.html file in the same directory and try the same thing it works
fine.  It's almost as though Tomcat is the one doing the redirection
(and it doesnt make any difference if its a .xml file or .jsp - same
thing happens).  I have both domains specified in my server.xml like the
following:

  



  

The exact same thing is copied after this and the name="" is changed to
name="doh.blah.com".

Can ANYONE please give me a little help

Thanks,

- Brent


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread dave . prout

Have you got an entry for you servlet in the web.xml file in the WEB-INF
folder ?

Dave 



-Original Message-
From: Chris Pheby [mailto:[EMAIL PROTECTED]]
Sent: 18 March 2002 15:07
To: Tomcat Users List
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


Do you have a web.xml???

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Jim Cobban
Sent: 18 March 2002 14:51
To: Tomcat Users List
Subject: Urgent Re: Newbie: Servlet under Windows does not run


I am really desperate.  I need to be able to demonstrate this servlet by
Tuesday evening and Tomcat still refuses to run it.

Essentially all that I have done is copy the examples from a book and change
the names to protect the innocent.  The first few lines of the .java file
are:

package Census;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class CensusQuery extends HttpServlet {


I then compile this class and create the .war file with the following .bat
file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF

When the .war file is deployed by Tomcat the class file is located at:

D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl
ass

All of this looks completely according to the documentation I have read.
What am I doing wrong so that Tomcat cannot find the class?



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: WebAppDeply and UseCanonicalNames

2002-03-18 Thread James Williamson

Hi Brent,

We had the same problem, if you actually look at the source code of
mod_webapp
(and you're familiar with Apache internals) you'll notice two things.

1) During Apache's rewrite handling stage which mod_webapp (wam_match) wants
to take
part in it returns OK, this tells Apache that the rewriting stage is over so
mod_rewrite is essentially
ignored. Since mod_webapp is generally the first handler (as you've often
LoadModule(d) it) to take
part in this stage this is the behaviour you'll get.

2) Even if you tell wam_match in mod_webapp to return DECLINED which lets
mod_rewrite take part
it doesn't make any difference. mod_webapp only looks at the raw uri, during
the rewrite stage only the
filename is alterered.

What this basically means is with the current mod_webapp code you can forget
all about rewriting. And then I'll start going on
about the 302 issue.

The solution:
hack mod_webapp or do something which we implemented, which is essentially
moving over to using the
filename, something we have on our development machine which we've been
testing recently.

Regards,

James Williamson
www.nameonthe.net

- Original Message -
From: Brent Johnson <[EMAIL PROTECTED]>
To: Tomcat-User (E-mail) <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 3:09 PM
Subject: WebAppDeply and UseCanonicalNames


> Tomcat Version:  4.0.x (not sure which exact release - I think its
> 4.0.2)
>
> I've got a pretty serious problem right now that I'm having trouble
> fixing.  I've got a production website running and I need to change the
> header of the pages on the website depending on the hostname in the URL.
>
> I've got UseCanonicalNames set to off for the default, and for each
> virtual host.  Lets say I've got this...
> 
> ServerAdmin [EMAIL PROTECTED]
> DocumentRoot /home/www/docs/development/blah.com
> UseCanonicalName Off
> ServerName doh.blah.com
> ServerAlias homer homer.blah.com
>
> RewriteEngine on
> RewriteRule ^.*\.xsl$ / [R]
>
> WebAppDeploy pctidev conn /
>
> ErrorLog logs/homer-error_log
> CustomLog logs/homer-access_log common
> 
> Options All
> AllowOverride All
> Order allow,deny
> Allow from all
> 
> 
>
> I'm using Cocoon1 along with Tomcat (but I dont think it has anything to
> do with Cocoon).  If I try to go to the following URL with these
> settings:
> http://homer.blah.com/index.xml
>
> It works fine that way - BUT - if I try going to the following (keep in
> mind I have index.xml set as one of my DirectoryIndex settings):
> http://homer.blah.com/
>
> It changes the URL to be http://doh.blah.com/index.xml
>
> If I comment out the WebAppDeploy in the VirtualHost and just stick in
> an index.html file in the same directory and try the same thing it works
> fine.  It's almost as though Tomcat is the one doing the redirection
> (and it doesnt make any difference if its a .xml file or .jsp - same
> thing happens).  I have both domains specified in my server.xml like the
> following:
>
>unpackWARs="true">
>   directory="logs"  prefix="homer_access_log."
> suffix=".txt"
>  pattern="common"/>
>   directory="logs"  prefix="homer_log." suffix=".txt"
> timestamp="true"/>
>  debug="0" reload="true"/>
>   
>
> The exact same thing is copied after this and the name="" is changed to
> name="doh.blah.com".
>
> Can ANYONE please give me a little help
>
> Thanks,
>
> - Brent
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Http 503 error

2002-03-18 Thread Eric . Wang


Hi everybody,

I run a Tomcat 4.0.3 on NT4(sp6). My application has a pooled connection
through DB2 JDBC driver. Everything works fine. But after the weekend, when
I try to access this application, I got a "HTTP 503" error in the browser.
I got this from Java JDK ---
|--|
| Status code (503) indicating that the HTTP server is temporarily |
| overloaded, and unable to handle the request |
|--|


But actually it's still under testing. No one is using it. I go through all
log files of Tomcat, nothing is special. After I restart my JDBC driver and
Tomcat, everything is fine.

Did anyone get the similar error? Any advises?

Thanks,



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




tomcat error when compile [urgent!]

2002-03-18 Thread Nancy Crisostomo Martinez

HI!

Because I need to run tomcat in a headless mode, I had tried to apply all the
advice that some of you gave me to run graphics under Solaris.  I just want to ask
why isn't it possible to me? I had tried  but it doesn't works and always the same
error appear:
/tomcat.sh: TOMCAT_OPTS=-Djava.awt.headless=true: is not an identifier

Is this a valid mode only for Tomcat 4.x? ... I'm using Tomcat 3.3, jdk 1.4.0 and
Solaris 8
Could you help me?? Please!

Regards,
Nancy




 Randy Layman wrote:

 > For Tomcat 3.3 change CATALINA_OPTS to TOMCAT_OPTS.  Otherwise
 the
 > directions quoted are correct.  If you insist on modifying the .sh
 file then
 > add this command as the second line of the sh file.
 >
 > Randy
 >
 > > -Original Message-
 > > From: Nancy Crisostomo Martinez [mailto:[EMAIL PROTECTED]]
 > > Sent: Friday, March 15, 2002 3:17 PM
 > > To: Tomcat Users List
 > > Subject: Re: Charts in Jsp doesn't work [urgent!]
 > >
 > >
 > > Do somebody know how to set Java to run in headless mode  in
 > > Tomcat 3.3 ?
 > >
 > > Do you want give me a hint?
 > > I really tried to modify the tomcat.sh script but I
 > > couldn't.. It's very
 > > hard to understand!!!
 > > Could you please help me?
 > >
 > >
 > >
 > >
 > > "Christopher K.St.John" wrote:
 > >
 > > > Andy Eastham wrote:
 > > > >
 > > > > 1) To run in headless mode, you do need to modify tomcat.sh,
 > > > >
 > > >
 > > >$ export CATALINA_OPTS="-Djava.awt.headless=true"
 > > >$ bin/startup.sh
 > > >
 > > >  No need to actually modify the catalina.sh code, it will
 > > > automatically pick up the environment variable.
 > > >
 > >
 > > Andy Eastham wrote:
 > >
 > > > Nancy,
 > > >
 > > > You either need X windows or (if your server has no graphics
 card):
 > > >
 > > > 1) Use j2se1.4 and run it in "headless" mode - the JAva VM
 > > needs to be
 > > > started with the
 > > > -Djava.awt.headless=true option in the Tomcat startup scripts.
 > > >
 > > > 2) Get the virtual frame buffer (VFB) version of X windows and run

 > > > that.  (I
 > > > know we did this at my previous company but I'm afraid I
 > > can't remember
 > > > how
 > > > to set it up).  Try typing "xwindows virtual frame buffer" into
 your
 > > > favourite search engine.
 > > >
 > > > Andy
 > > >
 > > > > -Original Message-
 > > > > From: Nancy Crisostomo Martinez [mailto:[EMAIL PROTECTED]]

 > > > > Sent: 14 March 2002 16:48
 > > > > To: Tomcat Users List
 > > > > Subject: Charts in Jsp doesn't work
 > > > >
 > > > >
 > > > > Hi Everybody!
 > > > >
 > > > > Do you know what is X Windows System for?
 > > > > Do I need to install it to work with charts?.. I mean, I
 > > couldn't see
 > > >
 > > > > the charts displayed and someone told me that I need to install
 X
 > > > Window
 > > > > System... Is that true?
 > > > > The jsp wich displays a chart are placed in a Solaris Sparc
 server
 > > > > running on Tomcat 3.3, but I want to see the charts in a
 > > Windows PC
 > > > and
 > > > > I couldn't
 > >
 > > >
 > > > --
 > > > Christopher St. John [EMAIL PROTECTED]
 > > > DistribuTopia http://www.distributopia.com
 > > >
 > > > --
 > > > To unsubscribe:
 > > 
 > > > For additional commands:
 > > 
 > > > Troubles with the list:
 > > 
 > >
 > >
 > > --
 > > To unsubscribe:
 
 > > For additional commands:
 
 > > Troubles with the list:
 
 > >
 >
 > --
 > To unsubscribe:   
 > For additional commands: 
 > Troubles with the list: 



configure Apache-Tomcat to read "local" web.xml for each webapp

2002-03-18 Thread Denis Wang

Hello, All,
I am using Apache-Tomcat.  In my configuration, the Apache does not read "local" 
web.xml
(tomcat/webapps/virtualhost1/WEB-INF/web.xml).  However, Apache does read "global" 
web.xml
(tomcat/conf/web.xml).
Does anybody know how to configure to read the "local" web.xml?
Any help will be highly appreciated!
Thanks,
Denis


__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Problem in running servlet please help--- urgent

2002-03-18 Thread Uma Munugala


Hi 
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet. 

When my servlet is invoked, 
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection (Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




ISAPI Filter not working with Webfolders win2k and Webdrive 5.1

2002-03-18 Thread Robert Priest

Can anyone help here:

I am using Tomcat 4.0.3. and the filter from  Tomcat version 3.3. (as is
specified in the AJP instruction page).
I am also running slide 1.0.16

The isapi filter (isapi_redirect.dll) works fine when accessing my
Tomcat/slide server through a browser.

But I am having the following problems when I Try to access Slide with the
following clients:

using WebFolders:

I get "The folder you entered does not appear to be valid" in a popup.

In  "iis_redirect.log", it appears that the url I request to map to  is
disappearing.
For example, If I try to map to "http://localhost/slide/test";, the url that
HttpFilterProc sees is:
"http://localhost/_vti_inf.html";. Everything goes down hill from there.


using WebDrive:

If i use the same url: "http://localhost/slide/test";, the isapi filter
interprets the url just fine.
However, it appears as though IIS never calls  "GetExtensionVersion" or
"HttpExtensionProc". Processing just
stops after HttpFilterProc does its job. The last few lines I see are:

[Fri Mar 15 11:46:48 2002]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/slide/
[Fri Mar 15 11:46:54 2002]  [jk_isapi_plugin.c (695)]: HttpFilterProc
[/slide/test] is a servlet url - should redirect to ajp13
[Fri Mar 15 11:46:56 2002]  [jk_isapi_plugin.c (706)]: HttpFilterProc
fowarding original URI [/slide/test]
[Fri Mar 15 11:47:10 2002]  [jk_isapi_plugin.c (744)]: HttpFilterProc check
if [/slide/test] is points to the web-inf directory

I believe the next line shoule be "HttpExtensionProc started".

Can anyone offer any help here? It would be greatly appreciated.

Robert Priest.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




HomeBase question...

2002-03-18 Thread Asher Yanich



I have configured HomeBase in order to provide servlets under a users
~/public_html

However, if one user has incorrect permissions on his public_html
directory, Tomcat craps out and does not continue to iterate through the
rest of the user dirs.   I would like to tomcat to continue on and
continue creating contexts.  Is this possible?

Also, I was wondering why PasswdUserDatabase has to read /etc/passwd ?
Wouldnt it be handier for tomcat to use getpwent() so as to be able to
work in an NIS environment or to take a parameter ie:
passwdDB="/etc/tomcat_passwd"
userClass="org.apache.catalina.startup.PasswdUserDatabase"/>



I am trying to find a non-kludgy way of providing servlets in a users home
directory and have not found such yet

THANKS,
-asher


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Problem in running servlet please help--- urgent

2002-03-18 Thread rsequeira


Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Lib placement problem

2002-03-18 Thread John Niven

> -Original Message-
> From: Alexander Reifinger [mailto:[EMAIL PROTECTED]] 
> Sent: 18 March 2002 13:08
> To: Tomcat Users List
> Subject: Lib placement problem
> 
> 
> Hello all,
> 
> In our JSP application I included an dynamic output as PDF, 
> done via Cocoon on tomcat 3.2.
> 
> This has worked once, but somehow does not anymore. After 
> fiddling around and reading FAQ's and so on I decided to try 
> Cocoon 2 and Tomcat 4, but could not get it to work again.
> 
> Anyway, right now I am back to cocoon 1.8.2 on tomcat 4.0.3 
> and I seem to be stuck to the following error message no 
> matter what I try:
> 
Alexander

Have you tried _both_ /server/lib and /ROOT/lib?  I believe there's a
documented issue with Tomcat 4 earlier than 4.0.4 that's resolved by placing
jars in both the server-only /lib folder (/server/lib), and in the
web-apps-only /lib folder (/lib).

Disclaimer: this is from recollection, and a recent problem I had porting a
site to Tomcat (from Jrun 3.0).  Your milage may vary, I'd appreciate it if
someone with more knowledge than me added comments if I've got it wrong...

Best of luck,
John

> java.lang.RuntimeException: Error loading logicsheet at 
> resource://org/apache/cocoon/processor/xsp/library/java/util.x
> sl due to
> java.lang.Exception: Resource not found or retrieving error.
>   at 
> org.apache.cocoon.processor.xsp.XSPProcessor.init(XSPProcessor
> .java:302)
> [...]
> at org.apache.cocoon.Cocoon.init(Cocoon.java:157)
> [...]
> 
> This util.xsl is included in the cocoon.jar, which he 
> obviously found, as the Cocoon.init() line shows.
> 
> I thought it might have something to do with the placement of 
> the jars (in WEB-INF/lib, in tomcat/lib, in 
> tomcat/common/lib...), but the error shows no matter where I 
> place the jars. Also renaming cocoon.jar to acocoon.jar or 
> zcocoon.jar to try to alter its position in the Classpath 
> does not change anything.
> 
> What else could I look at to find what's going wrong? I was 
> wondering whether to post this here or in the cocoon list, 
> but I think it has something to do with a problem in (my 
> understanding of) searching the classpath so I decided to 
> post it here. In case you think this was a wrong decision, 
> tell me so and I will contact the cocoon group.
> 
> Thanks in advance,
> Alexander Reifinger
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

 --
John Niven
Please reply through mailing list

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




cannot run simple servlets with tomcat 3.3.rc1

2002-03-18 Thread Tomcat Programmer

I upgraded Tomcat from 3.3a because there were some
bugs fixed in the rc1 release. But now I have run
across another problem. Servlets that used to run
correctly do not work at all. So I built a simple
servlet to print text, but it does not work either. I
am invoking it with the simple URL syntax of 
"host:8080/myapp/servlet/ServletTest" and I made sure
the InvokerInterceptor entry was in the server.xml
file. However, I always get the following stack trace
when I try to run the servlet. Can anyone help with
this problem, please? 

Thanks -- Tom C.

java.lang.NullPointerException
at
org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:431)
at
org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:228)
at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:472)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)



__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Adding a system property?

2002-03-18 Thread Rich Baldwin

I have a system property which I have added to my build.properties file
and my build.xml
file.  Ant builds and deploys w/o any errors.  However, my tomcat
servlet cannot "find" this
new system property.   What is the trick here?  There is nothing in my
build.xml file to tell
tomcat explicitly about this property, but how would I do that?   Where
can system properties be
set in tomcat?

To recap
In build.properties
metadata.xmlfile=project.xml

In build.xml


Thanks, Rich


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: WebAppDeply and UseCanonicalNames

2002-03-18 Thread Brent Johnson

Thanks for the reply - this seems like a pretty nasty bug in mod_webapp
doesn't it?  Unless you're like Microsoft, then we could always
just call it a "feature" :)

I'll try hacking at mod_webapp and see if I can get that to work (unless
you could be so generous enough to pass on the code you're currently
testing so I could take a look - if it's not "company confidential" or
anything you can send it directly to me).

Thanks for the help!

- Brent

-Original Message-
From: James Williamson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 10:27 AM
To: Tomcat Users List
Subject: Re: WebAppDeply and UseCanonicalNames


Hi Brent,

We had the same problem, if you actually look at the source code of
mod_webapp
(and you're familiar with Apache internals) you'll notice two things.

1) During Apache's rewrite handling stage which mod_webapp (wam_match)
wants
to take
part in it returns OK, this tells Apache that the rewriting stage is
over so
mod_rewrite is essentially
ignored. Since mod_webapp is generally the first handler (as you've
often
LoadModule(d) it) to take
part in this stage this is the behaviour you'll get.

2) Even if you tell wam_match in mod_webapp to return DECLINED which
lets
mod_rewrite take part
it doesn't make any difference. mod_webapp only looks at the raw uri,
during
the rewrite stage only the
filename is alterered.

What this basically means is with the current mod_webapp code you can
forget
all about rewriting. And then I'll start going on
about the 302 issue.

The solution:
hack mod_webapp or do something which we implemented, which is
essentially
moving over to using the
filename, something we have on our development machine which we've been
testing recently.

Regards,

James Williamson
www.nameonthe.net

- Original Message -
From: Brent Johnson <[EMAIL PROTECTED]>
To: Tomcat-User (E-mail) <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 3:09 PM
Subject: WebAppDeply and UseCanonicalNames


> Tomcat Version:  4.0.x (not sure which exact release - I think its
> 4.0.2)
>
> I've got a pretty serious problem right now that I'm having trouble
> fixing.  I've got a production website running and I need to change
the
> header of the pages on the website depending on the hostname in the
URL.
>
> I've got UseCanonicalNames set to off for the default, and for each
> virtual host.  Lets say I've got this...
> 
> ServerAdmin [EMAIL PROTECTED]
> DocumentRoot /home/www/docs/development/blah.com
> UseCanonicalName Off
> ServerName doh.blah.com
> ServerAlias homer homer.blah.com
>
> RewriteEngine on
> RewriteRule ^.*\.xsl$ / [R]
>
> WebAppDeploy pctidev conn /
>
> ErrorLog logs/homer-error_log
> CustomLog logs/homer-access_log common
> 
> Options All
> AllowOverride All
> Order allow,deny
> Allow from all
> 
> 
>
> I'm using Cocoon1 along with Tomcat (but I dont think it has anything
to
> do with Cocoon).  If I try to go to the following URL with these
> settings:
> http://homer.blah.com/index.xml
>
> It works fine that way - BUT - if I try going to the following (keep
in
> mind I have index.xml set as one of my DirectoryIndex settings):
> http://homer.blah.com/
>
> It changes the URL to be http://doh.blah.com/index.xml
>
> If I comment out the WebAppDeploy in the VirtualHost and just stick in
> an index.html file in the same directory and try the same thing it
works
> fine.  It's almost as though Tomcat is the one doing the redirection
> (and it doesnt make any difference if its a .xml file or .jsp - same
> thing happens).  I have both domains specified in my server.xml like
the
> following:
>
>unpackWARs="true">
>   directory="logs"  prefix="homer_access_log."
> suffix=".txt"
>  pattern="common"/>
>   directory="logs"  prefix="homer_log." suffix=".txt"
> timestamp="true"/>
>  debug="0" reload="true"/>
>   
>
> The exact same thing is copied after this and the name="" is changed
to
> name="doh.blah.com".
>
> Can ANYONE please give me a little help
>
> Thanks,
>
> - Brent
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Adding a system property?

2002-03-18 Thread Alex Potter


- Original Message -
From: "Rich Baldwin" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 4:51 PM
Subject: Adding a system property?


> I have a system property which I have added to my build.properties file
> and my build.xml
> file.  Ant builds and deploys w/o any errors.  However, my tomcat
> servlet cannot "find" this
> new system property.   What is the trick here?  There is nothing in my
> build.xml file to tell
> tomcat explicitly about this property, but how would I do that?   Where

Tomcat will read your application's WEB.XML - you can set the System
property in the init method of an appropriate servlet.

HTH

Alex



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Deployment from directories not under webapps

2002-03-18 Thread Yuval Levav

Hi,
Is it possible to deploy apps from directories not under the webapps
directory ?
Thanks,
Yuval


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




ZipException on web app deploy (in catalina.out)

2002-03-18 Thread Bryan Field-Elliot

I'm having a very puzzling problem... I have a .war file which deploys
fine on one machine. On another machine however, when I deploy it in
Tomcat (4.0.3), I get:

java.util.zip.ZipException: invalid END header (bad central directory
offset)

the last interesting call in the stack trace is:

org.apache.cataline.loader.WebappLoader.setRepositories(WebappLoader.java:1005)

I tested my .war file by extracting it (with "jar"), and it's fine.
Furthermore, inside of the .war file's WEB-INF/lib directory, I tested
every single .jar file the same way.. They all extract correctly, no
errors reported.

Lastly, my webapp as far as I can tell is functioning fine.

I'm very puzzled by this error message (in catalina.out) and was
wondering if anyone has any ideas?

Thanks,
Bryan




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Deployment from directories not under webapps

2002-03-18 Thread rsequeira


Yes. See docBase attribute of the  element in server.xml

RS




"Yuval Levav" <[EMAIL PROTECTED]> on 03/18/2002 11:10:06 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "Tomcat Users List" <[EMAIL PROTECTED]>
cc:

Subject:  Deployment from directories not under webapps

Hi,
   Is it possible to deploy apps from directories not under the
webapps
directory ?
Thanks,
   Yuval


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 4.0 and IterationTag

2002-03-18 Thread Albert Pastrana

Hi,

I've a tomcat 4.0 (downloaded latest week) in a Win2k pro.

I've a little problem running it as service, but running stand-alone
everything it's right.

The first problem comes when creating an iteration tag. I've followed many
explanations and, of course, read all the javadocs, and I cannot understand
what I'm doing wrong.

My code is something like that:

public class RepeatTag
extends  TagSupport
{
   int num = 0;

   boolean endLoop()   { return num==10; }
   voidnextElement() { num++;  }

   public int doStartTag() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
 }
 return SKIP_BODY;
   }

   public int doAfterBody() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
  } else {
 return SKIP_BODY;
  }
  }

} //end class RepeatTag

And the problem is that my Tomcat is saying me that exception:
"javax.servlet.ServletException: Since tag handler class
com.ludicus.general.taglib.RepeatTag does not implement BodyTag, it can't
return BodyTag.EVAL_BODY_TAG"

I've read a lot of documentation about JSP1.2 and I think that's the right
solution, but I supose I'm doing something wrong, could anyone tell me
what's the problem?

thanks a lot

  albert


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Problem in running servlet please help--- urgent

2002-03-18 Thread Uma Munugala

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve that
problem. The class has static members and static methods, when iam trying to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:41 AM
To: Tomcat Users List
Subject: Re: Problem in running servlet please help--- urgent



Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat 4.0 and IterationTag

2002-03-18 Thread Barney Hamish

Although this doesn't address the problem you're having with your tag, you
should consider using the Struts tag library. The Iteration Tag in the logic
tags does exactly what you want and it's been tested extensively.
http://jakarta.apache.org/struts/doc-1.0.2/struts-logic.html#iterate
Hamish

-Original Message-
From: Albert Pastrana [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 6:25 PM
To: tomcat-list
Subject: Tomcat 4.0 and IterationTag


Hi,

I've a tomcat 4.0 (downloaded latest week) in a Win2k pro.

I've a little problem running it as service, but running stand-alone
everything it's right.

The first problem comes when creating an iteration tag. I've followed many
explanations and, of course, read all the javadocs, and I cannot understand
what I'm doing wrong.

My code is something like that:

public class RepeatTag
extends  TagSupport
{
   int num = 0;

   boolean endLoop()   { return num==10; }
   voidnextElement() { num++;  }

   public int doStartTag() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
 }
 return SKIP_BODY;
   }

   public int doAfterBody() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
  } else {
 return SKIP_BODY;
  }
  }

} //end class RepeatTag

And the problem is that my Tomcat is saying me that exception:
"javax.servlet.ServletException: Since tag handler class
com.ludicus.general.taglib.RepeatTag does not implement BodyTag, it can't
return BodyTag.EVAL_BODY_TAG"

I've read a lot of documentation about JSP1.2 and I think that's the right
solution, but I supose I'm doing something wrong, could anyone tell me
what's the problem?

thanks a lot

  albert


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message - 
From: "Chris Pheby" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 10:07 AM
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Do you have a web.xml???

Yes I previously posted its contents to this mailing list.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Did you add a Census context to your server.xml file?

No.  I looked at the way the examples used that file, and it seemed that it
was used only to override the default behavior. For example they change
where logs go in that context.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Problem in running servlet please help--- urgent

2002-03-18 Thread rsequeira


Post your code/log output. Maybe someone will have a look at it. Or you
could check the archives. I think I saw someone who had a similar problem.

RS





Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 11:27:42 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve
that
problem. The class has static members and static methods, when iam trying
to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:41 AM
To: Tomcat Users List
Subject: Re: Problem in running servlet please help--- urgent



Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Tomcat 4.0 and IterationTag

2002-03-18 Thread Albert Pastrana

Ok, thanks a lot, but that not solves my problem :(. I knew already the
IterateTag from Struts, but the question is that my tag will (should) be
something more than this Tag, and I need to make my own Iteration tag.
thanks

- Original Message -
From: "Barney Hamish" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 6:32 PM
Subject: RE: Tomcat 4.0 and IterationTag


> Although this doesn't address the problem you're having with your tag, you
> should consider using the Struts tag library. The Iteration Tag in the
logic
> tags does exactly what you want and it's been tested extensively.
> http://jakarta.apache.org/struts/doc-1.0.2/struts-logic.html#iterate
> Hamish
>
> -Original Message-
> From: Albert Pastrana [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 6:25 PM
> To: tomcat-list
> Subject: Tomcat 4.0 and IterationTag
>
>
> Hi,
>
> I've a tomcat 4.0 (downloaded latest week) in a Win2k pro.
>
> I've a little problem running it as service, but running stand-alone
> everything it's right.
>
> The first problem comes when creating an iteration tag. I've followed many
> explanations and, of course, read all the javadocs, and I cannot
understand
> what I'm doing wrong.
>
> My code is something like that:
>
> public class RepeatTag
> extends  TagSupport
> {
>int num = 0;
>
>boolean endLoop()   { return num==10; }
>voidnextElement() { num++;  }
>
>public int doStartTag() throws JspException {
>   if (!endLoop()) {
>  nextElement();
>  return EVAL_BODY_AGAIN;
>  }
>  return SKIP_BODY;
>}
>
>public int doAfterBody() throws JspException {
>   if (!endLoop()) {
>  nextElement();
>  return EVAL_BODY_AGAIN;
>   } else {
>  return SKIP_BODY;
>   }
>   }
>
> } //end class RepeatTag
>
> And the problem is that my Tomcat is saying me that exception:
> "javax.servlet.ServletException: Since tag handler class
> com.ludicus.general.taglib.RepeatTag does not implement BodyTag, it can't
> return BodyTag.EVAL_BODY_TAG"
>
> I've read a lot of documentation about JSP1.2 and I think that's the right
> solution, but I supose I'm doing something wrong, could anyone tell me
> what's the problem?
>
> thanks a lot
>
>   albert
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

What URL are you using to get to the servlet?

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:47 PM
To: Tomcat Users List
Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run


- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Did you add a Census context to your server.xml file?

No.  I looked at the way the examples used that file, and it seemed that it
was used only to override the default behavior. For example they change
where logs go in that context.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: security-constraint and error-page

2002-03-18 Thread Craig R. McClanahan



On Mon, 18 Mar 2002 [EMAIL PROTECTED] wrote:

> Date: Mon, 18 Mar 2002 08:44:56 -0600
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: security-constraint and error-page
>
>
> Thanks Craig. But I was wondering if there was some way where we could
> intercept the container generated 401 response before it is sent to the
> browser. And after a certain count, send a 200 OK response with some page
> describing that the user does not have access to that resource.
> Correct me if I'm wrong, but my understanding was that the number of times
> the server responds with a 401 is dependent on the server (Tomcat, in our
> case). Or is it actually? Tomcat sends a 401 Unauthorized response twice
> (if the userid/password is incorrect) and after the third incorrect
> attempt, Tomcat sends a page back. Is the status code associated with the
> fourth response a "401 Unauthorized" still or is it some other code since I
> thought if the browser receives a 401, it displays the login dialog box.
> According to the HTTP/1.1 rfc:
> "If the 401 response contains the same challenge as the prior response, and
> the user agent has already attempted authentication at least once, then the
> user SHOULD be presented the entity that was given in the response, since
> that entity MAY include relevant diagnostic information."
> With regards to the above quote, does this mean that the browser on
> receiving the fourth "401 Unauthorized" displays the page that came along
> with it?
>

You can intercept this, but you'll need to do it with Tomcat-specific
mechanisms (since authentication is happening before your application's
servlets are ever invoked).  Authentication is implemented by Valves
inside of Tomcat (very similar to Filters at the web application level),
so you can write and install a Valve of your own that is invoked before
authentication to do this kind of interception.

To get further, you'll need to download the Tomcat 4 source distribution
and look at the org.apache.catalina.Valve interface.

> Thanks.
> RS

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JNDI blues

2002-03-18 Thread Nikola Milutinovic

Hi all.

Well, I'm not having much success with JDBC data source over JNDI. What happens 
is that the object that should be javax.sql.DataSource is returned "null" from 
the lookup.

What steps can I take to identify the source of (not only) my problem?

SERVER.XML
--

   
   
 
   driverClassName
   org.postgresql.Driver
 
 
   driverName
   jdbc:postgresql://test.domain.com/test
 
 
   user
   my_user
 
 
   password
   my_pass
 
   


WEB.XML
---

   jdbc/AddressBookDB
   javax.sql.DataSource
   Container


TEST.JSP

public void init() throws ServletException {
   Context initCtx, envCtx;

   super.init();
   try {
 initCtx = new InitialContext();
 if( (envCtx = (Context)initCtx.lookup( "java:comp/env" )) == null ) {
   throw new UnavailableException( "No java:comp/env context" );
 }
 if( (ds = (DataSource)envCtx.lookup( "jdbc/AddressBookDB" )) == null ) {
   throw new UnavailableException( "No environment resource: JDBC" );
 }
   } catch( javax.naming.NamingException ne ) {
 throw new UnavailableException( "Naming service failure" );
   }
}

The servlet goes to "unavailable" and the error in logs is that JDBC line. So, 
the "java:comp/env" is accessable, but not the "jdbc/AddressBookDB". What could 
possibly be the reason for this? How can test JNDI setup?

Nix.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Adding a system property?

2002-03-18 Thread Craig R. McClanahan



On Mon, 18 Mar 2002, Rich Baldwin wrote:

> Date: Mon, 18 Mar 2002 11:51:45 -0500
> From: Rich Baldwin <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Adding a system property?
>
> I have a system property which I have added to my build.properties file
> and my build.xml
> file.  Ant builds and deploys w/o any errors.  However, my tomcat
> servlet cannot "find" this
> new system property.   What is the trick here?  There is nothing in my
> build.xml file to tell
> tomcat explicitly about this property, but how would I do that?   Where
> can system properties be
> set in tomcat?
>

The "build.properties" file is only consulted when you *build* Tomcat, not
when you *run* it.

> To recap
> In build.properties
> metadata.xmlfile=project.xml
>
> In build.xml
>  value="${catalina.home}/webapps/${app.name}/${metadata.xmlfile}"/>
>

To get system properties defined at Tomcat runtime, you will need to set
an environment variable -- either CATALINA_OPTS (Tomcat 4.x) or
TOMCAT_OPTS (Tomcat 3.3.x).  For example:

  CATALINA_OPTS=-Dmetadata.xmlfile=/path/to/the/file.xml
  $CATALINA_HOME/bin/startup.sh

However, system properties are not the best way to provide configuration
information to servlets, because they are global to the entire container
and hard to manipulate.  You should look at using  or
servlet initialization parameters inside the web.xml file to provide this
sort of configuration data.

If you want to do this kind of thing without modifying the web.xml file
(which would typically be the case if you're deploying the same webapp in
lots of different environments), here is an apporach that works in Tomcat
4 because it requires the JNDI namespace that Tomcat 4 provides:

* In your web.xml file, declare an  element
  for the configuration property, optionally with a default value:


  metadata.path
  /default/path/to/metadata.xml
  java.lang.String


* In your server.xml file, add a  element that defines
  the actual value for *this* installation of the webapp:


  


* In your application, you grab the value you need like this:

IniitalContext ic = new InitialContext();
String metadataPath = (String) ic.lookup("java:comp/env/metadata.path");

  (This is the javax.naming.InitialContext class from JNDI.  The servlet
  spec defines that all environment entries are in the "java:comp/env"
  namespace.)

* This will pick up the default value (if nothing was set in server.xml)
  or the override value (if you did set it).

The nice thing about this is that it doesn't mess up any other webapp that
might be using the same property name -- environment entries are
per-webapp instead of being global.  It also requires zero changes to your
webapp itself (or its web.xml file) to customize behavior differently on
different installations.


> Thanks, Rich
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Deployment from directories not under webapps

2002-03-18 Thread Craig R. McClanahan



On Mon, 18 Mar 2002, Yuval Levav wrote:

> Date: Mon, 18 Mar 2002 19:10:06 +0200
> From: Yuval Levav <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Deployment from directories not under webapps
>
> Hi,
>   Is it possible to deploy apps from directories not under the webapps
> directory ?

Yes ... the "docBase" parameter can accept an absolute pathname.

> Thanks,
>   Yuval

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JAXMServlet + SOAP

2002-03-18 Thread Paul Brown

Hi

I've got a Servlet which extends JAXMServlet and i'm trying to
write some code to process received messages.


I am following the Sun example
http://java.sun.com/xml/jaxm-0_9_2-prd-spec.pdf


To get a DOM from a SOAPMessage you need to do this apparently:

 DOMSource domSrc = (DOMSource)
soapEnvelope.getContentAs(DOMSource.FEATURE );

However, the "getContentAs" method does not exist on the SOAPEnvelope.


Have any of you come across this?

Has anybody got a code sample that shows how to get a DOM from one of
the SOAP
objects in the JAXM api?

thanks
Paul


This message contains confidential information and is intended only for the named 
individual
and may not be disseminated without prior permission.  If you are not the named 
addressee,
you should not disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this message in error and delete this 
e-message from your system. E-mail transmission cannot be guaranteed to be secure or 
error-free as
information could be intercepted, corrupted, lost, destroyed, delayed in transmission,
incomplete, or may contain viruses. The sender therefore does not accept liability for 
any
errors or omissions in the contents of this Message which arise as a result of e-mail 
transmission.  If verification is required please request a hard-copy version. This 
message
is provided for informational purposes and should not be construed as a solicitation or
offer to buy or sell any software or services.

 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


Re: Adding a system property?

2002-03-18 Thread Mike McGuinness

Rich,

You can edit the start script to set system properties for the JVM.

I set the user.dir system property in my $CATALINA_HOME/bin/catalina.sh
script.  I just added the parameter  -Duser.dir=${CATALINA_HOME}/conf to
the $CATALINA_OPTS varaable.
 
Then, in the app I can do this:

String userDir = System.getProperty("user.dir");

I don't know if this is the proper way, but it works!


Mike

On Mon, 2002-03-18 at 11:51, Rich Baldwin wrote:

I have a system property which I have added to my build.properties file
and my build.xml
file.  Ant builds and deploys w/o any errors.  However, my tomcat
servlet cannot "find" this
new system property.   What is the trick here?  There is nothing in my
build.xml file to tell
tomcat explicitly about this property, but how would I do that?   Where
can system properties be
set in tomcat?

To recap
In build.properties
metadata.xmlfile=project.xml

In build.xml


Thanks, Rich


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Charts in Jsp doesn't work [urgent!]

2002-03-18 Thread Kevin Wang

export VAR="value"
Is a bash / ksh thing.  /bin/sh doesn't understand it.  You need to use:
VAR="value"
export VAR

Csh/tcsh has a different format:
setenv VAR "value"

   - Kevin Wang

-Original Message-
From: Nancy Crisostomo Martinez [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 15, 2002 1:06 PM
To: Tomcat Users List
Subject: Re: Charts in Jsp doesn't work [urgent!]


Thaks Randy!

And  I tried it in both ways and the same error appear:
/tomcat.sh: TOMCAT_OPTS=-Djava.awt.headless=true: is not an
identifier

Could you help me?? Please!

Regards,
Nancy


Randy Layman wrote:

> For Tomcat 3.3 change CATALINA_OPTS to TOMCAT_OPTS.  Otherwise 
> the directions quoted are correct.  If you insist on modifying the .sh 
> file then add this command as the second line of the sh file.
>
> Randy
>
> > -Original Message-
> > From: Nancy Crisostomo Martinez [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 3:17 PM
> > To: Tomcat Users List
> > Subject: Re: Charts in Jsp doesn't work [urgent!]
> >
> >
> > Do somebody know how to set Java to run in headless mode  in Tomcat 
> > 3.3 ?
> >
> > Do you want give me a hint?
> > I really tried to modify the tomcat.sh script but I couldn't.. It's 
> > very hard to understand!!!
> > Could you please help me?
> >
> >
> >
> >
> > "Christopher K.St.John" wrote:
> >
> > > Andy Eastham wrote:
> > > >
> > > > 1) To run in headless mode, you do need to modify tomcat.sh,
> > > >
> > >
> > >$ export CATALINA_OPTS="-Djava.awt.headless=true"
> > >$ bin/startup.sh
> > >
> > >  No need to actually modify the catalina.sh code, it will 
> > > automatically pick up the environment variable.
> > >
> >
> > Andy Eastham wrote:
> >
> > > Nancy,
> > >
> > > You either need X windows or (if your server has no graphics 
> > > card):
> > >
> > > 1) Use j2se1.4 and run it in "headless" mode - the JAva VM
> > needs to be
> > > started with the
> > > -Djava.awt.headless=true option in the Tomcat startup scripts.
> > >
> > > 2) Get the virtual frame buffer (VFB) version of X windows and run 
> > > that.  (I know we did this at my previous company but I'm afraid I
> > can't remember
> > > how
> > > to set it up).  Try typing "xwindows virtual frame buffer" into 
> > > your favourite search engine.
> > >
> > > Andy
> > >
> > > > -Original Message-
> > > > From: Nancy Crisostomo Martinez [mailto:[EMAIL PROTECTED]]
> > > > Sent: 14 March 2002 16:48
> > > > To: Tomcat Users List
> > > > Subject: Charts in Jsp doesn't work
> > > >
> > > >
> > > > Hi Everybody!
> > > >
> > > > Do you know what is X Windows System for?
> > > > Do I need to install it to work with charts?.. I mean, I
> > couldn't see
> > >
> > > > the charts displayed and someone told me that I need to install 
> > > > X
> > > Window
> > > > System... Is that true?
> > > > The jsp wich displays a chart are placed in a Solaris Sparc 
> > > > server running on Tomcat 3.3, but I want to see the charts in a
> > Windows PC
> > > and
> > > > I couldn't
> >
> > >
> > > --
> > > Christopher St. John [EMAIL PROTECTED]
> > > DistribuTopia http://www.distributopia.com
> > >
> > > --
> > > To unsubscribe:
> > 
> > > For additional commands:
> > 
> > > Troubles with the list:
> > 
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > 
> > Troubles with the list: 
> >
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



Repost: File upload problem

2002-03-18 Thread Jason Webber

Well I am reposting this message since I haven't got any response and hoping
that the lack of response was because everybody had something better to do
than work all weekend.


When I try and use an html form to upload a file I get the flowing error in
jk.log file:

[Sat Mar 16 10:30:32 2002]  [jk_ajp12_worker.c (503)]:
ajpv12_handle_response, error reading header line

The webserver then gives me a 500 Internal Server Error

I don't get this error if I dont use browse to locate a file and I just hit
the submit button to call my servlet.




 
 
 



Any one know what is going wrong?

Tomcat 3.3
mod_jk
Apache 1.3.20
Windows 2000


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: JAXMServlet + SOAP

2002-03-18 Thread Dahnke, Eric

I recently did this by parsing the SOAP Message (via JAXM) with SAX. My
parser class happily takes an XML file or any kind of input stream, so I
just wrote the SOAP message out to a OS (did a OS -> IS conversion as
follows).


// write the SOAPMessage to an OutputStream, convert that to
// a string and close the OutputStream
ByteArrayOutputStream baos = new ByteArrayOutputStream();
message.writeTo(baos);
String strSOAPMsg = baos.toString();
baos.close();

// now build an InputSource to send to the SAXParser 
// from the strSOAPMsg 
StringReader chrStream = new StringReader(strSOAPMsg);
InputSource is = new InputSource(chrStream);

// this is the code to call the SAXParser (goes with the
// SAXParseHandler class) 
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
parser.parse(is, new SAXParseHandler());





HTH




-Original Message-
From: Paul Brown [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 1:03 PM
To: Tomcat Users List
Subject: JAXMServlet + SOAP


Hi

I've got a Servlet which extends JAXMServlet and i'm trying to
write some code to process received messages.


I am following the Sun example
http://java.sun.com/xml/jaxm-0_9_2-prd-spec.pdf


To get a DOM from a SOAPMessage you need to do this apparently:

 DOMSource domSrc = (DOMSource)
soapEnvelope.getContentAs(DOMSource.FEATURE );

However, the "getContentAs" method does not exist on the SOAPEnvelope.


Have any of you come across this?

Has anybody got a code sample that shows how to get a DOM from one of
the SOAP
objects in the JAXM api?

thanks
Paul

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> What URL are you using to get to the servlet?

I have tried a very wide range of URLs.  According to all of the
documentation the one that should work is
http://localhost/servlet/Census.CensusQuery  That is using the class name.
However when that failed I also tried  /servlet/Census/CensusQuery,
and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
earlier, the name of the servlet, as opposed to the class, was Census1901 I
also tried /servlet/Census1901.  I have also tried using URL mapping
specified in the
WEB-INF/web.xml file.  In any event the bottom lime is that when I request
the above URL TomCat does go looking for my class.  It just can't seem to
find it!

I know that I must be doing something wrong, because nobody else seems to be
having any difficulty running servlets, but this is driving me crazy.  I
have been trying everything I can think of for more than a week and  TomCat
keeps claiming that it can't find the class.  I have read the documentation
over and over again.  I have gone with a fine tooth comb through the
examples trying to see what they are doing that is different from what I am
doing.  I just don't understand why this is so bloody difficulty.

Just to put every bit of the documentation of this problem in one place:

The first few lines of my servlet are:

package Census;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class CensusQuery extends HttpServlet {


which I compile using the following .bat file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
 javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
 javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
 javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF


The .war file this produces contains:

D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
META-INF/
META-INF/MANIFEST.MF
CensusQuery.html
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/Census/
WEB-INF/classes/Census/ConnectionPool.class
WEB-INF/classes/Census/DBResults.class
WEB-INF/classes/Census/DriverUtilities.class
WEB-INF/classes/Census/DatabaseUtilities.class
WEB-INF/classes/Census/ServletUtilities.class
WEB-INF/classes/Census/CensusQuery.class
WEB-INF/web.xml

The web.xml file is:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


My Web Application

  This is version X.X of an application to perform
  a wild and wonderful task, based on servlets and
  JSP pages.  It was written by Dave Developer
  ([EMAIL PROTECTED]), who should be contacted for
  more information.




Census1901


Census.CensusQuery



DbVendor
 mysql


 Url
 localhost


 DbName
 Census


 UserName
 anonymous


 Password
 none


 InitConnections
 10


 MaxConnections
 10






and the relevant lines of the log file under TomCat 4.0.3 are:

2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
context path /Census from URL
jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number
generator class java.security.SecureRandom
2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number
generator has been completed
2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container
servlet default
2002-03-17 14:52:34 default: init
2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container
servlet invoker
2002-03-17 14:52:34 invoker: init
2002-03-17 14:52:34 jsp: init
2002-03-17 14:52:55
StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking
servlet org.apache.catalina.INVOKER.Census.CensusQuery as unavailable
2002-03-17 14:52:55 invoker: Cannot allocate servlet instance for path
/servlet/Census.CensusQuery
javax.servlet.ServletException: Wrapper cannot find servlet class
Census.CensusQuery or a class it depends on




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Problem in running servlet please help--- urgent

2002-03-18 Thread Uma Munugala

Hi sequeira 
can u please suggest the site where I can find archives. I tried at
www.apache.org but Iam not finding any thing



Thanks a lot for help
Uma




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:32 AM
To: Tomcat Users List
Subject: RE: Problem in running servlet please help--- urgent



Post your code/log output. Maybe someone will have a look at it. Or you
could check the archives. I think I saw someone who had a similar problem.

RS





Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 11:27:42 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve
that
problem. The class has static members and static methods, when iam trying
to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:41 AM
To: Tomcat Users List
Subject: Re: Problem in running servlet please help--- urgent



Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: cannot run simple servlets with tomcat 3.3.rc1

2002-03-18 Thread Larry Isaacs

I can duplicate this error if I remove JspInterceptor.
It appears that InvokerInterceptor is dependent on some
initialization being done in JspInterceptor.  Was
JspInterceptor removed in your server.xml?

Cheers,
Larry

> -Original Message-
> From: Tomcat Programmer [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, March 18, 2002 11:52 AM
> To: [EMAIL PROTECTED]
> Subject: cannot run simple servlets with tomcat 3.3.rc1
> 
> 
> I upgraded Tomcat from 3.3a because there were some
> bugs fixed in the rc1 release. But now I have run
> across another problem. Servlets that used to run
> correctly do not work at all. So I built a simple
> servlet to print text, but it does not work either. I
> am invoking it with the simple URL syntax of 
> "host:8080/myapp/servlet/ServletTest" and I made sure
> the InvokerInterceptor entry was in the server.xml
> file. However, I always get the following stack trace
> when I try to run the servlet. Can anyone help with
> this problem, please? 
> 
> Thanks -- Tom C.
> 
> java.lang.NullPointerException
>   at
> org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler
> .java:431)
>   at
> org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:228)
>   at
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler
> .java:472)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextM
> anager.java:917)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
>   at
> org.apache.tomcat.modules.server.Http10Interceptor.processConn
> ection(Http10Interceptor.java:176)
>   at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:494)
>   at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:516)
>   at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Wagoner, Mark

Are you absolutely sure the problem is with CensusQuery and not a referenced
class?  It could be that Tomcat can't find another class that is referenced
by CensusQuery, so it cannot load CensusQuery

Try stripping (or commenting) out all of the code except for a println call.
This will show you if the servlet is actually being located or not.

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 1:34 PM
To: Tomcat Users List
Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run


- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> What URL are you using to get to the servlet?

I have tried a very wide range of URLs.  According to all of the
documentation the one that should work is
http://localhost/servlet/Census.CensusQuery  That is using the class name.
However when that failed I also tried  /servlet/Census/CensusQuery,
and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
earlier, the name of the servlet, as opposed to the class, was Census1901 I
also tried /servlet/Census1901.  I have also tried using URL mapping
specified in the
WEB-INF/web.xml file.  In any event the bottom lime is that when I request
the above URL TomCat does go looking for my class.  It just can't seem to
find it!

I know that I must be doing something wrong, because nobody else seems to be
having any difficulty running servlets, but this is driving me crazy.  I
have been trying everything I can think of for more than a week and  TomCat
keeps claiming that it can't find the class.  I have read the documentation
over and over again.  I have gone with a fine tooth comb through the
examples trying to see what they are doing that is different from what I am
doing.  I just don't understand why this is so bloody difficulty.

Just to put every bit of the documentation of this problem in one place:

The first few lines of my servlet are:

package Census;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class CensusQuery extends HttpServlet {


which I compile using the following .bat file:

set PATH=C:\jdk1.3.1\bin;%PATH%
set
CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH%
 javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
 javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
 javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
 javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
jar cf Census.war *.html WEB-INF


The .war file this produces contains:

D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
META-INF/
META-INF/MANIFEST.MF
CensusQuery.html
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/Census/
WEB-INF/classes/Census/ConnectionPool.class
WEB-INF/classes/Census/DBResults.class
WEB-INF/classes/Census/DriverUtilities.class
WEB-INF/classes/Census/DatabaseUtilities.class
WEB-INF/classes/Census/ServletUtilities.class
WEB-INF/classes/Census/CensusQuery.class
WEB-INF/web.xml

The web.xml file is:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


My Web Application

  This is version X.X of an application to perform
  a wild and wonderful task, based on servlets and
  JSP pages.  It was written by Dave Developer
  ([EMAIL PROTECTED]), who should be contacted for
  more information.




Census1901


Census.CensusQuery



DbVendor
 mysql


 Url
 localhost


 DbName
 Census


 UserName
 anonymous


 Password
 none


 InitConnections
 10


 MaxConnections
 10






and the relevant lines of the log file under TomCat 4.0.3 are:

2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
context path /Census from URL
jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number
generator class java.security.SecureRandom
2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number
generator has been completed
2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container
servlet default
2002-03-17 14:52:34 default: init
2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container
servlet invoker
2002-03-17 14:52:34 invoker: init
2002-03-17 14:52:34 jsp: init
2002-03-17 14:52:55
StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking
servlet org.apache.catalina.INVOKER.Census.CensusQue

RE: Problem in running servlet please help--- urgent

2002-03-18 Thread Ram Kurapati

Hello: try at 
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2

Rama
-Original Message-
From: Uma Munugala [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 1:26 PM
To: 'Tomcat Users List'
Subject: RE: Problem in running servlet please help--- urgent


Hi sequeira 
can u please suggest the site where I can find archives. I tried at
www.apache.org but Iam not finding any thing



Thanks a lot for help
Uma




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:32 AM
To: Tomcat Users List
Subject: RE: Problem in running servlet please help--- urgent



Post your code/log output. Maybe someone will have a look at it. Or you
could check the archives. I think I saw someone who had a similar problem.

RS





Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 11:27:42 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve
that
problem. The class has static members and static methods, when iam trying
to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:41 AM
To: Tomcat Users List
Subject: Re: Problem in running servlet please help--- urgent



Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




AW: Repost: File upload problem

2002-03-18 Thread Ralph Einfeldt

What are you using to receive the uploaded file ?

The reading of multipart forms is not part of the 
servlet spec. So you need some thing like Jason Hunters
MultipartRequest or jspSmartUpload to process multipart 
forms.

Which browser are you using ?
Some versions of IE have some nasty bugs in their headers
that can lead the header parser of mod_jk into trouble.

Same is true for at least one version of netscape 6.1.
(crashes my good ole jserv anytime i try to use multipart 
forms)

May be looking at the tcp data will help.
(Don't ask me for a tool to do that, I do that kind of things
under linux (tcpdump))

> -Ursprüngliche Nachricht-
> Von: Jason Webber [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 18. März 2002 19:15
> An: [EMAIL PROTECTED]
> Betreff: Repost: File upload problem
> 
 
> ajpv12_handle_response, error reading header line
> 
> The webserver then gives me a 500 Internal Server Error
> 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: JAXMServlet + SOAP

2002-03-18 Thread JavaJosh

I'd like to wrap plain text in the editor. I use text files for notes
and such, and this would be helpful. Does Netbeans 3.3.1 support this?

Thanks,
Josh Rehman


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Adding a system property?

2002-03-18 Thread Rich Baldwin

Craig

Thanks very much, nothing like a complete answer to a question!

Take care, Rich

"Craig R. McClanahan" wrote:

> On Mon, 18 Mar 2002, Rich Baldwin wrote:
>
> > Date: Mon, 18 Mar 2002 11:51:45 -0500
> > From: Rich Baldwin <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Adding a system property?
> >
> > I have a system property which I have added to my build.properties file
> > and my build.xml
> > file.  Ant builds and deploys w/o any errors.  However, my tomcat
> > servlet cannot "find" this
> > new system property.   What is the trick here?  There is nothing in my
> > build.xml file to tell
> > tomcat explicitly about this property, but how would I do that?   Where
> > can system properties be
> > set in tomcat?
> >
>
> The "build.properties" file is only consulted when you *build* Tomcat, not
> when you *run* it.
>
> > To recap
> > In build.properties
> > metadata.xmlfile=project.xml
> >
> > In build.xml
> >  > value="${catalina.home}/webapps/${app.name}/${metadata.xmlfile}"/>
> >
>
> To get system properties defined at Tomcat runtime, you will need to set
> an environment variable -- either CATALINA_OPTS (Tomcat 4.x) or
> TOMCAT_OPTS (Tomcat 3.3.x).  For example:
>
>   CATALINA_OPTS=-Dmetadata.xmlfile=/path/to/the/file.xml
>   $CATALINA_HOME/bin/startup.sh
>
> However, system properties are not the best way to provide configuration
> information to servlets, because they are global to the entire container
> and hard to manipulate.  You should look at using  or
> servlet initialization parameters inside the web.xml file to provide this
> sort of configuration data.
>
> If you want to do this kind of thing without modifying the web.xml file
> (which would typically be the case if you're deploying the same webapp in
> lots of different environments), here is an apporach that works in Tomcat
> 4 because it requires the JNDI namespace that Tomcat 4 provides:
>
> * In your web.xml file, declare an  element
>   for the configuration property, optionally with a default value:
>
> 
>   metadata.path
>   /default/path/to/metadata.xml
>   java.lang.String
> 
>
> * In your server.xml file, add a  element that defines
>   the actual value for *this* installation of the webapp:
>
> 
>  value="/the/real/path/to/metadata.xml"/>
> 
>
> * In your application, you grab the value you need like this:
>
> IniitalContext ic = new InitialContext();
> String metadataPath = (String) ic.lookup("java:comp/env/metadata.path");
>
>   (This is the javax.naming.InitialContext class from JNDI.  The servlet
>   spec defines that all environment entries are in the "java:comp/env"
>   namespace.)
>
> * This will pick up the default value (if nothing was set in server.xml)
>   or the override value (if you did set it).
>
> The nice thing about this is that it doesn't mess up any other webapp that
> might be using the same property name -- environment entries are
> per-webapp instead of being global.  It also requires zero changes to your
> webapp itself (or its web.xml file) to customize behavior differently on
> different installations.
>
> > Thanks, Rich
> >
>
> Craig
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Problem with run Tomcat 4.0.3 as a service on win2k

2002-03-18 Thread Lawlor, Frank

There are other differences between 3.x and 4.x that
require wrapper.properties changes.  Failure to start
the service is most often a wrapper.properties problem.
You do not have to un/reinstall the service to make
wrapper.properties changes.  Just stop/start.

Here are some of the key lines in mine:

# Remove all the 3.3 entries and have only this for 4.x:
wrapper.class_path=$(wrapper.tomcat_home)\bin\bootstrap.jar

#
# This is Tomcat's startup class (the class that contains Tomcat's
# starting point.
#
wrapper.startup_class=org.apache.catalina.startup.Bootstrap

# I set the xml parser in the invocation
# -Xrs is only required if jdk is pre 1.3.1?
wrapper.cmd_line=$(wrapper.javabin) -Xrs
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
-Dcatalina.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path)
$(wrapper.startup_class) -config $(wrapper.server_xml) start

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: manually stopping one application

2002-03-18 Thread Lawlor, Frank

In Tomcat 4.x take a look at the manager application which is
included.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Another directory question

2002-03-18 Thread Lawlor, Frank

How are you writing the file?

Using the File class you can specify the desired directory.
The file path to your app is
  getServletContext().getRealPath("/")

If you have java security enabled, you need to give your
app permission to write there.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


> Are you absolutely sure the problem is with CensusQuery and not a
referenced
> class?  It could be that Tomcat can't find another class that is
referenced
> by CensusQuery, so it cannot load CensusQuery
>
> Try stripping (or commenting) out all of the code except for a println
call.
> This will show you if the servlet is actually being located or not.

Yes I stripped out everything else and it still won't run the servlet.  In
any event the log from Tomcat says that the cause is that it can't find that
class.

- Root Cause -
java.lang.ClassNotFoundException: Census.CensusQuery

Would someone please tell me what the h**l I am doing wrong?


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: security-constraint and error-page

2002-03-18 Thread rsequeira


Thanks Craig.

RS





"Craig R. McClanahan" <[EMAIL PROTECTED]> on 03/18/2002 11:40:51 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   Tomcat Users List <[EMAIL PROTECTED]>
cc:




On Mon, 18 Mar 2002 [EMAIL PROTECTED] wrote:

> Date: Mon, 18 Mar 2002 08:44:56 -0600
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: security-constraint and error-page
>
>
> Thanks Craig. But I was wondering if there was some way where we could
> intercept the container generated 401 response before it is sent to the
> browser. And after a certain count, send a 200 OK response with some page
> describing that the user does not have access to that resource.
> Correct me if I'm wrong, but my understanding was that the number of
times
> the server responds with a 401 is dependent on the server (Tomcat, in our
> case). Or is it actually? Tomcat sends a 401 Unauthorized response twice
> (if the userid/password is incorrect) and after the third incorrect
> attempt, Tomcat sends a page back. Is the status code associated with the
> fourth response a "401 Unauthorized" still or is it some other code since
I
> thought if the browser receives a 401, it displays the login dialog box.
> According to the HTTP/1.1 rfc:
> "If the 401 response contains the same challenge as the prior response,
and
> the user agent has already attempted authentication at least once, then
the
> user SHOULD be presented the entity that was given in the response, since
> that entity MAY include relevant diagnostic information."
> With regards to the above quote, does this mean that the browser on
> receiving the fourth "401 Unauthorized" displays the page that came along
> with it?
>

You can intercept this, but you'll need to do it with Tomcat-specific
mechanisms (since authentication is happening before your application's
servlets are ever invoked).  Authentication is implemented by Valves
inside of Tomcat (very similar to Filters at the web application level),
so you can write and install a Valve of your own that is invoked before
authentication to do this kind of interception.

To get further, you'll need to download the Tomcat 4 source distribution
and look at the org.apache.catalina.Valve interface.

> Thanks.
> RS

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: SecurityManager - pulling my hair out

2002-03-18 Thread Lawlor, Frank

Here are some of my aded catalina.policy statements:

1.  // Allow read of SAX Parser name
permission java.util.PropertyPermission
"org.xml.sax.driver", "read";

2.  Allow the Autoweb application to do whatever it wants:
// The permissions granted to the AGCW application
grant codeBase
"file:${catalina.home}/webapps/AGCW/-" {
permission java.security.AllPermission;
};

But is seems like TldLocationsCache (is this in your app?)
is having trouble getting to
/javax/servlet/resources/web-app_2_3.dtd (in common\lib\servlet.jar).
What is the dtd spec in your web.xml?

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JDBC/JNDI problem, continued

2002-03-18 Thread Nikola Milutinovic

Hi all.

PostgreSQL 7.2
PostgreSQL JDBC 7.2
Tomcat 4.0.1

Problem: When I try to lookup a resource regularely (I think) defined, I get 
"null". The JDBC resource is defined as per Tomcat docs and general advice on 
this list.

I have made some test, I can lookup the following:

java:comp
java:comp/env
java:comp/env/jdbc

But when I try "java:jdbc/env/jdbc/AddressBookDB" I get "null". The resource in 
question should be OK.

Is there a way to see what goes on in Tomcat's JNDI tree? Some sort of JNDI browser?

Nix.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jim Cobban

Please read this thread and tell me what the h**l I am doing wrong.  I am
just trying to write my first servlet.  I have to give a demo Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
cannot find the class, even though as far as I can see the servlet has
deployed properly.  I have posted every bit of documentation I have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat has no
trouble running.  I honestly cannot see that I am doing anything differently
except to name the package and class different names.  I am losing my mind!
I do not have time to root through the code of Tomcat to find out exactly
what it does during deployment of a servlet or where it goes looking for
classes, and frankly I don't think that I should have to worry about that.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: JDBC/JNDI problem, continued

2002-03-18 Thread George M. Coles

Hello,
I have had the same problem. Null returning from JNDI lookup. The very same
web.xml works in other appservers, and my server.xml is extremely
straightforward. I was using db2.

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 2:43 PM
To: Tomcat Users List
Subject: JDBC/JNDI problem, continued


Hi all.

PostgreSQL 7.2
PostgreSQL JDBC 7.2
Tomcat 4.0.1

Problem: When I try to lookup a resource regularely (I think) defined, I get
"null". The JDBC resource is defined as per Tomcat docs and general advice
on
this list.

I have made some test, I can lookup the following:

java:comp
java:comp/env
java:comp/env/jdbc

But when I try "java:jdbc/env/jdbc/AddressBookDB" I get "null". The resource
in
question should be OK.

Is there a way to see what goes on in Tomcat's JNDI tree? Some sort of JNDI
browser?

Nix.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Jeff Macomber

I don't see any previous posting by you containing your web.xml (even though
I do see a note or two saying you had posted it before but no web.xml).
>From your previous posts it is clear that tomcat is finding your war file
and expanding it.  Your path appears to be correct from the war file.  Is
the case correct on your class file name (I'm not sure this is checked on
windows, I'm using Linux)?  I noticed you are loading java.sql.* does the
class you are loading require javax.sql.* ?  If so be sure you are including
the java extensions for jdbc 2.0.  Other than that I can't think of any
reason why it wouldn't be loading.  You said you had tried just doing a
simple hello world in the servlet and commenting everything else out?  When
you did that did you comment out the imports that you didn't need?

Hope this helps,
Jeff

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 3:00 PM
To: Tomcat Users List
Subject: Please read Re: Urgent Re: Newbie: Servlet under Windows does
not run


Please read this thread and tell me what the h**l I am doing wrong.  I am
just trying to write my first servlet.  I have to give a demo Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
cannot find the class, even though as far as I can see the servlet has
deployed properly.  I have posted every bit of documentation I have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat has no
trouble running.  I honestly cannot see that I am doing anything differently
except to name the package and class different names.  I am losing my mind!
I do not have time to root through the code of Tomcat to find out exactly
what it does during deployment of a servlet or where it goes looking for
classes, and frankly I don't think that I should have to worry about that.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Keng Wong

Have you tried
http://localhost/Census/servlet/Census.CensusQuery or
http://localhost:8080/Census/servlet/Census.CensusQuery ?
You are deploying a new war file(Census webapp) and requires the
webapp name before any servlet urls. Exception is the ROOT
webapp. Good luck.

-keng wong

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:00 PM
To: Tomcat Users List
Subject: Please read Re: Urgent Re: Newbie: Servlet under Windows
does
not run


Please read this thread and tell me what the h**l I am doing
wrong.  I am
just trying to write my first servlet.  I have to give a demo
Tuesday
evening and I cannot get TomCat to run my servlet.  Tomcat
insists that it
cannot find the class, even though as far as I can see the
servlet has
deployed properly.  I have posted every bit of documentation I
have on the
problem and so far all I have received is sympathy.

I have modelled my code directly on the examples, which Tomcat
has no
trouble running.  I honestly cannot see that I am doing anything
differently
except to name the package and class different names.  I am
losing my mind!
I do not have time to root through the code of Tomcat to find out
exactly
what it does during deployment of a servlet or where it goes
looking for
classes, and frankly I don't think that I should have to worry
about that.


--
To unsubscribe:

For additional commands:

Troubles with the list:



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: JDBC/JNDI problem, continued - PUZZLED

2002-03-18 Thread Nikola Milutinovic

Nikola Milutinovic wrote:

> Hi all.
> 
> PostgreSQL 7.2
> PostgreSQL JDBC 7.2
> Tomcat 4.0.1
> 
> Problem: When I try to lookup a resource regularely (I think) defined, I 
> get "null". The JDBC resource is defined as per Tomcat docs and general 
> advice on this list.
> 
> I have made some test, I can lookup the following:
> 
> java:comp
> java:comp/env
> java:comp/env/jdbc
> 
> But when I try "java:jdbc/env/jdbc/AddressBookDB" I get "null". The 
> resource in question should be OK.
> 
> Is there a way to see what goes on in Tomcat's JNDI tree? Some sort of 
> JNDI browser?

So, I decided to write my own JNDI browser, after all, I have Java, JSP and JNDI 
in Tomcat. :-)

Relatively simple code:

Context looked up: <%= contextPath %>
<%
InitialContext initCtx;
Context envCtx;

initCtx = new InitialContext();
NamingEnumeration enum = initCtx.listBindings( contextPath );
int i = 1;
%>

<%
   while( enum.hasMore() ) {
%>
   
 <%= i %>
 <%= ((Binding)enum.next()).toString() %>
   
<%
   }
%>


This is what I get when I set context to "java:comp/env/jdbc":

--
Context looked up: java:comp/env/jdbc

1 AddressBookDB: org.apache.naming.ResourceRef:Reference Class Name: 
javax.sql.DataSource Type: scope Content: Shareable Type: auth Content: Container
--

So, it is there. Why does "lookup()" on that particular resource return "null"?

Nix.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Please read Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Fabien Nisol

At 02:59 PM 18/03/2002 -0500, you wrote:
>Please read this thread and tell me what the h**l I am doing wrong.  I am
>just trying to write my first servlet.  I have to give a demo Tuesday
>evening and I cannot get TomCat to run my servlet.  Tomcat insists that it
>cannot find the class, even though as far as I can see the servlet has
>deployed properly.  I have posted every bit of documentation I have on the
>problem and so far all I have received is sympathy.
>
>I have modelled my code directly on the examples, which Tomcat has no
>trouble running.  I honestly cannot see that I am doing anything differently
>except to name the package and class different names.  I am losing my mind!
>I do not have time to root through the code of Tomcat to find out exactly
>what it does during deployment of a servlet or where it goes looking for
>classes, and frankly I don't think that I should have to worry about that.
>

I've noticed that in certain cases, jar does put the *.class files in the 
file with a NON relative path... This lead to the impossibility for the 
java interpretter to find your classes...

Look with a jar -tvf if the pathes are relative or not ... That could be as 
stupid than this ! ( I had a problem similar to yours in a java 
application, I searched a solution for 4 days !

Also : Did you add your application to the server.xml file ?


>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: JDBC/JNDI problem, continued - PUZZLED

2002-03-18 Thread Craig R. McClanahan

Do your log files have any interesting messages?

Craig


On Mon, 18 Mar 2002, Nikola Milutinovic wrote:

> Date: Mon, 18 Mar 2002 21:21:36 +0100
> From: Nikola Milutinovic <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: JDBC/JNDI problem, continued - PUZZLED
>
> Nikola Milutinovic wrote:
>
> > Hi all.
> >
> > PostgreSQL 7.2
> > PostgreSQL JDBC 7.2
> > Tomcat 4.0.1
> >
> > Problem: When I try to lookup a resource regularely (I think) defined, I
> > get "null". The JDBC resource is defined as per Tomcat docs and general
> > advice on this list.
> >
> > I have made some test, I can lookup the following:
> >
> > java:comp
> > java:comp/env
> > java:comp/env/jdbc
> >
> > But when I try "java:jdbc/env/jdbc/AddressBookDB" I get "null". The
> > resource in question should be OK.
> >
> > Is there a way to see what goes on in Tomcat's JNDI tree? Some sort of
> > JNDI browser?
>
> So, I decided to write my own JNDI browser, after all, I have Java, JSP and JNDI
> in Tomcat. :-)
>
> Relatively simple code:
>
> Context looked up: <%= contextPath %>
> <%
> InitialContext initCtx;
> Context envCtx;
>
> initCtx = new InitialContext();
> NamingEnumeration enum = initCtx.listBindings( contextPath );
> int i = 1;
> %>
> 
> <%
>while( enum.hasMore() ) {
> %>
>
>  <%= i %>
>  <%= ((Binding)enum.next()).toString() %>
>
> <%
>}
> %>
> 
>
> This is what I get when I set context to "java:comp/env/jdbc":
>
> --
> Context looked up: java:comp/env/jdbc
>
> 1 AddressBookDB: org.apache.naming.ResourceRef:Reference Class Name:
> javax.sql.DataSource Type: scope Content: Shareable Type: auth Content: Container
> --
>
> So, it is there. Why does "lookup()" on that particular resource return "null"?
>
> Nix.
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Disable DTD Validation for web.xml

2002-03-18 Thread Kevin Grey

 
Heya,
 
I was wondering if its possible to disable DTD validation for
the web.xml for a specific WAR file (or across an entire Tomcat engine)?
 
~~K
 



4.0.2: Element type "tlib-version" must be declared.

2002-03-18 Thread Christopher Cobb

When I try to use a JSP 1.2 style taglib definition file, I get an exception
JasperException: XML parsing error on file /WEB-INF/tabtags.tld, Element type
"tlib-version" must be declared.  My file validates against this dtd:
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd.  Is there some switch somewhere to
turn on JSP 1.2 dtds?

cc

org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/tabtags.tld:
(line 11, col 17): Element type "tlib-version" must be declared.
 at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:218)
 at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:283)

 at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:219)
 at
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1164)

 at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:758)

 at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:121)

 at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
 at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)

 at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)

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

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
 at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
 at java.lang.Thread.run(Thread.java:536)



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: JDBC/JNDI problem, continued - PUZZLED

2002-03-18 Thread Brad Schneider

I (and countless others) have run into this same problem.  I tried with
the MS SQL 2000 Beta Driver.  It seems to me that either due to
incorrect configuration or bugs in the driver, the connection cannot be
created and the end result is null when you go to ask for a connection.
However this is just a guess, since I could not find any kind of logging
or diagnostic output.

The current pool implementation in Tomcat is Tyrex.  I *suspect* that is
where the problem lies, it either doesn't understand that it isn't
creating connections properly, or it just isn't logging it's errors or
failure to connect anywhere (even worse).  I couldn't find anything
beyond Javadoc API for the Tyrex stuff.

So, my solution was to create my own factory until the Container,
Connection Pool, and Driver can work their respective *#!@ out.  While
this doesn't get me connection pooling, it does allow me to proceed with
development and when this stuff does get fixed, I won't have to change
my code.  

Tyrex is going away in favor of DBCP, so I will probably revisit this
issue when that shows up in the Tomcat release.  If you have a JDBC
driver that has it's own connection pooling support, you could easily
enhance my code to add the appropriate parameters.

(Yes, I know this is a work-around, but I have wasted a ***lot*** of
time trying to get this to work and finally gave up and did this, so at
least my code won't have to change when the 'true' connection pooling
stuff gets fixed, and given the amount of time and research I have put
into this, it is broken in some respect.)

Here is the code, server.xml and web.xml:


import java.util.Enumeration;
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.spi.ObjectFactory;

import java.sql.*;
import javax.sql.*;
import com.microsoft.jdbcx.sqlserver.*;

public class DataSourceFactory implements ObjectFactory
{
private DataSource ds;
private String serverName;
private String databaseName;
private String password;
private String user;
private int portNumber;
private String description;

public Object getObjectInstance(Object obj,Name name, Context
nameCtx, Hashtable environment)
throws NamingException
{
// check to see if the DataSource has been initialized yet
if(ds == null)
{
// initialize the DataSource
initParams((Reference)obj);
initDataSource();
}

return ds;
}

/**
 * Retrieves the parameters set in server.xml which will be used
 * to intitalize the properties of the DataSource.  Looks for the 
 * parameters named: 
 * 
 * 
 *  serverName
 *  databaseName
 *  user
 *  password
 *  portNumber
 *  description
 * 
 */
 
void initParams(Reference ref)
{
Enumeration parameters = ref.getAll();

while(parameters.hasMoreElements())
{
RefAddr addr = (RefAddr)parameters.nextElement();
String name = addr.getType();

if(name.equals("serverName"))
{
serverName = (String)addr.getContent();
}
else if(name.equals("databaseName"))
{
databaseName = (String)addr.getContent();
}
else if(name.equals("user"))
{
user = (String)addr.getContent();
}
else if(name.equals("password"))
{
password = (String)addr.getContent();
}
else if(name.equals("portNumber"))
{
portNumber =
Integer.parseInt((String)addr.getContent());
}
else if(name.equals("description"))
{
description = (String)addr.getContent();
}
}
}

/**
 * Sets the properties of the SQLServerDataSource using the
parameters
 * from server.xml.
 */
 
void initDataSource()
{
SQLServerDataSource ds = null;

try
{
ds = new SQLServerDataSource();

ds.setServerName(serverName);
ds.setDatabaseName(databaseName);
ds.setPassword(password);
ds.setUser(user);
ds.setPortNumber(portNumber);
ds.setDescription(description); 
}
catch(Exception e)
{
System.out.println("DataSource intitialization
failed.");
System.out.println(e);
}
}
}

--
server.xml
--



factory
  net.kanati.db.DataSourceFactory


serverName
localhost


databaseName
   

RE: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread JavaJosh

I am fairly new, but perhaps I can help...

> -Original Message-
> From: Jim Cobban [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 10:34 AM
> To: Tomcat Users List
> Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run
> 
> - Original Message -
> From: "Wagoner, Mark" <[EMAIL PROTECTED]>
> Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run
> 
> 
> > What URL are you using to get to the servlet?
> 
> I have tried a very wide range of URLs.  According to all of the
> documentation the one that should work is
> http://localhost/servlet/Census.CensusQuery  That is using the class
> name.
> However when that failed I also tried  /servlet/Census/CensusQuery,
> and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
> earlier, the name of the servlet, as opposed to the class, was
> Census1901 I
> also tried /servlet/Census1901.  I have also tried using URL mapping
> specified in the
> WEB-INF/web.xml file.  In any event the bottom lime is that when I
> request
> the above URL TomCat does go looking for my class.  It just can't seem
> to
> find it!
> 
> I know that I must be doing something wrong, because nobody else seems
> to be
> having any difficulty running servlets, but this is driving me crazy.
> I
> have been trying everything I can think of for more than a week and
> TomCat
> keeps claiming that it can't find the class.  I have read the
> documentation
> over and over again.  I have gone with a fine tooth comb through the
> examples trying to see what they are doing that is different from what
> I am
> doing.  I just don't understand why this is so bloody difficulty.
> 
> Just to put every bit of the documentation of this problem in one
> place:
> 
> The first few lines of my servlet are:
> 
> package Census;

OK. First, you should use the naming convention of having your packages
lowercase. A little known fact is that classes and packages share the
same namespace, so you risk a collision. (You don't have any classes or
interfaces called Census do you???)
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.sql.*;
> public class CensusQuery extends HttpServlet {
> 
> 
> which I compile using the following .bat file:
> 
> set PATH=C:\jdk1.3.1\bin;%PATH%
> set
> CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-

I'm surprised this works since servlet.jar is in common/lib (at least in
the 4.0.3 release)

> INF\classes;%CLASSPATH%

This is dangerous. I notice you are doing db stuff. You wouldn't happen
to be doing a Class.forName would you? If you are, then your servlet
won't run without your JDBC driver in web-inf/lib.

>  javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
>  javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
>  javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java |
> more
>  javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more

> jar cf Census.war *.html WEB-INF

It seems like you are compiling a lot of stuff here. Is this your first
servlet? Have you ever successfully gotten a simple servlet to run? I
would recommend doing that first. That said...

Also, tomcat does not require that you use a war file, and I suggest
that you don't, especially for development. Also, tomcat will use the
default context of "Census" - possibly confusing itself and you.
> 
> 
> The .war file this produces contains:
> 
> D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
> META-INF/
> META-INF/MANIFEST.MF
> CensusQuery.html
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/Census/
> WEB-INF/classes/Census/ConnectionPool.class
> WEB-INF/classes/Census/DBResults.class
> WEB-INF/classes/Census/DriverUtilities.class
> WEB-INF/classes/Census/DatabaseUtilities.class
> WEB-INF/classes/Census/ServletUtilities.class
> WEB-INF/classes/Census/CensusQuery.class
> WEB-INF/web.xml
> 
> The web.xml file is:
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
> 
> My Web Application
> 
>   This is version X.X of an application to perform
>   a wild and wonderful task, based on servlets and
>   JSP pages.  It was written by Dave Developer
>   ([EMAIL PROTECTED]), who should be contacted for
>   more information.
> 
> 
> 
> 
> Census1901
> 
> 
> Census.CensusQuery
> 
> 
> 
> DbVendor
>  mysql
> 
> 
>  Url
>  localhost
> 
> 
>  DbName
>  Census
> 
> 
>  UserName
>  anonymous
> 
> 
>  Password
>  none
> 
> 
>  InitConnections
>  10
> 
> 
>  MaxConnections
>  10
> 
> 
> 


Apache2.032+Tomcat4.0.4+mod_jk Please Help

2002-03-18 Thread Gabriel Lopez


Hi. I need help.
My configuration is:
Apache-2.0.32(SSL)
Tomcat-4.0.4
mod-jk
jdk1.4

When I try to run some servlet I get:


Server error!
El servidor encontro un error interno y fue imposible completar su solicitud. 
Mensaje de error: 
handler "jakarta-servlet" not found for: HelloWorldExample 
Favor de contactar al webmaster en caso de que usted crea que existe un error en el 
servidor. 
Error 500
london.dif.um.es 
Mon Mar 18 13:35:59 2002 
Apache/2.0.32 (Unix) DAV/2 mod_ssl/3.0a0 OpenSSL/0.9.6b 
**

This seems to be that ajp connector is not found¡¡
This is my configuratión:
server.xml:
***
  


 

 




  

  

  

  


  
  

  











  
  
  
  
  
  
usersa
password
driverClassName
  org.hsql.jdbcDriver
driverName
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  




  
  
  

  
  
  
  
usersa
password
driverClassName
  org.hsql.jdbcDriver
driverName
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  


  



  


***

my worker.properties:


workers.tomcat_home=/usr/local/jakarta/tomcat4.0

workers.java_home=/usr/local/j2sdk1.4.0

ps=/
worker.list=ajp13 ,ajp14, inprocess
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp14.port=8010
worker.ajp14.host=localhost
worker.ajp14.type=ajp14
worker.ajp14.secretkey=secret
worker.ajp14.credentials=myveryrandomentropy

worker.ajp14.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13

worker.inprocess.type=jni

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/catalina.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat-util.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)/tomcat-jk2.jar 
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
**

my httpd.conf:

***
ServerRoot "/usr/local/apache2"


LoadModulejk_module  modules/mod_jk.so
JkWorkersFile /usr/local/jakarta/tomcat4.0/conf/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevelinfo
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

Alias /myappp "/usr/local/jakarta/tomcat4.0/webapps/myapp"

Options Indexes FollowSymLinks

 
JkMount /manager ajp13
JkMount /manager/* ajp13
 
JkMount /examples ajp13
JkMount /examples/* ajp13
 
JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

JkMount /myapp/servlet/* ajp13

JkMount /myapp ajp13
JkMount /myapp/* ajp13


ServerName london.dif.um.es

DocumentRoot "/usr/local/apache2/htdocs"



Include conf/ssl.conf




my ssl.conf 
*



Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl.crl
SSLPassPhraseDialog  builtin

SSLSessionCacheTimeout  300

SSLMutex  file:logs/ssl_mutex

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog  logs/ssl_engine_log
SSLLogLevel info



DocumentRoot "/usr/local/apache2/htdocs"
ServerName london.dif.um.es
ServerAdmin [EMAIL PROTECTED]
ErrorLog logs/error_log
TransferLog logs/access_log

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /usr/local/...
SSLCertificateKeyFile /usr/local/...
SSLCACertificateFile /usr/local/
SSLVerifyClient optional
SSLOptions +ExportCertData +StdEnvVars

SSLOptions +StdEnvVars


SSLOptions +StdEnv

RE: Tomcat 4.0 and IterationTag

2002-03-18 Thread Rich Sneiderman

I haven't implemented on of these yet but it sounds like you should be
inheriting from BodyTagSupport not TagSupport.

- Rich

-Original Message-
From: Albert Pastrana [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 9:25 AM
To: tomcat-list
Subject: Tomcat 4.0 and IterationTag


Hi,

I've a tomcat 4.0 (downloaded latest week) in a Win2k pro.

I've a little problem running it as service, but running stand-alone
everything it's right.

The first problem comes when creating an iteration tag. I've followed
many explanations and, of course, read all the javadocs, and I cannot
understand what I'm doing wrong.

My code is something like that:

public class RepeatTag
extends  TagSupport
{
   int num = 0;

   boolean endLoop()   { return num==10; }
   voidnextElement() { num++;  }

   public int doStartTag() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
 }
 return SKIP_BODY;
   }

   public int doAfterBody() throws JspException {
  if (!endLoop()) {
 nextElement();
 return EVAL_BODY_AGAIN;
  } else {
 return SKIP_BODY;
  }
  }

} //end class RepeatTag

And the problem is that my Tomcat is saying me that exception:
"javax.servlet.ServletException: Since tag handler class
com.ludicus.general.taglib.RepeatTag does not implement BodyTag, it
can't return BodyTag.EVAL_BODY_TAG"

I've read a lot of documentation about JSP1.2 and I think that's the
right solution, but I supose I'm doing something wrong, could anyone
tell me what's the problem?

thanks a lot

  albert


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Does CGIServlet work with POST?

2002-03-18 Thread August Detlefsen

I setup the CGIServlet for one of my customers using a perl CGI. After
much debugging and delving into perl code, we tried switching the
form's POST method to GET and it worked fine after that. 

Does CGIServlet not support POST? 

-August

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JSP problem

2002-03-18 Thread Umamaheswar Kalluru

Hi,
I am using Tomcat 4.0.1. When I use my Java servlets it is working fine but when I use 
.jsp it says that the file does not exists in the server directory. What could be the 
problem? Should I chage any thing in the .xml file?

Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Problem in running servlet please help--- URGENT

2002-03-18 Thread Uma Munugala

Hi 
Iam getting problem java.lang.ClassFormatError: since 4 days Iam working on
but not finding a solution.
I tried with tomcat 4.0.3 and 4.0.4 beta version both gives same problem.
Installation is successful, and examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.



Here is the description
---
I have written a servlet which SingleThreadModel


public class Login extends HttpServlet implements SingleThreadModel


In this one Iam trying to access oracle database using custom developed
classes



/**
 * defineCFDatabase creates the Data Dictionary for 'cf'
 **/
public static synchronized boolean defineCFDatabase()
{

try{
if (!gDBInitialized) {

gDBInitialized = dbCFDefinition.defineCFDatabase( false );
if (gDBInitialized) {

gDB = dbCFDefinition.getDatabase();
dboCF = gDB;
}
}

if (gDBInitialized && !gVariablesInitialized) {
gVariablesInitialized = initializeVariables();
}
} catch(Exception e) {
Util.log("*  Exception :" + e.toString());  
}

return gDBInitialized && gVariablesInitialized;
}

In dbCFDefinition class
public static synchronized boolean defineCFDatabase( boolean forceAllTables
){

Access a class called DscDomain trying to get defaultId;

return boolean
}


DscDomain class calls a method as follows


public String getGenericType(String dataType , int length)  {

if(!RelConnection.gDefaultConnectionIsOracle && mSQLServer){
//now only for SQLServer
if (dataType.toLowerCase().equals("varchar2")){
dataType = "varchar";
}
else if (dataType.toLowerCase().equals("number")){
dataType = "numeric";
}
else if (dataType.toLowerCase().equals("date")){
dataType = "datetime";
}
else{
dataType = "varchar";
length = 0;
}

} 
if ( length == 0) { 
Util.log("--- 2 if dataType" + dataType + "
length: " + length);
return dataType;

}
else {
Util.log("--- else dataType" + dataType + " length:
" + length);
return dataType + "(" + length + ")" ;
}
}


when RelConnection.gDefaultConnectionIsOracle is accessed Iam getting
problem
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal Variable name "")

RelConnection is a public class with static members and static methods
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.

gDefaultConnectionIsOracle is defined as
static public boolean   gDefaultConnectionIsOracle = false;



Thanks a lot
Uma




---
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:32 AM
To: Tomcat Users List
Subject: RE: Problem in running servlet please help--- urgent



Post your code/log output. Maybe someone will have a look at it. Or you
could check the archives. I think I saw someone who had a similar problem.

RS





Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 11:27:42 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve
that
problem. The class has static members and static methods, when iam trying
to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sen

RE: Problem in running servlet please help--- urgent

2002-03-18 Thread rsequeira


http:[EMAIL PROTECTED]%3E

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 12:26:13 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Hi sequeira
can u please suggest the site where I can find archives. I tried at
www.apache.org but Iam not finding any thing



Thanks a lot for help
Uma




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 9:32 AM
To: Tomcat Users List
Subject: RE: Problem in running servlet please help--- urgent



Post your code/log output. Maybe someone will have a look at it. Or you
could check the archives. I think I saw someone who had a similar problem.

RS





Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 11:27:42 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  RE: Problem in running servlet please help--- urgent

Thanks for replying
   I have synchronized methods and they are returning boolean. Can u please
let me know how that is getting affected and what I need to do to solve
that
problem. The class has static members and static methods, when iam trying
to
access static members the error is coming.

java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")


Thanks a lot

Uma


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:41 AM
To: Tomcat Users List
Subject: Re: Problem in running servlet please help--- urgent



Do you have any synchronized method? Are there any return statements within
the synchronized methods?

RS




Uma Munugala <[EMAIL PROTECTED]> on 03/18/2002 10:00:13 AM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:

Subject:  Problem in running servlet please help--- urgent


Hi
  Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and
examples work properly.
I deployed my application in web-inf/classes
Iam getting an error when I run servlet.

When my servlet is invoked,
when code is trying to access the RelConnection.gDefaultConnectionIsOracle,
a static member Iam getting the error.
java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection
(Illegal
Variable name "")
Relconnection is a public class with all static members and static methods.
In the same package it is able to get other methods. when it is trying to
access static variable iam getting this error.


Any help would be appreciated


Thanks
Uma

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 









--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 4.0 and Windows XP

2002-03-18 Thread Marc Chamberlin

Hate to ask a straightfoward question, but can't seem to find any answers and the FAQ 
is down

I currently am running Tomcat 4.0 under Win98 and am thinking of upgrading to Windows 
XP Pro.  Has anyone encountered any problems or know of any hitches I should be aware 
of to do this? Has Tomcat 4.0 been tested under Windows XP?  Thanks for any/all 
replies, just trying to forsee any roadblocks! ;-)

   Marc..




Do you think the software industry will ever make software that is as easy and 
reliable for a user to use 
as the automobile industry makes a car easy and reliable for a user to drive?

A man said unto the universe -  "Sir, I exist!"
"However," replied the universe  "I do not see where that creates in me a sense of an 
obligation."
  - Stephen Crane



Re: Disable DTD Validation for web.xml

2002-03-18 Thread Craig R. McClanahan



On Mon, 18 Mar 2002, Kevin Grey wrote:

> Date: Mon, 18 Mar 2002 15:39:57 -0500
> From: Kevin Grey <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Disable DTD Validation for web.xml
>
>
> Heya,
>
> I was wondering if its possible to disable DTD validation for
> the web.xml for a specific WAR file (or across an entire Tomcat engine)?
>

Not without changing the Tomcat sources.  IMHO, this would be a really
unwise thing for people to do to themselves, because it basically
guarantees that your app would not be portable even if it just happened to
run on Tomcat.

> ~~K
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: 4.0.2: Element type "tlib-version" must be declared.

2002-03-18 Thread Craig R. McClanahan



On Mon, 18 Mar 2002, Christopher Cobb wrote:

> Date: Mon, 18 Mar 2002 15:44:16 -0500
> From: Christopher Cobb <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: 4.0.2: Element type "tlib-version" must be declared.
>
> When I try to use a JSP 1.2 style taglib definition file, I get an exception
> JasperException: XML parsing error on file /WEB-INF/tabtags.tld, Element type
> "tlib-version" must be declared.  My file validates against this dtd:
> http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd.  Is there some switch somewhere to
> turn on JSP 1.2 dtds?
>

What does the entire DOCTYPE element of your TLD say?  Tomcat matches on
the public identifier first, and if that says to use the JSP 1.1 version,
it will.

> cc
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: 4.0.2: Element type "tlib-version" must be declared.

2002-03-18 Thread Christopher Cobb

I knew it would be something easy!  Thanks.

cc

"Craig R. McClanahan" wrote:

> On Mon, 18 Mar 2002, Christopher Cobb wrote:
>
> > Date: Mon, 18 Mar 2002 15:44:16 -0500
> > From: Christopher Cobb <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: 4.0.2: Element type "tlib-version" must be declared.
> >
> > When I try to use a JSP 1.2 style taglib definition file, I get an exception
> > JasperException: XML parsing error on file /WEB-INF/tabtags.tld, Element type
> > "tlib-version" must be declared.  My file validates against this dtd:
> > http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd.  Is there some switch somewhere 
>to
> > turn on JSP 1.2 dtds?
> >
>
> What does the entire DOCTYPE element of your TLD say?  Tomcat matches on
> the public identifier first, and if that says to use the JSP 1.1 version,
> it will.
>
> > cc
> >
>
> Craig
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Urgent Re: Newbie: Servlet under Windows does not run

2002-03-18 Thread Peter Wieland

I know it sounds stupid but sometimes it is a simple thing that blocks all:

When I had troubles like the one you describe I usually got it fixed
stopping tomcat, deleting the work directory (${tomcat-home}/work and
deleting the directory that contains the unpacked war-file (for you
${tomcat-home}/webapps/Census). Then restart Tomcat. This way you are sure
to have the actual version of your servlet and no older cached files used.

Besides this I have entries like this in my web.xml to access my servlets.

--

  my-servlet
  my.package.MyServlet



  my-servlet
  my-servlet.exe

---

which allows me to access the servlet with the url
http://localhost/my-application/my-servlet.exe (but this is not very
different from your web.xml).

Hope that helps. Good luck

Peter



> - Original Message -
> From: "Wagoner, Mark" <[EMAIL PROTECTED]>
> Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run


>> What URL are you using to get to the servlet?

> I have tried a very wide range of URLs.  According to all of the
> documentation the one that should work is
> http://localhost/servlet/Census.CensusQuery  That is using the class name.
> However when that failed I also tried  /servlet/Census/CensusQuery,
> and  /servlet/CensusQuery.  Since in my web.xml file, which I posted
> earlier, the name of the servlet, as opposed to the class, was Census1901
> I
> also tried /servlet/Census1901.  I have also tried using URL mapping
> specified in the
> WEB-INF/web.xml file.  In any event the bottom lime is that when I request
> the above URL TomCat does go looking for my class.  It just can't seem to
> find it!

> I know that I must be doing something wrong, because nobody else seems to
> be
> having any difficulty running servlets, but this is driving me crazy.  I
> have been trying everything I can think of for more than a week and
> TomCat
> keeps claiming that it can't find the class.  I have read the
> documentation
> over and over again.  I have gone with a fine tooth comb through the
> examples trying to see what they are doing that is different from what I
> am
> doing.  I just don't understand why this is so bloody difficulty.

> Just to put every bit of the documentation of this problem in one place:

> The first few lines of my servlet are:

> package Census;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.sql.*;
> public class CensusQuery extends HttpServlet {


> which I compile using the following .bat file:

> set PATH=C:\jdk1.3.1\bin;%PATH%
> set
> CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPAT
> H%
>  javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more
>  javac -d WEB-INF/classes -classpath %CP% DBResults.java | more
>  javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more
>  javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more
> jar cf Census.war *.html WEB-INF


> The .war file this produces contains:

> D:\MyPrograms\JavaProgs\CensusServlet>jar -tf Census.war
> META-INF/
> META-INF/MANIFEST.MF
> CensusQuery.html
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/Census/
> WEB-INF/classes/Census/ConnectionPool.class
> WEB-INF/classes/Census/DBResults.class
> WEB-INF/classes/Census/DriverUtilities.class
> WEB-INF/classes/Census/DatabaseUtilities.class
> WEB-INF/classes/Census/ServletUtilities.class
> WEB-INF/classes/Census/CensusQuery.class
> WEB-INF/web.xml

> The web.xml file is:

> 

>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

> 
> My Web Application
> 
>   This is version X.X of an application to perform
>   a wild and wonderful task, based on servlets and
>   JSP pages.  It was written by Dave Developer
>   ([EMAIL PROTECTED]), who should be contacted for
>   more information.
> 

> 
> 
> Census1901
> 
> 
> Census.CensusQuery
> 

> 
> DbVendor
>  mysql
> 
> 
>  Url
>  localhost
> 
> 
>  DbName
>  Census
> 
> 
>  UserName
>  anonymous
> 
> 
>  Password
>  none
> 
> 
>  InitConnections
>  10
> 
> 
>  MaxConnections
>  10
> 

> 
> 
> 

> and the relevant lines of the log file under TomCat 4.0.3 are:

> 2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at
> context path /Census from URL
> jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/
> 2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to
> work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census
> 2002-03-17 14:52:34 StandardManager[/Census]: Seeding

Re: SecurityManager - pulling my hair out

2002-03-18 Thread Kim Altintop

Hi Frank,

thank you for responding. 
TldLocationsCache is a tomcat internal class that provides the web.xml and
tld DTDs to the SAX parser (thus avoiding it to download them from the
network). The DTD for the web.xml is deployed as part of the servlet.jar.
My DTD spec in web.xml is:

http://java.sun.com/dtd/web-app_2_3.dtd";>

It seems to me as if Tomcat should be able to resolve this under all
circumstances (as all Tomcat code has AllPermission by default). But it
doesn't and I'm unable to figure out what's going on... :(
As I said: no AccessControlException gets thrown here. Tomcat just prints
the message to the log - but my servlets are unable to get any
s from web.xml since it has not been parsed. If I turn off the
SecurityManager, everything works fine.

After all, it seems like voodoo to me - since no one out there has the same
problem apparently...

Regards,
Kim

--On 3/18/2002 1:38 PM -0600 "Lawlor, Frank" <[EMAIL PROTECTED]>
wrote:

> Here are some of my aded catalina.policy statements:
> 
>   1.  // Allow read of SAX Parser name
>   permission java.util.PropertyPermission
> "org.xml.sax.driver", "read";
>   
>   2.  Allow the Autoweb application to do whatever it wants:
>   // The permissions granted to the AGCW application
>   grant codeBase
> "file:${catalina.home}/webapps/AGCW/-" {
>   permission java.security.AllPermission;
>   };
> 
> But is seems like TldLocationsCache (is this in your app?)
> is having trouble getting to
> /javax/servlet/resources/web-app_2_3.dtd (in common\lib\servlet.jar).
> What is the dtd spec in your web.xml?
> 
> Frank Lawlor
> Athens Group, Inc.
> (512) 345-0600 x151
> Athens Group, an employee-owned consulting firm integrating technology
> strategy and software solutions.
> 
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




MacOS X - Changing JAVA_OPTS for 8859_1 encoding

2002-03-18 Thread Steven Elliott

 From: Dave Makower <[EMAIL PROTECTED]>
> 
> I think the correct syntax would be:
> 
> JAVA_OPTS="-Dfile.encoding=8859_1"
> 
> The quotes aren't really important, but the -D is.  If that was just a typo
> in your message, then I'm not really sure what the problem is.  But if that
> was actually what's in your script, it won't have the effect of setting a
> system property in Java unless the -D is there.
> 
> (I really don't know anything about the file.encoding property in
> particular, or it's behavior, so I can't help you there.)

Thanks Dave for the suggestion but I tried that (amongst other numerous
variations) but I still was getting System.getProperty("file.encoding") =
MacRoman.

The only way I found was to replace $JAVA_OPTS everywhere in catalina.sh
with -Dfile.encoding="Latin-1" (I suppose 8859_1 would work, just haven't
tried yet).

I look into it more later

Thanks,

Steven


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Upload file to email as attachment

2002-03-18 Thread Jason Webber

Right now I finally got the file uploading to work properly using
jspSmartUpload.  Now I need to have my servlet send an email with the file
as an attachment.  I believe I wont have a problem saving the file to disk
and then attaching it to an email.  However saving it to disk just to reread
from the disk to send as an attachment seems wasteful.  The files are only
about 30-50kb.  Has anyone done this or is there even a better way to do
this using somethign other than jspSmartUpload?

TIA


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




  1   2   >