RE: Configuring the 2 web.xml's ??!!

2001-06-14 Thread Pernica, Jan

The directory structure should be:
webapps/myapp
webapps/myapp/WEB-INF

if you put your index.html into myapp directory then tomcat should use that
file (if it exists)

Regards

Jan

On Wednesday, June 13, 2001 4:36 PM, Matthias Schiffer
[SMTP:[EMAIL PROTECTED]] wrote:
 
 Hi!
 
 No! I have daone all these point or better in an Embedded Tomcat-Machine
 you do not have to put a server.xml anywhere, but a web.xmlBut
 thanks anyway. Tomcat finds all my Web.xml files but it seems to be
 not able to read/find/locate my desired welcome-file. What can I do ??
 
 
 Pernica, Jan schrieb:
  
  Hi
  1) you have to add your application into $JAKARTA_HOME/conf/server.xml
(look
  how example is defined)
  2) you have to put your web.xml into
  $JAKARTA_HOME/webapps/yourapp/WEB-INF/web.xml
  
 
   I have still several problems with my embedded Tomcat. I would be very
   thankful if you take a look over my src-code and tell me whether it's
   right or not, but I think the src-code is not my problem. I think my
   problem is the configuration of the Tomcat because it seems to be
   impossible to find any documentation about configuring a Tomcat as
   Embedded.
   So, my introduction for you: I have a ICCS/-directory, which is my
   root-directory(app1.getParent()). In this directory there is also a
   conf-directory, in which the default-modified web.xml is placed, and
in
   the ICCS/-directory there is a html/-subdirectory, in which all my
   html-files including my desired welcome-file index.html are placed. So
I
   don't know how to configure my web.xml files or other files, if i was
   wrong, correctly. Please help me with all my problems. Perhaps now you
   think I am a little bit stupid but I am very new in configuring and
   installing webservers generally.
  
   I have just taken over the delievered web.xml in Tomcat Vers. 4 B5 and
   created a web.xml file in my html/-subdirectory and then in the
   WEB-INF-subdirectory of it. This file is also found and in it is
   written:
  
   web-app
   welcome-file-list
   welcome-fileindex.html/welcome-file
   /welcome-file-list
   /web-app
  
   If this was all right, there would be an error containing: The
request
   file contained no data or something like that.
  
  
   I hope you have read until this line and you can now answer my
   questions.
  
   Yours faithfully
  
   Matthias Schiffer
  
  __
  Tato komunikace je urcena vyhradne pro adresata a je duverna.
  This communication is intended solely for the addressee and is
confidential.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: reloading JSP

2001-06-14 Thread Pernica, Jan

there is an bug

On Wednesday, June 13, 2001 6:25 PM, Luba Powell
[SMTP:[EMAIL PROTECTED]] wrote:
 What do I need to do to have Tomcat4 automatically reload JSP pages 
 that contain beans and other classes.   
 Right now I am just deleting stuff from work directory, thus forcing 
 recompilation.   There must be a better way.
  
 And I dutifully put reload flag into server.xml file:
 Context path=/db docBase=db debug=9 reloadable=true
  /Context
  
 Thanks.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: session object

2001-06-14 Thread Pernica, Jan

You cannot do that.

On Thursday, June 14, 2001 3:06 PM, [EMAIL PROTECTED]
[SMTP:[EMAIL PROTECTED]] wrote:
 Hi !
 
 I don't understand why but when I put the request object in the session :
 
 session.setAttribute(request, request);
 
 and try to retrieve it later in another jsp page :
 
 request = (HttpServletRequest) session.getAttribute(request);
 
 I constat that my request object is egal to null
 
 WHY !
 
 
 Patrick PIERRA


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Configuring the 2 web.xml's ??!!

2001-06-13 Thread Pernica, Jan

Hi
1) you have to add your application into $JAKARTA_HOME/conf/server.xml (look
how example is defined)
2) you have to put your web.xml into
$JAKARTA_HOME/webapps/yourapp/WEB-INF/web.xml

good luck

Jan

On Wednesday, June 13, 2001 2:12 PM, Matthias Schiffer
[SMTP:[EMAIL PROTECTED]] wrote:
 Hello everybody
 
 I have still several problems with my embedded Tomcat. I would be very
 thankful if you take a look over my src-code and tell me whether it's
 right or not, but I think the src-code is not my problem. I think my
 problem is the configuration of the Tomcat because it seems to be
 impossible to find any documentation about configuring a Tomcat as
 Embedded. 
 So, my introduction for you: I have a ICCS/-directory, which is my
 root-directory(app1.getParent()). In this directory there is also a
 conf-directory, in which the default-modified web.xml is placed, and in
 the ICCS/-directory there is a html/-subdirectory, in which all my
 html-files including my desired welcome-file index.html are placed. So I
 don't know how to configure my web.xml files or other files, if i was
 wrong, correctly. Please help me with all my problems. Perhaps now you
 think I am a little bit stupid but I am very new in configuring and
 installing webservers generally.
 
 I have just taken over the delievered web.xml in Tomcat Vers. 4 B5 and
 created a web.xml file in my html/-subdirectory and then in the
 WEB-INF-subdirectory of it. This file is also found and in it is
 written:
 
 web-app
 welcome-file-list
 welcome-fileindex.html/welcome-file
 /welcome-file-list
 /web-app
 
 If this was all right, there would be an error containing: The request
 file contained no data or something like that.
 
 
 I hope you have read until this line and you can now answer my
 questions.
 
 Yours faithfully
 
 Matthias Schiffer


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: ODBC

2001-06-13 Thread Pernica, Jan

thre is no special place
you have to define the right place in your ODCB setup.

On Wednesday, June 13, 2001 2:38 PM, [EMAIL PROTECTED]
[SMTP:[EMAIL PROTECTED]] wrote:
 I have written a servlet that accesses the Access database. can u tell
me is there a special place where i need to put  this database file within
Tomcat directory.
  
 thanks
 Qasim


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: cache control problem in tomact 3.2.1

2001-06-11 Thread Pernica, Jan

We use only tomcat and we set following:
response.setHeader(Cache-Control, no-cache); 
response.setHeader(Pragma, no-cache); 
response.setDateHeader(max-age, 0); 
response.setDateHeader(Expires, 0); 

and we combine it with:

out.print(META HTTP-EQUIV=\Cache-Control\
CONTENT=\no-cache\\n); 
out.print(META HTTP-EQUIV=\Pragma\
CONTENT=\no-cache\\n); 
out.print(META HTTP-EQUIV=\max-age\ CONTENT=\0\\n); 
out.print(META HTTP-EQUIV=\Expires\ CONTENT=\0\\n); 
 
it works fine for us

On Monday, June 11, 2001 9:23 AM, [EMAIL PROTECTED]
[SMTP:[EMAIL PROTECTED]] wrote:
 hi All
 
 i have a global include file . i have put to header in the file as given
 below.
 response.addHeader(Cache-Control,no-cache);
 response.addHeader(expires,0);
 when i work with tomact + IISboth header works fine.
 but when only tomact is running  the these headers doesn't work. is this
is
 the bug in tomact ?
 any solution please help.
 i am using WINNT and Tomact 3.2.1 and IIS 4.0
 thanks in advance.
 
 niraj


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Servlet to get client's certificate

2001-06-11 Thread Pernica, Jan

you have to configure your tomcat to require client certificate.
see attribute clientAuth in the SSL configuration

On Monday, June 11, 2001 12:56 PM, J. Chong [SMTP:[EMAIL PROTECTED]]
wrote:
 Hi,
 
   I have installed Apache, mod_ssl and OpenSSL. The thing I want to do
is
 create a servlet to get the client's certificate. I have successfully 
 installed Jakarta Tomcat 3.2.1 and tested with HelloWorld servlet by HTTPS
 and it works. That means the servlet works ok with SSL. However when I
 tried to get the client certificate by
 
   String cert = 
 (String)request.getAttribute(javax.servlet.request.X509Certificate);
 
   The cert is null. Please help. I have been struggling with it for
like
 ages. Thanks.
 
   Thanks for your help. Wish you all the best.
 
 
 
 Best regards,
 
 Jordan Cheun Ngen, Chong
 Room 4067
 Distributed and Embeded Systems Group
 Centre for Telematics and Information Technology
 University of Twente
 Faculty Informatica
 7522 NB Enschede
 The Netherlands
 
 Office Phone: +31 53 4894655
 Email Add.: [EMAIL PROTECTED]
 
 
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






Precompile JSP files on startup

2001-06-07 Thread Pernica, Jan

Hi

Is it possible to precompile files on startup?

Thank you

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Precompile JSP files on startup

2001-06-07 Thread Pernica, Jan

I did I have not found any detail. Could you be more specific?

Thank you

Jan

On Thursday, June 07, 2001 12:13 PM, Krishna Kant T
[SMTP:[EMAIL PROTECTED]] wrote:
 yes it is
 do check the faq
 
 ~krishnakant
 
 
 Pernica, Jan wrote:
 
  Hi
 
  Is it possible to precompile files on startup?
 
  Thank you
 
  Jan
 
  __
  Tato komunikace je urcena vyhradne pro adresata a je duverna.
  This communication is intended solely for the addressee and is
confidential.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






JSPC does not work for Tomcat 4.0 b5

2001-06-07 Thread Pernica, Jan

Hi

I found that jspc does not work for Tomcat 4.0 b5.
It throws following exception:
2001-06-07 05:13:26 - ERROR-the file '\admin\projects.jsp' generated the
following general exception: java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.jasper.CommandLineContext.getTldLocation(CommandLineContext.java:
365)
at
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP
arseEventListener.java:1141)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:754)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:121)
at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:243)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1126)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1091)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1087)
at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:220)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:207)
at org.apache.jasper.JspC.parseFile(JspC.java:385)
at org.apache.jasper.JspC.parseFiles(JspC.java:651)
at org.apache.jasper.JspC.main(JspC.java:699)

Any ideas or fixes?

Thank you

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Where to Place Bean files

2001-06-06 Thread Pernica, Jan

into WEB-INF/classes
or into jar which will be in WEB-INF/lib

On Wednesday, June 06, 2001 8:52 AM, Hemant Singh
[SMTP:[EMAIL PROTECTED]] wrote:
 HI ALL:
 Where do i need to place the JSP bean which i m going
 to use in JSP files.
 Cheers
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: JDBCRealm NullPointerException error

2001-06-05 Thread Pernica, Jan

You should slightly rewrite JDBCRealm, if you want to prohibit null
usernames and passwords.
If server tries to authenticate client first time. client sends not
authentication information so that
server tries to find user null with null password.

Regards

Jan

On Tuesday, June 05, 2001 9:03 PM, Chris McNeilly
[SMTP:[EMAIL PROTECTED]] wrote:
 My JDBC driver is blowing up with a NullPointerException error as soon
 as it tries authenticating.  This is even before my login page gets
 called.  It looks like its trying to authenticate username=null and
 password=null.  Not sure what to do.  Any ideas?
 
 Thanks,
 
 Chris


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: include problem

2001-06-04 Thread Pernica, Jan

only path relative to the your application context root works.

On Monday, June 04, 2001 2:20 PM, Ryan [SMTP:[EMAIL PROTECTED]] wrote:
 I am trying to include files using tomcat 3.2, right now I'm testing out
my
 setup with the
 
 %@ include file=bleh
 
 However, the file value only works when I specify a _relative_ path inside
 one of the Contexts. How can I make it so that an absolute path will work
 with any file on my server?
 
 
 cheers
 -ryan


 
 www.the45.dhs.org
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






How to get server URL?

2001-06-04 Thread Pernica, Jan

Hi 

How can I get the server name?
I do not like HttpServlet.getServerName() because if I access it from local
network the name differs from the name when
accessing it from internet.

Any suggestions?

Regards

Jan

 Mgr. Jan Pernica, MSc.
 Project Manager
 DCB Actuaries and Consultants
 Tel: +420 5 4221 7390-5
 Mobile: +420 602 52 42 51
 Fax:+420 5 4221 7399
 http://www.dcb.cz
 mailto:[EMAIL PROTECTED]
 
 
 
__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






Tomcat 4.0 as NT service

2001-05-31 Thread Pernica, Jan

I have done a research on running Tomcat 4.0 as a service on NT.
Here is my wrapper.properties
 wrapper.properties 
Ammend this file and follow instruction for version 3.2

Regards

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.




 wrapper.properties


RE: certificate for tomcat and ssl

2001-05-31 Thread Pernica, Jan

I have configured tomcat 4.0 and 3.2 to work with SSL over HTTPS. I have
used BASIC authenitication.
I have followed instructions in the documentation step by step.

Regards

Jan

On Thursday, May 31, 2001 11:09 AM, François Andromaque
[SMTP:[EMAIL PROTECTED]] wrote:
 Has someone configured tomcat to work with SSL without use APACHE server?
I've try lot of things and nothing has worked, i'm seeking for all the steps
to generated certificate and configure tomcat to work with it. Can someone
help me?


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Using Realm

2001-05-31 Thread Pernica, Jan

Which one?
You can use MemoryRealm, which loads user info from conf/tomcat-users.xml
or you can use JDBCRealm, which loads user info from database

After that you have to define your security constratins in the web.xml

Regards

Jan

On Thursday, May 31, 2001 1:10 PM, Hemant Singh [SMTP:[EMAIL PROTECTED]]
wrote:
 HI ALL:
 Can any one tell me how to use Realm with tomcat.
 Cheers
 HEMANT
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: JSP and Javascript

2001-05-31 Thread Pernica, Jan

JSP behaves as a normal HTML/servlet page

On Thursday, May 31, 2001 2:41 PM, [EMAIL PROTECTED]
[SMTP:[EMAIL PROTECTED]] wrote:
 Can I open a Jsp from the JavaScript OPEN function?
 For example I want to open a jsp from a html form when a button is
pressed.
 The code looks like this:
 
 input type = button value = Update onclick = open
 ('igce/jsp/update.jsp?testParam=1222','newwindow')
 
 When I press the button, Netscape opens up a download file dialogue box.
 
 I can run the jsp alone but not in an HTML page.  All the examples I have
 seen have html run a servlet and the servlet forwards the JSP.
 
 Thanks
 
 Jeff Sulman


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






how to automaticaly redirect to SSL?

2001-05-30 Thread Pernica, Jan

Hi

I would like to automaticaly redirect client to use HTTPS if it is required.
In the version 4.0
there is attribute redirectPort. How can I set up this feature in the
version 3.2.2?

Thank you

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: how to automaticaly redirect to SSL?

2001-05-30 Thread Pernica, Jan

Thank you for your prompt reply.

I have set up you have described. But redirection did not work.
I found that I have to set up redirection port in the context manager:
ContextManager debug=0 workDir=work showDebugInfo=true
securePort=8443

in the server.xml

because by default it is -1 so that tomcat tells the client it requires SSL
communication.]
After setting this attribute redirection works fine.

Regards

Jan

On Wednesday, May 30, 2001 11:22 AM, Rams [SMTP:[EMAIL PROTECTED]] wrote:
 Jan,
   Anyway, ur tomcat server is ssl enabled.
 once u enable server for ssl, there u specify the ssl-port and all.
   Depending on some criteria, u'll be redirecting to ssl using https.
 so use some condition for https and change the url accordingly..
   To comm. thru' https, u have to enable the ssl part in server.xml.
 so check some condition and turn to https.
 
 Rams
 
 -Original Message-
 From: Pernica, Jan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 30, 2001 2:34 PM
 To: Tomcat-User (E-mail)
 Subject: how to automaticaly redirect to SSL?
 
 
 Hi
 
 I would like to automaticaly redirect client to use HTTPS if it is
required.
 In the version 4.0
 there is attribute redirectPort. How can I set up this feature in the
 version 3.2.2?
 
 Thank you
 
 Jan
 
 
 
 __
 Tato komunikace je urcena vyhradne pro adresata a je duverna.
 This communication is intended solely for the addressee and is
confidential.
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Problem sun.misc solved - but why is authorization=null???? Please help (urgent!)

2001-05-30 Thread Pernica, Jan

I have tried it and it works fine. But the page you are requesting must be
under security-constraint

Regards

Jan

On Wednesday, May 30, 2001 4:50 PM, [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
wrote:
 Hello,
 
 I solved the problem with sun.misc (was an error in directive). But now I
 had a strange error. When performing form login via JDBC  and trying to
 read out AUTHORIZATION Header the string is NULL. Why? Does form login not
 write Authorization in HTTP Header?
 I do the following:
 %
 String aut = request.getHeader(Authorization);
 BASE64Decoder decoder = new BASE64Decoder();
 if (aut == null) {
   out.println(NOTHING INSIDE);
 } else {
   String userInfo = aut.substring(6).trim();
 }
 %
 Can anyone help please??
 
 Thomas
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Errorpage exception?

2001-05-30 Thread Pernica, Jan

JasperExecption is descendant of the ServletException

We following code to display Root Cause:
ServletError: %= exception.getMessage() %
hr
pre
%
Throwable e = exception;
while (e instanceof javax.servlet.ServletException
 ((javax.servlet.ServletException)e).getRootCause() != null) {
e =
((javax.servlet.ServletException)e).getRootCause();
}
%
Stack Trace of root cause is: %
e.printStackTrace(new java.io.PrintWriter(out));
%
/pre

Regards

Jan

On Thursday, May 31, 2001 1:21 AM, Edwin Martin [SMTP:[EMAIL PROTECTED]]
wrote:
 I've created an JSP errorPage and now I want to know which
 exception has been thrown.
 
 On the errorPage, exception.getClass() only gives
 class org.apache.jasper.JasperException
 
 I want the Root cause exception (as seen without errorPage).
 
 Fortunately, in the javax.servlet API, I saw the getRootCause() method
 but (unfortunately), it doesn't work with JasperException.
 
 I've three questions:
 
 1) How do I get the Root cause of an exception?
 
 2) Where is the JavaDoc of org.apache.jasper? (I searched the whole
 Tomcat website and Tomcat doc and couldn't find it)
 
 3) Isn't this a FAQ?
 
 Bye,
 Edwin Martin.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: jdbc realm question

2001-05-28 Thread Pernica, Jan

It is OK. Then Browser will prompt you for user name and password.

On Friday, May 25, 2001 6:02 PM, [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
wrote:
 I have a jdbc realm set up and running with the BASIC login config.
 I set debug to 9 and started to notice that as soon as a request comes in
 for a protected page/dir
 tomcat tries to autheticate with username = null before prompting for
 username and password, which is a problem since I would like to redirect
 failed logins (401) but this little quirk causes every request to fail
 initially
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Tomcat and certificate

2001-05-28 Thread Pernica, Jan

In the jdk1.3 documentation there is a chapter about security and there is
description how to convert
keys generated by openssl into JKS key store used by JSSE.

On Monday, May 28, 2001 9:40 AM, François Andromaque
[SMTP:[EMAIL PROTECTED]] wrote:
 I have created a new key and a new certificate with openssl, how can do to
tomcat work with this new cert and this new key.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Problems with XML parsing: welcome-file-list (web.xml)

2001-05-28 Thread Pernica, Jan

That is easy. Look into conf/web.dtd.
welcome-file-list need not preceede the servlet.

Regards

Jan

On Monday, May 28, 2001 1:57 PM, christian kuehrt
[SMTP:[EMAIL PROTECTED]] wrote:
 everytime i try to deploy my application i get the following message:
  
 PARSE error at line 18 column -1
 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app
servlet
 Starting service Tomcat-Apache
 Apache Tomcat/4.0-b3
  
 and the reason for this are in the web.xml:
  
 
 web-app
 
welcome-file-list
  welcome-filetechSupp.html/welcome-file
/welcome-file-list
  
servlet--line 18
  servlet-nametechSup...
  
  
 without the welcome-file-list tags the deploying - is no problem. but
with it i get a the parse error.
 but i don´t know why.
 please help
  
 thx christian kuehrt


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: tomcat process dies out...

2001-05-28 Thread Pernica, Jan

this is a known bug of JDK 1.3 on NT

On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura
[SMTP:[EMAIL PROTECTED]] wrote:
 hello,
  I am trying to setup multiple JVMs using mod_jk. the JVM running at port
8080
 is okay. I'm having problem with the JVM running at port 8090. whenever, i
log
 out of my server machine(the machine where i am starting my apache and
tomcat),
 the tomcat process stops listening to the port 8090. Actually, the
Tomcat(java)
 threads are getting killed when i log out.
 
  Please let me know where i am going wrong?  i am starting tomcat1 
 as ./startup.sh -f server_1.xml
 
 thanks,
 kishore.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: RE: How to get Role and Password from JDBC Realme -using 3.2.2

2001-05-28 Thread Pernica, Jan

The username and the password is part of the request. you can get it from
org.apache.catalina.util.Base64 base64Helper = new
org.apache.catalina.util.Base64();
String unencoded = new
String(base64Helper.decode(request.getHeader(authorization).getBytes()));
int colon = unencoded.indexOf(':');
if (colon  0)
return (null);
String username = unencoded.substring(0, colon).trim();
String password = unencoded.substring(colon + 1).trim();

I hope it helps

Jan

On Monday, May 28, 2001 4:56 PM, [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
wrote:
 Thanks Jan,
 
 I have to apologize not to have explained the intended usage:
 I need username, userpassword and userrole since I will use it for
 DB-Authorization (GRANT to group, and user to tables and so on, connecting
 DB with username,userpass). I intend to synchronize username, password and
 role with the authDB of the specific Datebase (Interbase and isc4.gdb). Is
 there a methode like org.apache.catalina.realm.GenericPrincipal principal
 = request.getUserPrincipal() for Tomcat 3.2.2 and is there an elegant
 method for attaching password, too?
 
 Thank you for help
Thomas
 
 Pernica, Jan wrote:
 It depends what do you want:
 to get user login = request.getRemoteUser()
 to whether he/she have a role you can use
 request.isUserInRole(myrole)
 
  Even you are able to get the list of roles
  org.apache.catalina.realm.GenericPrincipal principal =
  request.getUserPrincipal();
  principal.getRoles()
 
 Regards
 
  Jan
 
 On Monday, May 28, 2001 4:22 PM, [EMAIL PROTECTED]
  [SMTP:[EMAIL PROTECTED]]
  wrote:
   Hello,
  
   I want to use the provided user_pass and user_role in the
   JDBCRealm-Database given in server.xml. What is the most
  elegant way to do
   this? Of cource I would be able to get it via
  request.getRemoteUser() and
   then make a select to the hardcoded database name with provided
  auth user
   and pass like it is given in server.xml. But there must be a
  better way
   since database name, username and driver url is already
  included in the
   Realm section? How to use it? I read the JDBCRealm code but I
  did not find
   out where it gets the connectionUrl a.s.o.
  
   Best Regards
  Thomas


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Tomcat and SSL

2001-05-25 Thread Pernica, Jan

you have to add your keys into
${user.home}/.keystore then it works fine

Regards

Jan

On Friday, May 25, 2001 11:46 AM, François Andromaque
[SMTP:[EMAIL PROTECTED]] wrote:
 Hello,
 I wonder if it's possible to configure Tomcat with SSL without using
apache.
 I have allready :
 
 activated SSL connector in server.xml with a port value of 8443
 generated a SSL certificate with openssl
 Added security.provider.2=com.sun.net.ssl.internal.ssl.Provider to the
$JAVA_HOME/jre/lib/ext/java.security file
 
 but i can'nt connect  my the server by requesting https://myhost:8443.
 What have i to do to complete the configuration of tomcat?


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Server.xml

2001-05-24 Thread Pernica, Jan

You can use XML parsers to parse the file, then you can change it and store
again.

On Thursday, May 24, 2001 10:30 PM, Venkatesh Sangam
[SMTP:[EMAIL PROTECTED]] wrote:
 Hi,
 
 Can anyone please tell me how do I change the Port on which the Tomcat 
 Server runs using Java program ..
 How do I modify server.xml using a Java program
 
 thnaks
 Venkatesh
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Run Tomcat as a NT Service Problem

2001-05-24 Thread Pernica, Jan

Hi

I am using Tomcat-4.0-b5. What shall I do to run as an NT service?
wrapper.properties is missing.

Thank you

Jan

On Friday, May 25, 2001 3:49 AM, Huynh Tin [SMTP:[EMAIL PROTECTED]] wrote:
 Dear Louzon,
 Thank you for your information, but i didn't have xerces.jar ...This
file not existed in Jboss-Tomcat2.2 !
 What i need to do . Thank you !
  
 I'm using JDK1.3, JBoss-Tomcat2.2
  
 Best regards !
 Huynh Tin
  
  
 
 - Original Message - 
 From: Ronald G. Louzon mailto:[EMAIL PROTECTED] 
 To: '[EMAIL PROTECTED]'
mailto:'[EMAIL PROTECTED]' 
 Sent: Thursday, May 24, 2001 8:42 PM
 Subject: RE: Run Tomcat as a NT Service Problem
 
 It sounds like you don't have xerces.jar as the first thing on your
classpath.   To make this the first thing on your classpath:
  
 1) Edit the file %TOMCAT_HOME%\conf\wrapper.properties 
 2) You see some lines in this file that start with wrapper.classpath.
Before the first of those lines, add a line
 wrapper.classpath=full path and filespec for xerces.jar
 3) Restart the service and see if things are better.
  
 Also, be aware that if you are using the jk_nt_service.exe wrapper for
your NT service, and if you are using version 1.3 of the JVM, when you log
out of NT, the service will be stopped.   I had to use JavaService.exe to
get around this problem.
  
  
 
 -Original Message-
 From: Huynh Tin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 23, 2001 11:23 PM
 To: [EMAIL PROTECTED]
 Subject: Run Tomcat as a NT Service Problem
 
 
 
 Hi all , 
  
 I used jk_nt_service.exe to add Tomcat like NT service .
  
 I finished adding Tomcat into a NT service named TomcatService. I went to
Control Panel to start TomcatService
 It started ok , but also stoped after started. What's happen.
  
 In logs dicrectory generate file named jvm.stderr and it's content as
follow:
  
 java.lang.NoClassDefFoundError: org/xml/sax/HandlerBase
 
 at java.lang.ClassLoader.defineClass0(Native Method)
 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
 
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
 
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 
 at java.security.AccessController.doPrivileged(Native Method)
 
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 
 at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
 
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
 
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 
 at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:178)
 
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
 
 Exception in thread main
 
 Anyway, in conf\server.xml file, i also didn't know how to define AJPV12
connector. There are not any information about AJPV12 in this server.xml
file. How could i do it ?
  
 Anybody help me , what's this error , how could i fix it ??
  
 Thank you
 Huynh Tin
  
  
  
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Server.xml

2001-05-24 Thread Pernica, Jan

Hi

the XML API documentation is part of the J2EE. You can download it from
http://www.javasoft.com/j2ee/j2sdkee/
Regards

Jan

On Friday, May 25, 2001 7:32 AM, Venkatesh Sangam
[SMTP:[EMAIL PROTECTED]] wrote:
 thanks Jan,
 Do I have any help on XML parsers online ??If u know any tell me ..
 I had one more doubt
 can anyone please tell me whats the use of the file tomcat.properties ..
 even If I delete that file ..tomcat runs fine ..
 can anyone give me any specific use of that ??
 thanks
 Venkatesh
 
 
 
 
 From: Pernica, Jan [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Server.xml
 Date: Fri, 25 May 2001 06:42:41 +0200
 
 You can use XML parsers to parse the file, then you can change it and
store
 again.
 
 On Thursday, May 24, 2001 10:30 PM, Venkatesh Sangam
 [SMTP:[EMAIL PROTECTED]] wrote:
   Hi,
  
   Can anyone please tell me how do I change the Port on which the Tomcat
   Server runs using Java program ..
   How do I modify server.xml using a Java program
  
   thnaks
   Venkatesh
  
_
   Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
 
 
 __
 Tato komunikace je urcena vyhradne pro adresata a je duverna.
 This communication is intended solely for the addressee and is
confidential.
 
 
 
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Urgent question on extra line with Tomcat Jsp

2001-05-23 Thread Pernica, Jan

JSP send all characters you have written into JPS. So that it passes back
all new lines
you have used in your code (including all white characters).

Jan

On Wednesday, May 23, 2001 2:52 PM, wtonetwork.com
[SMTP:[EMAIL PROTECTED]] wrote:
 Dear all,
  
 I have encounter a strange behaviour with Tomcat 3.2
 When I use jsp to output a line to html or other format.
 The resulting page will append a line before the content.
 this make some of my applications work inproperly as they parse
 the content uncorrectly.
 Does any one encounter similar situation??
 How can I determine if it is the problem of Tomcat or other 
 parts??
  
 Thanks
 Bryan


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: OT What's really happening in this JSP?

2001-05-22 Thread Pernica, Jan

If form tag does not contain action it is posted to the same page.


On Tuesday, May 22, 2001 11:55 AM, Jim Cheesman [SMTP:[EMAIL PROTECTED]] wrote:
 Given the following (edited) jsp:
 
 jsp:useBean id=kk class=test.TestBean scope=session /
 jsp:setProperty name=kk property=* /
 
 form method=post
   select single name=testValue1
   ...
   input type=submit
 /form
 hr
 
 %
   if (kk.isValid())
   {
 %
jsp:forward page=/jsp/test2.jsp /
 %
   }
 %
 
 
 The jsp works, in that the bean kk is filled with the values of the
form, 
 and if valid, forwards to test2.jsp.  What I don't understand is how: Does

 clicking on submit call the compiled jsp (_jspService) on tomcat, which 
 then checks the value, or what?
 
 (kk is previously instantiated by a servlet, which returns the page
above.)
 
 I should emphasise that this works and is not urgent, but more a question 
 of my curiosity... ;)
 
 Jim
 
 
 
 --
 
*   Jim Cheesman   *
  Trabajo: 
 [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
 My identity lies 
 in not knowing who I am.
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: AW: Charset Problem?

2001-05-22 Thread Pernica, Jan

We had similar problem with using windows-1250 encoding. The problem
is that MS IE does not provide conding information in the request header.
We have to manualy set request encoding to windows-1250

On Tuesday, May 22, 2001 2:39 PM, oLi [SMTP:[EMAIL PROTECTED]] wrote:
 It is not a bug in the redirector, it just depends on
 the HTML Doctype tag, the language part just has to be
 DE in my case. Works fine now.
 
 --- oLi [EMAIL PROTECTED] schrieb:  I'm having the
 same problem: Cocoon web app running
  on
  NT4.0, Tomcat 3.2.1, IIS 4.0 in our intranet. When I
  enter umlauts into a form they get all scrambled up,
  however, today I have noticed that when I do it with
  Opera, it works fine. It also works perfectly when I
  use another web server. I'm not sure if it really is
  a
  problem with the redirector. Does anybody have a
  clue?
  
  oLi
  
  -Ursprüngliche Nachricht-
  Von: Andreas Schlegel
  [mailto:[EMAIL PROTECTED]]
  Gesendet: Donnerstag, 26. April 2001 11:57An:
  [EMAIL PROTECTED]
  Betreff: Charset Problem?Hi,
  does anyone know this problem. Having an HTML form
  the
  user may type
  words like 'Köln' (ö - special german character).
  In
  one case the
  server receives the parameter 'Köln', in the other
  case it receives only'K'.
  On the other hand the server has no problem to build
  +
  send HTML pages
  that contain words like 'Köln'.
  The Browser is always the same (i.e. Opera 5.0, IE
  4.0).
  The application is the same.
  Could it be a charset problem? But I think by
  default,
  a server parses
  parameters using the common Latin-1 (ISO 8859-1)
  charset. That works for
  Western European languages.Works::
  Configuration: Tomcat 3.2.1, MS-SQL 7, NT 4, runing
  in
  intranetDoesn't work:
  Configuration: Tomcat 3.2.1 as in-process addon with
  IIS 4, MS-SQL 7, NT
  4, runing in internetGreetings,Andreas
  
  
 
 __
  Do You Yahoo!?
  Gesendet von Yahoo! Mail - http://mail.yahoo.de
 
 
 
 __
 Do You Yahoo!?
 Gesendet von Yahoo! Mail - http://mail.yahoo.de


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Accessing Base Document Directory from JSP

2001-05-22 Thread Pernica, Jan

application.getContextPath() returns the path to the current context

On Tuesday, May 22, 2001 2:42 PM, Jeff Trent [SMTP:[EMAIL PROTECTED]]
wrote:
 I would like to use absolute URLs to get to another page in my app.
However, I don't want to burn in 'MyApp'.   Instead, I would like to
dynamically get the name that was assigned via the sysadmin.   How can I do
this from within a JSP?
  
 Thanks,
 Jeff
  


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: servlet deployment

2001-05-22 Thread Pernica, Jan

you have to modify web.xml
and add:
servlet
servlet-nameHelloWorld/servlet-name
servlet-classdummy.HelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/dummy/HelloWorld/url-pattern
/servlet-mapping

then you can reference it using the URL you have written

On Tuesday, May 22, 2001 3:43 PM, Montgomery, Kendal L
[SMTP:[EMAIL PROTECTED]] wrote:
 Hello all,
 
 I am just wandering how I deploy a servlet that is part of a package, and
 how to reference it.  For example.. say you take the HelloWorldExample
 servlet that comes with and modify it.  Rename the source to
 HelloWorld.java, and change the file appropriately, including adding a
line
 at the top:
 
 package dummy;
 
 so, it is in the dummy class.
 
 When I deploy this new HelloWorld servlet, I put it in
 ...webapps/examples/WEB-INF/classes/dummy/HelloWorld.class.  Now, to
 reference this, I expected to be able to go to my browser and hit
 http://myserver/examples/servlet/dummy/HelloWorld
 http://myserver/examples/servlet/dummy/HelloWorld .  That did not work.
 So, what do I have to do to make this work?
 
 By the way, I am running Apache 1.3.19 and Tomcat 3.2.1.fasdf
 
 Thanks..
 
 Kendal L. Montgomery
 Qwest - eFlow Development Team
 614-215-4937


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Accessing Base Document Directory from JSP

2001-05-22 Thread Pernica, Jan

It returns only /custref string.

On Tuesday, May 22, 2001 3:55 PM, Jeff Trent [SMTP:[EMAIL PROTECTED]]
wrote:
 HttpServletRequest.getContextPath() do you mean?  If so, this returns the
 path to get to the current servlet.  This is not what I want.  I want to
get
 the base context.  So for example, if I deploy a solution to the path
 'custref' and I am within the servlet custref/admin/tools/whatever, I
would
 like to find the way to get simply custref back, not
 custref/admin/tools/whatever.  I realize I can write my own function to
do
 this easily but I'd rather use something already built.
 
 thanks,
 jeff
 
 - Original Message -
 From: Pernica, Jan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 22, 2001 9:12 AM
 Subject: RE: Accessing Base Document Directory from JSP
 
 
  application.getContextPath() returns the path to the current context
 
  On Tuesday, May 22, 2001 2:42 PM, Jeff Trent
[SMTP:[EMAIL PROTECTED]]
  wrote:
   I would like to use absolute URLs to get to another page in my app.
  However, I don't want to burn in 'MyApp'.   Instead, I would like to
  dynamically get the name that was assigned via the sysadmin.   How can I
 do
  this from within a JSP?
  
   Thanks,
   Jeff
  
 
 
  __
  Tato komunikace je urcena vyhradne pro adresata a je duverna.
  This communication is intended solely for the addressee and is
 confidential.
 
 
 
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






CLIENT-CERT with tomcat

2001-05-21 Thread Pernica, Jan

Hello

How can I use CLIENT-CERT auth method? What should I do (especially how
should I configure client and server to use this type of authorization?)
Thank you

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






Enabling only HTTPS for a container

2001-05-20 Thread Pernica, Jan

Hi everybody

I would like disable HTTP for one container. How can I do that?
Thank you in advance.
Regards

Jan



__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Enabling only HTTPS for a container

2001-05-20 Thread Pernica, Jan

Sorry about the question. I found solution in the documentation (servlet 2.3
specification).

I have to use CONFIDENTIAL transport-guarantee.
Regards

Jan

On Monday, May 21, 2001 7:30 AM, Pernica, Jan [SMTP:[EMAIL PROTECTED]] wrote:
 Hi everybody
 
 I would like disable HTTP for one container. How can I do that?
 Thank you in advance.
 Regards
 
 Jan
 
 
 
 __
 Tato komunikace je urcena vyhradne pro adresata a je duverna. 
 This communication is intended solely for the addressee and is
confidential.
 
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.






RE: Enabling only HTTPS for a container

2001-05-20 Thread Pernica, Jan

Hi

At first you have to enable HTTPS in your conf/server.xml file. There is
also description how to generate certificate.
Then you have to define security constratint for your application: Eg. you
want to restrict access to your administration part of the application. So
that
you have to add following code into your web.xml

security-constraint
web-resource-collection
web-resource-nameall-pages/web-resource-name
url-pattern/admin/*/url-pattern
url-pattern/administration/*/url-pattern
/web-resource-collection
auth-constraint
role-nameSA/role-name
/auth-constraint
user-data-constraint
descriptionSSL is required/description

transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

Regards

Jan

On Monday, May 21, 2001 8:16 AM, Rams [SMTP:[EMAIL PROTECTED]] wrote:
 how to use this CONFIDENTIAL transport-guarantee and where?
 
 --Rams
 
 -Original Message-
 From: Pernica, Jan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 21, 2001 11:19 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Enabling only HTTPS for a container
 
 
 Sorry about the question. I found solution in the documentation (servlet
2.3
 specification).
 
 I have to use CONFIDENTIAL transport-guarantee.
 Regards
 
 Jan
 
 On Monday, May 21, 2001 7:30 AM, Pernica, Jan [SMTP:[EMAIL PROTECTED]] wrote:
  Hi everybody
 
  I would like disable HTTP for one container. How can I do that?
  Thank you in advance.
  Regards
 
  Jan
 
 
 
  __
  Tato komunikace je urcena vyhradne pro adresata a je duverna.
  This communication is intended solely for the addressee and is
 confidential.
 
 
 
 
 __
 Tato komunikace je urcena vyhradne pro adresata a je duverna.
 This communication is intended solely for the addressee and is
confidential.
 


__
Tato komunikace je urcena vyhradne pro adresata a je duverna. 
This communication is intended solely for the addressee and is confidential.