Re: OT: Is it ok to close connection in finalize() ?

2003-02-21 Thread Rosdi bin Kasim

Thanks guys for the input... yeah I understand that i can't predict when the
gc will be run..

The reason I ask is that, I was (unfortunately) inherited with some badly
designed code and I really dont have time to inspect it line by line to see
whether each opened connection is closed or not..

So I thought of using finalize() as the quick-fix solution. :-)

Anyway... I will use finalize() momentarily and see whether it works... if
it does not, I will have no choice but to read and inspect the code line by
line. *sigh*

Regards.
Rosdi.


- Original Message -
From: Mike Jackson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:48 PM
Subject: RE: OT: Is it ok to close connection in finalize() ?


 I've never heard of issues with putting things in finalize(), but I
haven't
 really looked into it.  However my issue is that you can't predict how
 quickly the objects will be collected (see other post).

 I'm not a java expert, I just play one on tv.

 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]

  -Original Message-
  From: Jake Robb [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 20, 2003 8:36 PM
  To: Tomcat Users List
  Subject: Re: OT: Is it ok to close connection in finalize() ?
 
 
  And now all these other guys say that using finalize() is bad practice.
I
  have to ask... Is it bad practice just for the reasons Mike Jackson
  described, or does the use of finalize() in general actually
  cause problems
  with the JVM?  I've not heard that before.  The 1.4 API makes no
  mention of
  any issues.
 
  Details on issues with finalize() would be appreciated, if that is
indeed
  the case.
 
  -Jake
 
 
  Jake Robb wrote:
 
   I apologize for not being familiar with this, but I have some insight
to
   offer.  Bear with me:
  
   Is ConnCache your own class (i.e., did you write it)?  If it
  is, I'd put a
   call to close() in the finalize method of that ConnCache, not
  GeneralConn.
   If it's not, I would expect that has already been done.
  
   If ConnCache not your class, and it does not close its own
  connection, then
   yes, you're doing it right.  There shouldn't be any issues with that
   approach.
  
   finalize() is indeed guaranteed to run upon garbage collection, which
in
   turn is guaranteed to happen.  However, garbage collection can
  happen at any
   time, so the connection may not be closed immediately.  If this
  is an issue
   for you, you can call System.gc() to force it to garbage collect
   immediately.
  
   -Jake
  
  
  
   Rosdi bin Kasim wrote:
  
   This is a bit off topic.
  
   I am using connection pooling, and in my code, I open all the
  connection I
   need in an object constructor.
   Then I will close this connection in finalize(), which
  (according to what I
   read) will be executed during java garbage collect.
  
   --- sample code --
  
   public class GeneralConn {
  
private ConnCache connCache;
  
//open connection during object creation
public GeneralConn () {
try {
   connCache = ConnCache.getInstance();
   dbConn= connCache.getConnection();  //grab a
  connection from
   the connection pool
}catch (Exception e) {
   System.out.println(Fail to open connection:  +
   e.getMessage());
}
 }
  
 //close when this object is destroyed
 public void finalize () {
 try{
 dbConn.close();
 dbConn = null;
   }catch (Exception e) {
   System.out.println(Fail to close connection:  +
   e.getMessage());
   }
 }
   }
  
   Would this be okay? is it guaranteed that finalize() will be
  executed during
   garbage collect??
  
  
   Regards,
   Rosdi bin Kasim.
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 



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



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




HELP: how to run Tomcat 4.0.3 with Jrockit 8.0 ?

2003-02-21 Thread Zhidong Yu
Tomcat 4.0.3 can run under Jrockit 8.0, because MissingResourceException
will be thrown at org.apache.catalina.util.StringManager's constructor:
 
private StringManager(String packageName)
{
String bundleName = packageName + .LocalStrings;
bundle = ResourceBundle.getBundle(bundleName);
 this line
}
 
java.util.MissingResourceException: Can't find bundle for base name
org.apache.naming.resources.LocalStrings, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(Ljava.lang.String
;Ljava.util.Locale;)V(Unknown Source)
at
java.util.ResourceBundle.getBundleImpl(Ljava.lang.String;Ljava.util.Loca
le;Ljava.lang.ClassLoader;)Ljava.util.ResourceBundle;(Unknown Source)
at
java.util.ResourceBundle.getBundle(Ljava.lang.String;)Ljava.util.Resourc
eBundle;(Unknown Source)
at
org.apache.naming.StringManager.init(Ljava.lang.String;)V(StringManage
r.java:115)
at
org.apache.naming.StringManager.getManager(Ljava.lang.String;)Lorg.apach
e.naming.StringManager;(StringManager.java:260)
at
org.apache.naming.resources.BaseDirContext.init()V(BaseDirContext.java
:140)
at
org.apache.naming.resources.FileDirContext.init()V(FileDirContext.java
:124)
at
org.apache.catalina.core.StandardContext.start()V(StandardContext.java:3
303)
at
org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start()V(StandardHost.java:614)
at
org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start()V(StandardEngine.java:343
)
at
org.apache.catalina.core.StandardService.start()V(StandardService.java:3
88)
at
org.apache.catalina.core.StandardServer.start()V(StandardServer.java:506
)
at
org.apache.catalina.startup.Catalina.start()V(Catalina.java:781)
at
org.apache.catalina.startup.Catalina.execute()V(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process([Ljava.lang.String;)V(Catal
ina.java:179)
at
COM.jrockit.reflect.NativeMethodInvoker.invoke0(ILjava.lang.Object;[Ljav
a.lang.Object;)Ljava.lang.Object;(Native Method)
at
COM.jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.
lang.Object;)Ljava.lang.Object;(Unknown Source)
at
COM.jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;
[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)L
java.lang.Object;(Unknown Source)
at
org.apache.catalina.startup.Bootstrap.main([Ljava.lang.String;)V(Bootstr
ap.java:243)
E:\jakarta-tomcat-4.0.3\bin
 
However, Tomcat 5.0 can run with Jrockit 8.0. I have compared the
StringManger of the two versions, and their constructor is same. Neither
Tomcat 4.0.3 or Tomcat 5.0 has LocalStrings_en_US.properties file in
their jars.
 
Is there anybody could tell me how to run Tomcat 4.0.3 under Jrockit
8.0.
 
BTW, my machine is windows 2000 server (locale is en_US).




RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Chris Catton
If you don't run close connection in finalize, can you be sure that the
connection was closed if an exception is thrown?

Chris Catton
BioImage Database Development Manager
Department of Zoology
University of Oxford
OX1 3PS
 
Tel: +44 (0) 1865 281993
email: [EMAIL PROTECTED]
web site: www.bioimage.org


 -Original Message-
 From: Rosdi bin Kasim [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2003 04:13
 To: Tomcat Users List
 Subject: OT: Is it ok to close connection in finalize() ?
 
 This is a bit off topic.
 
 I am using connection pooling, and in my code, I open all the
connection I
 need in an object constructor.
 Then I will close this connection in finalize(), which (according to
what
 I
 read) will be executed during java garbage collect.
 
 --- sample code --
 
 public class GeneralConn {
 
private ConnCache connCache;
 
//open connection during object creation
public GeneralConn () {
try {
   connCache = ConnCache.getInstance();
   dbConn= connCache.getConnection();  //grab a connection
from
 the connection pool
}catch (Exception e) {
   System.out.println(Fail to open connection:  +
 e.getMessage());
}
 }
 
 //close when this object is destroyed
 public void finalize () {
 try{
 dbConn.close();
 dbConn = null;
   }catch (Exception e) {
   System.out.println(Fail to close connection:  +
 e.getMessage());
   }
 }
 }
 
 Would this be okay? is it guaranteed that finalize() will be executed
 during
 garbage collect??
 
 
 Regards,
 Rosdi bin Kasim.
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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




HTTP Status 503 - Servlet jsp is currently unavailable

2003-02-21 Thread A.Ezhil
hi,

i found the following error when i use tomcat server:

HTTP Status 503 - Servlet jsp is currently unavailable

pls let me know the solution for this at earliest.


thanks in advance

ezhil.a



Re: HTTP Status 503 - Servlet jsp is currently unavailable

2003-02-21 Thread Jens Skripczynski
A.Ezhil:
 hi,
 
 i found the following error when i use tomcat server:
 
 HTTP Status 503 - Servlet jsp is currently unavailable
 
 pls let me know the solution for this at earliest.
well. Just posting the error message, does not give me (i believe most of us)
enough information, to help you with this matter.

1) Which tomcat version are you running
   a) standalone
   b) inside apache.
2) what os
3) What did you do, that caused this error message to appear ?

Ciao

Jens Skripczynski
-- 
E-Mail: skripi(at)myrealbox(dot)com

Gehe Grosse Dinge mit Gelassenheit an. [...] Und nehme kleine Dinge ernst.
-- aus Ghost Dog


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




4.1.18 Re-deployment

2003-02-21 Thread Tony Colson
I need help in figuring out why when I re-deploy an
app with Tomcat 4.1.18 I get error 404 - Resource not
available.

The application works fine.  Then when I recompile
everything, put it in WEB-INF/classes, bundle it up
into a war, and then try to use the application, I get
the error.

I compile the application with an ant job.  I
precompile the jsps into classes and create a web.xml
file on the fly with all appropriate servlet/jsp
mappings.  If I restart Tomcat, things work fine. 
Otherwise there is somewhere in replacing the .class
files or something that prevents TOmcat from accessing
them.

Any ideas would be appreciated.
Thanks to anybody in advance,
Tony

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




Re: HTTP Status 503 - Servlet jsp is currently unavailable

2003-02-21 Thread A.Ezhil
thanks i am using standalone.. in linux 8.0  tomcat 4.0

while i am trying to open my application jsp page,it displayed that error...

ezhil.a


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




Web browser authenticates to Tomcat Server using Client SSL authentication

2003-02-21 Thread Kwan Hon Luen
Hi ,

Have configured Tomcat to use SSL with client authentication set to true.
Have imported client (which is the web browser IE) certificate to tomcat
server keystore.
But when I use IE to connect to Tomcat, it pops up a message box saying The
Web site you want to view requests identification. Select the certificate to
use when connecting. Problem is that there is no certificate displayed to
select.

Does anyone know how to solve this using the current setup ?

regards,
Hon Luen

__
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com

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




Re: apache web server and Tomcat

2003-02-21 Thread Cédric Viaud
Hi,

to make Tomcat work with Apache is not really complicated, but need a
certain amount of configuration.

First install Apache and Tomcat (on the same computer or on two differents
one).

Then you'll need to install a connector. I actually use Apache 1.3.x with
Tomcat 4.0.4 LE, and my connecter is mod_jk.
For installation/configuration, this link is pretty usefull :
http://www.ubeans.com/tomcat/

Contrary to what is written, it is not mandatory to compile all the stuff.
You can find pre-compiled versions on the Web. But it depends of what OS
your are using.

Many other links may be helpfull. First time i've done the job, i used these
ones :
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/quickhowto.html
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/index.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html

and also this one :
http://www.galatea.com/flashguides/index

I know, it's a lot of work to read all this , but better to much
documentation than not enough :-)

Regards,

   Cédric


- Original Message -
From: christian morales [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 20, 2003 10:43 PM
Subject: apache web server and Tomcat


 I am a peruvian student and i have a problem about apache web server and
its
 relation whit tomcat. i have apache web server 1.3 and tomcat 4.0. what i
 have to do for a good understandig between this two.
 plus i need to now how i got to call my servlets from my web page. before
i
 use to call like: localhost:8080 what i have to do. because i call whit
 server name too and nothing.
 please helpme i need this information.
 P.D.: sorry by my english



 _



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



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




Re: Re: Performance Issue

2003-02-21 Thread vikas yk

Hi peter

Thanks for your reply.
I didnt get what u meant by testing it with bean
What  I did was

recorded the time before I executed the Proc
recorded the time after I got result result set
recorded the time after commenting all the logic I had in
while(rs.next()){} loop.

I need all 6000 rows coz
on my page i am selecting one item in my combo-box and based on 
value i select second combo box on same page gets populated.
Unfortunately there is one value which is creating problem


Any help will be of great help 2 me




On Fri, 21 Feb 2003 Peter Lin wrote :


If you're reading out 6K rows remotely, you're limited by 
bandwidth. Especially if the webserver only has one ethernet card 
and you're viewing the pages from another client. If you're 
concerned about performance, I would suggest writing a simple 
test bean to do the same exact query and time the elapse time to 
get the data. Then you can subtract the transport time from the 
total elapsed time.
Is there a reason you need all 6000 rows? That's a lot of data to 
view in one shot. If you can break it into pages, or preload that 
data, it should improve the response time.

peter

 vikas yk [EMAIL PROTECTED] wrote:I am making call Oracle 
Function on remote database .
The values are taken in result set.The numbers of records in
result set are aroung 6000.
when I do
while(rs.next())
{
//My logic
}
This takes aroung 5 min(300 sec) to get completed
Now I commented all my logic inside while loop of rs.next()

then also its taking around 4 min (250 sec) to just loop 
through
records.
Is there any way I can minize my time to recurse through
records.

I am using oracle thin driver to make connection.



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



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more



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




cgi program htsearch not working in tomcat

2003-02-21 Thread prem harish
hi,
I am using htdig software in a linux system which has
both apache and tomcat4.0.5. I have a cgi program
htsearch located in my
/usr/tomcat405/webapps/ROOT/cgi-bin. I have followed
the instructions for configuring tomcat to run cgi ie.
renaming
$CATALINA_BASE/server/lib/servlets-cgi.renameto to
$CATALINA_BASE/server/lib/servlets-cgi.jar and also
uncommenting servlet and servlet mapping configuration
in $CATALINA_BASE/conf/web.xml.
When I run the program in the browser I get a page
full of junk. The htdig program rundig had
successfully indexed the required directory earlier.
The htsearch program is supposed to return all the
occurrences of a particular string. I am not getting
any error as such but only a set of junk characters.
Could somebody please help me?
prem

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




newbe question; use a class.

2003-02-21 Thread kwolff
Hi all, 

i am a strupid newbe. and have simple question.

my asp have to use a class, but i do not know how ?

I give you my test files:
ASP:
-- test.asp / in the root directory of tomcat:
body
test-page:
hr
%
out.println(--br);
test t = new test();
out.println(--br);
%
/body
/html


and now the test.java:

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class test extends TagSupport {
public void test() throws Exception {
JspWriter out = pageContext.getOut();
out.print(ok. i am the class.);
}   
}
---

i compailed it with standart java 1.4 javac test.java and put it in INF- and for 
testing in other directorys that contain classes...  or looks like it.

i run my asp in the tomcat env and get thi error:
cannot resolve symbol symbol : class test location: class 
org.apache.jsp.test_jsp test t = new test(); 

i also tried some things with includions, but failed everytime. I think 
it is the best do not tell you all the steps i done because all of it are 
wrong. 

Can you gurus please tell me how to make this little test working ? 

Thank you very much.


Best Regards 
Kris

Kris Wolff
Application Developer
dietzk. Interactive OHG
An der Schindhohl 7
D-65843 Sulzbach am Taunus
Fon +49 (0) 6196 4939-95
Fax +49 (0) 6196 758830
[EMAIL PROTECTED]
http://www.dietzk.de



Servlet filter and listerner best practices

2003-02-21 Thread Etienne
Hi all, 

I am looking for some best practices for servlet filter (and servlet
listener). These are quite new (servlet 2.3). I am using a servlet
filter on some of my jsp page, but I would need a detail example of the
best way to implement it. I am not sure how to catch exception in the
servlet filter without hiding everything in the back on it. Also, I find
it a bit limited to map the servlet on jsp and servlet using the
web.xml. Is there a more precise way (with some reg ex?) to associate a
filter with pages? If I had some good example of good patterns, using
filter chain... I would probably apply it a better way. I would have the
same question about listener servlet too.

Thanks.

Etienne.


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




/manager /admin Tomcat 4.1.18

2003-02-21 Thread Andoni
Are these different things? /manager   and /admin

I have Tomcat 4.0.4 working and I know it only has /manager but now after
getting 4.1.18 working on my windows platform I can only get   /admin
working even though there is a manager subdirectory to the webapps
directory.


Andoni.


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




Re: /manager /admin Tomcat 4.1.18 - IGNORE THIS...

2003-02-21 Thread Andoni
A quick look at server.xml reveals that the Memory realm is not enabled by
default (it is commented out) in favour of the JNDI Realm.

Andoni.

- Original Message -
From: Andoni [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 11:53 AM
Subject: /manager  /admin Tomcat 4.1.18


 Are these different things? /manager   and /admin

 I have Tomcat 4.0.4 working and I know it only has /manager but now after
 getting 4.1.18 working on my windows platform I can only get   /admin
 working even though there is a manager subdirectory to the webapps
 directory.


 Andoni.


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




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




Re: Tomcat and Apache

2003-02-21 Thread Andoni
Apache is better at doing some things than Tomcat.  For instance one I know
of is serving static pages.  Apache does that much better.  Also if you use
apache you get the benefit of things such as URL Rewriting and you get
better Virtual host support than with Tomcat acting alone.

I am sure there is a document somewhere on the web explaining all the
benefits.

I would recommend you do put Apache as your live interface to the world.
Tomcat was designed as an application server not a web server and so if you
are being pure about using the correct tool for every job then go with
Apache  Tomcat instead of just tomcat.

Recently I will admit, later versions of Tomcat seem to be able to do a lot
of what only apache used to be able to do but when you have your system up
and running you'll find that it is then that you need something (at the most
awkward time) that only apache can provide.

Andoni.

- Original Message -
From: Etienne [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:01 PM
Subject: Tomcat and Apache


 Hi, I have a simple question to ask. Why most of the people use Apache
 like the web server running in front of Tomcat? Would it be better to
 map tomcat on port 80? What is the plus value of having the apache web
 server in front?
 Is it only to have access to perl or php?

 Thanks

 Etienne.


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




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




servlet/jsp/j2ee/pattern/ mailing list

2003-02-21 Thread Etienne
It there a newsgroup of a good mailing list for
servlet/jsp/j2ee/pattern/? I have search for some of them, I didn't find
anything.

Thanks.

Etienne. 


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




Re: servlet/jsp/j2ee/pattern/ mailing list

2003-02-21 Thread Andoni
Have you tried the newsgroups? http://groups.google.com is a good place to
look for groups but if you want to post regularly you are better getting
Outlook Express (or some other client) and an address of a proper news
server.

Then you have news://comp.lang.java to post to.

Also, although you are not Irish but it does not matter, you can use:

http://www.ijug.org/

The Irish Java User's Group who have a very good web site discussion forum.


Andoni.

- Original Message -
From: Etienne [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:17 PM
Subject: servlet/jsp/j2ee/pattern/ mailing list


 It there a newsgroup of a good mailing list for
 servlet/jsp/j2ee/pattern/? I have search for some of them, I didn't find
 anything.

 Thanks.

 Etienne.


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




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




Tomcat admin

2003-02-21 Thread Etienne

Hi, 

Last week, I have change the path of the tomcat admin from mysite/admin
to mysite/admins, because I already had a custom administration section
on mysite/admin/. Now I have tried to access the tomcat admin, but I
have a security error. It seems that only admin/index.jsp can request
the admin section. So, is there a better way to configure my
tomcat/admin? By the way in which file can I set the path of the
administration section? I forgot where I did it!

ERROR:

HTTP Status 400 - Invalid direct reference to form login page




type Status report

message Invalid direct reference to form login page

description The request sent by the client was syntactically incorrect
(Invalid direct reference to form login page).



Thanks

Etienne.


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




Re: ant install task

2003-02-21 Thread Rasputin
* Rob Abernethy IV [EMAIL PROTECTED] [0252 21:52]:
 When I run 'ant install', I get the response OK - Installed application at
 context path /foo.  When I list the apps using ant list, I see that my app
 is listed, but not started.  When I try to access it via
 http://localhost:8080/foo;, I get the error The requested resource is not
 available.  When I try to manually start this app from the manager gui, I get
 this error FAIL - Application at context path /foo could not be started. 
 Any ideas?

I had the same trouble , possibly the install task likes an
expanded directory rather than a warfile?

If it doesn't work, see the attached build.xml - I knocked it
together over the past couple of days, but it works well for me.

Does the following (assuming you have the standard project layout
a la appdev guide:

build.xml
catalina-tasks.ent # just holds the taskdefs for the tasks you want.
src/
lib/
web/
)

deploys by copying warfiles to $appbase.dir under CATALINA_HOME,
so it sticks after reboots or if the build directory changes

names the warfile after the context.path it'll be deployed to
(not essential, it just simplified the buildfile)

undeploys by calling remove on the context, and physically deleting
the warfile from $appbase.dir to it stays undeployed after a restart
- you'll still have it in dist/ unless you do a clean

It has a few requirements:

1. catalina-ant.jar should be in the classpath
2. CATALINA_HOME should be correctly set in the environment
3.the webapp directory has unpackWARS=false set (not strictly a
requirement, but I found it saves a lot of hassle)
4. You have a file in your home directory called
'.tcdeploy.properties' with two lines:
user=managerusername
pass=managerpassword

Hmm, think that's it, there are other obvious targets, like list,stop,start
- see if it's any use.


-- 
How wonderful opera would be if there were no singers.
Rasputin :: Jack of All Trades - Master of Nuns

?xml version=1.0 ?
!DOCTYPE project [
!ENTITY catalina-tasks SYSTEM ./catalina-tasks.ent
]

project name=deployment test default=webapp

property environment=env /
property file=${user.home}/.tcdeploy.properties prefix=tc /
property file=build.properties /

!-- default properties if not specified elsewhere --

property name=servlet.jar
value=${env.CATALINA_HOME}/common/lib/servlet.jar /

property name=context.path value=deployment /
property name=webapp.name value=${context.path} /
property name=warfile.name location=dist/${webapp.name}.war /

property name=cat.server value=webapps.tenten /
property name=cat.appbase value=webapps /
property name=cat.deploydir
location=${env.CATALINA_HOME}/${cat.appbase} /
property name=cat.port value=8080 /
property name=autoload.delay value=30 /

property name=manager.url
value=http://${cat.server}:${cat.port}/manager; /

path id=compile.classpath
pathelement location=${servlet.jar} /
/path

!-- end of default properties --

!-- pull in the tomcat task definitions --
catalina-tasks;

target name=init description=create required directories
mkdir dir=build/classes /
mkdir dir=dist /
/target

target name=clean description=remove directories created by build
delete dir=build /
delete dir=dist /
/target

target name=compile depends=init 
description=compile servlet classes 
javac srcdir=src destdir=build/classes
classpathref=compile.classpath /
/target

target name=webapp depends=compile
description=generate WARfile 
war destfile=${warfile.name}
webxml=web/WEB-INF/web.xml
fileset dir=web excludes=WEB-INF/web.xml/
classes dir=build/classes /
lib dir=lib /
/war
/target

!-- this task sets ${webapp.deployed} if, uh, it is  --
target name=checkdeploy
condition property=webapp.deployed 
http 
url=http://${cat.server}:${cat.port}/${context.path};
/
/condition
/target

!-- catalina Ant tasks  --

target name=list
description=list Contexts installed on ${cat.server} 
list url=${manager.url}
username=${tc.user} password=${tc.pass}
/
/target

target name=appbase-copy depends=webapp
description=copy ${warfile.name} to ${cat.deploydir} [ needs shared disk ] 
copy file=${warfile.name} todir=${cat.deploydir}
/
/target

target name=wait-for-tc
echo message=waiting 

Re: parameter order

2003-02-21 Thread Mr. Cristian Romanescu
Actually, from my experience you should not rely on the order of the 
parameters...There is no rule on that.

At 12:16 AM 2/21/2003 -0800, you wrote:

StringBuffer sb = new StringBuffer();
Enumeration en = req.getParameterNames();
for (; en.hasMoreElements() ;) {
String param = (String) en.nextElement();
String value = req.getParameter (param);
sb.append(param).append(:
).append(value).append(\n);
}


The order of the parameters is not clear - it is
neither alphabetical nor as specified in the html
form.
Is it that IE is ordering the parameters in such way
when POSTing the data? Anybody knows about this? This
is just out of curiousity, not really needed anywhere.

Thanks
rf


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



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




RE: ant install task

2003-02-21 Thread Collins, Jim
Check your logs. There will be message in there saying why the app could not
be loaded (my apps fail to load if I have made a mistake in my web.xml file)

Regards

Jim.

 -Original Message-
 From: Rob Abernethy IV [mailto:[EMAIL PROTECTED]]
 Sent: 20 February 2003 08:52
 To: tomcat-user
 Subject: ant install task
 
 
 When I run 'ant install', I get the response OK - Installed 
 application at
 context path /foo.  When I list the apps using ant list, I 
 see that my app
 is listed, but not started.  When I try to access it via
 http://localhost:8080/foo;, I get the error The requested 
 resource is not
 available.  When I try to manually start this app from the 
 manager gui, I get
 this error FAIL - Application at context path /foo could not 
 be started. 
 Any ideas?
 
 --
 Robert Abernethy IV
 Dynamic Edge, Inc.
 734.975.0460
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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




Re: Tomcat and Apache

2003-02-21 Thread Ian Hunter
Well said.  One reason I front end with Apache is that I have to run other
applications (IIS/ASP based, pppht!) and have several virtual hosts.  Apache
gives me the flexibility to handle literally anything thrown my way so far.
I also feel like Apache is probably more secure to have exposed to the
outside world.  I don't feel that way about Tomcat.  In fact, I'll only
expose Tomcat apps via a connector, rather than HTTP.

- Original Message -
From: Andoni [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 7:13 AM
Subject: Re: Tomcat and Apache


 Apache is better at doing some things than Tomcat.  For instance one I
know
 of is serving static pages.  Apache does that much better.  Also if you
use
 apache you get the benefit of things such as URL Rewriting and you get
 better Virtual host support than with Tomcat acting alone.

 I am sure there is a document somewhere on the web explaining all the
 benefits.

 I would recommend you do put Apache as your live interface to the world.
 Tomcat was designed as an application server not a web server and so if
you
 are being pure about using the correct tool for every job then go with
 Apache  Tomcat instead of just tomcat.

 Recently I will admit, later versions of Tomcat seem to be able to do a
lot
 of what only apache used to be able to do but when you have your system up
 and running you'll find that it is then that you need something (at the
most
 awkward time) that only apache can provide.

 Andoni.

 - Original Message -
 From: Etienne [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 12:01 PM
 Subject: Tomcat and Apache


  Hi, I have a simple question to ask. Why most of the people use Apache
  like the web server running in front of Tomcat? Would it be better to
  map tomcat on port 80? What is the plus value of having the apache web
  server in front?
  Is it only to have access to perl or php?
 
  Thanks
 
  Etienne.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



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




RE: Tomcat and Apache

2003-02-21 Thread Turner, John

Agreed.  It's probably OK, but I would rather keep Tomcat isolated from port
80, and I try to avoid running any services as root on port 80 if I can help
it.

In many cases, Tomcat alone is sufficient to serve whatever content there is
to be served, but the additional flexibility and architecture benefits you
get from using Apache + Tomcat are too many for me to ignore.

John

 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 21, 2003 8:36 AM
 To: Tomcat Users List
 Subject: Re: Tomcat and Apache
 
 
 Well said.  One reason I front end with Apache is that I have 
 to run other
 applications (IIS/ASP based, pppht!) and have several virtual 
 hosts.  Apache
 gives me the flexibility to handle literally anything thrown 
 my way so far.
 I also feel like Apache is probably more secure to have exposed to the
 outside world.  I don't feel that way about Tomcat.  In fact, 
 I'll only
 expose Tomcat apps via a connector, rather than HTTP.
 
 - Original Message -
 From: Andoni [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 7:13 AM
 Subject: Re: Tomcat and Apache
 
 
  Apache is better at doing some things than Tomcat.  For 
 instance one I
 know
  of is serving static pages.  Apache does that much better.  
 Also if you
 use
  apache you get the benefit of things such as URL Rewriting 
 and you get
  better Virtual host support than with Tomcat acting alone.
 
  I am sure there is a document somewhere on the web 
 explaining all the
  benefits.
 
  I would recommend you do put Apache as your live interface 
 to the world.
  Tomcat was designed as an application server not a web 
 server and so if
 you
  are being pure about using the correct tool for every job 
 then go with
  Apache  Tomcat instead of just tomcat.
 
  Recently I will admit, later versions of Tomcat seem to be 
 able to do a
 lot
  of what only apache used to be able to do but when you have 
 your system up
  and running you'll find that it is then that you need 
 something (at the
 most
  awkward time) that only apache can provide.
 
  Andoni.
 
  - Original Message -
  From: Etienne [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Friday, February 21, 2003 12:01 PM
  Subject: Tomcat and Apache
 
 
   Hi, I have a simple question to ask. Why most of the 
 people use Apache
   like the web server running in front of Tomcat? Would it 
 be better to
   map tomcat on port 80? What is the plus value of having 
 the apache web
   server in front?
   Is it only to have access to perl or php?
  
   Thanks
  
   Etienne.
  
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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




Re: Servlets and classpath problem

2003-02-21 Thread Ian Hunter
I've had similar problems and I could have sworn I saw someone give the
advice that it's best to give each webapp it's own copy of the shared jars.
I did that and the problems went away.  I hate having duplicate files, but I
guess if proper application segmentation is going on it's probably safer
anyway.  Just my two cents.

- Original Message -
From: John Rishea [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 8:49 AM
Subject: Servlets and classpath problem


 Hi,

 I'm having a classpath problem with Tomcat 4.0.x on a Unix platform and
was
 hoping someone could point me in the right direction.

 A servlet in one of my webapps uses external classes located outside
 common/lib or webapp/WEB-INF/classes.  So I added the external class'
 location to the classpath in my .profile, assuming this would be all I
 needed to do.  When I compile the servlet in my development directory, it
 compiles just fine.  But when I place the servlet class in WEB-INF/classes
 directory and restart Tomcat, a ClassDefNotFound furball gets spit back at
 me for those external classes that (I thought) would be accessible via my
 classpath.

 I have root permissions so I know that isn't the issue.  Is there
something
 else I'm missing here?  An entry in server.xml or something similar?  I
 would really rather not copy those external classes into WEB-INF/classes
(I
 have tried that, and then the servlet works just fine) but I don't know
what
 to try next.

 Thanks for your help!

 __
 John Rishea


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



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




Tomcat and Virtual Sites in IIS

2003-02-21 Thread Konrad Rusz
Hi.
I have one question. I'm trying to configure Tomcat 4.1.12 to work with 
IIS 5.0. All of my settings work properly, but I can't configure IIS 
Virtual Sites to serve .jsp pages by means of Tomcat (I have configured
site in IIS - this site name is sklep.zlp.pl, and I have configured
virtual directory naming 'oponyzimowe' under this site; I have
configured virtual directory naming 'jakarta' under this site as well).
I think it is correct, because when I connect over Internet to site
http://sklep.zlp.pl/examples I can see that my Tomcat work and I be able
to execute examples servlets and .jsp pages. However, if I try to
connect over the Internet to the site
http://sklep.zlp.pl/oponyzimowe/examples I see the IIS Error 404 - File
Not Found. How can I configure my Tomcat and IIS to work with IIS
Virtual Sites? If You have some idea please contact me.

Konrad Rusz
e-mail: [EMAIL PROTECTED]


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




where can i servlet api specification?

2003-02-21 Thread Xiongfei Wang


servlet api specification is not included in java2 platform specification,
but where i can find it?

Thanks


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




Re: where can i servlet api specification?

2003-02-21 Thread Jake Robb
http://java.sun.com/products/servlet/2.2/javadoc/


- Original Message -
From: Xiongfei Wang [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 9:05 AM
Subject: where can i servlet api specification?




 servlet api specification is not included in java2 platform specification,
 but where i can find it?

 Thanks


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



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




Re: where can i servlet api specification?

2003-02-21 Thread Tim Funk
http://java.sun.com/products/servlet/download.html

-Tim

Xiongfei Wang wrote:


servlet api specification is not included in java2 platform specification,
but where i can find it?

Thanks

 


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




RE: Excel sheets

2003-02-21 Thread Cox, Charlie
add the content type to /conf/web.xml for csv files. 

  mime-mapping
extensioncsv/extension
mime-typeapplication/excel/mime-type
  /mime-mapping

you will have to restart tomcat for this change.
Charlie


 -Original Message-
 From: David Epstein [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 20, 2003 9:08 PM
 To: [EMAIL PROTECTED]
 Subject: Excel sheets
 
 
 
 I have a website that serves up files, which are often .csv 
 files. When
 I run the site using IIS (ick), a user with Excel on their 
 machine will
 see the .csv files automatically open in Excel. But when I use the
 Tomcat server, I can't get it to do the same. Is there an easy way to
 enable this functionality?
 
 Any help appreciated.
 
 David Epstein
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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




[OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

This is a bit off topic.

Then please mark it as such.  See modified Subject for this message.

I am using connection pooling, and in my code, I open all the
connection I
need in an object constructor.
Then I will close this connection in finalize(), which (according to
what I
read) will be executed during java garbage collect.

Bad practice.  Connections are scarce resources and should be held for
the minimum amount of time.  Grab them from the pool, run whatever query
you need, release them back to the pool.  Make sure your release code
handles exception and does not hold on to connections.

Do not wait for the finalize() methods.  They will be called during GC,
yes, but it is difficult if not impossible to know exactly when GC will
be called for your specific objects, even after no references are held
to them.

Yoav Shapira
Millennium ChemInformatics




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




Re: Re: Performance Issue

2003-02-21 Thread Peter Lin

 
what I mean is this.  write a simple bean to test how long it takes to get all 6K rows 
outside of Tomcat. ie, a bean you can run from your IDE or command line.
Luckily, I already wrote one for the Tomcat performance book and included it in the 
zip file. All you would have to do is change the JDBC properties, provide your sql 
query in a text file and tell it how many iterations you want.
 
it will record the elapsed time to get the resultset. Once you know long that takes... 
you can compare it to your page in Tomcat. It sounds like you're trying to dynamically 
create all the drop downs, which sounds good in theory but is bad in practice. I'll 
give you real example and see if it helps.  I worked at a E-commerce site in the past 
that had a similar problem. On the homepage, they wanted to show all the specials and 
available items. this meant doing quite a few queries to dynamically build a page that 
accurately reflected the inventory.
 
well, the end result of that approach is it ended up taking 6min+ to load the 
homepage. After a lot of negotiating with marketing, and business people, it turns out 
they really only need one part of the homepage dynamic (specials) and the rest could 
be static. There really was no need to run 20 queries to build a page.
 
I don't know if your situation is similar, but if you really need the data to be 
absolutely accurate, then you have no choice. I'm guessing only a small part of the 
data changes every minute. In a situation where you have a lot of data that is 
dynamic, it's better to create a application wide cache that uses events/messaging to 
update the data in Tomcat. Since you're using Oracle, you can write a java trigger, 
which uses JMS to publish a message. JMS will then notify all listening  clients and 
the client will go update itself. I'm guessing the first drop down doesn't have 6K 
options, it's a good idea to break it into discrete pieces.  If you make a persistent 
webapp and have Tomcat load it at startup, you can prepopulate that data. hope that 
helps.
 
peter
 
 vikas yk [EMAIL PROTECTED] wrote:
Hi peter

Thanks for your reply.
I didnt get what u meant by testing it with bean
What I did was

recorded the time before I executed the Proc
recorded the time after I got result result set
recorded the time after commenting all the logic I had in
while(rs.next()){} loop.

I need all 6000 rows coz
on my page i am selecting one item in my combo-box and based on 
value i select second combo box on same page gets populated.
Unfortunately there is one value which is creating problem


Any help will be of great help 2 me




On Fri, 21 Feb 2003 Peter Lin wrote :


If you're reading out 6K rows remotely, you're limited by 
bandwidth. Especially if the webserver only has one ethernet card 
and you're viewing the pages from another client. If you're 
concerned about performance, I would suggest writing a simple 
test bean to do the same exact query and time the elapse time to 
get the data. Then you can subtract the transport time from the 
total elapsed time.
Is there a reason you need all 6000 rows? That's a lot of data to 
view in one shot. If you can break it into pages, or preload that 
data, it should improve the response time.

peter

 vikas yk wrote:I am making call Oracle 
Function on remote database .
The values are taken in result set.The numbers of records in
result set are aroung 6000.
when I do
while(rs.next())
{
//My logic
}
This takes aroung 5 min(300 sec) to get completed
Now I commented all my logic inside while loop of rs.next()

then also its taking around 4 min (250 sec) to just loop 
through
records.
Is there any way I can minize my time to recurse through
records.

I am using oracle thin driver to make connection.



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



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more



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



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more


[OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

You shouldn't put anything in your finalize() method, it's a bad
practice
because it can cause issues with the jvm's gc.

I strongly disagree with the above statement.  Finalize methods have
their use -- that's why they're around.  I agree with your specific
answer to this guy's connection handling question -- finalize() is not
the place for that.

But finalize() can be useful for many other things.

Consider the following class:

Class MyClass {
  private Map aBigMap;
  private Set aBigSet;
  private List aBigList;

  // This class does various
  // things where the member structures
  // can grow very very large and consume
  // significant memory

  /**
   * Finalize: clear member
   * structures.
   *
   * @throws Throwable
   */
  protected void finalize() throws Throwable() {
aBigMap.clear();
aBigMap = null;

aBigSet.clear();
aBigSet = null;

aBigList.clear();
aBigList = null;

// Always call super.finalize()
// at the end of custom finalizers.
super.finalize();
  }
}
// End of class: MyClass

The above custom finalizer will result in much more efficient memory
claiming by the garbage collector, almost independent of collector
implementation (parallel, mark and sweep, concurrent will all benefit
from this).  Moreover, the finalize() method is the best place to do
this
sort of cleanup as you are assured the data won't be needed again.

Yoav Shapira
Millennium ChemInformatics





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




Slightly Off Topic: Web Site Content

2003-02-21 Thread Kevin Andryc
Hello,
I have been doing web programming for quite some time but what I have
yet to figure out is the best way to handle web site content. For example,
if I want to create a web sire with a vast number of pages, I would like to
have it easily maintained such that if a link changes in my navigation bar,
the rest gets updated rather than picking through every page. What is the
best way to do this? Do you guys use JSP pages and have the navigation or
content stored in a database and then retrieved by the JSP? How about
architecture? Are there any good books on this? Any help would be great.

Sincerely,
Kevin

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]



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




Re: where can i servlet api specification?

2003-02-21 Thread Jake Robb
Obviouisly, if you want the spec for a different version, just change the
2.2.  For instance:

http://java.sun.com/products/servlet/2.3/javadoc/


- Original Message -
From: Jake Robb [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 9:15 AM
Subject: Re: where can i servlet api specification?


 http://java.sun.com/products/servlet/2.2/javadoc/


 - Original Message -
 From: Xiongfei Wang [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 9:05 AM
 Subject: where can i servlet api specification?


 
 
  servlet api specification is not included in java2 platform
specification,
  but where i can find it?
 
  Thanks
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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




RE: Tomcat and Apache

2003-02-21 Thread pqin
This is the story I was told.

In old days, Tomcat was a JSP/Servlet Container - interpreting JSP/Servlet
pages faster than it did for static html. So people chose Apache to load
HTML pages and redirected requests of JSP/Servlet to Tomcat. Now Tomcat
claims to be as fast as Apache in terms of interpreting HTMLs.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Etienne [mailto:[EMAIL PROTECTED]] 
Sent: February 21, 2003 7:01 AM
To: 'Tomcat Users List'
Subject: Tomcat and Apache

Hi, I have a simple question to ask. Why most of the people use Apache
like the web server running in front of Tomcat? Would it be better to
map tomcat on port 80? What is the plus value of having the apache web
server in front?
Is it only to have access to perl or php?

Thanks

Etienne.


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



RE: Connection Pooling

2003-02-21 Thread pqin
There are two options.

1. Tomcat JNDI: refer to Tomcat's JNDI datasource how-to
2. commons-dbcp + commons-pooling: refer to commons-dbcp and pooling API
documentation

Which one do you want to know?


Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Sebastiªo Carlos Santos [mailto:[EMAIL PROTECTED]] 
Sent: February 20, 2003 7:15 PM
To: [EMAIL PROTECTED]
Subject: Connection Pooling

Somebody has some experience or example in the 
configuration and use of pool of connections with the 
commons-dbcp.  
I am a little lost and I don't know through where to 
begin.  
All information will be well arrival.  
I thank the help in advance

 
__
E-mail Premium BOL
Antivírus, anti-spam e até 100 MB de espaço. Assine já!
http://email.bol.com.br/



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



[OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

 for you, you can call System.gc() to force it to garbage collect
 immediately.

No.  System.gc is a suggestion.  The VM doesn't have to activate the
collector upon this call.  JDK 1.4 even includes a flag to explicitly
ignore System.gc calls, so the server admin could use this flag anytime.

True, but the garbage collector doesn't have to collect everything.

There are very strict policies on what can and can't be collected and
when.  The simplest view is that if something has no references, it can
(but not must) be finalized and collected.  Consider the hypothetical
case where the VM had many times the amount of memory it needed: would
anything every be allocated?  Depends on the collector implementation,
and there are numerous implementations.

if you call it directly you can't count on it collecting some or all of
the
available object.

An object is an atomic unit for garbage collection.  You can't garbage
collect part of an object.  If a class instance contains several member
variables and the collector has determined the instance can be
discarded, the collector has determined this after considering the
member variables.  Once discarded, all member variables are discarded in
one atomic operation.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




RE: parameter order

2003-02-21 Thread Shapira, Yoav

Howdy,
No rule exists, your design shouldn't rely on parameter order.  If it
does, shuffle the enumeration into another structure, e.g. List, and
sort it before processing parameters.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: rf [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 3:16 AM
To: [EMAIL PROTECTED]
Subject: parameter order


StringBuffer sb = new StringBuffer();
Enumeration en = req.getParameterNames();
for (; en.hasMoreElements() ;) {
String param = (String) en.nextElement();
String value = req.getParameter (param);
sb.append(param).append(:
).append(value).append(\n);
}


The order of the parameters is not clear - it is
neither alphabetical nor as specified in the html
form.
Is it that IE is ordering the parameters in such way
when POSTing the data? Anybody knows about this? This
is just out of curiousity, not really needed anywhere.

Thanks
rf


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




[offtopic]Are JK2 developers M$ people?

2003-02-21 Thread pqin
I built apache and jk2 for my linux box. I have to admit it is slightly
difficult to build and config. I still have an error after I start apache
[error] mod_jk child init 1 0 - I am not even running mod_jk but mod_jk2!
Yesterday I installed apache and jk2 on w2k box. Few minutes, I was done.

 

I was wondering if those jk2 developers are hired by M$? :)

 

Regards,

 

 

 

PQ

 

This Guy Thinks He Knows Everything

This Guy Thinks He Knows What He Is Doing

 




Re: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Kris Schneider
Not sure I buy ...will result in much more efficient memory claiming At
the least, implementing a finalizer extends the lifetime of an object. It's up
to the VM to decide when that finalizer gets run, so the object might not become
finalized (ready for deallocation) for a significant amount of time. This seems
like a particularly bad idea for short-lived objects in an application that's
under heavy load. In general, if you really need to do some cleanup I'd say it's
preferable to make it explicit (e.g. add a clear method to MyClass).

Quoting Shapira, Yoav [EMAIL PROTECTED]:

 
 Howdy,
 
 You shouldn't put anything in your finalize() method, it's a bad
 practice
 because it can cause issues with the jvm's gc.
 
 I strongly disagree with the above statement.  Finalize methods have
 their use -- that's why they're around.  I agree with your specific
 answer to this guy's connection handling question -- finalize() is not
 the place for that.  
 
 But finalize() can be useful for many other things.
 
 Consider the following class:
 
 Class MyClass {
   private Map aBigMap;
   private Set aBigSet;
   private List aBigList;
 
   // This class does various
   // things where the member structures
   // can grow very very large and consume
   // significant memory
 
   /**
* Finalize: clear member
* structures.
*
* @throws Throwable
*/
   protected void finalize() throws Throwable() {
 aBigMap.clear();
 aBigMap = null;
 
 aBigSet.clear();
 aBigSet = null;
  
 aBigList.clear();
 aBigList = null;
 
 // Always call super.finalize()
 // at the end of custom finalizers.
 super.finalize();
   }
 }
 // End of class: MyClass
 
 The above custom finalizer will result in much more efficient memory
 claiming by the garbage collector, almost independent of collector
 implementation (parallel, mark and sweep, concurrent will all benefit
 from this).  Moreover, the finalize() method is the best place to do
 this
 sort of cleanup as you are assured the data won't be needed again.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential, proprietary
 and/or privileged.  This e-mail is intended only for the individual(s) to
 whom it is addressed, and may not be saved, copied, printed, disclosed or
 used by anyone else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and notify the
 sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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




Re: setting up jndi jdbc tomcat and postgres

2003-02-21 Thread awc
Hi Chris,

where does this validationQuery goes?? on every connect??

Thanks

.anil

Chris Catton wrote:

 The tomcat documentation on jndi and datasources
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
 -howto.html asks for  feedback on setup with postgres.  We finally got
 it working  using java 1.4, tomcat 4.1.18 on linux, postgres 7.2.1 on
 linux with pg73jdbc2ee.jar.  The instructions miss one crucial thing -
 on our system we were getting a datasource created, but on trying to get
 a connection from the datasource the system seemed to hang.  A look at
 the postgres log showed repeated attempts to connect.  Problem
 eventually solved by putting 'select 1;' in the validationQuery

 Seems the postgres driver wants the database to confirm the connection
 is valid before handing it  back ..

 Hope this saves someone else some headscratching - pls stick it in the
 docs!

 C



 Chris Catton
 BioImage Database Development Manager
 Department of Zoology
 University of Oxford
 OX1 3PS

 Tel: +44 (0) 1865 281993
 email: [EMAIL PROTECTED]
 web site: www.bioimage.org



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




Re: Slightly Off Topic: Web Site Content

2003-02-21 Thread Andoni
What I do is that I make all my links point back to my servlet with
something like serMyServlet?mode=about
then I have the servlet process the mode parameter and find the about
section.  This then runs a method which returns a JSP to the browser.

Architecture is always MVC, Classes doing processing and DB access fronted
by a single servlet which spits out JSPs.

Andoni.


- Original Message -
From: Kevin Andryc [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 2:31 PM
Subject: Slightly Off Topic: Web Site Content


 Hello,
 I have been doing web programming for quite some time but what I have
 yet to figure out is the best way to handle web site content. For example,
 if I want to create a web sire with a vast number of pages, I would like
to
 have it easily maintained such that if a link changes in my navigation
bar,
 the rest gets updated rather than picking through every page. What is the
 best way to do this? Do you guys use JSP pages and have the navigation or
 content stored in a database and then retrieved by the JSP? How about
 architecture? Are there any good books on this? Any help would be great.

 Sincerely,
 Kevin

 Kevin Andryc
 Web Systems Engineer
 MISER
 http://www.umass.edu/miser/
 Phone: (413)-545-3460
 [EMAIL PROTECTED]



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




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




RE: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

Not sure I buy ...will result in much more efficient memory
claiming

Then benchmark it ;)  You will see a difference.

For a short-lived object, the benefits may be negligible as you say.  My
scenario is for a long lived cache type object.  In a full
implementation, an explicit clear method would be present as well, and
the finalize method would call the clear, but I wanted to put together
the simplest, clearest example.

the least, implementing a finalizer extends the lifetime of an object.

True, but typically by very little and in this example, IMHO the
benefits (~100MB of memory cleaned up a second faster for an increase of
several microseconds in execution time of my benchmark run) far outweigh
this cost.

preferable to make it explicit (e.g. add a clear method to MyClass).

An explicit clear method has its uses as well, and I nearly always
include them in all implementations.  But so does the finalizer() in
ensuring the most efficient possible shutdown internally, without
relying on the user to call a clear() method.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




RE: Slightly Off Topic: Web Site Content

2003-02-21 Thread Zabel, Ian
You should take a look at the Jakarta Struts project.
http://jakarta.apache.org/struts/

You define the urls for all your pages in config file and then struts
handles making the links.

Ian.

-Original Message-
From: Kevin Andryc [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 21, 2003 9:31 AM
To: Tomcat Users List
Subject: Slightly Off Topic: Web Site Content

Hello,
I have been doing web programming for quite some time but what I have
yet to figure out is the best way to handle web site content. For example,
if I want to create a web sire with a vast number of pages, I would like to
have it easily maintained such that if a link changes in my navigation bar,
the rest gets updated rather than picking through every page. What is the
best way to do this? Do you guys use JSP pages and have the navigation or
content stored in a database and then retrieved by the JSP? How about
architecture? Are there any good books on this? Any help would be great.

Sincerely,
Kevin

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]



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



RE: Slightly Off Topic: Web Site Content

2003-02-21 Thread Collins, Jim
You should also look at cocoon.

http://xml.apache.org/cocoon/

Regards

Jim.

 -Original Message-
 From: Zabel, Ian [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2003 15:27
 To: 'Tomcat Users List'
 Subject: RE: Slightly Off Topic: Web Site Content
 
 
 You should take a look at the Jakarta Struts project.
 http://jakarta.apache.org/struts/
 
 You define the urls for all your pages in config file and then struts
 handles making the links.
 
 Ian.
 
 -Original Message-
 From: Kevin Andryc [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, February 21, 2003 9:31 AM
 To: Tomcat Users List
 Subject: Slightly Off Topic: Web Site Content
 
 Hello,
 I have been doing web programming for quite some time but 
 what I have
 yet to figure out is the best way to handle web site content. 
 For example,
 if I want to create a web sire with a vast number of pages, I 
 would like to
 have it easily maintained such that if a link changes in my 
 navigation bar,
 the rest gets updated rather than picking through every page. 
 What is the
 best way to do this? Do you guys use JSP pages and have the 
 navigation or
 content stored in a database and then retrieved by the JSP? How about
 architecture? Are there any good books on this? Any help 
 would be great.
 
 Sincerely,
 Kevin
 
 Kevin Andryc
 Web Systems Engineer
 MISER
 http://www.umass.edu/miser/
 Phone: (413)-545-3460
 [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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




RE: Form based security and Remember Me

2003-02-21 Thread Raible, Matt
Here's how I've done it -

First of all, I don't use j_security_check as my action, but rather
auth/ which maps to a LoginServlet.  That servlet does some other things,
but here's the relevant code.  The StringUtil.encodeString(password) method
changes to cookie to be base64 encrypted.  Not a very good encryption, but
better than nothing.

LoginServlet.java
=

String username = request.getParameter(j_username).toLowerCase();
String password = request.getParameter(j_password);

if (request.getParameter(rememberMe) != null) {
response =
RequestUtil.setCookie(response, rememberMe, true, false);
response =
RequestUtil.setCookie(response, password,
  StringUtil.encodeString(password),
  false);
}

String req =
j_security_check?j_username= + RequestUtils.encodeURL(username)
+ j_password= + RequestUtils.encodeURL(password);

response.sendRedirect(response.encodeRedirectURL(req));


Then I have a filter mapped to /* and it has the following code:

Cookie rememberMe = RequestUtil.getCookie(request, rememberMe);
Cookie passCookie = RequestUtil.getCookie(request, password);
String password =
(passCookie != null)
? URLDecoder.decode(passCookie.getValue(), UTF-8) : null;

// form-error-page/login.jsp?error=true/form-error-page
boolean authFailed =
StringUtils.equals(request.getParameter(error), true);

// check to see if the user is logging out, if so, remove the
// rememberMe cookie and password Cookie
if ((request.getRequestURL().indexOf(logout) != -1) || authFailed) {
if (log.isDebugEnabled()) {
log.debug(deleting rememberMe-related cookies);
}

response =
RequestUtil.deleteCookie(response,
 RequestUtil.getCookie(request,
   rememberMe));
response = RequestUtil.deleteCookie(response, passCookie);
}

if ((request.getRequestURL().indexOf(login) != -1)  !authFailed) {
// Check to see if we should automatically login the user
// container is routing user to login page, check for remember me cookie
Cookie userCookie = RequestUtil.getCookie(request, username);
String username =
(passCookie != null)
? URLDecoder.decode(userCookie.getValue(), UTF-8) : null;

if ((rememberMe != null)  (password != null)) {
// authenticate user without displaying login page
String route =
j_security_check?j_username= + username
+ j_password= + StringUtil.decodeString(password);

if (log.isDebugEnabled()) {
log.debug(I remember you ' + username
  + ', attempting authentication...);
}

response.sendRedirect(response.encodeRedirectURL(route));

return;
}
}

chain.doFilter(req, resp);

This has been working great for me, but I've only tested it on Tomcat.

HTH,

Matt


 -Original Message-
 From: John Trollinger [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 20, 2003 1:12 PM
 To: [EMAIL PROTECTED]
 Subject: Form based security and Remember Me
 
 
 I seached the archive and only saw one message pertaining to this.
 
 Is anyone doing this at all?  And if so how?
 
 Thanks,
 
 John
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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




RE: Slightly Off Topic: Web Site Content

2003-02-21 Thread Turner, John

Or even Forrest:

http://xml.apache.org/forrest/index.html

John


 -Original Message-
 From: Collins, Jim [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 21, 2003 10:32 AM
 To: 'Tomcat Users List'
 Subject: RE: Slightly Off Topic: Web Site Content
 
 
 You should also look at cocoon.
 
 http://xml.apache.org/cocoon/
 
 Regards
 
 Jim.
 
  -Original Message-
  From: Zabel, Ian [mailto:[EMAIL PROTECTED]]
  Sent: 21 February 2003 15:27
  To: 'Tomcat Users List'
  Subject: RE: Slightly Off Topic: Web Site Content
  
  
  You should take a look at the Jakarta Struts project.
  http://jakarta.apache.org/struts/
  
  You define the urls for all your pages in config file and 
 then struts
  handles making the links.
  
  Ian.
  
  -Original Message-
  From: Kevin Andryc [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, February 21, 2003 9:31 AM
  To: Tomcat Users List
  Subject: Slightly Off Topic: Web Site Content
  
  Hello,
  I have been doing web programming for quite some time but 
  what I have
  yet to figure out is the best way to handle web site content. 
  For example,
  if I want to create a web sire with a vast number of pages, I 
  would like to
  have it easily maintained such that if a link changes in my 
  navigation bar,
  the rest gets updated rather than picking through every page. 
  What is the
  best way to do this? Do you guys use JSP pages and have the 
  navigation or
  content stored in a database and then retrieved by the JSP? 
 How about
  architecture? Are there any good books on this? Any help 
  would be great.
  
  Sincerely,
  Kevin
  
  Kevin Andryc
  Web Systems Engineer
  MISER
  http://www.umass.edu/miser/
  Phone: (413)-545-3460
  [EMAIL PROTECTED]
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 PLEASE READ: The information contained in this email is confidential
 and intended for the named recipient(s) only. If you are not 
 an intended
 recipient of this email you must not copy, distribute or take any 
 further action in reliance on it and you should delete it and 
 notify the
 sender immediately. Email is not a secure method of communication and 
 Nomura International plc cannot accept responsibility for the accuracy
 or completeness of this message or any attachment(s). Please 
 examine this
 email for virus infection, for which Nomura International plc accepts
 no responsibility. If verification of this email is sought then please
 request a hard copy. Unless otherwise stated any views or opinions
 presented are solely those of the author and do not represent those of
 Nomura International plc. This email is intended for informational
 purposes only and is not a solicitation or offer to buy or sell
 securities or related financial instruments. Nomura 
 International plc is
 regulated by the Financial Services Authority and is a member of the
 London Stock Exchange.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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




Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why?

2003-02-21 Thread chrislott
Hi,

I recently upgraded from tomcat 4.1.12-LE to 4.1.18-LE.  I use the simple
Memory Realm for user authentication.  I have been maintaining the
tomcat-users.xml file by hand, including comments etc.  It appears
that some portion of 4.1.18 reads and then rewrites the tomcat-users.xml
file because all of my comments etc. disappear shortly after the server
starts and long before I make any access to the server.  I am not using 
the manager webapp or anything else, although the manager webapp is starting.
Is the behavior with respect to the tomcat-users.xml file configurable?  
I would really prefer that it not be changed by some program.  

Please advise, thanks.

chris...

p.s. would you please cc me on any reply so I see it soonest?  Thanks.

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




Re: 403 Forbidden - you don't have permission ... I'M STUCK!!

2003-02-21 Thread tomcat guy
Bill, thanks for looking over the files...
I checked the directory and everyone is set for file permissions.  If they
were not set wouldn't http://localhost:8080/examples be blocked?  It
accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as
http://localhost/examples .  Isn't that correct???

The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as
D:/Apache/Tomcat4.1/webapps/examples.

Any other ideas?  What I need to access is the directory listing under
D:/Apache/Tomcat4.1/CTG/temp...
It is one of those things that has to be something so obvious, when (IF) I
find it I'll probably screem!  :)   Until then... aaargghh...

- Original Message -
From: Bill Barker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:24 AM
Subject: Re: 403 Forbidden - you don't have permission ... any ideas?


At a very quick glance, it looks like it should be Ok.  My first guess would
be tree permissions.  Apache will tree-walk, so it needs at least 'rx'
permissions to all directories upto and including
D:/Apache/Tomcat4.1/CTG/examples.

403 is also Apache's normal response when you have disabled directory
listings, but I didn't see that in my quick glance (quick := I very well may
have overlooked something :).


  tomcat guy [EMAIL PROTECTED] wrote in message
001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg...
  If anyone can help, here is my problem:

  I can go to http://localhost:8080/examples and I get the directory listing
images/ jsp/ servlets/.  BUT when I go to http://localhost/examples I get
the forbidden error?!?

  Any ideas?  The permissions are all good.

  I go to http://localhost/examples/jps and it works?  The JSP's work along
with the servlets.

  I recently reinstalled my apache server.  I cannot remember this not
working.  What did I forget!!!   (besides my documentation, of course).

  Basically I need to setup a directory path to
http://localhost/examples/temp or http://localhost/temp  to my virtualHost
http://ctg.com/examples nothing is working!!!

  I have attached a copy of my httpd.conf  server.xml.  If anyone would be
able to give it a quick glance OR send a copy of your config files that
would be great!

  I am using:
  Apache2.0.43
  Tomcat4.1.18
  mod_jk
  Win2k




--


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


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




Re: 403 Forbidden - you don't have permission ... any ideas?

2003-02-21 Thread tomcat guy
Could it possibly be with the connector?
I'm thinking that could be a possibility since I can see the directory
http://localhost:8080/examples but I get the 403 err with
http://localhost/examples...  Keep in mind http://localhost/examples/jsp
gives no error, shows my jsp samples...



- Original Message -
From: Bill Barker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:24 AM
Subject: Re: 403 Forbidden - you don't have permission ... any ideas?


At a very quick glance, it looks like it should be Ok.  My first guess would
be tree permissions.  Apache will tree-walk, so it needs at least 'rx'
permissions to all directories upto and including
D:/Apache/Tomcat4.1/CTG/examples.

403 is also Apache's normal response when you have disabled directory
listings, but I didn't see that in my quick glance (quick := I very well may
have overlooked something :).


  tomcat guy [EMAIL PROTECTED] wrote in message
001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg...
  If anyone can help, here is my problem:

  I can go to http://localhost:8080/examples and I get the directory listing
images/ jsp/ servlets/.  BUT when I go to http://localhost/examples I get
the forbidden error?!?

  Any ideas?  The permissions are all good.

  I go to http://localhost/examples/jps and it works?  The JSP's work along
with the servlets.

  I recently reinstalled my apache server.  I cannot remember this not
working.  What did I forget!!!   (besides my documentation, of course).

  Basically I need to setup a directory path to
http://localhost/examples/temp or http://localhost/temp  to my virtualHost
http://ctg.com/examples nothing is working!!!

  I have attached a copy of my httpd.conf  server.xml.  If anyone would be
able to give it a quick glance OR send a copy of your config files that
would be great!

  I am using:
  Apache2.0.43
  Tomcat4.1.18
  mod_jk
  Win2k




--


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


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




Re-post: Tomcat 4.1.18 as Win2k/XP Service

2003-02-21 Thread Daniel Haynes
We have Tomcat and Oracle (both as services) running on a single box. Our
application uses poolman and works fine when starting Tomcat on a manual
basis, but on a re-boot Oracle is not ready by the time the application
attempts to make its connections. The resulting error leaves
Tomcat/application in an unrecoverable state.

What is the easiest way to delay the Tomcat startup (by say a minute) on
re-boot. The Tomcat service uses 'tomcat.exe' which I think is created on
the install. We thought of adding a hacked delay to startup.bat but changing
the service to use startup.bat didn't seem to work at all. (Win2k service
dependencies don't work in the sense that that the Tomcat service only
depends on the starting of the Oracle service, and does not wait until
Oracle is fully initialised)

Any ideas ?


 Daniel Haynes
 
 Rule Financial
 30 Cannon Street
 London EC4M 6YN


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




RE: 403 Forbidden - you don't have permission ... I'M STUCK!!

2003-02-21 Thread Roberts, Eric
Sorry - didn't get your attachments - but think the problem is in httpd.conf
Is your listen directive set?

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 127.0.0.1:8080

...in other words its the port that could be causing the problem.

HTH
-Original Message-
From: tomcat guy [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 21. Februar 2003 16:48
To: Tomcat Users List
Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!!


Bill, thanks for looking over the files...
I checked the directory and everyone is set for file permissions.  If they
were not set wouldn't http://localhost:8080/examples be blocked?  It
accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as
http://localhost/examples .  Isn't that correct???

The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as
D:/Apache/Tomcat4.1/webapps/examples.

Any other ideas?  What I need to access is the directory listing under
D:/Apache/Tomcat4.1/CTG/temp...
It is one of those things that has to be something so obvious, when (IF) I
find it I'll probably screem!  :)   Until then... aaargghh...

- Original Message -
From: Bill Barker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:24 AM
Subject: Re: 403 Forbidden - you don't have permission ... any ideas?


At a very quick glance, it looks like it should be Ok.  My first guess would
be tree permissions.  Apache will tree-walk, so it needs at least 'rx'
permissions to all directories upto and including
D:/Apache/Tomcat4.1/CTG/examples.

403 is also Apache's normal response when you have disabled directory
listings, but I didn't see that in my quick glance (quick := I very well may
have overlooked something :).


  tomcat guy [EMAIL PROTECTED] wrote in message
001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg...
  If anyone can help, here is my problem:

  I can go to http://localhost:8080/examples and I get the directory listing
images/ jsp/ servlets/.  BUT when I go to http://localhost/examples I get
the forbidden error?!?

  Any ideas?  The permissions are all good.

  I go to http://localhost/examples/jps and it works?  The JSP's work along
with the servlets.

  I recently reinstalled my apache server.  I cannot remember this not
working.  What did I forget!!!   (besides my documentation, of course).

  Basically I need to setup a directory path to
http://localhost/examples/temp or http://localhost/temp  to my virtualHost
http://ctg.com/examples nothing is working!!!

  I have attached a copy of my httpd.conf  server.xml.  If anyone would be
able to give it a quick glance OR send a copy of your config files that
would be great!

  I am using:
  Apache2.0.43
  Tomcat4.1.18
  mod_jk
  Win2k




--


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


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


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




RE: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Kris Schneider
Quoting Shapira, Yoav [EMAIL PROTECTED]:

 
 Howdy,
 
 Not sure I buy ...will result in much more efficient memory
 claiming
 
 Then benchmark it ;)  You will see a difference.

Someone did, and you're right, there was a difference ;-):

http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#997455

The point is really that it depends. My issues are with the word will (as in
it's always gonna be that way) and the implication that finalizers should be
part of your normal implementation. I'd say finalilzers are specifically for
abnormal situations where automatic memory management is insufficient for
cleaning up an object's resources. And even then, you're still better off doing
an explicit cleanup.

 For a short-lived object, the benefits may be negligible as you say.  My
 scenario is for a long lived cache type object.  In a full
 implementation, an explicit clear method would be present as well, and
 the finalize method would call the clear, but I wanted to put together
 the simplest, clearest example.

Sure, I understand the example has to be bite-sized. But even for a long-lived
cache object, if it's not reachable I want it gone as quickly as possible, not
when the VM gets a chance to run its finalizer. Yes, on average, it may not be
an issue for the VM to do that, but I don't want to get bit by that ~100MB cache
hanging around at the wrong time.

 the least, implementing a finalizer extends the lifetime of an object.
 
 True, but typically by very little and in this example, IMHO the
 benefits (~100MB of memory cleaned up a second faster for an increase of
 several microseconds in execution time of my benchmark run) far outweigh
 this cost.

Well, I guess in a typical situation that one second wouldn't make a difference
either. But under heavy load you can't really make any claims about when the
finalilzer gets run because it's unspecified.

 preferable to make it explicit (e.g. add a clear method to MyClass).
 
 An explicit clear method has its uses as well, and I nearly always
 include them in all implementations.  But so does the finalizer() in
 ensuring the most efficient possible shutdown internally, without
 relying on the user to call a clear() method.

That just seems like too much of a generalization. In fact, it's possible that
finalizers may never be run. I'm much happier with a system that behaves
predictably and relying on finalizers is a step in the opposite direction.

 Yoav Shapira
 Millennium ChemInformatics
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential, proprietary
 and/or privileged.  This e-mail is intended only for the individual(s) to
 whom it is addressed, and may not be saved, copied, printed, disclosed or
 used by anyone else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and notify the
 sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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




RE: Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why?

2003-02-21 Thread Shapira, Yoav

Howdy,

I recently upgraded from tomcat 4.1.12-LE to 4.1.18-LE.  I use the
simple
Memory Realm for user authentication.  I have been maintaining the
tomcat-users.xml file by hand, including comments etc.  It appears
that some portion of 4.1.18 reads and then rewrites the
tomcat-users.xml

That portion is org.apache.catalina.users.MemoryUserDatabase.  This
class reads and then writes the file.

I believe the reason the file needs to be re-written is that users may
be added via the admin webapp.  I may be wrong on this.

What the class does is read the file into memory, not retaining its XML
content but rather converting it into maps of groups
(org.apache.catalina.Group), roles (org.apache.catalina.Role), and users
(org.apache.catalina.User).  The public close() method persists the
in-memory representation of this structures back into the XML file.  So
obviously, comments are not saved.

file because all of my comments etc. disappear shortly after the server
starts and long before I make any access to the server.

This is unfortunate.  I'm not sure what the best solution is in this
case.  For now, perhaps you could move the content of these comments out
of the tomcat-users.xml file itself and into a separate document
regarding tomcat user setup for your company/webapp/whatever.

Is the behavior with respect to the tomcat-users.xml file configurable?

I don't think so.

I would really prefer that it not be changed by some program.

It's not some program.  This is a tomcat-owned configuration file and
tomcat changes this file.

p.s. would you please cc me on any reply so I see it soonest?  Thanks.

OK.

Yoav Shapira
Millennium ChemInformatics




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




RE: Re-post: Tomcat 4.1.18 as Win2k/XP Service

2003-02-21 Thread Turner, John

I'm no developer, but I think perhaps you want to take a look at a
LifecycleListener.  Something along the lines of when this Context starts,
check to see if Oracle is up.  Block until it is, when it is, continue to
application initialization.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

John


 -Original Message-
 From: Daniel Haynes [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 21, 2003 10:50 AM
 To: Tomcat User List (E-mail)
 Subject: Re-post: Tomcat 4.1.18 as Win2k/XP Service
 
 
 We have Tomcat and Oracle (both as services) running on a 
 single box. Our
 application uses poolman and works fine when starting Tomcat 
 on a manual
 basis, but on a re-boot Oracle is not ready by the time the 
 application
 attempts to make its connections. The resulting error leaves
 Tomcat/application in an unrecoverable state.
 
 What is the easiest way to delay the Tomcat startup (by say a 
 minute) on
 re-boot. The Tomcat service uses 'tomcat.exe' which I think 
 is created on
 the install. We thought of adding a hacked delay to 
 startup.bat but changing
 the service to use startup.bat didn't seem to work at all. 
 (Win2k service
 dependencies don't work in the sense that that the Tomcat service only
 depends on the starting of the Oracle service, and does not wait until
 Oracle is fully initialised)
 
 Any ideas ?
 
 
  Daniel Haynes
  
  Rule Financial
  30 Cannon Street
  London EC4M 6YN
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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




RE: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.
html
#997455

That's a good link.  Thanks for posting it.  It also makes the point
that

In addition to lengthening object lifetimes, finalize methods can
increase object size. For example, some JVMs, such as the classic JVM
implementation, add an extra hidden field to objects with finalize
methods so that they can be held in a linked list finalization queue.

I neglected to make this point, and it's true.  These objects even show
up neatly in my OptimizeIt and JProbe windows as java.lang.ref.Finalizer
(BTW can anyone find the JavaDoc for that class?) instances.

The point is really that it depends. My issues are with the word will
(as

I completely agree.

part of your normal implementation. I'd say finalilzers are
specifically
for
abnormal situations where automatic memory management is insufficient
for
cleaning up an object's resources. And even then, you're still better
off
doing
an explicit cleanup.

I partially agree.  But that's an idealistic view which is not always
possible.

cache object, if it's not reachable I want it gone as quickly as
possible,
not when the VM gets a chance to run its finalizer.

The VM will run its finalizer always before the object is gone.
Whether it's the default Object.finalize() or your custom one, some
finalizer will always be run anyways.  Of course, Object.finalize() is
likely to be quicker than any other implementation, so it works best for
your specific requirement above.  I've been in several situations where
efficient memory management is critical enough that this clear on
finalization is a common requirement.

That just seems like too much of a generalization. In fact, it's
possible
that finalizers may never be run. I'm much happier with a system that
behaves predictably and relying on finalizers is a step in the opposite
direction.

I don't think finalizers reduce predictability at all.  How is it
possible they are never run for something that is going be GC'ed??

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




RE: 403 Forbidden - you don't have permission ... I'M STUCK!!

2003-02-21 Thread Roberts, Eric
1) Yes each VH can have a Directory directive (as far as I can remember :-))
2) I have the Tomcat Welcome page as the default page on our installation - in 
mod_jk.conf I added the lines:

JKMount / ajp13
JKMount /* ajp13

in addition to my normal webapp mounts.

Apache now completely ignores it's own default directory and sends all blank 
requests to Tomcats ROOT context. Plus all the links to Manager, Admin etc work!

Ciao 

-Original Message-
From: tomcat guy [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 21. Februar 2003 17:13
To: Tomcat Users List
Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!!


I just noticed that!  Like I was saying it had to be something simple.  The
default Directory / was not set.  I'll do another ggghhh
One word - documentation.

Got another quick question now.   Can you have a Directory setting for
each virtualHost?

Ok 2 questions.  The default DocumentRoot is:
DocumentRoot D:/Apache/Apache2/htdocs  everything (all files) are being
served under D:/Apache/Tomcat4.1/webapps
Should the DocumentRoot be changed to this?  Or does the connector handle
this  D:/Apache/Apache2/htdocs is ok???


- Original Message -
From: Roberts, Eric [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 9:50 AM
Subject: RE: 403 Forbidden - you don't have permission ... I'M STUCK!!


Sorry - didn't get your attachments - but think the problem is in httpd.conf
Is your listen directive set?

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 127.0.0.1:8080

...in other words its the port that could be causing the problem.

HTH
-Original Message-
From: tomcat guy [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 21. Februar 2003 16:48
To: Tomcat Users List
Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!!


Bill, thanks for looking over the files...
I checked the directory and everyone is set for file permissions.  If they
were not set wouldn't http://localhost:8080/examples be blocked?  It
accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as
http://localhost/examples .  Isn't that correct???

The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as
D:/Apache/Tomcat4.1/webapps/examples.

Any other ideas?  What I need to access is the directory listing under
D:/Apache/Tomcat4.1/CTG/temp...
It is one of those things that has to be something so obvious, when (IF) I
find it I'll probably screem!  :)   Until then... aaargghh...

- Original Message -
From: Bill Barker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:24 AM
Subject: Re: 403 Forbidden - you don't have permission ... any ideas?


At a very quick glance, it looks like it should be Ok.  My first guess would
be tree permissions.  Apache will tree-walk, so it needs at least 'rx'
permissions to all directories upto and including
D:/Apache/Tomcat4.1/CTG/examples.

403 is also Apache's normal response when you have disabled directory
listings, but I didn't see that in my quick glance (quick := I very well may
have overlooked something :).


  tomcat guy [EMAIL PROTECTED] wrote in message
001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg...
  If anyone can help, here is my problem:

  I can go to http://localhost:8080/examples and I get the directory listing
images/ jsp/ servlets/.  BUT when I go to http://localhost/examples I get
the forbidden error?!?

  Any ideas?  The permissions are all good.

  I go to http://localhost/examples/jps and it works?  The JSP's work along
with the servlets.

  I recently reinstalled my apache server.  I cannot remember this not
working.  What did I forget!!!   (besides my documentation, of course).

  Basically I need to setup a directory path to
http://localhost/examples/temp or http://localhost/temp  to my virtualHost
http://ctg.com/examples nothing is working!!!

  I have attached a copy of my httpd.conf  server.xml.  If anyone would be
able to give it a quick glance OR send a copy of your config files that
would be great!

  I am using:
  Apache2.0.43
  Tomcat4.1.18
  mod_jk
  Win2k




--


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


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


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



Re: RequestDispatcher and WEB-INF

2003-02-21 Thread Erik Price


rf wrote:

It is strange that RequestDispatcher considers only
jsp and html, why not other extns like jpg/gif or why
not just any other resource - is this because of any
security concern?


I don't think it's security, but I looked at the Servlet spec (page 55) 
and couldn't find a specific reason.  It looks like it was originally 
intended that a RequestDispatcher should represent only a servlet, and 
that you could forward to that servlet to continue processing the 
request, but there is also the include method of RequestDispatcher for 
when you wish to output /some/ data and then allow the included resource 
to continue processing.

Perhaps the very fact that HTML files are allowed to be the target 
resources of RequestDispatchers at all was added on at some later point 
for developer convenience.  Certainly there is more [programmatic] 
flexibility if you are forwarding to or including a servlet (or JSP, 
which is really a servlet).


Erik



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



RE: Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why?

2003-02-21 Thread Roberts, Eric
Yoav is correct - you can create users in the Admin webapp.

...and you could use the Fullname field for your comments.

HTH

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 21. Februar 2003 16:56
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: RE: Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why?



Howdy,

I recently upgraded from tomcat 4.1.12-LE to 4.1.18-LE.  I use the
simple
Memory Realm for user authentication.  I have been maintaining the
tomcat-users.xml file by hand, including comments etc.  It appears
that some portion of 4.1.18 reads and then rewrites the
tomcat-users.xml

That portion is org.apache.catalina.users.MemoryUserDatabase.  This
class reads and then writes the file.  

I believe the reason the file needs to be re-written is that users may
be added via the admin webapp.  I may be wrong on this.

What the class does is read the file into memory, not retaining its XML
content but rather converting it into maps of groups
(org.apache.catalina.Group), roles (org.apache.catalina.Role), and users
(org.apache.catalina.User).  The public close() method persists the
in-memory representation of this structures back into the XML file.  So
obviously, comments are not saved.

file because all of my comments etc. disappear shortly after the server
starts and long before I make any access to the server.

This is unfortunate.  I'm not sure what the best solution is in this
case.  For now, perhaps you could move the content of these comments out
of the tomcat-users.xml file itself and into a separate document
regarding tomcat user setup for your company/webapp/whatever.

Is the behavior with respect to the tomcat-users.xml file configurable?

I don't think so.

I would really prefer that it not be changed by some program.

It's not some program.  This is a tomcat-owned configuration file and
tomcat changes this file.  

p.s. would you please cc me on any reply so I see it soonest?  Thanks.

OK.

Yoav Shapira
Millennium ChemInformatics




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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


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




Tomcat 4.1.18 Internal Server Error

2003-02-21 Thread Mark Baumann
Hello!

I get this error message and don#t know what the problem could be:
snip
java.security.AccessControlException: access denied (java.lang.RuntimePermission 
getClassLoader)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.ClassLoader.getParent(ClassLoader.java:701)
at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java:888)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:361)

/snip

The error occurs while I try to create a DOMParser.

Is this a problem due to some configuration problem??
Any help is greatly appreciated

I use Tomcat 4.1.18 on Debian/GnuLinux.
JDK1.4.

-- 
Mit freundlichen Gruessen/best regards

Mark Baumann

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




Mapping .jsp to controller servlet

2003-02-21 Thread Januski, Ken
Yesterday I noticed that an application that has been running successfully
for about a year has a problem I've never noticed before. It's set up so
that all access to web-app is through a login method that calls a login.jsp
page from a controller servlet. So all requests to jsp pages get redirected
to the login page. But yesterday I noticed that if I included .jsp in the
address the controller servlet and the login.jsp are completely bypassed and
access is given to the jsp page.

I've also recently changed the login method to use JCIFS and authenticate
against NT domain controller rather than a mySQL database and I suppose it's
possible that the problem is actually there. In investigating this though
I've read that .jsp pages are public, which indicates to me that they CAN be
accessed directly. Can anyone tell me if this is true. In other words is
mapping .jsp to a servlet fruitless? If not then I guess I can conclude that
it's the login method that is failing not the mapping. I've included this in
my web.xml to force redirection of all .jsp page to the servlet but it seems
to have no effect. 

The relevant portion of web.xml, mapped to servlet named 'sysadmin' further
up in web.xml.

servlet-mapping
servlet-name
sysadmin
/servlet-name
url-pattern
.*jsp
/url-pattern
/servlet-mapping

Thanks for any info,

Ken

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




RE: Tomcat 4.1.18 Internal Server Error

2003-02-21 Thread Shapira, Yoav

Howdy,
Are you running tomcat with a security manager, and if so what does your
policy file look like?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mark Baumann [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:27 AM
To: Tomcat Users List
Subject: Tomcat 4.1.18 Internal Server Error

Hello!

I get this error message and don#t know what the problem could be:
snip
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
at
java.security.AccessControlContext.checkPermission(AccessControlContext
.jav
a:270)
at
java.security.AccessController.checkPermission(AccessController.java:40
1)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.ClassLoader.getParent(ClassLoader.java:701)
at
org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader
.jav
a:888)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:361)

/snip

The error occurs while I try to create a DOMParser.

Is this a problem due to some configuration problem??
Any help is greatly appreciated

I use Tomcat 4.1.18 on Debian/GnuLinux.
JDK1.4.

--
Mit freundlichen Gruessen/best regards

Mark Baumann

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




Re: Mapping .jsp to controller servlet

2003-02-21 Thread Erik Price
I may not be entirely clear on what you're saying, but if you're saying 
that no one should directly be able to request your JSPs and instead 
they should only access the contents of your site by requesting Servlet 
resources (which then forward to JSPs), perhaps it would be worth moving 
the JSPs into WEB-INF where they cannot be touched?  AFAIK, you can 
still have the servlets dispatcher.forward() to the JSPs if you do this.


Erik



Januski, Ken wrote:
Yesterday I noticed that an application that has been running successfully
for about a year has a problem I've never noticed before. It's set up so
that all access to web-app is through a login method that calls a login.jsp
page from a controller servlet. So all requests to jsp pages get redirected
to the login page. But yesterday I noticed that if I included .jsp in the
address the controller servlet and the login.jsp are completely bypassed and
access is given to the jsp page.

I've also recently changed the login method to use JCIFS and authenticate
against NT domain controller rather than a mySQL database and I suppose it's
possible that the problem is actually there. In investigating this though
I've read that .jsp pages are public, which indicates to me that they CAN be
accessed directly. Can anyone tell me if this is true. In other words is
mapping .jsp to a servlet fruitless? If not then I guess I can conclude that
it's the login method that is failing not the mapping. I've included this in
my web.xml to force redirection of all .jsp page to the servlet but it seems
to have no effect. 

The relevant portion of web.xml, mapped to servlet named 'sysadmin' further
up in web.xml.

servlet-mapping
	servlet-name
	sysadmin
	/servlet-name
	url-pattern
	.*jsp
	/url-pattern
/servlet-mapping

Thanks for any info,

Ken

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




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




RE: Mapping .jsp to controller servlet

2003-02-21 Thread Januski, Ken
Erik,

That's exactly what I want: no direct access but only through servlet. I'll
try moving one to WEB-INF and see if that solves the problem.

Ken


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:32 AM
To: Tomcat Users List
Subject: Re: Mapping .jsp to controller servlet


I may not be entirely clear on what you're saying, but if you're saying 
that no one should directly be able to request your JSPs and instead 
they should only access the contents of your site by requesting Servlet 
resources (which then forward to JSPs), perhaps it would be worth moving 
the JSPs into WEB-INF where they cannot be touched?  AFAIK, you can 
still have the servlets dispatcher.forward() to the JSPs if you do this.


Erik



Januski, Ken wrote:
 Yesterday I noticed that an application that has been running successfully
 for about a year has a problem I've never noticed before. It's set up so
 that all access to web-app is through a login method that calls a
login.jsp
 page from a controller servlet. So all requests to jsp pages get
redirected
 to the login page. But yesterday I noticed that if I included .jsp in the
 address the controller servlet and the login.jsp are completely bypassed
and
 access is given to the jsp page.
 
 I've also recently changed the login method to use JCIFS and authenticate
 against NT domain controller rather than a mySQL database and I suppose
it's
 possible that the problem is actually there. In investigating this though
 I've read that .jsp pages are public, which indicates to me that they CAN
be
 accessed directly. Can anyone tell me if this is true. In other words is
 mapping .jsp to a servlet fruitless? If not then I guess I can conclude
that
 it's the login method that is failing not the mapping. I've included this
in
 my web.xml to force redirection of all .jsp page to the servlet but it
seems
 to have no effect. 
 
 The relevant portion of web.xml, mapped to servlet named 'sysadmin'
further
 up in web.xml.
 
 servlet-mapping
   servlet-name
   sysadmin
   /servlet-name
   url-pattern
   .*jsp
   /url-pattern
 /servlet-mapping
 
 Thanks for any info,
 
 Ken
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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




RE: Mapping .jsp to controller servlet

2003-02-21 Thread Januski, Ken
Hmm. I got a 404 error after moving one jsp file to WEB-INF and trying to
directly access it. That's not great but at least it prevents access. Worse
though is that when I then try to go to page after having logged in I get a
root cause: file not found error. So it looks to me like you can't move
your .jsp files out of the root web-app directory. Can anyone shed any more
light on this?



-Original Message-
From: Januski, Ken [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:36 AM
To: Tomcat Users List
Subject: RE: Mapping .jsp to controller servlet


Erik,

That's exactly what I want: no direct access but only through servlet. I'll
try moving one to WEB-INF and see if that solves the problem.

Ken


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:32 AM
To: Tomcat Users List
Subject: Re: Mapping .jsp to controller servlet


I may not be entirely clear on what you're saying, but if you're saying 
that no one should directly be able to request your JSPs and instead 
they should only access the contents of your site by requesting Servlet 
resources (which then forward to JSPs), perhaps it would be worth moving 
the JSPs into WEB-INF where they cannot be touched?  AFAIK, you can 
still have the servlets dispatcher.forward() to the JSPs if you do this.


Erik



Januski, Ken wrote:
 Yesterday I noticed that an application that has been running successfully
 for about a year has a problem I've never noticed before. It's set up so
 that all access to web-app is through a login method that calls a
login.jsp
 page from a controller servlet. So all requests to jsp pages get
redirected
 to the login page. But yesterday I noticed that if I included .jsp in the
 address the controller servlet and the login.jsp are completely bypassed
and
 access is given to the jsp page.
 
 I've also recently changed the login method to use JCIFS and authenticate
 against NT domain controller rather than a mySQL database and I suppose
it's
 possible that the problem is actually there. In investigating this though
 I've read that .jsp pages are public, which indicates to me that they CAN
be
 accessed directly. Can anyone tell me if this is true. In other words is
 mapping .jsp to a servlet fruitless? If not then I guess I can conclude
that
 it's the login method that is failing not the mapping. I've included this
in
 my web.xml to force redirection of all .jsp page to the servlet but it
seems
 to have no effect. 
 
 The relevant portion of web.xml, mapped to servlet named 'sysadmin'
further
 up in web.xml.
 
 servlet-mapping
   servlet-name
   sysadmin
   /servlet-name
   url-pattern
   .*jsp
   /url-pattern
 /servlet-mapping
 
 Thanks for any info,
 
 Ken
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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

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




RE: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Kris Schneider
Quoting Shapira, Yoav [EMAIL PROTECTED]:

 
 Howdy,
 
 http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.
 html
 #997455
 
 That's a good link.  Thanks for posting it.  It also makes the point
 that
 
 In addition to lengthening object lifetimes, finalize methods can
 increase object size. For example, some JVMs, such as the classic JVM
 implementation, add an extra hidden field to objects with finalize
 methods so that they can be held in a linked list finalization queue.
 
 I neglected to make this point, and it's true.  These objects even show
 up neatly in my OptimizeIt and JProbe windows as java.lang.ref.Finalizer
 (BTW can anyone find the JavaDoc for that class?) instances.

Hm, looks like it's a default access class so they problaly don't consider it
part of the public Java API.

 The point is really that it depends. My issues are with the word will
 (as
 
 I completely agree.
 
 part of your normal implementation. I'd say finalilzers are
 specifically
 for
 abnormal situations where automatic memory management is insufficient
 for
 cleaning up an object's resources. And even then, you're still better
 off
 doing
 an explicit cleanup.
 
 I partially agree.  But that's an idealistic view which is not always
 possible.
 
 cache object, if it's not reachable I want it gone as quickly as
 possible,
 not when the VM gets a chance to run its finalizer. 
 
 The VM will run its finalizer always before the object is gone.
 Whether it's the default Object.finalize() or your custom one, some
 finalizer will always be run anyways.  Of course, Object.finalize() is
 likely to be quicker than any other implementation, so it works best for
 your specific requirement above.  I've been in several situations where
 efficient memory management is critical enough that this clear on
 finalization is a common requirement.
 
 That just seems like too much of a generalization. In fact, it's
 possible
 that finalizers may never be run. I'm much happier with a system that
 behaves predictably and relying on finalizers is a step in the opposite
 direction.
 
 I don't think finalizers reduce predictability at all.  How is it
 possible they are never run for something that is going be GC'ed??

Ack! No, I'm not saying *if* they'll be run before deallocation is unpredictable
(although it is possible for the VM to exit without runing finalizers) rather
*when* they'll be run. So if I code:

theCache.clear();  // no finalizer
theCache = null;

versus:

theCache = null; // finalizer clears resources

In the second case, I have no guarantee *when* the clearing takes place, only
that it happens before theCache is deallocated.

 Yoav Shapira
 Millennium ChemInformatics
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential, proprietary
 and/or privileged.  This e-mail is intended only for the individual(s) to
 whom it is addressed, and may not be saved, copied, printed, disclosed or
 used by anyone else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and notify the
 sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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




RE: [OFF-TOPIC] RE: Is it ok to close connection in finalize() ?

2003-02-21 Thread Shapira, Yoav

Howdy,

Ack! No, I'm not saying *if* they'll be run before deallocation is

Ahh, I misinterpreted your earlier message.  I agree with everything
else you said.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




Re: Mapping .jsp to controller servlet

2003-02-21 Thread Erik Price


Januski, Ken wrote:

Hmm. I got a 404 error after moving one jsp file to WEB-INF and trying to
directly access it. That's not great but at least it prevents access. Worse
though is that when I then try to go to page after having logged in I get a
root cause: file not found error. So it looks to me like you can't move
your .jsp files out of the root web-app directory. Can anyone shed any more
light on this?


Oh, I didn't realize you were still trying to directly access the JSPs 
after login.  I made the assumption that you were only using the 
forward method of RequestDispatcher to forward to those JSPs from your 
servlets.

If you need to allow those JSPs to be directly accessed via HTTP 
requests, my solution won't work.  Perhaps you can move them to a 
subfolder (not WEB-INF) and map a filter to it which only calls 
doFilterChain() if the user has a valid session and is logged in?  If 
the subfolder was called /protected, you could use the URL pattern 
/protected/* as your filter mapping.


Erik


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



Re: startup issue (invalid CEN header)

2003-02-21 Thread Andre Jay Meissner
hi,

did that, complete fresh binaries - same error. huh...
any suggestions what I could try else?

thanks so much in advance,
*Jay


 looks like one of your libraries (prob in server/lib or common/lib) is
 corrupted.
 simply try to replace them with fresh binaries.
 
 Filip
 
 -Original Message-
 From: Andre Jay Meissner [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 19, 2003 2:18 PM
 To: Tomcat Users List
 Subject: startup issue (invalid CEN header)
 
 
 hi,
 
 my tomcat 4.1.8 (mac os 10.2, J2SE 1.3.1) is not launching properly since
 today (it ran before). the startup.sh is giving me the usual three comments
 with envs and from the console everything just seems fine. but there is no
 action on 8080.
 
 catalina.out is complaining with the error below - no additional logging
 takes place. I´d greatly appreciate any help - thank you very much in
 advance!
 
 *Jay
 
 
 
 java.util.zip.ZipException: invalid CEN header (encrypted entry)
   at java.util.zip.ZipFile.open(Native Method)
   at java.util.zip.ZipFile.init(ZipFile.java:105)
   at java.util.jar.JarFile.init(JarFile.java:110)
   at java.util.jar.JarFile.init(JarFile.java:52)
   at 
 org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
 dClassLoader.java:1082)
   at 
 org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
 va:221)
   at 
 org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
 Factory.java:204)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:147)
 Bootstrap: Class loader creation threw exception
 java.lang.IllegalArgumentException: addRepositoryInternal:
 java.util.zip.ZipException: invalid CEN header (encrypted entry)
   at 
 org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
 dClassLoader.java:1110)
   at 
 org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
 va:221)
   at 
 org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
 Factory.java:204)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:147)
 count = 6, total = 51
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 

thaijay.com -- delicious IT development  consulting!

Andre Jay Meissner - [EMAIL PROTECTED]
Zehdenicker Strasse 1 - 10119 Berlin - Germany

fon +49.(0)30.49853830
fax +49.(0)30.49853831
leo +49.(0)30.49853832

http://www.thaijay.com


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




re: 403 Forbidden - you don't have permission ... I'M STUCK!!

2003-02-21 Thread tomcat guy
Oops, here are the files...


 How would you define the Directory in httpd.conf for the virtualhosts?
 Just add multiple Directory (s)? e.g.
 Directory /examples
 Options -Indexes
 /Directory
 Directory /webapps
 Options -Indexes
 /Directory
 The syntax appears to be ok after an apache.exe -t but

 The DocumentRoot is ignored as the DRs are defined in VirtualHost...
 correct?

 Attached is a copy of the auto generated mod_jk.conf  the
 workers.properties file...

 - Original Message -
 From: Roberts, Eric [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 10:18 AM
 Subject: RE: 403 Forbidden - you don't have permission ... I'M STUCK!!


 1) Yes each VH can have a Directory directive (as far as I can remember
:-))
 2) I have the Tomcat Welcome page as the default page on our
installation -
 in mod_jk.conf I added the lines:

 JKMount / ajp13
 JKMount /* ajp13

 in addition to my normal webapp mounts.

 Apache now completely ignores it's own default directory and sends all
 blank requests to Tomcats ROOT context. Plus all the links to Manager,
 Admin etc work!

 Ciao

 -Original Message-
 From: tomcat guy [mailto:[EMAIL PROTECTED]]
 Sent: Freitag, 21. Februar 2003 17:13
 To: Tomcat Users List
 Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!!


 I just noticed that!  Like I was saying it had to be something simple.
The
 default Directory / was not set.  I'll do another ggghhh
 One word - documentation.

 Got another quick question now.   Can you have a Directory setting for
 each virtualHost?

 Ok 2 questions.  The default DocumentRoot is:
 DocumentRoot D:/Apache/Apache2/htdocs  everything (all files) are being
 served under D:/Apache/Tomcat4.1/webapps
 Should the DocumentRoot be changed to this?  Or does the connector handle

 this  D:/Apache/Apache2/htdocs is ok???


 - Original Message -
 From: Roberts, Eric [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 9:50 AM
 Subject: RE: 403 Forbidden - you don't have permission ... I'M STUCK!!


 Sorry - didn't get your attachments - but think the problem is in
httpd.conf
 Is your listen directive set?

 #
 # Listen: Allows you to bind Apache to specific IP addresses and/or
 # ports, in addition to the default. See also the VirtualHost
 # directive.
 #
 # Change this to Listen on specific IP addresses as shown below to
 # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
 #
 Listen 127.0.0.1:8080

 ...in other words its the port that could be causing the problem.

 HTH
 -Original Message-
 From: tomcat guy [mailto:[EMAIL PROTECTED]]
 Sent: Freitag, 21. Februar 2003 16:48
 To: Tomcat Users List
 Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!!


 Bill, thanks for looking over the files...
 I checked the directory and everyone is set for file permissions.  If they
 were not set wouldn't http://localhost:8080/examples be blocked?  It
 accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as
 http://localhost/examples .  Isn't that correct???

 The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as
 D:/Apache/Tomcat4.1/webapps/examples.

 Any other ideas?  What I need to access is the directory listing under
 D:/Apache/Tomcat4.1/CTG/temp...
 It is one of those things that has to be something so obvious, when (IF) I
 find it I'll probably screem!  :)   Until then... aaargghh...

 - Original Message -
 From: Bill Barker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 12:24 AM
 Subject: Re: 403 Forbidden - you don't have permission ... any ideas?


 At a very quick glance, it looks like it should be Ok.  My first guess
would
 be tree permissions.  Apache will tree-walk, so it needs at least 'rx'
 permissions to all directories upto and including
 D:/Apache/Tomcat4.1/CTG/examples.

 403 is also Apache's normal response when you have disabled directory
 listings, but I didn't see that in my quick glance (quick := I very well
may
 have overlooked something :).


   tomcat guy [EMAIL PROTECTED] wrote in message
 001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg...
   If anyone can help, here is my problem:

   I can go to http://localhost:8080/examples and I get the directory
listing
 images/ jsp/ servlets/.  BUT when I go to http://localhost/examples I get
 the forbidden error?!?

   Any ideas?  The permissions are all good.

   I go to http://localhost/examples/jps and it works?  The JSP's work
along
 with the servlets.

   I recently reinstalled my apache server.  I cannot remember this not
 working.  What did I forget!!!   (besides my documentation, of course).

   Basically I need to setup a directory path to
 http://localhost/examples/temp or http://localhost/temp  to my
virtualHost
 http://ctg.com/examples nothing is working!!!

   I have attached a copy of my httpd.conf  server.xml. 

RE: Performance Issue

2003-02-21 Thread Filip Hanik
Looks like either your network connection is super slow, or your oracle is not 
optimized at all.

if it is oracle, go to amazon.com, buy yourself an oracle performance tuning book :)
it is the fastest return on investment you will ever see. 

nothing to do with tomcat.
Filip

-Original Message-
From: vikas yk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 8:43 PM
To: [EMAIL PROTECTED]
Subject: Performance Issue


I am making call Oracle Function on remote database .
The values are taken in result set.The numbers of records in 
result set are aroung 6000.
when I do
while(rs.next())
{
//My logic
}
This takes aroung 5 min(300 sec) to get completed
Now I commented all my logic inside while loop of rs.next()

then also its taking around 4 min (250 sec) to just loop through 
records.
Is there any way I can minize my time to recurse through 
records.

I am using oracle thin driver to make connection.



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


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




Re: Help! Anyone successfully install a purchased certificate?

2003-02-21 Thread Matt Fury
Richard,

Thanks so much for your reply! I'm trying one last
time with InstantSSL. We'll find out soon and I'll let
everyone know whether you can go with InstantSSL or
not! :-)

-Matt


--- Richard S. Huntrods [EMAIL PROTECTED]
wrote:
 *** I am re-sending this email with the attachment
 'kt.bat' removed and 
 the text of the batch file included in email body -
 after being flooded 
 with anti-virus messages from a couple dozen ISP's
 that have labelled 
 '.bat' files as potential viruses. ***
 
 
 Matt,
 
 I'm sorry I didn't see this sooner (or did you post
 before you purchased?).
 
 I've installed a Thawte Certificate (one year ago),
 and then installed
 the renewal certificate again this month.
 
 The first installation was a nightmare, because
 no-one seemed to know
 all of the required details (and you must get them
 ALL correct, or
 nothing works!)
 
 Anyway, the technicians at Thawte finally figured
 the problem, and we
 got it working.
 
 This time, I simply followed the same process and it
 worked the very
 first time.
 
 I'm attaching an abbreviated step-by-step for SSL
 certificates using
 ONLY Tomcat (no Apache in the loop). This is a
 DOS-type BATCH file that
 I used on my Win2K machine to generate the
 appropriate certificates. The
 actual certificate runs on my production server,
 which is Solaris 2.8 on
 a Sparc E250, running only Tomcat and MySQL. In
 otherwords, the process
 should be portable.
 
 The only other IMPORTANT item is the type of
 certificate. In my case,
 the only mistake in the whole original process (that
 caused everything
 to fail) was that I requested the wrong certificate
 type. Once the
 correct certificate was requested, it all worked -
 and has been working
 ever since!
 
 The type you want is PKCS #7 no other type worked
 for me (we tried
 them all G).
 
 If you cannot get it to work with JUST Tomcat at
 all, get a refund and
 RUN (don't walk) to the Thawte website and get one
 of theirs.
 
 Cheers,
 
 -Richard
 
 DISCLAIMER: I have no connection whatsoever with
 Thawte. I receive
 nothing for endorsing their certificate. The only
 reason I endorse
 Thawte is that I know their certs do work with
 Tomcat, and their tech
 support is pretty good.
 
 ===kt.bat===
 @echo off
 
 rem mycompany.com
 
 rem INSTRUCTIONS
 rem 1. BE SURE JAVA (I use SDK 1.4) is installed and
 WORKING before you 
 begin...
 rem 2. unremark the lines with asterisks '*' for
 each step in the process.
 remthe batch file is run once for each step.
 rem 3. BETWEEN Step 2 and 3, you must copy the CSR
 to the appropriate 
 place on the
 remThawte website and request the PKCS#7
 certificate. It will arrive 
 by email
 remonce all the 'paperwork' has been processed.
 Save this as a text 
 file 'myc-thawte.txt'
 remand proceed to step 3.
 rem 4. Of course, you will have to modify the field
 data to suit your 
 actual information.
 
 rem STEP 1. - generate the .keystore file
 (self-signed certificate)
 
 rem remove the .keystore file or step 1 will fail
 rem*if exist .keystore del .keystore
 
 rem generate the self-signed certificate
 rem*   keytool -genkey -alias tomcat -keyalg RSA
 -keystore .keystore 
 -dname CN=mycompany.com, OU=myc, O=My Company Name,
 L=MyCity, 
 S=MyProvince, C=CA -storepass mypassword
 rem*copy .keystore keystore.private
 
 rem STEP 2. - generate the csr (can be done together
 with step 1)
 
 rem remove the -csr.txt file or step 2 will fail
 rem*if exist *-csr.txt del *-csr.txt
 
 rem make the appropriate CSR - mycompany.com
 rem*keytool -certreq -alias tomcat -keystore
 .keystore -file 
 myc-csr.txt -storepass mypassword
 
 rem STEP 3. - after the signer has issued the
 certificate, import it 
 into a new .keystore file
 
 rem import thawte certificate - mycompany.com
 rem*keytool -import -v -alias tomcat
 -trustcacerts -keystore 
 .keystore -file myc-thawte.txt -storepass mypassword
 
 rem verify the keystore (I do this for every step)
  keytool -list -keystore .keystore -storepass
 mypassword
 
 
  Subject: Re: Help! Anyone successfully install a
 purchased certificate?
  
  They do have Apache instructions. But I guess I
 better
  request that soon before the warranty runs out.
 LOL
  
  They have instructions for how to do create and
  install it with generic Java based servers but it
  hasn't been specific enough with Tomcat.
  
  -Matt
  
  --- Ian Hunter [EMAIL PROTECTED] wrote:
   From what I understand, some different
 certificate
   vendors require different
   installation methods... Did they include
   instructions for IIS or Apache, for
   instance?
  
   Worst possible case you could front-end your
 site(s)
   with Apache and use
   connectors to get to Tomcat.
  
   - Original Message -
   From: Matt Fury [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, February 20, 2003 3:58 PM
   Subject: Help! Anyone 

RE: Mapping .jsp to controller servlet

2003-02-21 Thread Januski, Ken
Erik,

Thanks. Sorry I haven't been clearer. The servlet does use request.include.
I just added a try/catch to it and noticed that it fails when trying to
include the file that I've put in WEB-INF. The error is
javax.servlet.ServletException: queries.jsp.

I would like to get a few things clear before I pursue filters, which I
haven't used before. Is it true that any jsp file put in root directory will
be accessible to anyone by just putting the url to it in browser? And if so
do you or anyone else know if moving it to a protected folder should solve
it. I know that's your theory. If it's correct then for now I'll pursue
getting that to work. If not then I guess I'll need to take a closer look at
filters.

Thanks again,

Ken



-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 11:51 AM
To: Tomcat Users List
Subject: Re: Mapping .jsp to controller servlet




Januski, Ken wrote:
 Hmm. I got a 404 error after moving one jsp file to WEB-INF and trying to
 directly access it. That's not great but at least it prevents access.
Worse
 though is that when I then try to go to page after having logged in I get
a
 root cause: file not found error. So it looks to me like you can't move
 your .jsp files out of the root web-app directory. Can anyone shed any
more
 light on this?

Oh, I didn't realize you were still trying to directly access the JSPs 
after login.  I made the assumption that you were only using the 
forward method of RequestDispatcher to forward to those JSPs from your 
servlets.

If you need to allow those JSPs to be directly accessed via HTTP 
requests, my solution won't work.  Perhaps you can move them to a 
subfolder (not WEB-INF) and map a filter to it which only calls 
doFilterChain() if the user has a valid session and is logged in?  If 
the subfolder was called /protected, you could use the URL pattern 
/protected/* as your filter mapping.


Erik


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

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




Re: Re: Performance Issue

2003-02-21 Thread Will Hartung
Another thing you can try is to time how long it takes to get the FIRST
record, rather than the entire thing. Sometimes the actual result set is
fully realized until after the first row is fetched.

Once the result set is realized on Oracle, fetching should be pretty quick.

Regards,

Will Hartung
([EMAIL PROTECTED])

- Original Message -
From: vikas yk [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 2:52 AM
Subject: Re: Re: Performance Issue



 Hi peter

 Thanks for your reply.
 I didnt get what u meant by testing it with bean
 What  I did was

 recorded the time before I executed the Proc
 recorded the time after I got result result set
 recorded the time after commenting all the logic I had in
 while(rs.next()){} loop.

 I need all 6000 rows coz
 on my page i am selecting one item in my combo-box and based on
 value i select second combo box on same page gets populated.
 Unfortunately there is one value which is creating problem


 Any help will be of great help 2 me




 On Fri, 21 Feb 2003 Peter Lin wrote :
 
 
 If you're reading out 6K rows remotely, you're limited by
 bandwidth. Especially if the webserver only has one ethernet card
 and you're viewing the pages from another client. If you're
 concerned about performance, I would suggest writing a simple
 test bean to do the same exact query and time the elapse time to
 get the data. Then you can subtract the transport time from the
 total elapsed time.
 Is there a reason you need all 6000 rows? That's a lot of data to
 view in one shot. If you can break it into pages, or preload that
 data, it should improve the response time.
 
 peter
 
   vikas yk [EMAIL PROTECTED] wrote:I am making call Oracle
 Function on remote database .
 The values are taken in result set.The numbers of records in
 result set are aroung 6000.
 when I do
 while(rs.next())
 {
 //My logic
 }
 This takes aroung 5 min(300 sec) to get completed
 Now I commented all my logic inside while loop of rs.next()
 
 then also its taking around 4 min (250 sec) to just loop
 through
 records.
 Is there any way I can minize my time to recurse through
 records.
 
 I am using oracle thin driver to make connection.
 
 
 
 -
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 -
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, and more



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





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




Re: Tomcat 4.1.18 Internal Server Error

2003-02-21 Thread Mark Baumann
Hello!

On Fri, Feb 21, 2003 at 11:28:58AM -0500, Shapira, Yoav wrote:
 
 Howdy,
 Are you running tomcat with a security manager, and if so what does your
 policy file look like?
Sorry but what's a secutrty manager?
I am new to Tomcat, Java ... and I was happy to get Tomcat running.

I solved the problem in an other way. I copied the *.jar (xerces symlink) 
files from the /usr/share/tomcat4/common dir to /usr/share/tomcat4/common/lib.
That fixed the problem. And after 3 days my servlet is working;-))

Thanks for the fast reply:)

Mark



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




RE: Re: Performance Issue

2003-02-21 Thread Mike Jackson
Something else to remember is the way that the JDBC driver in oracle works.
You have to retrieve all the records that match your sql query.  Oracle
will do this whether you want it to or not.

However that said, if the query is static (ie the where clause doesn't
change except for the values you're looking for), you ought to look at the
oracle xdk.  Their XSQL servlet is a wonderful thing.  And it's orders of
magnitude faster than doing straight jdbc calles, probably 'cause they use
underlying oracle api calls rather than standard jdbc calls.  As long as
you're using oracle this is a great way to go.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: Will Hartung [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 21, 2003 9:25 AM
 To: Tomcat Users List; vikas yk
 Subject: Re: Re: Performance Issue


 Another thing you can try is to time how long it takes to get the FIRST
 record, rather than the entire thing. Sometimes the actual result set is
 fully realized until after the first row is fetched.

 Once the result set is realized on Oracle, fetching should be
 pretty quick.

 Regards,

 Will Hartung
 ([EMAIL PROTECTED])

 - Original Message -
 From: vikas yk [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 2:52 AM
 Subject: Re: Re: Performance Issue


 
  Hi peter
 
  Thanks for your reply.
  I didnt get what u meant by testing it with bean
  What  I did was
 
  recorded the time before I executed the Proc
  recorded the time after I got result result set
  recorded the time after commenting all the logic I had in
  while(rs.next()){} loop.
 
  I need all 6000 rows coz
  on my page i am selecting one item in my combo-box and based on
  value i select second combo box on same page gets populated.
  Unfortunately there is one value which is creating problem
 
 
  Any help will be of great help 2 me
 
 
 
 
  On Fri, 21 Feb 2003 Peter Lin wrote :
  
  
  If you're reading out 6K rows remotely, you're limited by
  bandwidth. Especially if the webserver only has one ethernet card
  and you're viewing the pages from another client. If you're
  concerned about performance, I would suggest writing a simple
  test bean to do the same exact query and time the elapse time to
  get the data. Then you can subtract the transport time from the
  total elapsed time.
  Is there a reason you need all 6000 rows? That's a lot of data to
  view in one shot. If you can break it into pages, or preload that
  data, it should improve the response time.
  
  peter
  
vikas yk [EMAIL PROTECTED] wrote:I am making call Oracle
  Function on remote database .
  The values are taken in result set.The numbers of records in
  result set are aroung 6000.
  when I do
  while(rs.next())
  {
  //My logic
  }
  This takes aroung 5 min(300 sec) to get completed
  Now I commented all my logic inside while loop of rs.next()
  
  then also its taking around 4 min (250 sec) to just loop
  through
  records.
  Is there any way I can minize my time to recurse through
  records.
  
  I am using oracle thin driver to make connection.
  
  
  
  -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
  
  -
  Do you Yahoo!?
  Yahoo! Tax Center - forms, calculators, tips, and more
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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




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




Re: Servlet filter and listerner best practices

2003-02-21 Thread Will Hartung
 From: Etienne [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 3:47 AM
 Subject: Servlet filter and listerner best practices


 Hi all,

 I am looking for some best practices for servlet filter (and servlet
 listener). These are quite new (servlet 2.3). I am using a servlet
 filter on some of my jsp page, but I would need a detail example of the
 best way to implement it.

It kind of all depends on what your Filter needs to do. Passive filters
(like, say, a Logging Filter) can be quite different from something like a
GZip filter, which needs to really muck about with the request and streams
and what not.

 I am not sure how to catch exception in the servlet filter without hiding
 everything in the back on it.

Pretty standard exception technique here. If you catch an exception that you
don't want to deal with, simply throw it again and let something else higher
up take care of it. Even better, don't catch exceptions that you can't
handle at all. The old proclamation of Don't test for something you can't
handle rings loudly here.

Perhaps some more detail about your situation would be helpful.

 Is there a more precise way (with some reg ex?) to associate a filter with
pages?

I dunno, the filter specification is pretty specific, perhaps too specific
meaning that for lots of disparate pages, you'll have lots of entries in the
web.xml. Perhaps if you could organize your pages in a hierarchy so you
could simply put the filter on a parent directory part of the path would
help reduce the load on the web.xml file.

Regards,

Will Hartung
([EMAIL PROTECTED])





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




apache tomcat (this old problem)

2003-02-21 Thread Dani
Hello. First of all: sorry for my terrible English. Second, I'm introducing
myself: My name is Dani. Third thing (and the most important): my problem
:-).

Again this silly and old problem?, you may say, but I can't solve it. Help
me please.

I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. I'm trying to
connect apache - tomcat each other, but I can't.

I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
workers2.properties as it is described in the mod_jk2 documentation. But it
doesn't work. Maybe server.xml or workers2.properties are bad
(workers2.properties didn't exist previously) or maybe mod_jk2-2.0.43 is not
the correct module or maybe I put them in a bad place. I don't know. Any
suggestion?

Thanks for your patient.



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: apache tomcat (this old problem)

2003-02-21 Thread Filip Hanik
look in your log files, find the errors and send them to us

-Original Message-
From: Dani [mailto:alchasira@xxx]
Sent: Friday, February 21, 2003 10:02 AM
To: tomcat-user@xx
Subject: apache  tomcat (this old problem)


Hello. First of all: sorry for my terrible English. Second, I'm introducing
myself: My name is Dani. Third thing (and the most important): my problem
:-).

Again this silly and old problem?, you may say, but I can't solve it. Help
me please.

I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. I'm trying to
connect apache - tomcat each other, but I can't.

I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
workers2.properties as it is described in the mod_jk2 documentation. But it
doesn't work. Maybe server.xml or workers2.properties are bad
(workers2.properties didn't exist previously) or maybe mod_jk2-2.0.43 is not
the correct module or maybe I put them in a bad place. I don't know. Any
suggestion?

Thanks for your patient.



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: apache tomcat (this old problem)

2003-02-21 Thread Turner, John

That's the correct *.so file.

If you post relevant portions of your configuration, that would help us help
you faster.

John

 -Original Message-
 From: Dani [mailto:alchasira@xxx]
 Sent: Friday, February 21, 2003 1:02 PM
 To: tomcat-user@xx
 Subject: apache  tomcat (this old problem)
 
 
 Hello. First of all: sorry for my terrible English. Second, 
 I'm introducing
 myself: My name is Dani. Third thing (and the most 
 important): my problem
 :-).
 
 Again this silly and old problem?, you may say, but I can't 
 solve it. Help
 me please.
 
 I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. 
 I'm trying to
 connect apache - tomcat each other, but I can't.
 
 I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
 workers2.properties as it is described in the mod_jk2 
 documentation. But it
 doesn't work. Maybe server.xml or workers2.properties are bad
 (workers2.properties didn't exist previously) or maybe 
 mod_jk2-2.0.43 is not
 the correct module or maybe I put them in a bad place. I 
 don't know. Any
 suggestion?
 
 Thanks for your patient.
 
 
 
 -
 To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
 For additional commands, e-mail: tomcat-user-help@xx
 

-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: apache tomcat (this old problem)

2003-02-21 Thread pqin
Not sure if mode_jk2-2.0.43.so works with apache 2.0.44. But
workers2.properties and jk2.properties are quite simple.

After I built tomcat-connector from source, I only did following changes

1. /usr/local/apache2/conf/workers2.properties

# shared memory handling.
[shm]
file=/usr/local/jakarta-tomcat-4.1.18/work/jk2.shm
size=1048576

# example socket channel, explicitly set port and host
[channel.socket:jackass:8009]
tomcatId=jackass:8009

# uri mapping
[uri:/examples/*]

2. /usr/local/Jakarta-tomcat-4.1.18/conf/jk2.properties

shm.file=${jkHome}/work/jk2.shm

3. No need to modify server.xml

4. /usr/local/apache2/conf/httpd.conf

LoadModule jk2_module modules/mod_jk2.so


Please show us the log so that we can better understand why it does work.

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Dani [mailto:alchasira@xxx] 
Sent: February 21, 2003 1:02 PM
To: tomcat-user@xx
Subject: apache  tomcat (this old problem)

Hello. First of all: sorry for my terrible English. Second, I'm introducing
myself: My name is Dani. Third thing (and the most important): my problem
:-).

Again this silly and old problem?, you may say, but I can't solve it. Help
me please.

I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. I'm trying to
connect apache - tomcat each other, but I can't.

I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
workers2.properties as it is described in the mod_jk2 documentation. But it
doesn't work. Maybe server.xml or workers2.properties are bad
(workers2.properties didn't exist previously) or maybe mod_jk2-2.0.43 is not
the correct module or maybe I put them in a bad place. I don't know. Any
suggestion?

Thanks for your patient.



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


RE: redirectPort results in HTTP Status 500

2003-02-21 Thread John Trollinger
CONFIDENTIAL will only allow it to be transported via https.

 -Original Message-
 From: Bryan Field-Elliot [mailto:bryan_lists@xxx] 
 Sent: Friday, February 21, 2003 1:02 PM
 To: Tomcat Users List
 Subject: redirectPort results in HTTP Status 500
 
 
 I am (for the first time) playing with security-constraint 
 transport-guarantee CONFIDENTIAL.
 
 My site is already working fine on ports 80 and 443 (SSL), 
 I've just never used this declarative security mechanism before.
 
 I have this constraint applied to page test.jsp for me to 
 test the redirection.
 
 Every time I hit the page, I get a HTTP Status 500 from 
 Tomcat (4.1.18), The server encountered an internal error 
 (/test.jsp) that prevented it from fulfilling this request..
 
 When I hit the page test.jsp from https://, it loads just fine.
 
 Any help would be appreciated! Am I missing something?
 
 BTW Tomcat is fronted by Apache and mod_webapp.
 
 Bryan
 
 
 
 


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: redirectPort results in HTTP Status 500

2003-02-21 Thread Bryan Field-Elliot
On Fri, 2003-02-21 at 11:10, John Trollinger wrote:

CONFIDENTIAL will only allow it to be transported via https.


That's right. That's the effect I'm trying to achieve... When tomcat
receives a request for /test.jsp on port 80, have it redirect to port
443 with https:. It's documented that this is supposed to work, but, I
am hitting a snag somewheres..

Bryan



RE: apache tomcat (this old problem)

2003-02-21 Thread Filip Hanik
you can't have two connectors listen to the same port, in your case 8080

Filip

-Original Message-
From: Dani [mailto:alchasira@xxx]
Sent: Friday, February 21, 2003 10:15 AM
To: Tomcat Users List
Subject: RE: apache  tomcat (this old problem)


- This is the apache error_log when I'm trying to connect
[Fri Feb 21 19:06:15 2003] [error] workerEnv.init() create slot epStat.1
failed
[Fri Feb 21 19:06:15 2003] [error] lb.service() worker failed
ajp13:192.168.5.1:8080
[Fri Feb 21 19:06:15 2003] [error] lb.service() unrecoverable error...
[Fri Feb 21 19:06:15 2003] [error] mod_jk.handler() Error connecting to
tomcat 12

- And this is the worker2.properties:
#Define the communication channel
[channel.socket:192.168.5.1:8080]
info=Ajp13 forwarding over socket
tomcatId=192.168.5.1:8080

#Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

- I add this line in the httpd.conf in the apache2/conf directory:
LoadModule jk2_module modules/mod_jk2-2.0.43.so

- This is jk2.properties in jakarta-tomcat/conf directory (only this line):
channelSocket.port=8080

- This is part of the server.xml file:
...
 Server port=8080 shutdown=SHUTDOWN debug=0
...
Service name=Tomcat-Apache
...
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=0
   useURIValidationHack=false

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8080 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/
.


- Original Message -
From: Dani alchasira@xxx
To: tomcat-user@xx
Sent: Friday, February 21, 2003 7:01 PM
Subject: apache  tomcat (this old problem)


 Hello. First of all: sorry for my terrible English. Second, I'm
introducing
 myself: My name is Dani. Third thing (and the most important): my problem
 :-).

 Again this silly and old problem?, you may say, but I can't solve it.
Help
 me please.

 I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. I'm trying to
 connect apache - tomcat each other, but I can't.

 I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
 workers2.properties as it is described in the mod_jk2 documentation. But
it
 doesn't work. Maybe server.xml or workers2.properties are bad
 (workers2.properties didn't exist previously) or maybe mod_jk2-2.0.43 is
not
 the correct module or maybe I put them in a bad place. I don't know. Any
 suggestion?

 Thanks for your patient.



 -
 To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
 For additional commands, e-mail: tomcat-user-help@xx



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: apache tomcat (this old problem)

2003-02-21 Thread pqin
Try channel.socket::8009

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Dani [mailto:alchasira@xxx] 
Sent: February 21, 2003 1:15 PM
To: Tomcat Users List
Subject: RE: apache  tomcat (this old problem)

- This is the apache error_log when I'm trying to connect
[Fri Feb 21 19:06:15 2003] [error] workerEnv.init() create slot epStat.1
failed
[Fri Feb 21 19:06:15 2003] [error] lb.service() worker failed
ajp13:192.168.5.1:8080
[Fri Feb 21 19:06:15 2003] [error] lb.service() unrecoverable error...
[Fri Feb 21 19:06:15 2003] [error] mod_jk.handler() Error connecting to
tomcat 12

- And this is the worker2.properties:
#Define the communication channel
[channel.socket:192.168.5.1:8080]
info=Ajp13 forwarding over socket
tomcatId=192.168.5.1:8080

#Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

- I add this line in the httpd.conf in the apache2/conf directory:
LoadModule jk2_module modules/mod_jk2-2.0.43.so

- This is jk2.properties in jakarta-tomcat/conf directory (only this line):
channelSocket.port=8080

- This is part of the server.xml file:
...
 Server port=8080 shutdown=SHUTDOWN debug=0
...
Service name=Tomcat-Apache
...
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=0
   useURIValidationHack=false

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8080 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/
.


- Original Message -
From: Dani alchasira@xxx
To: tomcat-user@xx
Sent: Friday, February 21, 2003 7:01 PM
Subject: apache  tomcat (this old problem)


 Hello. First of all: sorry for my terrible English. Second, I'm
introducing
 myself: My name is Dani. Third thing (and the most important): my problem
 :-).

 Again this silly and old problem?, you may say, but I can't solve it.
Help
 me please.

 I've installed red hat 7.2, apache 2.0.44  tomcat 4.1.18. I'm trying to
 connect apache - tomcat each other, but I can't.

 I've downloaded mod_jk2-2.0.43.so and I've configure server.xml and
 workers2.properties as it is described in the mod_jk2 documentation. But
it
 doesn't work. Maybe server.xml or workers2.properties are bad
 (workers2.properties didn't exist previously) or maybe mod_jk2-2.0.43 is
not
 the correct module or maybe I put them in a bad place. I don't know. Any
 suggestion?

 Thanks for your patient.



 -
 To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
 For additional commands, e-mail: tomcat-user-help@xx



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


RE: redirectPort results in HTTP Status 500

2003-02-21 Thread Filip Hanik
make sure your redirect port is set to 443 and not 8443 in server.xml

Filip

-Original Message-
From: Bryan Field-Elliot [mailto:bryan_lists@xxx]
Sent: Friday, February 21, 2003 10:13 AM
To: Tomcat Users List
Subject: RE: redirectPort results in HTTP Status 500


On Fri, 2003-02-21 at 11:10, John Trollinger wrote:

CONFIDENTIAL will only allow it to be transported via https.


That's right. That's the effect I'm trying to achieve... When tomcat
receives a request for /test.jsp on port 80, have it redirect to port
443 with https:. It's documented that this is supposed to work, but, I
am hitting a snag somewheres..

Bryan


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: redirectPort results in HTTP Status 500

2003-02-21 Thread Bryan Field-Elliot
On Fri, 2003-02-21 at 11:13, Filip Hanik wrote:

make sure your redirect port is set to 443 and not 8443 in
server.xml

Filip


Thanks.. It is (set correctly to 443).

Bryan


Re: Help! Anyone successfully install a purchased certificate?

2003-02-21 Thread Richard S. Huntrods
Matt,

You are most welcome. I do hope it works for you, but I also know you
would be very happy with Thawte. I chose them based on cost (less that
1/2 verisign and others).
Cheers,

-Richard

Matt Fury wrote:

Richard,

Thanks so much for your reply! I'm trying one last
time with InstantSSL. We'll find out soon and I'll let
everyone know whether you can go with InstantSSL or
not! :-)

-Matt


--- Richard S. Huntrods huntrods@xxx
wrote:


*** I am re-sending this email with the attachment
'kt.bat' removed and
the text of the batch file included in email body -
after being flooded
with anti-virus messages from a couple dozen ISP's
that have labelled
'.bat' files as potential viruses. ***


Matt,

I'm sorry I didn't see this sooner (or did you post
before you purchased?).

I've installed a Thawte Certificate (one year ago),
and then installed
the renewal certificate again this month.

The first installation was a nightmare, because
no-one seemed to know
all of the required details (and you must get them
ALL correct, or
nothing works!)

Anyway, the technicians at Thawte finally figured
the problem, and we
got it working.

This time, I simply followed the same process and it
worked the very
first time.

I'm attaching an abbreviated step-by-step for SSL
certificates using
ONLY Tomcat (no Apache in the loop). This is a
DOS-type BATCH file that
I used on my Win2K machine to generate the
appropriate certificates. The
actual certificate runs on my production server,
which is Solaris 2.8 on
a Sparc E250, running only Tomcat and MySQL. In
otherwords, the process
should be portable.

The only other IMPORTANT item is the type of
certificate. In my case,
the only mistake in the whole original process (that
caused everything
to fail) was that I requested the wrong certificate
type. Once the
correct certificate was requested, it all worked -
and has been working
ever since!

The type you want is PKCS #7 no other type worked
for me (we tried
them all G).

If you cannot get it to work with JUST Tomcat at
all, get a refund and
RUN (don't walk) to the Thawte website and get one
of theirs.

Cheers,

-Richard

DISCLAIMER: I have no connection whatsoever with
Thawte. I receive
nothing for endorsing their certificate. The only
reason I endorse
Thawte is that I know their certs do work with
Tomcat, and their tech
support is pretty good.

===kt.bat===
echo off

rem mycompany.com

rem INSTRUCTIONS
rem 1. BE SURE JAVA (I use SDK 1.4) is installed and
WORKING before you
begin...
rem 2. unremark the lines with asterisks '*' for
each step in the process.
remthe batch file is run once for each step.
rem 3. BETWEEN Step 2 and 3, you must copy the CSR
to the appropriate
place on the
remThawte website and request the PKCS#7
certificate. It will arrive
by email
remonce all the 'paperwork' has been processed.
Save this as a text
file 'myc-thawte.txt'
remand proceed to step 3.
rem 4. Of course, you will have to modify the field
data to suit your
actual information.

rem STEP 1. - generate the .keystore file
(self-signed certificate)

rem remove the .keystore file or step 1 will fail
rem*if exist .keystore del .keystore

rem generate the self-signed certificate
rem*   keytool -genkey -alias tomcat -keyalg RSA
-keystore .keystore
-dname CN=mycompany.com, OU=myc, O=My Company Name,
L=MyCity,
S=MyProvince, C=CA -storepass mypassword
rem*copy .keystore keystore.private

rem STEP 2. - generate the csr (can be done together
with step 1)

rem remove the -csr.txt file or step 2 will fail
rem*if exist *-csr.txt del *-csr.txt

rem make the appropriate CSR - mycompany.com
rem*keytool -certreq -alias tomcat -keystore
.keystore -file
myc-csr.txt -storepass mypassword

rem STEP 3. - after the signer has issued the
certificate, import it
into a new .keystore file

rem import thawte certificate - mycompany.com
rem*keytool -import -v -alias tomcat
-trustcacerts -keystore
.keystore -file myc-thawte.txt -storepass mypassword

rem verify the keystore (I do this for every step)
 keytool -list -keystore .keystore -storepass
mypassword


 Subject: Re: Help! Anyone successfully install a
purchased certificate?
 
 They do have Apache instructions. But I guess I
better
 request that soon before the warranty runs out.
LOL
 
 They have instructions for how to do create and
 install it with generic Java based servers but it
 hasn't been specific enough with Tomcat.
 
 -Matt
 
 --- Ian Hunter ihunter@x wrote:
  From what I understand, some different
certificate
  vendors require different
  installation methods... Did they include
  instructions for IIS or Apache, for
  instance?
 
  Worst possible case you could front-end your
site(s)
  with Apache and use
  connectors to get to Tomcat.
 
  - Original Message -
  From: Matt Fury matty@
  To: tomcat-user@xx
  Sent: Thursday, February 20, 

RE: Mapping .jsp to controller servlet

2003-02-21 Thread Januski, Ken
Thanks Erik,

I'm going to hold off for awhile and see if anyone clarifies the public
nature of the .jsp files and any possible way around it. In the meantime
I'll keep experimenting on my own. If that leads to nothing, as I sort of
suspect it will, then it's on to filters and more questions about them.

Ken

-Original Message-
From: Erik Price [mailto:eprice@xxx]
Sent: Friday, February 21, 2003 12:40 PM
To: Tomcat Users List
Subject: Re: Mapping .jsp to controller servlet




Januski, Ken wrote:
 Erik,
 
 Thanks. Sorry I haven't been clearer. The servlet does use
request.include.
 I just added a try/catch to it and noticed that it fails when trying to
 include the file that I've put in WEB-INF. The error is
 javax.servlet.ServletException: queries.jsp.

Oh.  Sorry about that.  For some reason I remember someone on this list 
saying that they did something like putting their JSPs in WEB-INF and 
include() or forward()ed to them.  But I must have been mistaken.

 I would like to get a few things clear before I pursue filters, which I
 haven't used before. Is it true that any jsp file put in root directory
will
 be accessible to anyone by just putting the url to it in browser?

It is my understanding that this is how it is supposed to work.  I have 
changed my own code to use servlets that forward to JSPs, but originally 
I started out with a setup that allowed users to directly request JSPs. 
  It doesn't require any special extra effort on the part of the developer.

 And if so
 do you or anyone else know if moving it to a protected folder should solve
 it. I know that's your theory. If it's correct then for now I'll pursue
 getting that to work. If not then I guess I'll need to take a closer look
at
 filters.

Hopefully someone else can clarify.  But the theory would go like this:

1. All JSPs are tucked away in a subdirectory.
2. A filter is mapped to any requests of any resource under that 
subdirectory.
3. The filter checks the session to determine if the user making the 
request is properly authenticated.  If so, do nothing (actually, doing 
nothing really means allowing the filter to call its doFilterChain 
method, which in this case would allow the request to pass through since 
the JSP itself is the next resource in the chain).
However, if the user's session indicates that the user is not 
authenticated, you could call response.sendRedirect() to send the user 
to another page or servlet or perhaps the Login resource.  However, be 
sure to put a return statement immediately after the call to 
sendRedirect because I discovered (in implementing an identical filter 
to the one I am describing) that the sendRedirect doesn't happen fast 
enough to stop the filter from calling doFilterChain, and that the JSP 
would get served anyway.  Putting a return in your filter will prevent 
the doFilterChain() from getting called.

If this is confusing, fire away, I can explain this better in more detail.


Erik


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx

-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



RE: Servlet filter and listerner best practices

2003-02-21 Thread Etienne
Thanks Will, 

The filter servlet is only for logging checking and parameter init. I
would have like to learn more about (J2EE) pattern using filter and
listener servlet.

The problem about the filter servlet is that doFilter() do not throws
exception, so we must catch everything in doFilter. So that is why I was
hiding everything in back of it. It can be hard to debug that way.

Regards, 

Etienne


-Original Message-
From: Will Hartung [mailto:willh@x] 
Sent: February 21, 2003 12:36 PM
To: Tomcat Users List
Subject: Re: Servlet filter and listerner best practices

 From: Etienne etienno@
 Sent: Friday, February 21, 2003 3:47 AM
 Subject: Servlet filter and listerner best practices


 Hi all,

 I am looking for some best practices for servlet filter (and servlet
 listener). These are quite new (servlet 2.3). I am using a servlet
 filter on some of my jsp page, but I would need a detail example of
the
 best way to implement it.

It kind of all depends on what your Filter needs to do. Passive filters
(like, say, a Logging Filter) can be quite different from something like
a
GZip filter, which needs to really muck about with the request and
streams
and what not.

 I am not sure how to catch exception in the servlet filter without
hiding
 everything in the back on it.

Pretty standard exception technique here. If you catch an exception that
you
don't want to deal with, simply throw it again and let something else
higher
up take care of it. Even better, don't catch exceptions that you can't
handle at all. The old proclamation of Don't test for something you
can't
handle rings loudly here.

Perhaps some more detail about your situation would be helpful.

 Is there a more precise way (with some reg ex?) to associate a filter
with
pages?

I dunno, the filter specification is pretty specific, perhaps too
specific
meaning that for lots of disparate pages, you'll have lots of entries in
the
web.xml. Perhaps if you could organize your pages in a hierarchy so you
could simply put the filter on a parent directory part of the path would
help reduce the load on the web.xml file.

Regards,

Will Hartung
(willh@x)





-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



Re: redirectPort results in HTTP Status 500

2003-02-21 Thread Bryan Field-Elliot
Well, I was using JDK 1.3.1, and just for fun I tried booting up Tomcat
on JDK 1.4, and the problem below just vanished. It works now. 

I'll report this as a bug (or at least, a request for documentation
addendum) in Bugzilla, if it isn't already...


On Fri, 2003-02-21 at 11:02, Bryan Field-Elliot wrote:

I am (for the first time) playing with security-constraint
transport-guarantee CONFIDENTIAL.

My site is already working fine on ports 80 and 443 (SSL), I've just
never used this declarative security mechanism before.

I have this constraint applied to page test.jsp for me to test the
redirection.

Every time I hit the page, I get a HTTP Status 500 from Tomcat
(4.1.18),
The server encountered an internal error (/test.jsp) that prevented
it
from fulfilling this request..

When I hit the page test.jsp from https://, it loads just fine.

Any help would be appreciated! Am I missing something?

BTW Tomcat is fronted by Apache and mod_webapp.

Bryan






Re: Servlet filter and listerner best practices

2003-02-21 Thread Will Hartung
 From: Etienne etienno@
 Sent: Friday, February 21, 2003 11:06 AM
 Subject: RE: Servlet filter and listerner best practices


 Thanks Will,

 The filter servlet is only for logging checking and parameter init. I
 would have like to learn more about (J2EE) pattern using filter and
 listener servlet.

Logging is pretty simple, as you simply Do Your Thing either before or after
the doFilter call (or both). Here the Filter is a simple wrapper.

I think they're handy for doing the parameter parsing and creating a local
instance of a specific Parameter class that your code relies on. This helps
loosen up the binding between your logic and the fact that it's buried in a
Servlet container. Of course, you still need to pass in the Parameter, I
stuff it into the Request as an attribute.

 The problem about the filter servlet is that doFilter() do not throws
 exception, so we must catch everything in doFilter. So that is why I was
 hiding everything in back of it. It can be hard to debug that way.

Well, it can throw a ServletException, which is the same as the
Servlet.service() method, though service() also can throw an IOException, so
you're really not losing anything.

Mind I'm not saying that it can't be limiting, but it's just not that much
more limiting than the normal happenings within Servlet programming.

Regards,

Will Hartung
(willh@x)




-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



wrestling with JSP error page

2003-02-21 Thread jeff . guttadauro
Hi, all.

I'm finding that the JSP errorPage directive has a serious flaw. 
Perhaps others out there have run into this and been as frustrated as I am 
and hopefully come up with some solution...?  The flaw is that, if the 
response has already been committed, then the error page is just plopped 
into the response where the error occurred - it has no way that I see of 
generating a fresh response with just the error page content.  Then the 
problem is that, depending on where the original page died, the error page 
content may not get displayed if it's caught inside some HTML tag where 
the browser can't figure out how to render it. 

Just as an example of this which I've seen, say you have a select 
dropdown list populated from some List request attribute, so you output 
select and then go to iterate through the List.  Now, say the List is 
null, and a NullPointerException is thrown, the errorPage content gets put 
into the response right after the select tag and the browser doesn't 
display it.  (You can see it if you do View - Source, but this obviously 
defeats the purpose.)

This is quite annoying, and I'm amazed that this mechanism still 
hasn't been improved.  I searched for solutions to this, but the only 
thing I could really find was using another framework like Velocity which 
buffers the whole response and therefore can generate a completely 
different one if an exception occurs at any step of the way. 
Unfortunately, learning another framework just isn't in the cards.

Does anyone know of a way, besides maybe making the buffer size 
really huge, to get around this problem?  Would a Filter on the response 
help with this?  How would something like that work?  (Never written/used 
a Filter before)

Thanks!
-Jeff 

tomcat and SAS

2003-02-21 Thread Vladimer Shioshvili
Hello all,

does anyone have experience with making SAS spawner and tomcat. 
Installation was successful, the whole thing seems to be working, but out 
of blue tomcat starts hogging CPU (99%) and once restarted bunch of SAS 
spawner errors appear in the application log in windows event logger.

Thanks for your help,
Vlad

Vladimer Shioshvili
QRC Division of Macro International Inc.
7315 Wisconsin Avenue, Suite 400W
Bethesda, MD 20814
Phone: (301) 657 3077 ext. 155 

-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


I can't add wepapps - maybe wrong configuration

2003-02-21 Thread Marcello Vitali
I installed jdk 1.4, apache2, tomcat got the latter 2 talking each other with the old 
method connector (on win2k local enviroment). Everything seems working as I can access 
the examples folder both with localhost 8000 and localhost 8080 than I made a folder 
hello in the webapps folder with a subdirectory WEB-INF and the relative web.xml file. 
But I keep getting the 404 - page not found error from both (tomcat actually redirects 
me to the proper error page). Really have no clue, if someone can help me I would 
greatly appreciate.
***maybe off topic, maybe not***
What is the standalone folder in the work folder meant for?

sorry for these very newbie questions
***
Best Regards


configuring JNDI for App-level auth

2003-02-21 Thread Erik Price
Hi,

I have an account on a server running Tomcat 4.0.6 and am finally 
getting around to incorporating connection pooling into my app.  At 
first I was going to use a home-brewed connection pooling class that I 
read in a book, then I discovered that there is support in Tomcat for 
the DBCP project's implementation, but then I found out that DBCP is for 
Tomcat 4.1.x or later, so I suppose I will try to use 4.0.6's Tyrex 
connection pooling system.

I am also relatively new to JNDI concepts so please go easy on me.

In reading the Tomcat JNDI Resource How-To, the example provided uses

  res-authContainer/res-auth

to indicate that the Container should sign onto the Resource Manager on 
behalf of the application (using parameters from 
$CATALINA_HOME/conf/server.xml).  However, I am curious how to specify 
connection parameters if I wish to use Application-level authorization, 
rather than Container-level.

Erik

-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


Tomcat 3.3.1a Install Windows 2000 Service

2003-02-21 Thread Kathleen Long

Is there a way to install Tomcat as a Windows Service?  I downloded a zip file and 
there was no install program.  How can I make Tomcat a windows service?


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



Re: Tomcat 3.3.1a Install Windows 2000 Service

2003-02-21 Thread Ian Hunter
The newer ones install that way by themselves.  4.1.18 is the latest
released build.

- Original Message -
From: Kathleen Long kathleen.long@
To: tomcat-user@xx
Sent: Friday, February 21, 2003 3:08 PM
Subject: Tomcat 3.3.1a Install Windows 2000 Service



Is there a way to install Tomcat as a Windows Service?  I downloded a zip
file and there was no install program.  How can I make Tomcat a windows
service?


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx



making file case insensitive

2003-02-21 Thread Peter Choe
is there a way to make tomcat serve html files regardless of the case of 
the file?

ie Hello.html and hello.html will retrieve the same file.

Peter



-
To unsubscribe, e-mail: tomcat-user-unsubscribe@xx
For additional commands, e-mail: tomcat-user-help@xx


  1   2   >