Re: Why so much virtual memory?

2005-03-15 Thread David Causse
Montz, James C. (James Tower) wrote:
On a related note, It would appear to me that java is not adhering to
the -Xmx option;
I have several instances that report using 3-4X RSS Memory what -Xmx is
set to.
For example,
Instance1:
CATALINA_OPTS=-sqerver -Xms64m -Xmx128m
 PS Ouput: 
	USER	%CPU%MEMVSZ RSS
	instanc10.7 8.9 509284  343636

Running on Redhat ES3 U4, Sun J2SDK 1.4.2_04
Anyone seen similar behaviour, tomcat or Java issue?, explanations?
 

Are you sure that your JVM is executed with these arguments and are not 
overidden by some shell scripts or so (ps -x will tell you)?
On HP-UX we consume 587mb of RSS with options below :
   CATALINA_OPTS=-server -Xoptgc -Xmx1024m -Xms256m -Xmn128m 
-XX:MaxPermSize=128m

On Linux (Java(TM) 2 Runtime Environment, Standard Edition (build 
Blackdown-1.4.2-rc1), with kernel 2.6)
   We consume 106m of RES but it is an unused/low-use tomcat, JVM 
options are below :
   export JAVA_OPTS=-Xmx700m -Djava.nio.use_epoll=true

It seems to be strange that you consume so much memory, is it at Tomcat 
startup, maybe your webapps are very big?
You never encountered OutOfMemory exceptions?

I had so much issues with JAVA memory management so now I'm so confuse 
with it that I gave up to understand
very well how it is working, my only fear is OutOfMemory, if my webapp 
runs fine it's OK, I don't touch it.

Good luck.
David.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Over 1000 threads running in production

2005-03-15 Thread Guillaume Lahitette
Chuck,

Many thanks for your feeback.

  From: Guillaume Lahitette [mailto:[EMAIL PROTECTED]
  Subject: Over 1000 threads running in production
 
  Our operations team discovered over 1000 java threads running
  on each production server. It appears that about 20 threads
  are added to this count every hour.

 Since no one else seems to be reporting this kind of problem,
 odds are it's a bug in one or more of the applications you're
 running under Tomcat.

This is what I am suspecting too. It's a large application with third
party modules (open source, outsourced,...). I am not too sure on how to
best track it down. Pointers welcome!

 There's an off chance it could be a
 problem in the JRE, since you're using a level that's been out of
 date and unsupported for quite some time.

We'll try to run some tests with the latest 1.4.2 JDK...If performance
increases, it will be an easy sell (although we'll want plenty of regression
testing). If not, operation teams will argue about the upgrade cost,
benefits


 The number of threads Tomcat uses to service requests is
 controlled by the maxProcessors parameter of the Connector
 element you're using; for 4.1, the default value is 20, and it
 would be very, very unusual to ever need to set it to much over
 100.  Since you don't seem to be aware of this configuration
 parameter, you're probably using the default.

We're using the default values for TC4.1.26: minProcessors=5
maxProcessors=75.


 Other than a few created for internal purposes by Tomcat and the
 JVM itself, additional threads must come from the applications.

How can I tell? Can I monitor who/when these are created?

 I would be highly suspicious of some piece of code kicking off a
 thread and then losing track of it and the thread not having any
 logic to terminate itself when it's no longer needed.

Slightly off topic: a third party module uses RMI: would RMI kick off a new
thread for each new RMI connection? We're suspecting this module does NOT
release RMI connections correctly and would explain these accumulation of
threads. I'm trying to get this confirmed...


e.. Any known issues with our setup?

 Can't tell unless you pass on the .xml files.

The server.xml is per default, except for port numbers. Any other relevant
XML files?

Tons of thanks for your feedback Chuck!

Guillaume


  - Chuck


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

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



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



Re: Over 1000 threads running in production

2005-03-15 Thread Tim Funk
Take periodic thread dumps and read them. perl, grep, and wc are your friends 
to parse the data without going insane.

The thread dumps should give you a general idea of who created them.
-Tim
Guillaume Lahitette wrote:
Hello Tomcat'oids,
This is Tomcat 4.1.26 on Linux with JDK 1.4.1_03, load balanced accross 2 
servers by a BigIP device. User base is around 50.
Our operations team discovered over 1000 java threads running on each 
production server. It appears that about 20 threads are added
to this count every hour.
Can someone clarify:
  a.. how are threads open? Is it 1 thread per HTTP request? Can I monitor this 
/ gather more details?
  b.. how and when are threads closed? garbage collected?
  c.. are threads re-used / pooled?
  d.. how to tune the number of threads Tomcat uses appropriately?
  e.. Any known issues with our setup?
Any other recommendations, best practices and war stories are greatly 
appreciated!
Many thanks in advance.
Guillaume
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem with BASIC authentication

2005-03-15 Thread Karanjkar, Sanjay V \(IT\)
Hi,
 
I have the following setup:

1. A copied version of Tomcat 4.1.24 on Unix (i.e. I have merely
*copied* the entire tomcat folder from another installed location
instead of installing it)

2. My application WAR file referenced by the following Context in
Server.xml:
Context path=/ieg-sc
docBase=/var/tmp/DEV/install/common/lib/tc.ieg.war 
reloadable=true debug=99 privileged=true
  ResourceLink name=users
type=org.apache.catalina.UserDatabase global=UserDatabase/
/Context

3. My app's web.xml has the following:
  security-constraint
web-resource-collection
  web-resource-nameMy Application/web-resource-name
  url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
  role-nameieg-sc-user/role-name
/auth-constraint
user-data-constraint
  transport-guaranteeNONE/transport-guarantee
/user-data-constraint
  /security-constraint
  !-- Define the Login Configuration for this Application --
  login-config
auth-methodBASIC/auth-method
realm-nameMy Application/realm-name
  /login-config
  security-role
role-nameieg-sc-user/role-name
  /security-role

4. I have defined the user/role in conf/tomcat-users.xml:
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=ieg-sc-user/
  user username=userid password=passwd roles=ieg-sc-user/
/tomcat-users

When I start tomcat, everything seems to run fine except that I do not
get a login window! I have gone over the setup so many times now, I'm
going madHave I missed something? Is it because I've copied the
tomcat binaries instead of installing it? If so, why does authentication
work correctly for the inbuilt Manager application..?

Appreciate if you could help me..

Thanks and regards
Sanjay Karanjkar 

 
NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited. 
 

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



RE: Over 1000 threads running in production

2005-03-15 Thread Guillaume Lahitette
Tim,

Thank you. This is very helpful.

I've tried kill -3 pid (following a google hit:
http://www.findarticles.com/p/articles/mi_m0MLW/is_3_3/ai_114495281/print)
but can't see the thread dump in catalina.out nor localhost_logtxt
files. What did I miss (this is Linux)?

If you could share your perl / grep / wc scripts, that would surely
jumpstart me and give me some ideas! Thanks in advance.

Cheers,
Guillaume


 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: 15 March 2005 11:03
 To: Tomcat Users List
 Subject: Re: Over 1000 threads running in production


 Take periodic thread dumps and read them. perl, grep, and wc are
 your friends
 to parse the data without going insane.

 The thread dumps should give you a general idea of who created them.

 -Tim

 Guillaume Lahitette wrote:
  Hello Tomcat'oids,
 
  This is Tomcat 4.1.26 on Linux with JDK 1.4.1_03, load balanced
 accross 2 servers by a BigIP device. User base is around 50.
 
  Our operations team discovered over 1000 java threads running
 on each production server. It appears that about 20 threads are added
  to this count every hour.
 
  Can someone clarify:
a.. how are threads open? Is it 1 thread per HTTP request?
 Can I monitor this / gather more details?
b.. how and when are threads closed? garbage collected?
c.. are threads re-used / pooled?
d.. how to tune the number of threads Tomcat uses appropriately?
e.. Any known issues with our setup?
  Any other recommendations, best practices and war stories are
 greatly appreciated!
 
  Many thanks in advance.
  Guillaume
 

 -
 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: Over 1000 threads running in production

2005-03-15 Thread Tim Funk
Sorry  -  I run such tests in adhoc manner.
-Tim
Guillaume Lahitette wrote:
Tim,
Thank you. This is very helpful.
I've tried kill -3 pid (following a google hit:
http://www.findarticles.com/p/articles/mi_m0MLW/is_3_3/ai_114495281/print)
but can't see the thread dump in catalina.out nor localhost_logtxt
files. What did I miss (this is Linux)?
If you could share your perl / grep / wc scripts, that would surely
jumpstart me and give me some ideas! Thanks in advance.
Cheers,
Guillaume

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 15 March 2005 11:03
To: Tomcat Users List
Subject: Re: Over 1000 threads running in production
Take periodic thread dumps and read them. perl, grep, and wc are
your friends
to parse the data without going insane.
The thread dumps should give you a general idea of who created them.
-Tim
Guillaume Lahitette wrote:
Hello Tomcat'oids,
This is Tomcat 4.1.26 on Linux with JDK 1.4.1_03, load balanced
accross 2 servers by a BigIP device. User base is around 50.
Our operations team discovered over 1000 java threads running
on each production server. It appears that about 20 threads are added
to this count every hour.
Can someone clarify:
 a.. how are threads open? Is it 1 thread per HTTP request?
Can I monitor this / gather more details?
 b.. how and when are threads closed? garbage collected?
 c.. are threads re-used / pooled?
 d.. how to tune the number of threads Tomcat uses appropriately?
 e.. Any known issues with our setup?
Any other recommendations, best practices and war stories are
greatly appreciated!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Session listener

2005-03-15 Thread Giuseppe Briotti
 ==
 Date: Mon, 14 Mar 2005 17:09:35 -0600 (CST)
 From: Christian Rebollar [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org, [EMAIL PROTECTED]
 Subject: Re: Session listener
 ==
 
 I don't know, but when I closed the browser the
 listener class catch sessionDestroyed event.

How do you close the browser? By a link on the page itself?
By closing the window?

G.



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



Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0

2005-03-15 Thread Fenderbosch, Eric
I found the FAQ (http://jakarta.apache.org/tomcat/faq/development.html) and 
followed the instructions there, including:

added env variable JPDA_ADDRESS=8000 
added env variable JPDA_TRANSPORT=dt_socket 
added -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n 
to java command line options,

but my Tomcat still doesn't seem to be running with the debug port enabled.  I 
can't connect via Eclipse, or even telnet to the port.  I'm running on WinXP 
SP2 w/ Tomcat as a service.  Here's a screenshot of the service config:
http://images.fender.net/tomcat.png

I'm guessing this is a really a JDK 1.5/5.0 issue and not a problem w/ Tomcat, 
but any help would be appreciated.

Thanks.

Eric

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



new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread Ashutosh Sharma
Hi,
I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
i will create a context with a docBase and this way i will work with
my webApp.
Now the world has changed a lot-everyone just deploying a WAR file
under webapps.
But i still want to work in the old manner-i want my
C:\Dir\sub-Dir\java\src\a\b\c\
to be compiled using ant which goes under C:\Dir\sub-\java\classes\a\b\c\
so that as and when i make any changes in any jsp file, struts-action,
formbean it gets direclty reflected rather than creating an out of box
WAR file again and again and putting it all under the webApps dir of
tomcat.
Can someone help me out?
Even ur help to deploy using manager will do?but i want manual editing
server.xml and then adding the context for my webApp.
Please help me.

-- 
With best regards:
Ashutosh Sharma

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



Re: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0

2005-03-15 Thread Giuseppe Briotti
 ==
 Date: Tue, 15 Mar 2005 08:12:07 -0500
 From: Fenderbosch, Eric [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Subject: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
 ==


Firewall of SP2 enabled?

G.



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



RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0

2005-03-15 Thread Fenderbosch, Eric
Yes, but I can connect to http on port 8080 just fine.  Is there some setting 
that might be allowing 8080, but blocking 8000?

I'll have to check this when I get home.  I'm posting from work where my 
configuration is different.

-Original Message-
From: Giuseppe Briotti [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 8:21 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0


 ==
 Date: Tue, 15 Mar 2005 08:12:07 -0500
 From: Fenderbosch, Eric [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Subject: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
 ==


Firewall of SP2 enabled?

G.



-
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: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread David Causse
Ashutosh Sharma wrote:
Hi,
I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
i will create a context with a docBase and this way i will work with
my webApp.
Now the world has changed a lot-everyone just deploying a WAR file
under webapps.
But i still want to work in the old manner-i want my
C:\Dir\sub-Dir\java\src\a\b\c\
to be compiled using ant which goes under C:\Dir\sub-\java\classes\a\b\c\
so that as and when i make any changes in any jsp file, struts-action,
formbean it gets direclty reflected rather than creating an out of box
WAR file again and again and putting it all under the webApps dir of
tomcat.
Can someone help me out?
Even ur help to deploy using manager will do?but i want manual editing
server.xml and then adding the context for my webApp.
Please help me.
 

Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.
Regards.
David.

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


Servlet / Jini lookup

2005-03-15 Thread Olivier Dusacq
Hello,
I'm trying to contact a Jini lookup service (reggie) from a simple 
servlet. I'm using Tomcat 5.5.7, Java 1.5.0_01, Jini 1.2.1 and Solaris8.

The problem is that, after the call to LookupDiscoveryManager() (see 
source code below), the discovered() method is never called back.

Here is what I get in my browser after an exec :

before LookupDiscoveryManager
end

I have successfully run a similar code in a standalone Java app (i.e. 
without Tomcat / servlet), and everything is OK.

In fact, I have no error message nor Exception thrown. :-( I simply 
don't have any response from reggie.

Any help would be appreciate,
Olive
PS: I'm new to Tomcat and Jini.

=
== core servlet
=
protected void doGet(HttpServletRequest request,
 HttpServletResponse response)
 throws ServletException, IOException {
response.setContentType(text/plain);
PrintWriter out = response.getWriter();
new searchALookup(out).start();
try {
Thread.sleep(3);
} catch (InterruptedException ie) {
out.println(InterruptedException:  + ie.getMessage());
}
out.println(end);
out.close();
}

==
== searchALookup.java
==
import java.io.*;
import net.jini.core.discovery.LookupLocator;
import net.jini.core.lookup.*;
import net.jini.discovery.*;
public class searchALookup extends Thread implements DiscoveryListener {
private LookupDiscoveryManager discover;
private PrintWriter sortie;
public chercheLookup(PrintWriter out) {
sortie = out;
}
public void run() {
try {
startServiceDiscovery();
} catch (IOException ioe) {
sortie.println(Error while connecting to service);
}
}
public synchronized void discovered(DiscoveryEvent dev) {
sortie.println(-- Discovered);
ServiceRegistrar[] lookup = dev.getRegistrars();
// We may have discovered one or more lookup services
sortie.println(lookup.length + lookups decouverts);
}
public synchronized void discarded(DiscoveryEvent dev) {
sortie.println(discarded);
}
private void startServiceDiscovery()
throws IOException {
String[] groups = null;
LookupLocator[] locators = null;
try{
LookupLocator locator =
new LookupLocator(jini://REGGIE_HOSTNAME);
locators = new LookupLocator[]{locator};
groups=DiscoveryGroupManagement.NO_GROUPS;
}catch(java.net.MalformedURLException e){
groups = new String[]{public};
sortie.println(Groups =+groups[0]);
}

// Initialize for receiving events from the lookup service
sortie.println(before LookupDiscoveryManager);
discover = new LookupDiscoveryManager(groups, locators, this);
}
}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread Ashutosh Sharma
Hi David,
Thanks for the reply.
But if i see the manager.xml under this location it's contents are like this:

Context path=/manager docBase=${catalina.home}/server/webapps/manager
debug=0 privileged=true

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context

So for my webApp viz. reports if i put this kind of contents:

Context path=/reports docBase=C:\talkBack src\talkback\java\build\reports
debug=0 privileged=true
/Context
and then i restart the tomcat i see the directory listing.
Shud i giv refrence of build dir or src directory. Actually my
build.xml compiles everythign from my src to corresponding build Dir.


On Tue, 15 Mar 2005 14:34:22 +0100, David Causse [EMAIL PROTECTED] wrote:
 Ashutosh Sharma wrote:
 
 Hi,
 I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
 i will create a context with a docBase and this way i will work with
 my webApp.
 Now the world has changed a lot-everyone just deploying a WAR file
 under webapps.
 But i still want to work in the old manner-i want my
 C:\Dir\sub-Dir\java\src\a\b\c\
 to be compiled using ant which goes under 
 C:\Dir\sub-\java\classes\a\b\c\
 so that as and when i make any changes in any jsp file, struts-action,
 formbean it gets direclty reflected rather than creating an out of box
 WAR file again and again and putting it all under the webApps dir of
 tomcat.
 Can someone help me out?
 Even ur help to deploy using manager will do?but i want manual editing
 server.xml and then adding the context for my webApp.
 Please help me.
 
 
 Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.
 
 Regards.
 
 David.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
With best regards:
Ashutosh Sharma

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



Re: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread David Causse
Ashutosh Sharma wrote:
Hi David,
Thanks for the reply.
But if i see the manager.xml under this location it's contents are like this:
Context path=/manager docBase=${catalina.home}/server/webapps/manager
   debug=0 privileged=true
 !-- Link to the user database we will get roles from --
 ResourceLink name=users global=UserDatabase
   type=org.apache.catalina.UserDatabase/
/Context
So for my webApp viz. reports if i put this kind of contents:
Context path=/reports docBase=C:\talkBack src\talkback\java\build\reports
   debug=0 privileged=true
/Context
and then i restart the tomcat i see the directory listing.
Shud i giv refrence of build dir or src directory. Actually my
build.xml compiles everythign from my src to corresponding build Dir.
 

You have to give a docBase that points to your webapps, in your 
example you must have this directory :

C:\talkBack src\talkback\java\build\reports\WEB-INF
and I hope a web.xml inside.
and for java classes (your build dest must be something like this)
C:\talkBack src\talkback\java\build\reports\WEB-INF\classes\
Your JSPs can be everywhere inside (depends on you web.xml):
C:\talkBack src\talkback\java\build\reports\
Don't forget to specify welcome-file in your web.xml.
You removed the RessourceLink to user databases so why do you continue to
use privileged=true ? I don't know if it's correct...
You can add log info to your context that might help you later:
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_reports_log. suffix=.txt
   timestamp=true/
Good luck,
David.
PS. I don't know if the '\' is OK for file separator inside this file: 
you'd better use '/'
like this: c:/webapps/reports.

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


running a thread in Tomcat

2005-03-15 Thread Mark
Hi,
I'm starting a new thread in my init servlet(I know it has been
discussed few time, that it's not the best idea, but anyway)
 and everyhing is fine untill I need to restart tomcat.
When I shutdown (shutdown.sh) Tomcat the java process remain active.

The question is it expected? or I need to take care about this thread
in destroy() method of my init servlet?

I have tomcat 5.0.24 on RH9.

Thanks a lot,
Mark.




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



RE: running a thread in Tomcat

2005-03-15 Thread Allistair Crossley
Hi,

Tomcat won't know anything about your Thread just because you created it in 
init(). Tomcat does not monitor your threads, you need to manage them yourself 
if you insist on creating them which many will tell you is naughty. Maybe you 
can kill your Thread in the destroy() method of the same servlet, since it 
sounds like you may have a class member reference to your thread in there. 

Cheers, Allistair.

 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]
 Sent: 15 March 2005 15:32
 To: tomcat-user@jakarta.apache.org
 Subject: running a thread in Tomcat
 
 
 Hi,
 I'm starting a new thread in my init servlet(I know it has been
 discussed few time, that it's not the best idea, but anyway)
  and everyhing is fine untill I need to restart tomcat.
 When I shutdown (shutdown.sh) Tomcat the java process remain active.
 
 The question is it expected? or I need to take care about this thread
 in destroy() method of my init servlet?
 
 I have tomcat 5.0.24 on RH9.
 
 Thanks a lot,
 Mark.
 
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Mail - Find what you need with new enhanced search. 
 http://info.mail.yahoo.com/mail_250
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Re: running a thread in Tomcat

2005-03-15 Thread Viorel Dragomir


Set the thread to act like a daemon.
It's a Thread [class] thing. 

There are ten better ways to resolve the same problem without threads.



Viorel Dragomir

.
..
---



- Original Message - 
From: Mark 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, March 15, 2005 17:31
Subject: running a thread in Tomcat


Hi,
I'm starting a new thread in my init servlet(I know it has been
discussed few time, that it's not the best idea, but anyway)
 and everyhing is fine untill I need to restart tomcat.
When I shutdown (shutdown.sh) Tomcat the java process remain active.

The question is it expected? or I need to take care about this thread
in destroy() method of my init servlet?

I have tomcat 5.0.24 on RH9.

Thanks a lot,
Mark.




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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


Re: running a thread in Tomcat

2005-03-15 Thread Ben Souther
set isDaemon(true) for all your threads.


On Tue, 2005-03-15 at 10:31, Mark wrote:
 Hi,
 I'm starting a new thread in my init servlet(I know it has been
 discussed few time, that it's not the best idea, but anyway)
  and everyhing is fine untill I need to restart tomcat.
 When I shutdown (shutdown.sh) Tomcat the java process remain active.
 
 The question is it expected? or I need to take care about this thread
 in destroy() method of my init servlet?
 
 I have tomcat 5.0.24 on RH9.
 
 Thanks a lot,
 Mark.
 
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Mail - Find what you need with new enhanced search. 
 http://info.mail.yahoo.com/mail_250
 
 -
 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: running a thread in Tomcat

2005-03-15 Thread Viorel Dragomir

I apologize for the previous post.
The Read Receipt was enabled [because of my boss's will] and I forgot about it.


Thank you for your understanding,


Viorel Dragomir

.
..
---



- Original Message - 
From: Mark 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, March 15, 2005 17:31
Subject: running a thread in Tomcat


Hi,
I'm starting a new thread in my init servlet(I know it has been
discussed few time, that it's not the best idea, but anyway)
 and everyhing is fine untill I need to restart tomcat.
When I shutdown (shutdown.sh) Tomcat the java process remain active.

The question is it expected? or I need to take care about this thread
in destroy() method of my init servlet?

I have tomcat 5.0.24 on RH9.

Thanks a lot,
Mark.




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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


tomcat servlet engine

2005-03-15 Thread brian dell
Is there a windows version of tomcat (servlet container) on a
apache (windows version) web server ?




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: tomcat servlet engine

2005-03-15 Thread Peter Crowther
 From: brian dell [mailto:[EMAIL PROTECTED] 
 Is there a windows version of tomcat (servlet container) on a
 apache (windows version) web server ?

'On' no, behind yes.  Run the Windows version of Apache, mod_jk, and
Tomcat on a Windows JVM.

- Peter

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



Help with SSL Cert

2005-03-15 Thread joelsherriff
Hope someone can help.  I've searched through the archives and this seems to be 
a common problem, but even detailed instructions
have left me stumped.  I'm trying to get client certificates to be required by 
tomcat by setting clientAuth=true but I can't seem to figure out how
to get the client certificate to be accepted once I do that.  Here's what I've 
done to generate all the appropriate files (parts coped from
other posts to this list):

# Create a private key and certificate request
openssl req -new -subj /C=US/ST=North Carolina/L=Raleigh/CN=akuma-c -newkey 
rsa:1024 -nodes -out ca.csr -keyout ca.key

# Create CA's self-signed certificate
openssl x509 -trustout -signkey ca.key -days 365 -req -in ca.csr -out ca.pem

# Copy ca.pem to ca.crt, edit and change TRUSTED CERTIFICATE to CERTIFICATE
# import ca.crt into the Trusted Root Certificates Store in IE

#Import the CA certificate into the JDK certificate authorities keystore:
keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file ca.pem 
-alias my_ca_alias -keypass changeit -storepass changeit

# Create a file to hold CA's serial numbers.
echo 02  ca.srl

# Create a keystore for the web server.
keytool -genkey -alias tomcat-sv -dname CN=akuma-c, OU=RD, O=MyOrganization, 
L=Raleigh, S=North Carolina, C=US -keyalg RSA -keypass changeit -storepass 
changeit -keysize 1024 -keystore server.keystore -storetype JKS

# Create a certificate request for the web server:
keytool -certreq -keyalg RSA -alias tomcat-sv -file server.csr -keystore 
server.keystore -storepass changeit

# Sign the certificate request:
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in server.csr -out 
server.crt -days 365

# Import the signed server certificate into the server keystore:
keytool -import -alias tomcat-sv -keystore server.keystore -trustcacerts -file 
server.crt -storepass changeit

# Import the CA certificate into the server keystore:
keytool -import -alias my_ca_alias -keystore server.keystore -trustcacerts 
-file ca.pem -keypass changeit

# Create a client certificate request:
openssl req -new -newkey rsa:512 -nodes -out client1.req -keyout client1.key

# Sign the client certificate.
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in client1.req 
-out client1.pem -days 365

# Generate a PKCS12 file containing client key and client certificate.
openssl pkcs12 -export -clcerts -in client1.pem -inkey client1.key -out 
client1.p12 -name Client

# Import the PKCS12 file into the web browser under Personal Certificates

# edit the server.xml file and set clientAuth=true and keystoreFile to point to 
my server.keystore file.

Once all this is done, neither IE nor my web app can talk to tomcat on the ssl 
port (8443)

Help getting started

2005-03-15 Thread brian
To get a servelet engine one needs the following
apache web server
and tomcat servlet engine ??

What about J2EE ? Does one need that as well ? Or the servlet
engine above (like tomcat) would contain the J2EE as well.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Jumping in and out of JSP

2005-03-15 Thread Charles P. Killmer
Is it possible to do something like the following?  I have as much code
as I want in Java classes.  This is just to make modifying the UI
easier.
 
 
%!
public String test() {
%
test2
%!
}
%
%=test()%
 
 
 
 
Charles Killmer
 


RE: Help getting started

2005-03-15 Thread Peter Crowther
 From: brian [mailto:[EMAIL PROTECTED] 
 To get a servelet engine one needs the following
 apache web server

No.  Tomcat will work standalone.

 and tomcat servlet engine ??

Or another engine such as Jetty.  But that's heresy on this list ;-).

 What about J2EE ? Does one need that as well ? Or the servlet
 engine above (like tomcat) would contain the J2EE as well.

J2EE is a collection of different parts.  Tomcat provides
implementations of some, but not all, of the parts.  What do you want
J2EE for?  Which bits do you want?

- Peter

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



RE: Help getting started

2005-03-15 Thread Allistair Crossley
Hi,

Yes, and some would say you don't need the Apache web server, since Tomcat can 
act as a web server too. Tomcat provides an implementation of the Servlet and 
JSP aspects of the J2EE suite, so if you only need those you're ok.

Allistair.

 -Original Message-
 From: brian [mailto:[EMAIL PROTECTED]
 Sent: 15 March 2005 16:27
 To: tomcat-user@jakarta.apache.org
 Subject: Help getting started
 
 
 To get a servelet engine one needs the following
 apache web server
 and tomcat servlet engine ??
 
 What about J2EE ? Does one need that as well ? Or the servlet
 engine above (like tomcat) would contain the J2EE as well.
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Help getting started

2005-03-15 Thread Pete Stevens

How to install tomcat for linux,

http://www.mythic-beasts.com/support/topic_vds_java.html


How to make it act like a normal webserver with jsp  virtual hosting support,
rather than worrying about packaging .war files etc.

http://www.ex-parrot.com/~pete/tomcat-vhost.html


Hope this helps.

Pete

On Tue, 15 Mar 2005, Allistair Crossley wrote:

 Hi,

 Yes, and some would say you don't need the Apache web server, since Tomcat 
 can act as a web server too. Tomcat provides an implementation of the Servlet 
 and JSP aspects of the J2EE suite, so if you only need those you're ok.

 Allistair.

  -Original Message-
  From: brian [mailto:[EMAIL PROTECTED]
  Sent: 15 March 2005 16:27
  To: tomcat-user@jakarta.apache.org
  Subject: Help getting started
 
 
  To get a servelet engine one needs the following
  apache web server
  and tomcat servlet engine ??
 
  What about J2EE ? Does one need that as well ? Or the servlet
  engine above (like tomcat) would contain the J2EE as well.
 
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam protection around
  http://mail.yahoo.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
 ---
 QAS Ltd.
 Developers of QuickAddress Software
 a href=http://www.qas.com;www.qas.com/a
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT


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



--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

When I read about the evils of drinking, I gave up reading.
  -- Henny Youngman

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



Re: running a thread in Tomcat

2005-03-15 Thread Darek Czarkowski
you have to terminate that thread explicitly. You can do that by
defining ApplicationServletContextListener and have it stopped on
contextDestroyed event

DarekC

On Tue, 2005-03-15 at 07:31, Mark wrote:
 Hi,
 I'm starting a new thread in my init servlet(I know it has been
 discussed few time, that it's not the best idea, but anyway)
  and everyhing is fine untill I need to restart tomcat.
 When I shutdown (shutdown.sh) Tomcat the java process remain active.
 
 The question is it expected? or I need to take care about this thread
 in destroy() method of my init servlet?
 
 I have tomcat 5.0.24 on RH9.
 
 Thanks a lot,
 Mark.
 
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Mail - Find what you need with new enhanced search. 
 http://info.mail.yahoo.com/mail_250
 
 -
 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]



Installing tomcat (help)

2005-03-15 Thread brian
Below is the tomcat installation files for download and have
pasted the contents of README packaging information.

One binary is an exe, one is tar.gz, one is a zip, another is
Deployer. Which one is the installation file for windows ?

The .exe is the Tomcat Setup wizard. Is this the windows
version ?

--
5.0.28 
 Binary 
  README (contains packaging information) 
  5.0.28 exe 
 [md5] [pgp] 
  5.0.28 tar.gz 
 [md5] [pgp] 
  5.0.28 zip 
 [md5] [pgp] 
  5.0.28 Deployer tar.gz 
 [md5] [pgp] 
  5.0.28 Deployer zip 
 [md5] [pgp] 
  5.0.28 Embed tar.gz 
 [md5] [pgp] 
  5.0.28 Embed zip 
 [md5] [pgp] 
--
Apache Tomcat 5.0.28

Useful references: 

Release notes, with important information about known issues 
Changelog 
Status 

NOTE: The tar files in this distribution use GNU tar
extensions, and must be untarred with a GNU compatible
version of tar. The version of tar on Solaris and Mac OS X
will not work with these files.

Thank you for using Tomcat!. 
-


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Installing tomcat (help)

2005-03-15 Thread Ben Souther
the exe

On Tue, 2005-03-15 at 11:56, brian wrote:
 Below is the tomcat installation files for download and have
 pasted the contents of README packaging information.
 
 One binary is an exe, one is tar.gz, one is a zip, another is
 Deployer. Which one is the installation file for windows ?
 
 The .exe is the Tomcat Setup wizard. Is this the windows
 version ?
 
 --
 5.0.28 
  Binary 
   README (contains packaging information) 
   5.0.28 exe 
  [md5] [pgp] 
   5.0.28 tar.gz 
  [md5] [pgp] 
   5.0.28 zip 
  [md5] [pgp] 
   5.0.28 Deployer tar.gz 
  [md5] [pgp] 
   5.0.28 Deployer zip 
  [md5] [pgp] 
   5.0.28 Embed tar.gz 
  [md5] [pgp] 
   5.0.28 Embed zip 
  [md5] [pgp] 
 --
 Apache Tomcat 5.0.28
 
 Useful references: 
 
 Release notes, with important information about known issues 
 Changelog 
 Status 
 
 NOTE: The tar files in this distribution use GNU tar
 extensions, and must be untarred with a GNU compatible
 version of tar. The version of tar on Solaris and Mac OS X
 will not work with these files.
 
 Thank you for using Tomcat!. 
 -
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.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: Installing tomcat (help)

2005-03-15 Thread Caldarale, Charles R
 From: Ben Souther [mailto:[EMAIL PROTECTED]
 Subject: Re: Installing tomcat (help)
 
 the exe
 
 On Tue, 2005-03-15 at 11:56, brian wrote:
  One binary is an exe, one is tar.gz, one is a zip, another is
  Deployer. Which one is the installation file for windows ?

Although the .exe is a true Windows installer, I much prefer using the .zip 
package, especially for the installation of a new level.  It provides the 
scripts to run from a command prompt, which I find to be much easier than 
running Tomcat as a service during the shakedown and tuning phase.  Once you're 
happy with your setup, you can use the service.bat script to create a service, 
if you wish.

 - Chuck


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

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



image upload

2005-03-15 Thread Shannon Scott
I have been preparing to write a servlet to handle image uploads.
It looks like most people are using the latest cos[date].jar file from
http://www.servlets.com/cos/index.html
Is this still the recommended method?
Are there any security concerns that I should address?
 
Thank you for any help.
Take Care.
 
 
 


RE: Over 1000 threads running in production

2005-03-15 Thread Guillaume Lahitette
Found the solution: to know which PID to kill -3 for, use ps -ef --forest
to detect the parent thread which has the *most* child threads. Then the
thread dump shows in catalina.out.

This is where I found the answer:
http://groups-beta.google.com/group/weblogic.developer.interest.performance/
browse_thread/thread/336d16199150720f/40be68d56007a1ea?q=periodic+%22thread+
dumps%22+linux+%22kill+-3%22#40be68d56007a1ea

Guillaume


 -Original Message-
 From: Guillaume Lahitette [mailto:[EMAIL PROTECTED]
 Sent: 15 March 2005 11:34
 To: Tomcat Users List
 Subject: RE: Over 1000 threads running in production


 Tim,

 Thank you. This is very helpful.

 I've tried kill -3 pid (following a google hit:
 http://www.findarticles.com/p/articles/mi_m0MLW/is_3_3/ai_11449528
 1/print) but can't see the thread dump in catalina.out nor
 localhost_logtxt files. What did I miss (this is Linux)?

 If you could share your perl / grep / wc scripts, that would
 surely jumpstart me and give me some ideas! Thanks in advance.

 Cheers,
 Guillaume


  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: 15 March 2005 11:03
  To: Tomcat Users List
  Subject: Re: Over 1000 threads running in production
 
 
  Take periodic thread dumps and read them. perl, grep, and wc are
  your friends
  to parse the data without going insane.
 
  The thread dumps should give you a general idea of who created them.
 
  -Tim
 
  Guillaume Lahitette wrote:
   Hello Tomcat'oids,
  
   This is Tomcat 4.1.26 on Linux with JDK 1.4.1_03, load balanced
  accross 2 servers by a BigIP device. User base is around 50.
  
   Our operations team discovered over 1000 java threads running
  on each production server. It appears that about 20 threads are added
   to this count every hour.
  
   Can someone clarify:
 a.. how are threads open? Is it 1 thread per HTTP request?
  Can I monitor this / gather more details?
 b.. how and when are threads closed? garbage collected?
 c.. are threads re-used / pooled?
 d.. how to tune the number of threads Tomcat uses appropriately?
 e.. Any known issues with our setup?
   Any other recommendations, best practices and war stories are
  greatly appreciated!
  
   Many thanks in advance.
   Guillaume
  
 
  -
  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: image upload

2005-03-15 Thread George Sexton
I think most people are moving to the Jakarta Commons File Upload jar.

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

 -Original Message-
 From: Shannon Scott [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 15, 2005 10:07 AM
 To: tomcat-user@jakarta.apache.org
 Subject: image upload
 
 I have been preparing to write a servlet to handle image uploads.
 It looks like most people are using the latest cos[date].jar file from
 http://www.servlets.com/cos/index.html
 Is this still the recommended method?
 Are there any security concerns that I should address?
  
 Thank you for any help.
 Take Care.
  
  
  
 


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



RE: image upload

2005-03-15 Thread Allistair Crossley
Yes I would say so, we use JCFU for loads of image and document uploads as it 
fronts the CMS.

 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED]
 Sent: 15 March 2005 17:11
 To: 'Tomcat Users List'
 Subject: RE: image upload
 
 
 I think most people are moving to the Jakarta Commons File Upload jar.
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Shannon Scott [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 15, 2005 10:07 AM
  To: tomcat-user@jakarta.apache.org
  Subject: image upload
  
  I have been preparing to write a servlet to handle image uploads.
  It looks like most people are using the latest 
 cos[date].jar file from
  http://www.servlets.com/cos/index.html
  Is this still the recommended method?
  Are there any security concerns that I should address?
   
  Thank you for any help.
  Take Care.
   
   
   
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Access denied with Apache + Tomcat config

2005-03-15 Thread Tony Stocker
Hello All,

I have searched the archives but have been unable to find a solution
to my problem.

I am integrating Apache 2.0.52 with Tomcat 5.0.28 using mod_jk 1.2.8
(compiled from source).  My client wants to continue using Apache as
the web server due to security and ease of configuration issues, so
using Tomcat as the web server is *not* an option.

The configuration appears to be good, and I can load a page such as
loading {server}/servelets-examples.  However I get 500 Interal
Server Error whenever I try to launch any of the jsp files.  There is
no indication of error in the CATALINA/logs files.  The only
indication in the Apache log files (error_log) occurs when attempting
to load the initial index.jsp page of a context:
[Tue Mar 15 16:10:23 2005] [error] [client xxx.xxx.xxx.xxx] client
denied by server configuration: index.jsp

I have checked my httpd.conf file and the
CATALINA/conf/auto/mod_jk.conf file but can find no reason why access
to the *jsp is denied.

I can include full versions of my various files, but for the sake of
space I'm only going to include snippets here:

[Apache httpd.conf]
LoadModule jk_module modules/mod_jk.so
...
Include /usr/local/tomcat/conf/auto/mod_jk.conf

[Tomcat conf/auto/mod_jk.conf]
JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
...
 machine2.sample.com:/servlets-examples 

# Static files 
Alias /servlets-examples
/usr/local/jakarta-tomcat-5.0.28/webapps/servlets-examples

Directory /usr/local/jakarta-tomcat-5.0.28/webapps/servlets-examples
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /servlets-examples/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /servlets-examples/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /servlets-examples/jsp/security/protected/j_security_check  ajp13
JkMount /servlets-examples/servlet/HelloWorldExample  ajp13
JkMount /servlets-examples/servlet/SessionExample  ajp13
JkMount /servlets-examples/servlet/RequestHeaderExample  ajp13
JkMount /servlets-examples/servlet/RequestParamExample  ajp13
JkMount /servlets-examples/servlet/CookieExample  ajp13
JkMount /servlets-examples/*.jspx  ajp13
JkMount /servlets-examples/CompressionTest  ajp13
JkMount /servlets-examples/*.jsp  ajp13
JkMount /servlets-examples/servlet/RequestInfoExample/*  ajp13

[Tomcat server.xml]
Server port=8005 shutdown=SHUTDOWN debug=0
Listener className=org.apache.jk.config.ApacheConfig
   modJk=/usr/local/apache/modules/mod_jk.so
 /
...
Host name=machine2.example.com debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Listener className=org.apache.jk.config.ApacheConfig
append=true forwardAll=false
modJk=/usr/local/apache/modules/mod_jk.so
/

Help greatly appreciated.

Tony

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



{OT] Re: Jumping in and out of JSP

2005-03-15 Thread Jason Bainbridge
On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:
 Is it possible to do something like the following?  I have as much code
 as I want in Java classes.  This is just to make modifying the UI
 easier.
 
 %!
 public String test() {
 %
 test2
 %!
 }
 %
 %=test()%

Yes it is and one of the reaons using JSP's instead of just Servlets
is attractive.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



RE: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Charles P. Killmer
Maybe I wasn't clear.  The code that I pasted below is throwing all
sorts of errors.  Assuming that something like this can be done.  Why
does my code throw errors?

Thanks
Charles 

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:
 Is it possible to do something like the following?  I have as much 
 code as I want in Java classes.  This is just to make modifying the UI

 easier.
 
 %!
 public String test() {
 %
 test2
 %!
 }
 %
 %=test()%

Yes it is and one of the reaons using JSP's instead of just Servlets is
attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Jason Bainbridge
On Tue, 15 Mar 2005 12:13:53 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:
 Maybe I wasn't clear.  The code that I pasted below is throwing all
 sorts of errors.  Assuming that something like this can be done.  Why
 does my code throw errors?

Obvious question... but what errors? On closer inspection your code
doesn't look right and I can't exatly see what you are trying to do so
try reading through some tutorials like
http://java.sun.com/products/jsp/html/jspbasics.fm3.html first and
then come back with some more pointed questions.

Cheers,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Tim Funk
You can't mix:
%!
stuff with open brace {
%
JSP CODE
%!
 } closeing brace here
%
Anything in %!% are class level declarations which live outside the 
jspService() method.  See the generated java to see what i mean.

-Tim
Charles P. Killmer wrote:
Maybe I wasn't clear.  The code that I pasted below is throwing all
sorts of errors.  Assuming that something like this can be done.  Why
does my code throw errors?
Thanks
Charles 

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:
Is it possible to do something like the following?  I have as much 
code as I want in Java classes.  This is just to make modifying the UI

easier.
%!
public String test() {
%
test2
%!
}
%
%=test()%

Yes it is and one of the reaons using JSP's instead of just Servlets is
attractive.
Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]

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


RE: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Charles P. Killmer
My goal in this is to have a function that returns a string.  But
instead of doing something like this:

%!
Public String test() {
return table border=\0\ cellspacing=\0\
cellpadding=\0\;
} 
%

I want to be able to jump out of JSP and just have the function echo it
to the screen without needing to escape the s to put it into a String
object.  

Charles

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:23 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't mix:
%!
stuff with open brace {
%
JSP CODE
%!
  } closeing brace here
%

Anything in %!% are class level declarations which live outside the
jspService() method.  See the generated java to see what i mean.

-Tim

Charles P. Killmer wrote:

 Maybe I wasn't clear.  The code that I pasted below is throwing all 
 sorts of errors.  Assuming that something like this can be done.  Why 
 does my code throw errors?
 
 Thanks
 Charles
 
 -Original Message-
 From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 15, 2005 11:51 AM
 To: Tomcat Users List
 Subject: {OT] Re: Jumping in and out of JSP
 
 On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer 
 [EMAIL PROTECTED] wrote:
 
Is it possible to do something like the following?  I have as much 
code as I want in Java classes.  This is just to make modifying the UI
 
 
easier.

%!
public String test() {
%
test2
%!
}
%
%=test()%
 
 
 Yes it is and one of the reaons using JSP's instead of just Servlets 
 is attractive.
 
 Regards,
 --
 Jason Bainbridge
 http://kde.org - [EMAIL PROTECTED]
 Personal Site - http://jasonbainbridge.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]
 
 
 

-
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: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Tim Funk
You can't do that. The jsp spec forbids it.
-Tim
Charles P. Killmer wrote:
My goal in this is to have a function that returns a string.  But
instead of doing something like this:
%!
Public String test() {
	return table border=\0\ cellspacing=\0\
cellpadding=\0\;
} 
%

I want to be able to jump out of JSP and just have the function echo it
to the screen without needing to escape the s to put it into a String
object.  

Charles
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:23 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't mix:
%!
stuff with open brace {
%
JSP CODE
%!
  } closeing brace here
%
Anything in %!% are class level declarations which live outside the
jspService() method.  See the generated java to see what i mean.
-Tim
Charles P. Killmer wrote:

Maybe I wasn't clear.  The code that I pasted below is throwing all 
sorts of errors.  Assuming that something like this can be done.  Why 
does my code throw errors?

Thanks
Charles
-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP
On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer 
[EMAIL PROTECTED] wrote:


Is it possible to do something like the following?  I have as much 
code as I want in Java classes.  This is just to make modifying the UI

easier.
%!
public String test() {
%
test2
%!
}
%
%=test()%

Yes it is and one of the reaons using JSP's instead of just Servlets 
is attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]


-
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: Failing a JK Worker thread

2005-03-15 Thread Dan Thiffault
I didn't hear back from any one so I looked through the code. I 
couldn't find any sign of code that would provide this functionality, 
so I added the following before line 605 of jk_ajp_common.c.  I 
recompiled and it seems to be working as intended so far.

if (d-status=500) {
jk_log(l, JK_LOG_ERROR,
Tomcat server returned status=%d,d-status);
JK_TRACE_EXIT(l);
return JK_FALSE;
}
I may end up using a case statement and preventing apache from trying 
the next worker on bad request or something like that.  Hope this helps 
some one else too.

-Dan Thiffault
On Mar 13, 2005, at 12:01 PM, Dan Thiffault wrote:
I am running apache web server 2.0.49 connected to tomcat 5.0.28 using 
the jk connector version 1.2.8.  From my understanding, if I set the 
reply_timeout property  of an ajpv13 worker, once the reply_timeout 
elapses for a particular request to a worker, apache web server will 
make a new request to the next worker in the group.

Is there any way from within the webapp that is being contacted to 
induce a failure other than not returning before the reply_timeout? For 
instance, can you return an HTTP error message from tomcat that would 
cause web server to retry the request to the next worker in the group 
(assuming full recovery mode)?

Thanks for any suggestions
-Dan Thiffault
-
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]


where serialized session objects stored?

2005-03-15 Thread Mark
Hi,

How can I find out where session serialized objects get stored and
how can I force _not_ to load session serialized objects ( I need it
when a new version of web application get deployed)



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



issue with redeploying war file

2005-03-15 Thread Mark
Hi there,

I find out really strange that when I copied over a new .war file I
cannot see my changes. Here what I've done:
$./shutdown.sh
$cp ~/my.war webapps
$./startup.sh

If I remove 'my' directory from 'webapps' everything works properly
and new web app get deployed.

Is there any way to enforce recreation of exploded web application if
.war file get changed.

Thanks,
Mark.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Configuration Problem in Tomcat for HTTPS

2005-03-15 Thread suryadevara dushyanth
Sanjeev,
How can i set the path for the keystore in server.xml?


--- Sanjeev Srivastava
[EMAIL PROTECTED] wrote:

 Hi Dushyanth,
 
 Have you created server.keystore, also are you
 specifing the right path in server.xml for the
 server.keystore. Check this, your problem will be
 solved.
 
 
 In case of any problem, do let me know...
 
 Cheers!,
 Sanjeev
 
 
  --- suryadevara dushyanth [EMAIL PROTECTED]
 wrote: 
  No I am not getting any errors in logs.
  
  
  --- Antony Paul [EMAIL PROTECTED] wrote:
   If you followed instruction in the tomcat docs
 the
   key will be stored
   in the users home directory. In windows it will
 be
   in c:\documents and
   settings\username\.keystore . By default
 Tomcat
   looks at this
   location for the key.
   Are you getting any error in logs ?.
   
   
   
   On Mon, 14 Mar 2005 05:09:27 -0800 (PST),
   suryadevara dushyanth
   [EMAIL PROTECTED] wrote:
I have modified the server.xml and removed the
comments for ssl connector on port 8443. I
   generated a
self signed certificate in the path of
  java_home.
   This
is the procedure given in
   
  
 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html.

After modifying the server.xml for testing I
  typed
   in
https:/Localhost:8443 which should give me the
   same
tomcat home page but it says page cannot be
   displayed.

Thanks
Dushyanth

--- Bill Barker [EMAIL PROTECTED] wrote:
 Urm, not really enough info here to help
 you. 
   Of
 course I'm assuming that
 you've already read

   
  
 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html.
  Beyond
 that, you can try setting your logging
  category
 (log4j/java.util.logging
 config) for 'org.apache.tomcat.net.jsse' to
   DEBUG to
 increase the number of
 messages.

 suryadevara dushyanth
 [EMAIL PROTECTED]
   wrote
 in message

   
  
 

news:[EMAIL PROTECTED]
  Hi,
  I am trying to configure my Tomcat with
  https
 support.
  I tried in two versions of tomcat.
 
  Tomcat 5
  I followed the process as given by the
 documentation
  but https is not working as i typed in the
  url
  https://localhost:8443; I am getting page
  not
  available.
 
  Tomcat 4.1.29
 
  I followed the process and modified the
   server.xml
  file by uncommenting the 8443 port. When i
   start
 my
  tomcat server it is shutting down and it
  does
   not
  start. I tried it through Tomcat Admin
 page
   but it
  says resource requested not available.
 
  Please help me out as I have to host my
 application in
  Tomcat using HTTPS port. And I am under a
   tight
  deadline for hosting this application.
 
  Thanks  Regards
  Dushyanth
 
 
 
  
 __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best
  spam
 protection around
  http://mail.yahoo.com





   
  
 

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



   
  __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
   protection around
http://mail.yahoo.com

   
  
 

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


   
   
   -- 
   rgds
   Antony Paul
   http://www.geocities.com/antonypaul24/
   
  
 

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   
   
  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
  protection around 
  http://mail.yahoo.com 
  
 

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




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



Re: Access denied with Apache + Tomcat config

2005-03-15 Thread Tony Stocker
All,

I believe that I found my problem, and for the sake of posterity I'm
posting it for the next poor fool who is forced to chase around the
web and through books looking for decent documentation.

When I set up Tomcat I copied the sample workers.properties file from
the JK source.  However it turns out that the sample file uses the
wrong worker name (compared to the name that is automatically
generated.)  In my case, the sample file was this:

worker.list=ajp13w

worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

However, as can be seen in my original post, the conf/auto/mod_jk.conf
file wants to use ajp13.

By changing the workers.properties file to 'ajp13' and NOT 'ajp13w'
everything started working.




On Tue, 15 Mar 2005 12:15:42 -0500, Tony Stocker [EMAIL PROTECTED] wrote:
 Hello All,
 
 I have searched the archives but have been unable to find a solution
 to my problem.

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



Re: Failing a JK Worker thread

2005-03-15 Thread Mladen Turk
Dan Thiffault wrote:
if (d-status=500) {
jk_log(l, JK_LOG_ERROR,
Tomcat server returned status=%d,d-status);
JK_TRACE_EXIT(l);
return JK_FALSE;
}
I may end up using a case statement and preventing apache from trying 
the next worker on bad request or something like that.  Hope this helps 
some one else too.

Yes, that is the problem, and that is why it wasn't implemented.
In case your application returns 500, then entire worker is marked
in error state and is unusable for consecutive requests until
recycled.
The solution would be to mark the url in error state, add url cache, and
then recycle the context path, but this would require lots of work,
add more complexity, with dubious usage.
I would suggest that you rewrite your application to offer high
availability. It would be much smarter then doing HTTP 500 tricks.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Charles P. Killmer
Does anyone know of a creative solution to this?  Or some way to achieve
what I am after?

Thanks

Charles 

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:33 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't do that. The jsp spec forbids it.

-Tim

Charles P. Killmer wrote:

 My goal in this is to have a function that returns a string.  But 
 instead of doing something like this:
 
 %!
 Public String test() {
   return table border=\0\ cellspacing=\0\
 cellpadding=\0\;
 }
 %
 
 I want to be able to jump out of JSP and just have the function echo 
 it to the screen without needing to escape the s to put it into a 
 String object.
 
 Charles
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 15, 2005 12:23 PM
 To: Tomcat Users List
 Subject: Re: {OT] Re: Jumping in and out of JSP
 
 You can't mix:
 %!
 stuff with open brace {
 %
 JSP CODE
 %!
   } closeing brace here
 %
 
 Anything in %!% are class level declarations which live outside the
 jspService() method.  See the generated java to see what i mean.
 
 -Tim
 
 Charles P. Killmer wrote:
 
 
Maybe I wasn't clear.  The code that I pasted below is throwing all 
sorts of errors.  Assuming that something like this can be done.  Why 
does my code throw errors?

Thanks
Charles

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer 
[EMAIL PROTECTED] wrote:


Is it possible to do something like the following?  I have as much 
code as I want in Java classes.  This is just to make modifying the 
UI


easier.

%!
public String test() {
%
test2
%!
}
%
%=test()%


Yes it is and one of the reaons using JSP's instead of just Servlets 
is attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]



 
 
 -
 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: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Ramu, Vinod
This sound very much similar to error handling. However,If you could
explain exactly about what you are trying to do then probably we could
suggest an alternative to get it done.

Vinod

-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 2:09 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP


Does anyone know of a creative solution to this?  Or some way to achieve
what I am after?

Thanks

Charles 

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:33 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't do that. The jsp spec forbids it.

-Tim

Charles P. Killmer wrote:

 My goal in this is to have a function that returns a string.  But
 instead of doing something like this:
 
 %!
 Public String test() {
   return table border=\0\ cellspacing=\0\
cellpadding=\0\;
 }
 %
 
 I want to be able to jump out of JSP and just have the function echo
 it to the screen without needing to escape the s to put it into a 
 String object.
 
 Charles
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 15, 2005 12:23 PM
 To: Tomcat Users List
 Subject: Re: {OT] Re: Jumping in and out of JSP
 
 You can't mix:
 %!
 stuff with open brace {
 %
 JSP CODE
 %!
   } closeing brace here
 %
 
 Anything in %!% are class level declarations which live outside the
 jspService() method.  See the generated java to see what i mean.
 
 -Tim
 
 Charles P. Killmer wrote:
 
 
Maybe I wasn't clear.  The code that I pasted below is throwing all
sorts of errors.  Assuming that something like this can be done.  Why 
does my code throw errors?

Thanks
Charles

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:


Is it possible to do something like the following?  I have as much
code as I want in Java classes.  This is just to make modifying the 
UI


easier.

%!
public String test() {
%
test2
%!
}
%
%=test()%


Yes it is and one of the reaons using JSP's instead of just Servlets
is attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]



 
 
 -
 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]



RE: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Charles P. Killmer
I am using a template.jsp file that calls a function defined in another
file.  Then every file, ie index.jsp, in the site defines that function
and includes the template which calls the function.  That way I only
have one file defining what the site looks like.  

Is there a better way to template a site.  I don't like the method of
including sections into each jsp file.  This makes adding new sections
to every page difficult.

Charles

-Original Message-
From: Ramu, Vinod [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 1:20 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP

This sound very much similar to error handling. However,If you could
explain exactly about what you are trying to do then probably we could
suggest an alternative to get it done.

Vinod

-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 2:09 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP


Does anyone know of a creative solution to this?  Or some way to achieve
what I am after?

Thanks

Charles 

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:33 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't do that. The jsp spec forbids it.

-Tim

Charles P. Killmer wrote:

 My goal in this is to have a function that returns a string.  But
 instead of doing something like this:
 
 %!
 Public String test() {
   return table border=\0\ cellspacing=\0\
cellpadding=\0\;
 }
 %
 
 I want to be able to jump out of JSP and just have the function echo
 it to the screen without needing to escape the s to put it into a 
 String object.
 
 Charles
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 15, 2005 12:23 PM
 To: Tomcat Users List
 Subject: Re: {OT] Re: Jumping in and out of JSP
 
 You can't mix:
 %!
 stuff with open brace {
 %
 JSP CODE
 %!
   } closeing brace here
 %
 
 Anything in %!% are class level declarations which live outside the
 jspService() method.  See the generated java to see what i mean.
 
 -Tim
 
 Charles P. Killmer wrote:
 
 
Maybe I wasn't clear.  The code that I pasted below is throwing all
sorts of errors.  Assuming that something like this can be done.  Why 
does my code throw errors?

Thanks
Charles

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer
[EMAIL PROTECTED] wrote:


Is it possible to do something like the following?  I have as much
code as I want in Java classes.  This is just to make modifying the 
UI


easier.

%!
public String test() {
%
test2
%!
}
%
%=test()%


Yes it is and one of the reaons using JSP's instead of just Servlets
is attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]



 
 
 -
 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]


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



Re: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread QM
On Tue, Mar 15, 2005 at 01:31:38PM -0600, Charles P. Killmer wrote:
: Is there a better way to template a site.  I don't like the method of
: including sections into each jsp file.  This makes adding new sections
: to every page difficult.

You could look into Tiles.  That may require Struts, but if not, it's
pretty much what you're after: it applies the GoF Decorator pattern to
web content.

If Tiles is indeed Struts-specific, you could look into other templating
frameworks (none come to mind, but they do exist).  

Finally, you can implement your own (Front Controller pattern) but given
the overhead that may be overkill if you use it just for site branding.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Hassan Schroeder
Charles P. Killmer wrote:
Does anyone know of a creative solution to this?  Or some way to achieve
what I am after?
Not to rain on your parade :-) but one of the main reasons for
using JSP (IMHO) is to *separate* markup and code.
Something like this wouldn't even be considered best practice
in /markup/, by current standards:
return table border=\0\ cellspacing=\0\ cellpadding=\0\;
Just table would do it, leave the other stuff to CSS...
(If you feel you really *must* return markup from a function, you
 could put it into a custom taglib, though, which would be a whole
 lot cleaner all the way around...)
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


RE: Failing a JK Worker thread

2005-03-15 Thread Guernsey, Byron \(GE Consumer Industrial\)

What is the situation where you find this useful?

Byron
 

-Original Message-
From: Dan Thiffault [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 1:41 PM
To: Tomcat Users List
Subject: Re: Failing a JK Worker thread

I didn't hear back from any one so I looked through the code. I couldn't
find any sign of code that would provide this functionality, so I added
the following before line 605 of jk_ajp_common.c.  I recompiled and it
seems to be working as intended so far.

if (d-status=500) {
jk_log(l, JK_LOG_ERROR,
Tomcat server returned status=%d,d-status);
JK_TRACE_EXIT(l);
return JK_FALSE;
}

I may end up using a case statement and preventing apache from trying
the next worker on bad request or something like that.  Hope this helps
some one else too.

-Dan Thiffault

On Mar 13, 2005, at 12:01 PM, Dan Thiffault wrote:

I am running apache web server 2.0.49 connected to tomcat 5.0.28 using
the jk connector version 1.2.8.  From my understanding, if I set the
reply_timeout property  of an ajpv13 worker, once the reply_timeout
elapses for a particular request to a worker, apache web server will
make a new request to the next worker in the group.

Is there any way from within the webapp that is being contacted to
induce a failure other than not returning before the reply_timeout? For
instance, can you return an HTTP error message from tomcat that would
cause web server to retry the request to the next worker in the group
(assuming full recovery mode)?

Thanks for any suggestions

-Dan Thiffault


-
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: Configuration Problem in Tomcat for HTTPS

2005-03-15 Thread Sanjeev Srivastava
Dushyanth!

 Have you created server.keystore using
keytool..? In server.xml check the code below and
provide the path to KeystoreFile and put the password.

keystoreFile=/cm/de/cfg/server.keystore
keystorePass=changeit 

Make sure the 443 or 8443 should be same in port 80
and port 8443


Connector
className=org.apache.catalina.connector.http.HttpConnector
   port=443 minProcessors=5
maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0 scheme=https
secure=true
  Factory
className=org.apache.catalina.net.SSLServerSocketFactory
  keystoreFile=/cm/de/cfg/server.keystore
keystorePass=changeit 



   clientAuth=false protocol=TLS/
/Connector




Cheers!
Sanjeev
 --- suryadevara dushyanth [EMAIL PROTECTED]
wrote: 
 Sanjeev,
 How can i set the path for the keystore in
 server.xml?
 
 
 --- Sanjeev Srivastava
 [EMAIL PROTECTED] wrote:
 
  Hi Dushyanth,
  
  Have you created server.keystore, also are you
  specifing the right path in server.xml for the
  server.keystore. Check this, your problem will be
  solved.
  
  
  In case of any problem, do let me know...
  
  Cheers!,
  Sanjeev
  
  
   --- suryadevara dushyanth [EMAIL PROTECTED]
  wrote: 
   No I am not getting any errors in logs.
   
   
   --- Antony Paul [EMAIL PROTECTED] wrote:
If you followed instruction in the tomcat docs
  the
key will be stored
in the users home directory. In windows it
 will
  be
in c:\documents and
settings\username\.keystore . By default
  Tomcat
looks at this
location for the key.
Are you getting any error in logs ?.



On Mon, 14 Mar 2005 05:09:27 -0800 (PST),
suryadevara dushyanth
[EMAIL PROTECTED] wrote:
 I have modified the server.xml and removed
 the
 comments for ssl connector on port 8443. I
generated a
 self signed certificate in the path of
   java_home.
This
 is the procedure given in

   
  
 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html.
 
 After modifying the server.xml for testing I
   typed
in
 https:/Localhost:8443 which should give me
 the
same
 tomcat home page but it says page cannot be
displayed.
 
 Thanks
 Dushyanth
 
 --- Bill Barker [EMAIL PROTECTED]
 wrote:
  Urm, not really enough info here to help
  you. 
Of
  course I'm assuming that
  you've already read
 

   
  
 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html.
   Beyond
  that, you can try setting your logging
   category
  (log4j/java.util.logging
  config) for 'org.apache.tomcat.net.jsse'
 to
DEBUG to
  increase the number of
  messages.
 
  suryadevara dushyanth
  [EMAIL PROTECTED]
wrote
  in message
 

   
  
 

news:[EMAIL PROTECTED]
   Hi,
   I am trying to configure my Tomcat with
   https
  support.
   I tried in two versions of tomcat.
  
   Tomcat 5
   I followed the process as given by the
  documentation
   but https is not working as i typed in
 the
   url
   https://localhost:8443; I am getting
 page
   not
   available.
  
   Tomcat 4.1.29
  
   I followed the process and modified the
server.xml
   file by uncommenting the 8443 port. When
 i
start
  my
   tomcat server it is shutting down and it
   does
not
   start. I tried it through Tomcat Admin
  page
but it
   says resource requested not available.
  
   Please help me out as I have to host my
  application in
   Tomcat using HTTPS port. And I am under
 a
tight
   deadline for hosting this application.
  
   Thanks  Regards
   Dushyanth
  
  
  
   
  __
   Do You Yahoo!?
   Tired of spam?  Yahoo! Mail has the best
   spam
  protection around
   http://mail.yahoo.com
 
 
 
 
 

   
  
 

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

  
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best
 spam
protection around
 http://mail.yahoo.com
 

   
  
 

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


-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

 
=== message truncated === 

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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

Jk1 jkstatus?

2005-03-15 Thread Guernsey, Byron \(GE Consumer Industrial\)

So with JK 1.2.8, is there any equivilent method of finding the data in
the jkstatus scoreboard from mod_jk2??

I understand jk2 is no longer the choice module for Apache 2.0.x. Funny,
when we first upgraded to Apache 2, the official line was that mod_jk1
should not be used with Apache 2, and we needed to get with the program
and move to the refactored jk2- once we did, jk2 was no longer supported
and considered flaky- meanwhile on the Apache 2 developers list there
continues to be threads asking why people still use Apache 1.3 and
aren't upgrading to 2.0, or may even be downgrading in some cases from 2
back to 1.3- I think its partly because things like the jkX confusion.

So now we are running on an unsupported platform where at any time a
patch could create problems with mod_jk2 with no resolution except to
fix it ourselves, and sure ajp13_proxy is coming, but we won't be first
in line with apache 2.2 after playing musical chairs with jk1/jk2.

So what other things besides the scoreboard will I have to live without
when downgrading back to JK1?

Byron


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



RE: where serialized session objects stored?

2005-03-15 Thread Fenderbosch, Eric
You can find that info here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/manager.html

The easy way to disable saving of sessions is to add this to you webapp xml 
under conf/Catalina/localhost

Manager className=org.apache.catalina.session.StandardManager pathname=/

For example, here's the start of mine:
?xml version=1.0 encoding=utf-8?
Context docBase=bazaar path=/bazaar 
workDir=work\Catalina\localhost\bazaar
  Manager className=org.apache.catalina.session.StandardManager pathname=/

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 1:45 PM
To: tomcat-user@jakarta.apache.org
Subject: where serialized session objects stored?


Hi,

How can I find out where session serialized objects get stored and
how can I force _not_ to load session serialized objects ( I need it
when a new version of web application get deployed)



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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 5.5.7+JRockit = windows service won't start

2005-03-15 Thread BB Commish
From: Caldarale, Charles R [EMAIL PROTECTED]

By definition _all_ -X parameters are non-standard, but there are quite a 
few you simply can't avoid using (-Xmx being the obvious example).  It 
would seem like JRockit took the wrong turn here, since -Xrs has been used 
to reduce JVM signal usage for many, many years.

As someone else suggested, why don't you simply edit the registry entry 
generated by the installer and change the -Xrs to -Xnohup?

I acknowledge that all -X parameters are non-standard and would agree that 
JRockit seems to have made an odd choice in not supporting -Xrs. But having 
said that, I still think it should have remained a parameter to be 
explicitly set when calling the installer (seems to have changed to 
hard-coded around 5.0.22 or so?).

With regards to the registry, the installer does not appear to create an 
entry that explicitly defines the -Xrs parameter. If it did it would be an 
easy change as has been suggested. The ...ParametersJavaOptions entry 
defines the various -D parameters being used but does not define -Xrs. I 
tried adding -Xnohup to this entry but no change in results.

(sorry if this message double-posts)

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


Tomcat 5.028 with Apache 2.053 on different machines

2005-03-15 Thread Dan
Hi

I'm trying to setup Apache 2.053 on one machine, and Tomcat 5.028 on another.  
I've put mod_jk.so in my modules directory.  Configured bother the httpd.conf 
and the workers.properties file on the apache machine.

Here are the lines 
httpd.conf
LoadModule jk_modulemodules/mod_jk.so
JkWorkersFile/httpd/conf/workers.properties
JkLogFile   /httpd/logs/mod_jk.log
JkLogLevel  info
JkLogStampFormat[%a %b %d %H:%M:%S %Y] 
JkOptions   +ForwardKeySize +ForwardURICompat 
-ForwardDirectories
JkRequestLogFormat   %w %V %T
JkMount  /shopping/*worker1

worker.properties
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host={tomcat machine hostname} --- edited for privacy.
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.recycle_timeout=300


The server.xml file is already set to listen on port 8009
Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /

As far as I know those are the only 2 items you need, but when I try to call 
anything from apache with the context /shopping ie 
http://{host}/shopping/index.jsp it tries to finding /shopping on the apache 
machine.  It's like it hasn't mounted the directory.  Do the web apps have to 
be on the apache machine?  I would like to keep all the Tomcat stuff on that 
machine, and away from the apache box.

The mod_jk.log file has this line in it.
[Tue Mar 15 02:23:33 2005] [info]  jk_handler::mod_jk.c (1883): Could not find 
a worker for worker name=worker1

there is no error in the error_log file
and access_log has this
GET /shopping/index.jsp HTTP/1.1 500 648

Am I missing something?


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



RE: {OT] Re: Jumping in and out of JSP

2005-03-15 Thread Ramu, Vinod
So, if I understood your requirement correctly, you want to execute a
single file, I,e JSP for every request. Probably after processing a
request you might wish to set an attribute to identify the response
view.

I would suggest to use standard jsp include tag, with this your template
JSP would look like

%-- put all your html/jsp code here (like the header, pictures
etc.)--%

jsp:include page=%=request.getParameter(mainPage)% /

%-- put all your html/jsp code here (like the footer etc.)--%

Keep in mind that this has a performance issue, as every request results
in runtime inclusion of output from the included JSP. 

Hope I was of some help.

Vinod


-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 2:32 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP


I am using a template.jsp file that calls a function defined in another
file.  Then every file, ie index.jsp, in the site defines that function
and includes the template which calls the function.  That way I only
have one file defining what the site looks like.  

Is there a better way to template a site.  I don't like the method of
including sections into each jsp file.  This makes adding new sections
to every page difficult.

Charles

-Original Message-
From: Ramu, Vinod [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 1:20 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP

This sound very much similar to error handling. However,If you could
explain exactly about what you are trying to do then probably we could
suggest an alternative to get it done.

Vinod

-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 2:09 PM
To: Tomcat Users List
Subject: RE: {OT] Re: Jumping in and out of JSP


Does anyone know of a creative solution to this?  Or some way to achieve
what I am after?

Thanks

Charles 

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:33 PM
To: Tomcat Users List
Subject: Re: {OT] Re: Jumping in and out of JSP

You can't do that. The jsp spec forbids it.

-Tim

Charles P. Killmer wrote:

 My goal in this is to have a function that returns a string.  But 
 instead of doing something like this:
 
 %!
 Public String test() {
   return table border=\0\ cellspacing=\0\
cellpadding=\0\;
 }
 %
 
 I want to be able to jump out of JSP and just have the function echo 
 it to the screen without needing to escape the s to put it into a 
 String object.
 
 Charles
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 15, 2005 12:23 PM
 To: Tomcat Users List
 Subject: Re: {OT] Re: Jumping in and out of JSP
 
 You can't mix:
 %!
 stuff with open brace {
 %
 JSP CODE
 %!
   } closeing brace here
 %
 
 Anything in %!% are class level declarations which live outside the
 jspService() method.  See the generated java to see what i mean.
 
 -Tim
 
 Charles P. Killmer wrote:
 
 
Maybe I wasn't clear.  The code that I pasted below is throwing all 
sorts of errors.  Assuming that something like this can be done.  Why 
does my code throw errors?

Thanks
Charles

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:51 AM
To: Tomcat Users List
Subject: {OT] Re: Jumping in and out of JSP

On Tue, 15 Mar 2005 10:27:21 -0600, Charles P. Killmer 
[EMAIL PROTECTED] wrote:


Is it possible to do something like the following?  I have as much 
code as I want in Java classes.  This is just to make modifying the 
UI


easier.

%!
public String test() {
%
test2
%!
}
%
%=test()%


Yes it is and one of the reaons using JSP's instead of just Servlets 
is attractive.

Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]



 
 
 -
 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 

RE: Tomcat 5.5.7+JRockit = windows service won't start

2005-03-15 Thread Caldarale, Charles R
 From: BB Commish [mailto:[EMAIL PROTECTED]
 Subject: RE: Tomcat 5.5.7+JRockit = windows service won't start
 
 With regards to the registry, the installer does not appear 
 to create an entry that explicitly defines the -Xrs parameter.

That's odd, since the -Xrs is in my registry entry, albeit this is with an 
older Tomcat level.  It's at the end of the parameter string, and normally 
won't display in regedit unless you've got a really wide screen or use the 
Modify menu.  Haven't tried installing 5.5.7 as a service yet.

 - Chuck


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

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



Re: Jk1 jkstatus?

2005-03-15 Thread Carlos Cajina
Good afternoon Byron.
There is a way in JK to check the status of your workers and even configure 
them to some degree. It requires pretty much the same setup as in JK2; for 
details about this and other VERY useful info on putting Apache and Tomcat 
together see this webinar: 
https://jboss.webex.com/jboss/onstage/tool/record/viewrecording1.php?EventID=136098785.

Regards,
Carlos
* Be adbvised that in order to view the webinar you need to install an 
ActiveX control in your IExplorer.

- Original Message - 
From: Guernsey, Byron (GE Consumer  Industrial) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Tuesday, March 15, 2005 2:03 PM
Subject: Jk1 jkstatus?


So with JK 1.2.8, is there any equivilent method of finding the data in
the jkstatus scoreboard from mod_jk2??
I understand jk2 is no longer the choice module for Apache 2.0.x. Funny,
when we first upgraded to Apache 2, the official line was that mod_jk1
should not be used with Apache 2, and we needed to get with the program
and move to the refactored jk2- once we did, jk2 was no longer supported
and considered flaky- meanwhile on the Apache 2 developers list there
continues to be threads asking why people still use Apache 1.3 and
aren't upgrading to 2.0, or may even be downgrading in some cases from 2
back to 1.3- I think its partly because things like the jkX confusion.
So now we are running on an unsupported platform where at any time a
patch could create problems with mod_jk2 with no resolution except to
fix it ourselves, and sure ajp13_proxy is coming, but we won't be first
in line with apache 2.2 after playing musical chairs with jk1/jk2.
So what other things besides the scoreboard will I have to live without
when downgrading back to JK1?
Byron
-
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: Failing a JK Worker thread

2005-03-15 Thread Dan Thiffault
We have an application running as a webapp which requires legacy 
systems and network resources which are not fault-tolerant.  Luckily 
these resources are stateless. So we have replicated these resources so 
that one is available per tomcat instance.  When we attempt to use one 
of these resources from within the webapp and it fails, we need a way 
to try the next pair (tomcat   legacy) in the group.  This will allow 
us to provide a balanced  fault-tolerant service with a webapp 
interface.  Since the tomcat instance is responding and functioning, 
the reply_timeout was not met so apache webserver considered the 
request a success.  Providing a application error from tomcat (maybe a 
503 or 401 instead of 500) seemed like the rightest way to do it.

I see a few other options:
1. Put a layer on top of apache that tests the response and makes a new 
request.  This doesn't buy us anything and circumvents the use of jk
2. (some how/maigcally) Send an out of process message from tomcat back 
to apache that the resource is down.
3. Modify AJP to handle this error (this may already have a mechanism 
that I missed)

Does any one have any other suggestions for ensuring reliability when 
there is a 3rd party piece of hardware/software which your webapp 
relies on that has no fault-tolerance of its own?

Thanks for any suggestions,
Dan
On Mar 15, 2005, at 2:50 PM, Guernsey, Byron ((GE Consumer  
Industrial)) wrote:

What is the situation where you find this useful?
Byron
-Original Message-
From: Dan Thiffault [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 1:41 PM
To: Tomcat Users List
Subject: Re: Failing a JK Worker thread
I didn't hear back from any one so I looked through the code. I couldn't
find any sign of code that would provide this functionality, so I added
the following before line 605 of jk_ajp_common.c.  I recompiled and it
seems to be working as intended so far.
if (d-status=500) {
jk_log(l, JK_LOG_ERROR,
Tomcat server returned status=%d,d-status);
JK_TRACE_EXIT(l);
return JK_FALSE;
}
I may end up using a case statement and preventing apache from trying
the next worker on bad request or something like that.  Hope this helps
some one else too.
-Dan Thiffault
On Mar 13, 2005, at 12:01 PM, Dan Thiffault wrote:
I am running apache web server 2.0.49 connected to tomcat 5.0.28 using
the jk connector version 1.2.8.  From my understanding, if I set the
reply_timeout property  of an ajpv13 worker, once the reply_timeout
elapses for a particular request to a worker, apache web server will
make a new request to the next worker in the group.
Is there any way from within the webapp that is being contacted to
induce a failure other than not returning before the reply_timeout? For
instance, can you return an HTTP error message from tomcat that would
cause web server to retry the request to the next worker in the group
(assuming full recovery mode)?
Thanks for any suggestions
-Dan Thiffault
-
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]


Installation Issues - AIX 5.2

2005-03-15 Thread Bob Wyatt
I've attempted to install tomcat 5.0.28 from source on an AIX 5.2 system
without internet access. When running ant, cvs fails.

So I downloaded and installed the binaries, but I get http 500 errors when
running a javascript for secure login. The vendor supplying the script feels
that tomcat does not know anything about the jdk (1.4.2) installed, despite
JAVA_HOME being defined.

I'd prefer to build from the source files (to resolve any issues from the
binaries being built elsewhere), but I can't get past the errors...

I'm trying to do all of this remotely through a VPN, which unfortunately
won't let me connect at this time to acquire the output from ant. I'll post
that tomorrow, assuming I get connected.

Does anyone have any ideas, despite the sketchy details that I have
provided?

Regards,

Bob Wyatt



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



SSL Appliance and Tomcat5.0.30/CoyoteConnector

2005-03-15 Thread Randy Watler
We employ an SSL appliance in front of servers running Tomcat5 
stand-alone and wish to configure the CoyoteConnector as we have done 
previously with Tomcat4:

Connector className=org.apache.coyote.tomcat5.CoyoteConnector
  port=8543 minProcessors=16 maxProcessors=384
  enableLookups=false acceptCount=128 debug=0
  connectionTimeout=30 scheme=https secure=true
  disableUploadTimeout=true proxyName=localhost
  proxyPort=443/
However, since secure=true is being specified, 
Http11Protocol.checkSocketfactory() in Tomcat 5.0.30 is attempting to 
create a secure SSL ServerSocketFactory. Of course, this fails since 
other SSL configuration parameters are not present. Since we are behind 
and SSL appliance, we really want just an ordinary ServerSocketFactory 
to be used and request.isSecure() to return true within our web 
applications. As I noted above, a similar configuration used to work for 
us on Tomcat 4.1.

Short of implementing a custom SSLImplementation and configuring it 
using an imbedded Factory/ tag within the Connector definition, is 
there any way to force Tomcat 5.0/Http11Protocol to use a default 
ServerSocketFactory?

Randy Watler

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


Strange Tomcat Error

2005-03-15 Thread Larry Johnson
Hi all,

Recently I lost the hard drive on one of my production tomcat servers. I've
since reinstalled and setup the effected machine to mirror the configuration
of one of my other servers that I know to be working fine. I know for a fact
that my servlet code is fine and that the tomcat configuration I'm using is
valid as both were copied from another running server. However despite its
identical configuration, the repaired machine now freezes somewhere between
querying the database for data and the XSL transformation of the XML
generated by my servlets. No error messages are written to catalina.out, the
terminal or localhost.log and the server is unable to process additional
requests after this happens. Additionally, following the error tomcat will
not respond to the execution of shutdown.sh and it seems the only way I can
abort the process is by issuing a kill -9 command to the process number of
tomcat's jvm. 

Has anyone ever experienced anything like this before? And if so what did
you do to fix it.

Here's some information on my execution environment:

OS: Redhat Linux 9
Kernel: i686 2.4.20-28.9smp
Tomcat: 5.0.28
Database: Oracle 9i
JVM: 1.5.0_01

Thanks,

Larry


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



RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0

2005-03-15 Thread Fenderbosch, Eric
I just disabled the firewall and I'm still getting the same thing.  Connection 
refused.


-Original Message-
From:   Giuseppe Briotti [mailto:[EMAIL PROTECTED]
Sent:   Tue 3/15/2005 8:21 AM
To: tomcat-user@jakarta.apache.org
Cc: 
Subject:Re: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
 ==
 Date: Tue, 15 Mar 2005 08:12:07 -0500
 From: Fenderbosch, Eric [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Subject: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
 ==


Firewall of SP2 enabled?

G.



-
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: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0

2005-03-15 Thread Fenderbosch, Eric
I tried downloading the .tar.gz package and extracted the startup scripts to 
bin.  Starting with
catalina.bat run
or
cataline.bat start
works fine.

However,
catalina.bat jdpa start
simply returns to the command prompt.

Now I'm really confused...

-Original Message-
From:   Fenderbosch, Eric
Sent:   Tue 3/15/2005 10:18 PM
To: Tomcat Users List; tomcat-user@jakarta.apache.org
Cc: 
Subject:RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
I just disabled the firewall and I'm still getting the same thing.  Connection 
refused.


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