Weird Occurance

2004-01-02 Thread Riaan Oberholzer
Hi, I have Tomcat 4.1.29 running under Windows XP and
my application works fine. I have a user login, then a
user object is stored in the session. This object is
retrieved at the start of every servlet  jsp to check
if the user has access/rights to the servlet/jsp. I
also use the object for some display information,
that's why I chose this instead of a Realm.

In another environment, Linux with Tomcat 4.1.27, the
app seems to work fine, but just about every second
page the user object is lost from the session and the
user gets directed to the login page. That is of
course correct if the user has been idle too long, but
this is certainly not the case here. I don't
understand this. The user object is supposed to be
there! 

The Windows XP server is locally, the linux one
remotely. The linux also has a ZoneAlarm firewall
protecting it.

Does anyone have an idea why this is happening?

Thanks


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread Suneel
Hi 
since runing mod_jk is throwing me only jsp source instead of jsp..i am trying 
mod_jk2. Now when i start apache i get error ../native2/server/mod_jk2.c is not the 
correct version. So i got the source and compiled it using buildconf.sh and configure, 
but in my native2/server/apache2 there is no mod_jk2.so  my config is rh9,tomcat 
4.1.29  apache 2.0.48. At this point i want to take a shotgun and blow my comp. What 
is wrong here?

regards
suneel


5.0.16: Deploying to common/lib from WAR

2004-01-02 Thread Vegard Skjefstad
Hi,

Is it possible to have a file copied to the $TOMCAT_HOME/common/lib when a
WAR-file is automatically deployed on a running instance of the Tomcat 5.0
server? I need to have jdbc.jar in this directory to get connection pooling
to work. Or maybe someone can tell me how to get pooling to work without
having to dump jdbc.jar in the common/lib directory. Without the file in
that location I get this exception:

org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'com.mysql.jdbc.Driver', cause: com.mysql.jdbc.Driver

Thanks a lot in advance.

Best regards,
Vegard Skjefstad

--- -- -
Vegard Skjefstad, c0d3 /\/\0nk3y
Norwegian Broadcasting Corporation
Office:  +47 23 04 78 37
Cellular:+47 92 48 17 12
For further contact information, please visit
http://www.vegard.net/about/#contact

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



hi, its me

2004-01-02 Thread tomcat-user


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

configure tomcat manager with connector mod_jk2

2004-01-02 Thread Anthony Gray
Hi All,

I have multiple Virtual Hosts running from the same tomcat JVM (Tomcat 4, 
Apache 2 using the apache connector mod_jk2).  I am trying to enable the 
tomcat manager so that I can restart a single Vhost without having to 
restart the whole tomcat, however so far when I call the manager I just get 
a tomcat status 404 page saying that /manager/list is not available.  I call 
the manager using http://foo.bar/manager/list.

Can anyone help to provide me with an example of what should be put into the 
httpd.conf, workers2.properties and server.xml to get the manager to work ?

When I restart tomcat, I see the following in the tomcat logs :
**
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: HostConfig: Processing START
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: Deploying discovered web 
applications
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: Deploying web application 
directory manager
2004-01-02 20:05:56 StandardHost[test1.foo.bar]: Installing web application 
at context path /manager from URL file:/home/test/www/manager
2004-01-02 20:05:56 WebappLoader[/manager]: Deploying class repositories to 
work directory 
/usr/local/bin/jakarta-tomcat-4.1.24-LE-jdk14/work/Apache/test1.foo.bar/manager
2004-01-02 20:05:56 ContextConfig[/manager]: No Realm has been configured to 
authenticate against
2004-01-02 20:05:56 ContextConfig[/manager]: Marking this application 
unavailable due to previous error(s).
.
2004-01-02 20:05:56 StandardContext[/manager]: Context startup failed due to 
previous errors
**
When tomcat is running and I try the manager, I don't see anything noticible 
in the apache or tomcat logs.

This is an exampe of what I have done so far :

- I copied the tomcat/server/webapps/manager/ - /home/test/www/manager
- Modified the below files :
**
httpd.conf :
VirtualHost 10.0.0.1:80
   DocumentRoot /home/test/www
   ServerName test1.foo.bar
   CustomLog logs/test1_access_log combined
   ErrorLog logs/test1_error_log
   Location /manager
   JkUriSet worker ajp13:localhost:8009
   /Location
   Location /*.jsp
   JkUriSet worker ajp13:localhost:8009
   /Location
/VirtualHost
**
workers2.properties :
[uri:test1.foo.bar/*.jsp]
worker=ajp13:localhost:8009
[uri:test1.foo.bar/manager]
worker=ajp13:localhost:8009
**
server.xml :
Server port=8005 shutdown=SHUTDOWN debug=0
 !-- Define an Apache-Connector Service --
!-- Global JNDI resources --
 GlobalNamingResources
   !-- Test entry for demonstration purposes --
   Environment name=simpleValue type=java.lang.Integer value=30/
   !-- Editable user database that can also be used by
   UserDatabaseRealm to authenticate users --
   Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
   /Resource
   ResourceParams name=UserDatabase
 parameter
   namefactory/name
   valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
 /parameter
parameter
   namepathname/name
   valueconf/tomcat-users.xml/value
 /parameter
   /ResourceParams
 /GlobalNamingResources

Service name=Tomcat-Apache

  !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=2
  useURIValidationHack=false
  
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

   Engine name=Apache defaultHost=test1.foo.bar debug=0

 Logger className=org.apache.catalina.logger.FileLogger
 prefix=apache_log. suffix=.txt
 timestamp=true/
!-- Access log processes all requests for this virtual host. --
 Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=localhost_access_log. 
suffix=.txt
pattern=common resolveHosts=false/

   Host name=test1.foo.bar debug=1
appBase=/home/test/www
  unpackWARs=true autoDeploy=true
   Aliaslocalhost/Alias
   Aliaswww/Alias
   Alias10.0.0.1/Alias
   Context path=/manager/ docBase=/home/test/www/manager/ 
debu
g=1/

   Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=test1_access_log. suffix=.txt
pattern=common resolveHosts=false/
   /Host
/Engine
 /Service

/Server
**
tomcat-users.xml :
?xml version='1.0' encoding='utf-8'?
tomcat-users
 role rolename=tomcat/
 role rolename=role1/
 role rolename=manager/
 user username=admin password=secret roles=manager/
 user username=tomcat password=tomcat roles=tomcat/
 user username=both password=tomcat 

what if response.sendRedirect(null)

2004-01-02 Thread Antony Paul
Hi,
What will happend if response.sendRedirect(null) is called. It is giving
a directory listing. No error is thrown. Is this as per the spec ? I am
using Tomcat 4.1.27 with JDK 1.3.1

rgds
Antony Paul

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



Exception in RealmBase

2004-01-02 Thread Mark Woon
Hi all,

I have a custom Realm implementation that extends 
org.apache.catalina.realm.RealmBase.  It used to work in 4.x, but in 
5.0.16, I'm getting the following exception on startup:

21:17:29,719 ERROR RealmBase:1092 - Can't register null
java.lang.NullPointerException
  at org.apache.catalina.realm.RealmBase.init(RealmBase.java:1088)
  at org.apache.catalina.realm.RealmBase.start(RealmBase.java:769)
  at 
org.pharmgen.webapp.tomcat.PharmGenRealmAdapter.setRealm(PharmGenRealmAdapter.java:34)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at 
org.securityfilter.config.SecurityConfig.addRealm(SecurityConfig.java:216)
[snip]

I've taken a look at the source, and as far as I can tell, it's because 
the container is null.  What is responsible for providing the Realm the 
container it's in?  Is there some new bit of configuration I need to do 
in Tomcat 5?  I'm also surprised that there's this bit of code in 
RealmBase.init():

if( container== null ) {
// do some stuff, and don't set container or oname
}
if( oname==null ) {
try {
  ContainerBase cb=(ContainerBase)container;
  //  NPE HAPPENS HERE  
  oname=new ObjectName(cb.getDomain()+:type=Realm + 
cb.getContainerSuffix());
  // some other stuff
} catch (Throwable e) {
  log.error( Can't register  + oname, e);
}
}

I don't have any experience with JMX, so maybe it's doing something 
behind the scenes, but if not, that bit of code looks wrong.  While this 
seems to be an error that can be safely ignored if I'm not using JMX, 
it's still a little distressing.

Any help would be appreciated.

Thanks,
-Mark


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


Logging and Tomcat 5.0.16

2004-01-02 Thread Mark Woon
Hi all,

I apologize in advance for starting another logging thread, but I have 
some questions that no amount of googling and archive surfing can seem 
to answer:

1) Is there a reason why the startup.sh script that comes bundled with
Tomcat 5.0.16 adds commons-logging-api.jar to the CLASSPATH?  As far as
I can tell, it's the only script that uses it.
2) Is there a recommended way to control what gets spewed into 
catalina.out?  The fact that all the messages I'm getting have an INFO 
tag would indicate that this should be possible. 

So far, the best I can come up with is to add commons-logging.jar and 
log4j.jar into /server/libs and adding in a log4j.properties in 
/server/classes.  This way I can still (theoretically) use 
commons-logging/log4j in my webapps' WEB-INF/lib without having to deal 
with classloader problems.

I say theoretically because when I reload my webapp, log4j complains 
that it cannot find any appenders, so there's still something screwy 
going on that I haven't figure out yet.

The other problem I have with this approach is that it seems to 
completely ignore the parameters in server.xml that purport to control 
the Logger's verbosity.

3) In any case, why doesn't Tomcat just come with commons-logging.jar 
and log4j.jar bundled in /server/libs?

4) Is there a FAQ or HOWTO on recommended approaches to handling logging 
in Tomcat somewhere?

Thanks,
-Mark


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


Re: what if response.sendRedirect(null)

2004-01-02 Thread Tim Funk
The spec doesn't dictate that the parameter to sendRedirect must be non-null. 
So the behavior probably varies by container. Other containers might throw NPE.

-Tim

Antony Paul wrote:
Hi,
What will happend if response.sendRedirect(null) is called. It is giving
a directory listing. No error is thrown. Is this as per the spec ? I am
using Tomcat 4.1.27 with JDK 1.3.1


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


adding timestamp to logs

2004-01-02 Thread Antony Paul
Hi,
I want to add a time stamp to Tomcat loggings. I am using JDK 1.3 and no
log4j. I want to add this to stderr.

rgds
Antony Paul

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



Re: Sudden IllegalStateException

2004-01-02 Thread Ben Souther
On Wednesday 31 December 2003 09:00 pm, Merrill Cornish wrote:
 Ben,

 I don't know if it's a good idea or not, but I separate the HTML stuff
 into the JSP pages and use the servlets solely for program logic.
It is a good idea. The MVC pattern is widely accepted as a best practice for 
server side java.  

 Therefore, my servlets never output content..  Instead they merely
 redirect to a JSP page which then contains only enough Java logic to
 collect the data it needs from session attributes.
Are you able to post your servlet/JSP code? If not on the list, you can send 
it to me personally.  I've been working on a fairly large app that uses the 
request dispatcher extensivly without running into this problem.  I'd be 
interested to see what your program is doing.




 Merrill

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

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread George Shafik
Yep,

without going into too much detail IT DOESN'T WORK ITS REALLY BROKE.

Over the past 4 weeks I've made 8 REAL attempts, spent around 30 hours of my time and 
short of writing the whole thing myself I went with mod_webapp.so, tomcat-warp.jar for 
Apache 1.3.29 Tomcat 4.1.29. The build is stuffed and its not the version of libtool 
or anything else something is broke when you try to build on RH9 exactly what is up to 
the many lib, builds scripts between Ant and Make - if I have enough time over the 
next decade I may be able to solve it however apache 1.3.29 can talk to Tomcat 4.1.29 
for now through webapp connector, 

Now if through some miracle someone out there has managed to REALLY build this on 
current vanilla install of RH9 (not enterprise) I want a copy of mod_jk2.so file,  
httpd.conf, serer.xml, copy of the SOURCE jakarta-tomcat -connector used, a README 
file with exactly what you did and the best part for last I want a dump of your system 
output from the build of the mod_jk2.so in order to make me a believer. Keep in mind I 
want to build from source no binaries and Apache 2.0.48 connecting to Tomcat 4.1.29 
through mod_jk2.so - all built from source just in case you mist my point. 

Greatest apologies but like many out there I'm very frustrate when stuff that I really 
don't want to know much about stops working because of compromises in testing on the 
various platforms or the Readme files aren't updated along side the respective release 
even though this is after all open source.

Cheers,
George


Excellence is not an act, but a habit.
- Aristotle -







- Original Message - 
From: Suneel [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, January 02, 2004 6:24 PM
Subject: MOD_JK2 also Fails [EMAIL PROTECTED]


Hi 
since runing mod_jk is throwing me only jsp source instead of jsp..i am trying 
mod_jk2. Now when i start apache i get error ../native2/server/mod_jk2.c is not the 
correct version. So i got the source and compiled it using buildconf.sh and configure, 
but in my native2/server/apache2 there is no mod_jk2.so  my config is rh9,tomcat 
4.1.29  apache 2.0.48. At this point i want to take a shotgun and blow my comp. What 
is wrong here?

regards
suneel


Re: Weird Occurance

2004-01-02 Thread QM
: In another environment, Linux with Tomcat 4.1.27, the
: app seems to work fine, but just about every second
: page the user object is lost from the session and the
: user gets directed to the login page.

It's a long shot, but perhaps you're losing session:
are cookies enabled on this browser?

Otherwise, you could play with context listeners to see exactly when the
user object is being dropped from the session.

-QM


-- 

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


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



Re: 5.0.16: Deploying to common/lib from WAR

2004-01-02 Thread Jacob Kjome
First, this would be non-standard behavior if Tomcat supported it.  Counting on 
it means being married to Tomcat.  Besides that, even if Tomcat did this, it 
wouldn't help.  The libraries in Tomcat's global lib directories are loaded 
upon server startup.  Any new library wouldn't be noticed until a server 
restart.

I assume the reason you need the driver in common/lib is to be able to use 
Tomcat's DBCP connection pooling.  Otherwise, if you use your own connection 
pooling that is not driven by Tomcat (and doesn't require two-way communication 
with libraries in common/lib), then you should be able to put it in your WEB-
INF/lib directory.  I think you are just going to have to deal with manually 
placing your jar in common/lib before application deployment.

I guess this is where the JBoss unified class loader might be advantagous, 
although it does cause its own problems, but that's another issue altogether.

Jake

Quoting Vegard Skjefstad [EMAIL PROTECTED]:

 Hi,
 
 Is it possible to have a file copied to the $TOMCAT_HOME/common/lib when a
 WAR-file is automatically deployed on a running instance of the Tomcat 5.0
 server? I need to have jdbc.jar in this directory to get connection pooling
 to work. Or maybe someone can tell me how to get pooling to work without
 having to dump jdbc.jar in the common/lib directory. Without the file in
 that location I get this exception:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
 'com.mysql.jdbc.Driver', cause: com.mysql.jdbc.Driver
 
 Thanks a lot in advance.
 
 Best regards,
 Vegard Skjefstad
 
 --- -- -
 Vegard Skjefstad, c0d3 /\/\0nk3y
 Norwegian Broadcasting Corporation
 Office:  +47 23 04 78 37
 Cellular:+47 92 48 17 12
 For further contact information, please visit
 http://www.vegard.net/about/#contact
 
 -
 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: Weird Occurance

2004-01-02 Thread Riaan Oberholzer
Thanks, that's a start.

Should cookies be enabled or not? I didn't do anything
in the application.



--- QM [EMAIL PROTECTED] wrote:
 : In another environment, Linux with Tomcat 4.1.27,
 the
 : app seems to work fine, but just about every
 second
 : page the user object is lost from the session and
 the
 : user gets directed to the login page.
 
 It's a long shot, but perhaps you're losing session:
 are cookies enabled on this browser?
 
 Otherwise, you could play with context listeners to
 see exactly when the
 user object is being dropped from the session.
 
 -QM
 
 
 -- 
 
 software  -- http://www.brandxdev.net (C++ / Java /
 SSL)
 tech news -- http://www.RoarNetworX.com
 
 

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


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: Logging and Tomcat 5.0.16

2004-01-02 Thread Jacob Kjome

Put log4j-1.2.8.jar in common/lib and put log4j.properties or log4j.xml in 
common/classes.  Works fine for me and I still use Log4j in my webapps, each 
with their own logging that doesn't interfere with anything else.  This is 
achieve be either adding log4j.jar to WEB-INF/lib of each webapp and/or using a 
repository selector where I can have a single instance of Log4j, yet have all 
apps log in their own private logger repository.

Jake

Quoting Mark Woon [EMAIL PROTECTED]:

 Hi all,
 
 I apologize in advance for starting another logging thread, but I have
 some questions that no amount of googling and archive surfing can seem
 to answer:
 
 1) Is there a reason why the startup.sh script that comes bundled with
 Tomcat 5.0.16 adds commons-logging-api.jar to the CLASSPATH?  As far as
 I can tell, it's the only script that uses it.
 
 
 2) Is there a recommended way to control what gets spewed into
 catalina.out?  The fact that all the messages I'm getting have an INFO
 tag would indicate that this should be possible.
 
 So far, the best I can come up with is to add commons-logging.jar and
 log4j.jar into /server/libs and adding in a log4j.properties in
 /server/classes.  This way I can still (theoretically) use
 commons-logging/log4j in my webapps' WEB-INF/lib without having to deal
 with classloader problems.
 
 I say theoretically because when I reload my webapp, log4j complains
 that it cannot find any appenders, so there's still something screwy
 going on that I haven't figure out yet.
 
 The other problem I have with this approach is that it seems to
 completely ignore the parameters in server.xml that purport to control
 the Logger's verbosity.
 
 
 3) In any case, why doesn't Tomcat just come with commons-logging.jar
 and log4j.jar bundled in /server/libs?
 
 
 4) Is there a FAQ or HOWTO on recommended approaches to handling logging
 in Tomcat somewhere?
 
 
 Thanks,
 -Mark
 
 
 
 
 -
 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: multiuser tomcat environment

2004-01-02 Thread Tim Downey


 The main perpose of the server - a programming course,the
 students should develope their projects on it.
 Students probably should be able to do the folowing:
 [1] deploy/redeply/reload their applications
Using Tomcat as a stand-alone server, you can create a ~ directory for each
user in /etc/passwd. Add a Listener for UserConfig in the Host.
 [2] they should NOT be able to do the same for the
other students applications
The ~ directories have individual user access privileges.

 [3] they can't restart the server ,of course, since
 students don't have root access.
I am unfamiliar with creating a new manager, but it seems that you should
be able to write a servlet that can only be accessed by registered users.
This servlet will send stop/start for a particular user's web app directory.
It is possible to send messages to the manager via HTTP. Your servlet
will need to authenticate as the manager, and then send the correct HTTP
request.
Perhaps someone else has a slicker solution. I would love to hear it.

 So,using manager app is not appropriate - that way all the
 students will be able to manage all the application.
--
Tim Downey


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


Re: Weird Occurance

2004-01-02 Thread QM
: Should cookies be enabled or not? I didn't do anything
: in the application.

Containers use cookies to track sessions, with URL rewriting (keeping
the session ID in the URL) as a fallback.  I don't recall the exact
configuration directive but there's a way to force Tomcat to use cookies
only, so maybe that hit you. If you didn't set up tomcat yourself, I'd
talk to your sysadmin crew to see whether their default settings are a
little tight.

Again, it's a long shot... but your description hinted at session loss.
Since you ruled out session timeouts, cookies are the next logical step. 


The plus side here is that the app works in one place, not in another,
so you can use the differences between the two environments to narrow
the scope of your problem analysis.

-QM

--

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


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



MOD_JK

2004-01-02 Thread HARI OM
I am using Apache 2.0.47 + Tomcat 4.1.27 on SuSE 8.0 and am working on MOD_JK 
connector.
I created MOD_JK.SO (from source) and placed under MODULES dir under apache.

I made changes to following files:

My SERVER.XML file is:
--
Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
  modJk=/usr/local/apache2/modules/mod_jk.so jkDebug=info
  workersConfig=/usr/local/tomcat4/conf/jk/workers.properties
  jkLog=/usr/local/tomcat4/logs/mod_jk.log/

Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener 
debug=0/

 Service name=Tomcat-Standalone

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /

!-- Define an AJP 1.3 Connector on port 8009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/

Engine name=Standalone defaultHost=localhost debug=0
 Host name=my.domain.name debug=0 appBase=webapps unpackWARs=true
   autoDeploy=true
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true  
/

 Context path=/examples docBase=examples debug=0 reloadable=true 
crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_examples_log. suffix=.txt timestamp=true/
--

My HTTPD.CONF file shows:
--
ServerName my.domain.name:80
LoadModule jk_module modules/mod_jk.so
Include /usr/local/tomcat4/conf/auto/mod_jk.conf

 JkWorkersFile /usr/local/tomcat4/conf/jk/workers.properties
 JkLogFile /usr/local/apache2/logs/mod_jk.log
 JkLogLevel debug
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 JkMount /jk ajp13
 JkMount /jk/* ajp13
 JkMount /cocoon ajp13
 JkMount /cocoon/* ajp13
--

My auto-generated MOD_JK.CONF file is:
--
## Auto generated on Wed Dec 31 09:56:01 MST 2003##
IfModule !mod_jk.c
  LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
/IfModule

JkWorkersFile /usr/local/tomcat4/conf/jk/workers.properties
JkLogFile /usr/local/tomcat4/logs/mod_jk.log
JkLogLevel info

VirtualHost my.domain.name
ServerName my.domain.name
JkMount /admin ajp13
JkMount /admin/* ajp13
JkMount /webdav ajp13
JkMount /webdav/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /manager ajp13
JkMount /manager/* ajp13
/VirtualHost
--

My TOMCAT LOG file shows following:
--
Dec 31, 2003 9:56:35 AM org.apache.struts.util.PropertyMessageResources init
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Dec 31, 2003 9:56:35 AM org.apache.struts.util.PropertyMessageResources init
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', 
returnNull=true
Dec 31, 2003 9:56:37 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
--

Can anyone please HELP me out.? would appreciate that

HARI OM

I live in a very small house...
but my windows open to a big world...


Re: Sudden IllegalStateException

2004-01-02 Thread Merrill Cornish
Ben,

Yes, I can post the code, but now I'm not sure that will help.

Yesterday I tried my old standby debugging technique of commenting out 
virtually all of the code in the servlet.  It worked.  I then started 
uncommenting portions until it stopped working.  For a while, I thought 
I was winning.  I got it down to where if a call to one subroutine was 
commented out, it worked; but if the subroutine was called, the return 
would fail when it reached the sendRedirect() back in the servlet.  Then 
I noticed that SOMETIMES a call to the subroutine would not fail. [sigh...]

The subroutine in question does database access with no sendRedirect() 
or any other funny business.  Right now, I'm trying to further 
characterize the problem. 

I may still take you up on your offer of help (and thank you, by the 
way), but I need to do some work first.

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


Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread Oscar Carrillo
I've done mod_jk many times on RH9, but not mod_jk2.

My first suggestion would be to apply all updates before trying to compile 
anything, in particular:

glibc and all other related glibc packages
nptl-devel

I don't know why you would have gone with mod_webapp before going to 
mod_jk.

Check my page if you haven't already:
http://daydream.stanford.edu/tomcat/install_web_services.html

Oscar

On Sat, 3 Jan 2004, George Shafik wrote:

 Yep,
 
 without going into too much detail IT DOESN'T WORK ITS REALLY BROKE.
 
 Over the past 4 weeks I've made 8 REAL attempts, spent around 30 hours
 of my time and short of writing the whole thing myself I went with
 mod_webapp.so, tomcat-warp.jar for Apache 1.3.29 Tomcat 4.1.29. The
 build is stuffed and its not the version of libtool or anything else
 something is broke when you try to build on RH9 exactly what is up to
 the many lib, builds scripts between Ant and Make - if I have enough
 time over the next decade I may be able to solve it however apache
 1.3.29 can talk to Tomcat 4.1.29 for now through webapp connector,
 
 Now if through some miracle someone out there has managed to REALLY
 build this on current vanilla install of RH9 (not enterprise) I want a
 copy of mod_jk2.so file, httpd.conf, serer.xml, copy of the SOURCE
 jakarta-tomcat -connector used, a README file with exactly what you did
 and the best part for last I want a dump of your system output from the
 build of the mod_jk2.so in order to make me a believer. Keep in mind I
 want to build from source no binaries and Apache 2.0.48 connecting to
 Tomcat 4.1.29 through mod_jk2.so - all built from source just in case
 you mist my point.
 
 Greatest apologies but like many out there I'm very frustrate when stuff
 that I really don't want to know much about stops working because of
 compromises in testing on the various platforms or the Readme files
 aren't updated along side the respective release even though this is
 after all open source.
 
 Cheers,
 George
 
 
 Excellence is not an act, but a habit.
 - Aristotle -
 
 
 
 
 
 
 
 - Original Message - 
 From: Suneel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, January 02, 2004 6:24 PM
 Subject: MOD_JK2 also Fails [EMAIL PROTECTED]
 
 
 Hi 
 since runing mod_jk is throwing me only jsp source instead of jsp..i am trying 
 mod_jk2. Now when i start apache i get error ../native2/server/mod_jk2.c is not the 
 correct version. So i got the source and compiled it using buildconf.sh and 
 configure, but in my native2/server/apache2 there is no mod_jk2.so  my config is 
 rh9,tomcat 4.1.29  apache 2.0.48. At this point i want to take a shotgun and blow 
 my comp. What is wrong here?
 
 regards
 suneel
 


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



mod jk

2004-01-02 Thread FRANCOIS Dufour
ok i want to add mod jk to easy php
ive put the two module file in the/mod folder
and the two dll whit the other dll
sombody could give mee is working command line
so i could adapt them to my server
im on win xp home +jdk1.3.3_09 +easy php 1.6 that old in itself apache 1.3
the lease that i cant do is try whit you too make it work proprely for 
everyone
(command line for tomcat and apache)

[EMAIL PROTECTED]
crazy-wilys webmaster
_
MSN Search, le moteur de recherche qui pense comme vous !  
http://fr.ca.search.msn.com/

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


PDF display under Tomcat 4.1.29

2004-01-02 Thread Paul Meyers
When sending a dynamically created PDF file to a browser with content type
application/pdf, the browser displays a file save dialog box.

Under Tomcat versions 3.3.1 and 4.1.27, the PDF file is displayed using the
acrobat plugin.

Something changed between versions 4.1.27 and 4.1.29 in the way a file is
sent to a browser.  Seems as if the content type gets lost.  Configuration?
Security?

Paul M.


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



Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread Mark Eggers
George,

This has been discussed on the list before.  While you
can use a vanilla RedHat 9 install, some of the
libraries (apr, apr-util) are not quite where the make
file thinks they should be.

There are several solutions.

1. Build apache 2.0.48 from source.

a) Note that on RedHat, the SSL libraries and includes
are not where the configure file expects.

export LDFLAGS=-L/usr/kerberos/lib

should solve that problem.

b) After building and installing Apache from source,
you then will need to install Tomcat - the binaries
will do fine.

c) Finally, download
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

d) Uncompress it and extract the tar file.

e) cd to
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2

f) chmod u+x configure

g) Run configure with:

./configure
  --with-apxs2=apache-root-directory/bin/apxs \
  --with-tomcat41=tomcat-root-directory \
  --with-java-home=java-root-directory \
  --with-jni \
  --with-pcre

For example:

./configure --with-apxs2=/home/apache/bin/apxs \
  --with-tomcat41=/home/tomcat \
  --with-java-home=/usr/java \
  --with-jni \
  --with-pcre

h) Run make

i) The two .so files (mod_jk2.so and jkjni.so) will be
in:

jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2

j) Copy those to files to
apache-root-directory/modules with the proper
permissions.

k) Configure and restart

If you're using the default RedHat 9 installation, you
will probably have to tell configure where to find the
libraries.  Add the following to the ./configure
command.

--with-apr-lib=directory
--with-apr-include=directory

Please check the syntax by typing

./configure --help

2. If you do not want to approach this from source,
check out www.jpackage.org for RPMs of mod_jk and
mod_jk2.  I've not used these, so caveat emptor.

Once you get a connector built and installed, there
are several good resources for getting Apache and
Tomcat configured.

http://jakarta.apache.org/tomcat/faq/connectors.html
http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

HTH
/mde/
just my two cents . . . .

__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



JSP URL

2004-01-02 Thread Howard Watson
Does anyone have any idea why a JSP referenced by name in a url would return 
getRemoteUser = null and the same JSP referenced through DirectoryIndex in Apache2 
would return getRemoteUser = expected user name.

Example:
http://serverAddr/DisplayUser.jsp returns null

In Apache conf
DirectoryIndex DisplayUser.jsp

http://serverAddr/ returns DisplayUser.jsp with user name


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



SuddenIllegalStateException: Solved(?)

2004-01-02 Thread Merrill Cornish
Well--I think I've found the cause for my sudden IllegalStateException, 
although I'm still not sure why.

Because it was claiming an IllegalStateException, and it was pointing to 
the sendRedirect() statement, I assumed the sendRedirect() was the 
CAUSE. So--

I started probing the code by inserting

  response.sendRedirect(page_name);
  return;
By putting this pair of statements in various places, I was able to 
deduce that the problem was occurring in a subroutine that accessed the 
MySQL database.  Furthermore, if only the first part of the subroutine 
was executed (as it would be with an invalid login name), it worked, but 
if the full subroutine was executed (valid login name), it failed.

At that point, I noticed that if I clicked on the brower's Back Button, 
the sendRedirect() that I had suspected of being the culprit had 
actually worked.  H.  So, I tried simply inserting extra return 
statements in the code rather than the sendRedirect()/return shown 
above.  Lo and behold, I got a SQLException from the suspect subroutine 
I had been probing.

Shortly before the problem started occurring (remember the suddenly 
part of my message subject?), I had removed a certain field from the 
database table, but I was still asking JDBC to get() that field value.  
That, of course, was an error (MY error) and fully worthy of an 
exception, but the question was why did it cause the error it did.

I apears my error handling  needs some work.  I'm going to post a 
separate question about catch{} to try to find out what I'm doing wrong.

In the meantime, thanks to Howard and Ben for their offers of help.

Merrill

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


Re: SuddenIllegalStateException: Solved(?)

2004-01-02 Thread Howard Watson
Good Job! 

 [EMAIL PROTECTED] 01/02/04 11:44AM 
Well--I think I've found the cause for my sudden IllegalStateException, 
although I'm still not sure why.

Because it was claiming an IllegalStateException, and it was pointing to 
the sendRedirect() statement, I assumed the sendRedirect() was the 
CAUSE. So--

I started probing the code by inserting

   response.sendRedirect(page_name);
   return;

By putting this pair of statements in various places, I was able to 
deduce that the problem was occurring in a subroutine that accessed the 
MySQL database.  Furthermore, if only the first part of the subroutine 
was executed (as it would be with an invalid login name), it worked, but 
if the full subroutine was executed (valid login name), it failed.

At that point, I noticed that if I clicked on the brower's Back Button, 
the sendRedirect() that I had suspected of being the culprit had 
actually worked.  H.  So, I tried simply inserting extra return 
statements in the code rather than the sendRedirect()/return shown 
above.  Lo and behold, I got a SQLException from the suspect subroutine 
I had been probing.

Shortly before the problem started occurring (remember the suddenly 
part of my message subject?), I had removed a certain field from the 
database table, but I was still asking JDBC to get() that field value.  
That, of course, was an error (MY error) and fully worthy of an 
exception, but the question was why did it cause the error it did.

I apears my error handling  needs some work.  I'm going to post a 
separate question about catch{} to try to find out what I'm doing wrong.

In the meantime, thanks to Howard and Ben for their offers of help.

Merrill

-
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: JSP URL

2004-01-02 Thread Howard Watson
Apache2.0.48
Tomcat4.1.29
mod_jk1.2.5
jvm1.4.1_02a 

 [EMAIL PROTECTED] 01/02/04 11:34AM 
Does anyone have any idea why a JSP referenced by name in a url would return 
getRemoteUser = null and the same JSP referenced through DirectoryIndex in Apache2 
would return getRemoteUser = expected user name.

Example:
http://serverAddr/DisplayUser.jsp returns null

In Apache conf
DirectoryIndex DisplayUser.jsp

http://serverAddr/ returns DisplayUser.jsp with user name


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



How is catch{} code handled

2004-01-02 Thread Merrill Cornish
My sudden IllegalStateException problem turned out to be caused by my 
error handling technique, but I'm not sure why.

When I started this project (as a way or learning JSP), I have 
EVERYTHING in JSP pages, meaning that there was a lot of Java code in % 
... % sections of the JSP page.  I added an errorPage declaration to 
each of my JSP pages to divert all errors to my standard error handling 
page--and all was well.

Later, I decided to limit the JSP pages to HTML as much as possible and 
move all of the Java program logic into servlets.  I left the errorPage 
declarations in the JSP pages, although there wasn't much left there to 
throw an exception.

In the servlets, I used the standard try/catch constructs to intercept 
exceptions.  However, I decided I wanted the exceptions caught in 
servlets to be handled by the same error page as the JSP pages used. 
Rather than have EVERY catch{} clause do the redirect, I defined a 
utility subroutine named errorPage() that collected various information 
in the catch{} clause, then called sendRedirect() to the error page.

Separate from these catch{} clauses, whenever the processing in a 
servlet was complete, it ended with a sendRedirect() to the next JSP 
page followed immediately by a return. I had assumed that the 
sendRedirect()s in the main servlet code were safe from the 
sendRedirect() in the catch{} cause since--as I understood it--once the 
exception was thrown and the catch{} entered, nothing else in the 
servlet was processed.

However, my IllegalStateException experience suggests there is 
something going on with catch{} that I don't understand.  Or, as a 
friend of mine used to say, I don't understand all I know about that. :-)

To recap, I got an IllegalStateExceptioni pointing to a sendRedirect() 
in a servlet until I effectively removed the sendRedirect() by returning 
before the sendRedirect() could be reached.  Only then did I see an 
SQLException  intercepted by a catch{} and redirected with 
sendRedirect() to the error page.

Why did main servlet processing appear to continue (allowing the second 
sendRedirect() to cause a problem) after the exception was triggered?

Merrill Cornish

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


RE: How is catch{} code handled

2004-01-02 Thread George Sexton
Unfortunately, your logic is flawed.

The major flaw is that sendRedirect() does not terminate processing of
the servlet. IOW, this is happening:

Servlet Invoked
Sub-Routine Invoked
SQLException Generated
Exception Caught
Send-Redirect to Error Handler
exit Sub-Routine Via Return
More code executed
Send-Redirect() Issued - Throws IllegalStateException


Essentially, because you are not checking the return state from your
sub-routine, you are having a problem. You need to return some sort of
value from the sub-routine that indicates processing should stop.

-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:06 PM
To: Tomcat Users List
Subject: How is catch{} code handled


My sudden IllegalStateException problem turned out to be caused by my 
error handling technique, but I'm not sure why.

When I started this project (as a way or learning JSP), I have 
EVERYTHING in JSP pages, meaning that there was a lot of Java code in %

... % sections of the JSP page.  I added an errorPage declaration to 
each of my JSP pages to divert all errors to my standard error handling 
page--and all was well.

Later, I decided to limit the JSP pages to HTML as much as possible and 
move all of the Java program logic into servlets.  I left the errorPage 
declarations in the JSP pages, although there wasn't much left there to 
throw an exception.

In the servlets, I used the standard try/catch constructs to intercept 
exceptions.  However, I decided I wanted the exceptions caught in 
servlets to be handled by the same error page as the JSP pages used. 
Rather than have EVERY catch{} clause do the redirect, I defined a 
utility subroutine named errorPage() that collected various information 
in the catch{} clause, then called sendRedirect() to the error page.

Separate from these catch{} clauses, whenever the processing in a 
servlet was complete, it ended with a sendRedirect() to the next JSP 
page followed immediately by a return. I had assumed that the 
sendRedirect()s in the main servlet code were safe from the 
sendRedirect() in the catch{} cause since--as I understood it--once the 
exception was thrown and the catch{} entered, nothing else in the 
servlet was processed.

However, my IllegalStateException experience suggests there is 
something going on with catch{} that I don't understand.  Or, as a 
friend of mine used to say, I don't understand all I know about that.
:-)

To recap, I got an IllegalStateExceptioni pointing to a sendRedirect() 
in a servlet until I effectively removed the sendRedirect() by returning

before the sendRedirect() could be reached.  Only then did I see an 
SQLException  intercepted by a catch{} and redirected with 
sendRedirect() to the error page.

Why did main servlet processing appear to continue (allowing the second 
sendRedirect() to cause a problem) after the exception was triggered?

Merrill Cornish

-
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: How is catch{} code handled

2004-01-02 Thread Rhino
I haven't got a clue what your problem is. Your explanation is entirely
verbal and would really benefit from code snippets to make it clearer. I
just can't get a clear mental picture of what you did with your code.

I can't presume to speak for anyone else but I wouldn't be surprised if
others felt the same way.

Rhino

- Original Message - 
From: Merrill Cornish [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, January 02, 2004 2:05 PM
Subject: How is catch{} code handled


 My sudden IllegalStateException problem turned out to be caused by my
 error handling technique, but I'm not sure why.

 When I started this project (as a way or learning JSP), I have
 EVERYTHING in JSP pages, meaning that there was a lot of Java code in %
 ... % sections of the JSP page.  I added an errorPage declaration to
 each of my JSP pages to divert all errors to my standard error handling
 page--and all was well.

 Later, I decided to limit the JSP pages to HTML as much as possible and
 move all of the Java program logic into servlets.  I left the errorPage
 declarations in the JSP pages, although there wasn't much left there to
 throw an exception.

 In the servlets, I used the standard try/catch constructs to intercept
 exceptions.  However, I decided I wanted the exceptions caught in
 servlets to be handled by the same error page as the JSP pages used.
 Rather than have EVERY catch{} clause do the redirect, I defined a
 utility subroutine named errorPage() that collected various information
 in the catch{} clause, then called sendRedirect() to the error page.

 Separate from these catch{} clauses, whenever the processing in a
 servlet was complete, it ended with a sendRedirect() to the next JSP
 page followed immediately by a return. I had assumed that the
 sendRedirect()s in the main servlet code were safe from the
 sendRedirect() in the catch{} cause since--as I understood it--once the
 exception was thrown and the catch{} entered, nothing else in the
 servlet was processed.

 However, my IllegalStateException experience suggests there is
 something going on with catch{} that I don't understand.  Or, as a
 friend of mine used to say, I don't understand all I know about that.
:-)

 To recap, I got an IllegalStateExceptioni pointing to a sendRedirect()
 in a servlet until I effectively removed the sendRedirect() by returning
 before the sendRedirect() could be reached.  Only then did I see an
 SQLException  intercepted by a catch{} and redirected with
 sendRedirect() to the error page.

 Why did main servlet processing appear to continue (allowing the second
 sendRedirect() to cause a problem) after the exception was triggered?

 Merrill Cornish

 -
 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: adding timestamp to logs

2004-01-02 Thread Rhino
I'm not sure I understand what your problem/question is. I've been using
Tomcat 4.1.24 for over a year and Tomcat 4.1.29 for the last few weeks and
all the messages generated by Tomcat already begin with timestamps.

Or are you asking how to put a timestamp in a message that you generate from
within your servlets?

Rhino

- Original Message - 
From: Antony Paul [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, January 02, 2004 8:00 AM
Subject: adding timestamp to logs


 Hi,
 I want to add a time stamp to Tomcat loggings. I am using JDK 1.3 and
no
 log4j. I want to add this to stderr.

 rgds
 Antony Paul

 -
 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: How is catch{} code handled

2004-01-02 Thread Craig Berry
Merrill Cornish [mailto:[EMAIL PROTECTED] wrote...

 Why did main servlet processing appear to continue (allowing the
 second sendRedirect() to cause a problem) after the exception was
 triggered?

Processing of a catch block does not terminate processing of the surrounding method.  
In other words, in this code fragment
 
  try {
foo.callMethodThrowingFooException();
  }
  catch (FooException fe) {
System.out.println(Caught a FooException);
  }
  System.out.println(After try/catch block);
 
if a FooException if thrown, control flows to the catch block, but then drops out to 
the following code normally.  This is a useful Java language feature for dealing with 
locally-recoverable errors.
 
If you want method processing to stop, you have to throw a new exception, return from 
inside the catch block, add logic suppressing further processing triggered by a flag 
set in the catch block, or otherwise explicitly avoid executing the remainder of the 
method.
 


Re: what *really* happens when you reload or stop/start a webapp?

2004-01-02 Thread Jeff Barrett
No, this is just an example.  What I'd like to know is if stop/start or 
reload has the same effect on a webapp as actually shutting down tomcat 
and starting it back up.

+jeff

QM wrote:
: would everything get dumped and reset -- would that static variable go 
: back to it's original state when the class file is first loaded?
: 
: I should probably be asking a more specific question about classloaders 
: and sandboxes and whatnot, but I'm not sure how this stuff works in 
: tomcat and I'm not familiar w/ classloaders beyond their basic operation.

I'm not familiar with how the manager app reloads apps, but you
could perform an experiment to find out:
If you already have such a static var in question, write a quick JSP
that prints that value to screen.  Fire up your app, hit this JSP (to
catch the initial/default value). 

Call the servlet/whatever that changes that value.

Next, reload Tomcat using the manager app.

Hit the JSP again (make sure to force a reload in your browser).
Compare the printed value to the original/default.
Also, is there any reason you require this to be a static variable?

-QM



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


re: Tomcat 5 port 80 non-root

2004-01-02 Thread James Bayer
i resolved the problem with the Can't load server.xml
message.  all i had to do was append $CATALINA_HOME to the
classpath...the Tomcat.sh script didn't have it in there.

CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$DAEMON_HOME/dist/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar:\
$CATALINA_HOME

---

i following the instructions with jsvc included with
tomcat, but when i run the Tomcat.sh script i get the
following in my $CATALINA_HOME\logs\catalina.out

Can 't load server.xml
Can 't load server.xml
Jan 2, 2004 12:14:04 AM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms

any ideas?

thanks,

james

-

You need to use jsvc to do this. The source ships in the
$CATALINA_HOME/bin/jsvc.tar.gz file. You need to unpack it
and build it for
your system. The documentation is at:
http://jakarta.apache.org/commons/daemon/jsvc.html.

Nicolas  nl@(protected)  wrote in message
news:3FF41454.9040005@(protected)
 hi

 i read that in Tomcat 5 it 's possible running the
catalina on port 80 as
 a non-root user.
 like in apache httpd where you can set the user an group
in the
httpd.conf.

 regards nicolas 

__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: How is catch{} code handled

2004-01-02 Thread Merrill Cornish
George,

Unfortunately, your logic is flawed.
 

Yes, that's very clear at this point.  :-)

I understand that the sendRedirect() does NOT terminate the execution 
flow that it is in.  That's why I follow each one with a return. 
However, I think I now recognize my problem.

In my mind, I've always associated a catch{} with an exception and 
nothing escapes from the exception.  And that's true, assuming you did 
NOT do what I did and disolve the exception into a simple message that 
displayed as text on a JSP page.  As I now see, in THAT case, the 
catch{} DOES return, thereby allowing multiple sendRedirect()s to occurs.

Thank you for setting my thinking straight.

Merrill

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


[Off Topic] Java printing to network printer

2004-01-02 Thread Merrill Cornish
I apologize for the off-topic question, but can someone point me to 
where I can find out how to print to a remote printer on the LAN from 
Java. 

While Java seems to have many printing classes, none of them appear to 
actually reference a physical printer.  While that's obviously in 
keeping with the hardware-independent nature of Java, sometimes an 
application needs to route output to a specific location on the net.  
But how?

Merrill

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


Really dumb question -- how do I set up Tomcat 5 to run as a service on NT?

2004-01-02 Thread Chang, Betty
Hi -

 

I've looked through the docs,  and it says the following:

Tomcat will be installed as a Windows NT/2k/XP service no matter what
setting is selected.

 

However,  I  never ran an installation program - I just unzipped a file.
What do I run to install Tomcat 5 as a service?  I don't see an install
program.

 

Please forgive if this was a really dumb question.  I did try to scour
through the docs --  but a lot of the stuff is on the older versions of
Tomcat.

 

Thanks

 

Betty

 

 



tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Srini
Hi,
I have a win2k machine trying to configure these. I am able to work apache
and tomcat individually. When I try to connect these using jk2 getting into
problems.. I have followed the John Turner win2k instructions. When ever I
add
-- LoadModule jk_module modules/mod_jk2-2.0.43.dll
-- Include C:/Tomcat4.1/conf/auto/mod_jk.conf
in httpd.con of apache and try to test using
c:\apache\apache2\bin\apache.exe -t

I am getting
Syntax error on line 174 of C:/Apache/Apache2/conf/httpd.conf:
Can't locate API module structure `jk_module' in file
C:/Apache/Apache2/modules/
mod_jk2-2.0.43.dll: No error

Any solution will be appreciated.

Thanks - srini.

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



Logging and Tomcat 5.0.16

2004-01-02 Thread Mark Woon
Hi all,

I apologize in advance for starting another logging thread, but I have 
some questions that no amount of googling and archive surfing can seem 
to answer:

1) Is there a good reason why the startup.sh script that comes bundled 
with Tomcat 5.0.16 adds commons-logging-api.jar to the CLASSPATH?  As 
far as I can tell, it's the only script that uses it.

2) Is there a recommended way to control what gets spewed into 
catalina.out?  The fact that all the messages I'm getting have an INFO 
tag would indicate that this should be possible. 

So far, the best I can come up with is to add commons-logging.jar and 
log4j.jar into /server/libs and adding in a log4j.properties in 
/server/classes.  This way I can still (theoretically) use 
commons-logging/log4j in my webapps' WEB-INF/lib without having to deal 
with classloader problems.

I say theoretically because when I reload my webapp, log4j complains 
that it cannot find any appenders, so there's still something screwy 
going on that I haven't figure out yet.

The other problem I have with this approach is that it seems to 
completely ignore the parameters in server.xml that purport to control 
the Logger's verbosity.

3) In any case, why doesn't Tomcat just come with commons-logging.jar 
and log4j.jar bundled in /server/libs?

4) Is there a FAQ or HOWTO on recommended approaches to handling logging 
in Tomcat somewhere?

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


Exception in RealmBase

2004-01-02 Thread Mark Woon
Hi all,

I have a custom Realm implementation that extends 
org.apache.catalina.realm.RealmBase.  It used to work in 4.x, but in 
5.0.16, I'm getting the following exception on startup:

21:17:29,719 ERROR RealmBase:1092 - Can't register null
java.lang.NullPointerException
   at org.apache.catalina.realm.RealmBase.init(RealmBase.java:1088)
   at org.apache.catalina.realm.RealmBase.start(RealmBase.java:769)
   at 
org.pharmgen.webapp.tomcat.PharmGenRealmAdapter.setRealm(PharmGenRealmAdapter.java:34)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at 
org.securityfilter.config.SecurityConfig.addRealm(SecurityConfig.java:216)
[snip]

I've taken a look at the source, and as far as I can tell, it's because 
the container is null.  What is responsible for providing the Realm the 
container it's in?  Is there some new bit of configuration I need to do 
in Tomcat 5?  I'm also surprised that there's this bit of code in 
RealmBase.init():

if( container== null ) {
 // do some stuff, and don't set container or oname
}
if( oname==null ) {
 try {
   ContainerBase cb=(ContainerBase)container;
   //  NPE HAPPENS HERE  
   oname=new ObjectName(cb.getDomain()+:type=Realm + 
cb.getContainerSuffix());
   // some other stuff
 } catch (Throwable e) {
   log.error( Can't register  + oname, e);
 }
}

I don't have any experience with JMX, so maybe it's doing something 
behind the scenes, but if not, that bit of code looks wrong.  While this 
seems to be an error that can be safely ignored if I'm not using JMX, 
it's still a little distressing.

Any help would be appreciated.

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


AW: what *really* happens when you reload or stop/start a webapp?

2004-01-02 Thread SH Solutions
Hi

 No, this is just an example.  What I'd like to know is if stop/start or
reload has the same effect on a webapp as actually shutting down tomcat and
starting it back up.

When you stop an webapp, its classloader is discarded. Therefor every
information held by you classes is discarded.
Whey you restart an webapp, a new classloader is instantiated for that
webapp and every class is loaded from scratch. Static vars and such are
all-new.

Problems occur, if you pass references of you classes to elements outside
you classloader (in example by using shared libraries).
In that case, the classes referenced from outside your webapp cannot be
discarded due to javas typesafe pointers.
This might result in the existence of the same static variable in two
classloaders. Remember that these are two distinct variables.
Even worse, if you manage to get the reference in the old classloader from
the shared library it won't be even the same type as it was before since
Classes loaded from different classloaders are type-different.

Hence avoid to even try to find a way to make information persistent to
webapp reloads without writing them somewhere outside the VM.

HTH

Steffen


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



Servlet Error

2004-01-02 Thread kalyan chakravarti
Sir,
  I am using TOMCAT Server on Windows 2000 Professional. I configured TOMCAT as per 
the instructions. All Servlet-Examples and JSPsamples are running fine. I deployed 
BugRat WAR file and configured the web.xml file as specified by Bug Rat vendor 
installation notes. But while asking for the BugRat View, BurRatReport, BugRatAdmin 
Servlets system is unble to locate the servlet classes even though they are loaded in 
the WebApps directory. Please suggest me a solution.

With Regards,
G.V.K.Chakravarti
Software Engineer,
JAVASOFTECH PVT LTD.,
Secunderabad.
INDIA
email:[EMAIL PROTECTED]


Re: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Charles Meier
Srini,

For Linux, I get similar errors unless I write the
LoadModule line as:
LoadModule jk2_module modules/mod_jk2.so

Srini wrote:
Hi,
I have a win2k machine trying to configure these. I am able to work apache
and tomcat individually. When I try to connect these using jk2 getting into
problems.. I have followed the John Turner win2k instructions. When ever I
add
-- LoadModule jk_module modules/mod_jk2-2.0.43.dll
-- Include C:/Tomcat4.1/conf/auto/mod_jk.conf
in httpd.con of apache and try to test using
c:\apache\apache2\bin\apache.exe -t
I am getting
Syntax error on line 174 of C:/Apache/Apache2/conf/httpd.conf:
Can't locate API module structure `jk_module' in file
C:/Apache/Apache2/modules/
mod_jk2-2.0.43.dll: No error
Any solution will be appreciated.

Thanks - srini.

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


--
Charles Meier
PeerPro, LLC.
[EMAIL PROTECTED]
http://www.peerpro.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Really dumb question -- how do I set up Tomcat 5 to run as a service on NT?

2004-01-02 Thread Merrill Cornish
Betty,

As nearly as I can tell, Tomcat 4 was distributed for Windows as a .exe 
file which included an installer.  That installer which could do the 
service install.  However, Tomcat 5 is distributed (so far, at least) as 
a .zip file, which has no installer.  I can run  Tomcat 5 standalone, as 
I did Tomcat 4, but I haven't yet been able to run as a service yet. 
When I try to command line approach, it doesn't work--I think it's 
because the command line is too long.

Merrill

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


Re: [Off Topic] Java printing to network printer

2004-01-02 Thread Robert Hall
Merrill,

Your question is off-topic, I'm sure someone will suggest the proper forum.

I haven't made use of PrintService yet, but it looks like you should be 
able to
select the desired network printer using 
PrintServiceLookup.lookupPrintServices()

In case you don't have it already:
http://java.sun.com/j2se/1.4.1/docs/guide/jps/spec/printing.fm.html#996958
Robert

Merrill Cornish wrote:

I apologize for the off-topic question, but can someone point me to 
where I can find out how to print to a remote printer on the LAN from 
Java.
While Java seems to have many printing classes, none of them appear 
to actually reference a physical printer.  While that's obviously in 
keeping with the hardware-independent nature of Java, sometimes an 
application needs to route output to a specific location on the net.  
But how?

Merrill

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



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


RE: [Off Topic] Java printing to network printer

2004-01-02 Thread Nicholson, Robb
Use the Java Print Services API in JDK 1.4 ( javax.print.* -
http://java.sun.com/j2se/1.4.2/docs/api/javax/print/package-summary.html)

Based on the DocFlavor and set of attributes (double sided, 2 up, etc.)
you specify, you can lookup the available print services that can handle
that print job. 

Here's a chunk of code I wrote when learning to use the JPS API. This is the
part that loooks up the available print services and either picks the
default (if defined) or the first in the list. Not very sophisticated, but
you can use something like this to see what printers can be seen from your
Java code and what formats the chosen printer supports.

  public PrintService getPrintService(DocFlavor flava,
PrintRequestAttributeSet pSet )
  {
  PrintService[] prnSvcs;
  PrintService prnSvc = PrintServiceLookup.lookupDefaultPrintService();
  
  if (prnSvc != null)
  {
  log.debug(Default Printer found: [+prnSvc.getName()+]);
  }
  else
  {
  prnSvcs = PrintServiceLookup.lookupPrintServices(flava, pSet);
  
  if (prnSvcs.length  0)
  {
  int ii = 0;
  while ( ii  prnSvcs.length )
  {
  log.debug(Printer found: [+prnSvcs[ii].getName()+]);
  ii++;
  }
  //choose first one for now, eh?
  prnSvc = prnSvcs[0];
  }
  }
  
  // Print out flavors for this selected printer
  DocFlavor[] flavors = prnSvc.getSupportedDocFlavors();
  for (int i = 0; i  flavors.length; i++)
  {
  log.debug(\t[  + flavors[i].getMimeType() +  |  +
  flavors[i].getRepresentationClassName() + | +
  flavors[i].toString()+ ]);
  }
  
  return prnSvc;
  }


-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 3:06 PM
To: Tomcat Users List
Subject: [Off Topic] Java printing to network printer


I apologize for the off-topic question, but can someone point me to 
where I can find out how to print to a remote printer on the LAN from 
Java. 

While Java seems to have many printing classes, none of them appear to 
actually reference a physical printer.  While that's obviously in 
keeping with the hardware-independent nature of Java, sometimes an 
application needs to route output to a specific location on the net.  
But how?

Merrill

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


RE: Really dumb question -- how do I set up Tomcat 5 to run as a service on NT?

2004-01-02 Thread Chang, Betty
Hi -- Thanks for the reply.  So, now I downloaded Tomcat 4, but I don't
see an install program.  I downloaded the .zip file.  Was I supposed to
download an .exe file instead?

Thanks

Betty


-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:26 PM
To: Tomcat Users List
Subject: Re: Really dumb question -- how do I set up Tomcat 5 to run as
a service on NT?

Betty,

As nearly as I can tell, Tomcat 4 was distributed for Windows as a .exe 
file which included an installer.  That installer which could do the 
service install.  However, Tomcat 5 is distributed (so far, at least) as

a .zip file, which has no installer.  I can run  Tomcat 5 standalone, as

I did Tomcat 4, but I haven't yet been able to run as a service yet. 
When I try to command line approach, it doesn't work--I think it's 
because the command line is too long.

Merrill

-
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: Really dumb question -- how do I set up Tomcat 5 to run as a service on NT?

2004-01-02 Thread Mark Eggers
Betty,

Check the following page:

http://jakarta.apache.org/site/binindex.cgi

About 3/4 down the page, you should see the following:

Tomcat 5.0.16 KEYS

* 5.0.16 zip PGP MD5
* 5.0.16 tar.gz PGP MD5
* 5.0.16 exe PGP MD5
* 5.0.16 Deployer zip PGP MD5
* 5.0.16 Deployer tar.gz PGP MD5
* 5.0.16 Embed zip PGP MD5
* 5.0.16 Embed tar.gz PGP MD5

Download the exe file and follow the installation
instructions.

HTH

/mde/
just my two cents . . . .

__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Mark Eggers
John's excellent instructions are written for mod_jk

mod_jk2 is different.

There are several How-To's available.

[link]  Tomcat-Apache using JK2 connector

from the FAQ page or

http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

are two good sources of information.

HTH
/mde/
just my two cents . . . .


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



RE: How is catch{} code handled

2004-01-02 Thread George Sexton
If you are really wedded to this architecture (and it's not really that
bad) then a good approach could be something like:

Public class myServlet extends HttpServlet {
doGet(HttpServletRequest req, HttpServletResponse res) {

try {
// All servlet code happens between this try catch pair.
//
// Beginning of servlet
MyClass.invokeSubRoutine();

// End of Servlet
} catch (ProcessingInterruptedException PIE){
return;
} finally {
}

}
}

Public class MyClass {

public static int invokeSubRoutine() 
throws ProcessingInterruptedException {
ProcessingInterruptedException pieThrow=null;


try {
// Some JDBC Code
} catch (SQLException se) {
// Log it
// Send Redirect
pieThrow=new ProcessingInterruptedException();
// Alternatively
throw new ProcessingInterruptedException();
}

if (pieThrow!=null){
throw pieThrow;
}
return retVal;
}

}

This code is somewhat cleaner because it forces the caller to handle the
exception. In general, the idea behind exceptions is that nobody checks
return codes so let's use the compiler to force them to catch an error.

George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585

-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 1:00 PM
To: Tomcat Users List
Subject: Re: How is catch{} code handled


George,

Unfortunately, your logic is flawed.
  

Yes, that's very clear at this point.  :-)

I understand that the sendRedirect() does NOT terminate the execution 
flow that it is in.  That's why I follow each one with a return. 
However, I think I now recognize my problem.

In my mind, I've always associated a catch{} with an exception and 
nothing escapes from the exception.  And that's true, assuming you did

NOT do what I did and disolve the exception into a simple message that 
displayed as text on a JSP page.  As I now see, in THAT case, the 
catch{} DOES return, thereby allowing multiple sendRedirect()s to
occurs.

Thank you for setting my thinking straight.

Merrill

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



Have some questions, also possible contract work up for grabs

2004-01-02 Thread graham_w
Hi everyone,

I had some questions regarding Tomcat.  Is Tomcat able to handle a steady 
stream of about 200 years efficiently without crashing, being unreliable, 
etc.. ? I personally don't know the limitations of it as I am fairly new to 
Java.

What would an ideal server be to handle that type of userbase?  Right now it's 
running on a 1ghz celeron with I believe 512mb of ram running linux.

Do any hosting companies offer reasonably priced colocation or flexible 
accounts with tomcat, php, and mysql installed?  The IT company I work for has 
developed a great piece of software using JSP and Java technology but we need 
to get it onto a good box for production use.

Does anyone here offer services such as using SSH to install Tomcat remotely?  
We would be willing to pay for someone to install Tomcat in a short timeframe.  

The ideal person would be someone that knows Tomcat installation quite well.  
We have installed it on a couple boxes,  but usually by a lot of trial and 
error.  We would like to get it up and running properly very quickly.

If anyone is interested, please send me an email and I can send you the 
details.  I apologize in advance if this is not the place for an email like 
this.  I figured this was probably one of the best places for an experienced 
Tomcat userbase.

Thank you all very much for your time,

~Graham



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



Ugh, I'm tired

2004-01-02 Thread graham_w

Well, my lack of sleep is showing with that last email =)

200 years should have been 200 users

Time for coffee or sleep hmm :)


~Graham


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



RE: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Enils Bashi
Hi,

I am sure everyone has seen the good work John has done with his how-to's;
but I am supprised at some people's denial when it comes to admitting
building problems on Redhat 9. I have tried building mod_jk and mod_jk2 from
source many times for tomcat 4.1.27 and apache-2.0.44; but it is impossible.
I am sure numerous users are having the same problems, but they are directed
to how-to's that don't deliver. I am curious to know whether someone has
succeeded in building mod_jk of any kind for Redhat 9 with tomcat 4 and
apache2.


Enils


-Original Message-
From: Mark Eggers
To: Tomcat Users List
Sent: 1/2/2004 3:59 PM
Subject: Re: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

John's excellent instructions are written for mod_jk

mod_jk2 is different.

There are several How-To's available.

[link]  Tomcat-Apache using JK2 connector

from the FAQ page or

http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

are two good sources of information.

HTH
/mde/
just my two cents . . . .


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-
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: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Mike Millson
I have never had a problem building either. Maybe this article will
help:

http://www.meritonlinesystems/docs/apache_tomcat_redhat.html

On Fri, 2004-01-02 at 18:12, Enils Bashi wrote:
 Hi,
 
 I am sure everyone has seen the good work John has done with his how-to's;
 but I am supprised at some people's denial when it comes to admitting
 building problems on Redhat 9. I have tried building mod_jk and mod_jk2 from
 source many times for tomcat 4.1.27 and apache-2.0.44; but it is impossible.
 I am sure numerous users are having the same problems, but they are directed
 to how-to's that don't deliver. I am curious to know whether someone has
 succeeded in building mod_jk of any kind for Redhat 9 with tomcat 4 and
 apache2.
 
 
 Enils
 
 
 -Original Message-
 From: Mark Eggers
 To: Tomcat Users List
 Sent: 1/2/2004 3:59 PM
 Subject: Re: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2
 
 John's excellent instructions are written for mod_jk
 
 mod_jk2 is different.
 
 There are several How-To's available.
 
 [link]  Tomcat-Apache using JK2 connector
 
 from the FAQ page or
 
 http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
 
 are two good sources of information.
 
 HTH
 /mde/
 just my two cents . . . .
 
 
 __
 Do you Yahoo!?
 Find out what made the Top Yahoo! Searches of 2003
 http://search.yahoo.com/top2003
 
 -
 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: Have some questions, also possible contract work up for grabs

2004-01-02 Thread QM

: Is Tomcat able to handle a steady 
: stream of about 200 years efficiently without crashing, being unreliable, 
: etc.. ? I personally don't know the limitations of it as I am fairly new to 
: Java.

Most scalability/stability concerns have more to do with the application
code (e.g. the WAR you run via Tomcat) and the JDK than the container.
Tomcat is sandwiched between the two. Perhaps someone else on the list can
provide some hard numbers re: their average load.

Also, pure statistics dictate that Tomcat itself is more thoroughly tested
than any webapp run through it (assuming Tomcat is used for the webapp's
dev  production). Most likely the bugs have already been discovered,
especially in the 4.1 releases.  Tomcat 4's JSP compiler had a limited
resource leak but that was it.


:What would an ideal server be to handle that type of userbase?  Right now it's 
:running on a 1ghz celeron with I believe 512mb of ram running linux.

Again, depends largely on the app.  There is no way to know this number
unless the code has been profiled and load-tested.

-QM

-- 

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


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



default admin password?

2004-01-02 Thread John King
Hello,

I downloaded the binaries and for the admin page up but I am being promped
for username and password.  Can someone tell me the default admin username
and password?

Thanks,

John



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



Re: default admin password?

2004-01-02 Thread Thomas Zehetbauer
There is none, in the default configuration you have to edit the
$CATALINA_HOME/conf/tomcat-users.xml file and assign the admin role.

Tom

-- 
  T h o m a s   Z e h e t b a u e r   ( TZ251 )
  PGP encrypted mail preferred - KeyID 96FFCB89
   mail [EMAIL PROTECTED]

Hi, I'm a tagline virus. Please add me to your signature and help me spread :)


signature.asc
Description: This is a digitally signed message part


RE: default admin password?

2004-01-02 Thread John King
Any chance you could tell me the xml syntax for that (ie code snippet)?

-Original Message-
From: Thomas Zehetbauer [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 5:35 PM
To: [EMAIL PROTECTED]
Subject: Re: default admin password?


There is none, in the default configuration you have to edit the
$CATALINA_HOME/conf/tomcat-users.xml file and assign the admin role.

Tom

--
  T h o m a s   Z e h e t b a u e r   ( TZ251 )
  PGP encrypted mail preferred - KeyID 96FFCB89
   mail [EMAIL PROTECTED]

Hi, I'm a tagline virus. Please add me to your signature and help me spread
:)



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



RE: default admin password?

2004-01-02 Thread Thomas Zehetbauer
tomcat-users
  user name=user1 password=password roles=manager /
  user name=user1 password=password roles=admin /
/tomcat-user

Use user1/password for the manager webapp and user2/password for the
admin webapp.

Tom

-- 
  T h o m a s   Z e h e t b a u e r   ( TZ251 )
  PGP encrypted mail preferred - KeyID 96FFCB89
   mail [EMAIL PROTECTED]

If there is a god, you are an authorized representative.


signature.asc
Description: This is a digitally signed message part


RE: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2

2004-01-02 Thread Oscar Carrillo
Hi,

Ok, I just did it for about the 5th time (mod_jk) on a completely new
installation. I even have it running with the new and improved kernel
2.6.0!


I'd say the common mistakes are:

1. Not removing the RPMS that will conflict, such as httpd and tomcat.

2. Not updating the critical updates first. nptl-devel and glibc 
   primarily.

3. Trying to do a mixture of RPMS and build compiles.

4. Not setting LD_KERNEL_ASSUME=2.2.5 in case you have problems with 
   threads. 
   Personally, I'm not convinced that this is necessary in all cases.

5. Not configuring your environment variables right from the start

6. Then of course messing up the syntax of the config files.

John Turner's site is well-written, but I would suggest taking a look at
mine as it sometimes is clearer to someone seeing it explained two
different ways.

http://daydream.stanford.edu/tomcat/install_web_services.html

Oscar

On Fri, 2 Jan 2004, Enils Bashi wrote:

 Hi,
 
 I am sure everyone has seen the good work John has done with his how-to's;
 but I am supprised at some people's denial when it comes to admitting
 building problems on Redhat 9. I have tried building mod_jk and mod_jk2 from
 source many times for tomcat 4.1.27 and apache-2.0.44; but it is impossible.
 I am sure numerous users are having the same problems, but they are directed
 to how-to's that don't deliver. I am curious to know whether someone has
 succeeded in building mod_jk of any kind for Redhat 9 with tomcat 4 and
 apache2.
 
 
 Enils
 
 
 -Original Message-
 From: Mark Eggers
 To: Tomcat Users List
 Sent: 1/2/2004 3:59 PM
 Subject: Re: tomcat4.1.24 + apache_2.0.47 + connectors-jk2.0.2
 
 John's excellent instructions are written for mod_jk
 
 mod_jk2 is different.
 
 There are several How-To's available.
 
 [link]  Tomcat-Apache using JK2 connector
 
 from the FAQ page or
 
 http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
 
 are two good sources of information.
 
 HTH
 /mde/
 just my two cents . . . .
 
 
 __
 Do you Yahoo!?
 Find out what made the Top Yahoo! Searches of 2003
 http://search.yahoo.com/top2003
 
 -
 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]



Linux Kernel 2.6.0 success

2004-01-02 Thread Oscar Carrillo
Hi,

I am successfully running the latest Apache/Tomcat4/mod_jk/openssl/jdk
with the new kernel 2.6.0 with RedHat9.

So far I am NOT using the LD_KERNEL_ASSUME=2.2.5, and Tomcat4 starts up
really fast. Apache seems to start in anticipation of me hitting the enter
button :)

The kernel is pretty spiffy esp. without setting the LD_KERNEL_ASSUME.

There are a couple of things you have to do to get kernel 2.6.0 running
but it's pretty minor. You can find it on the web, but I'll have it up on
my page soon also:

http://daydream.stanford.edu/tomcat/install_web_services.html

Oscar


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



Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread George Shafik
Yep - didn't get past first base - no make file generated!

In professional circles we classify this as CRAP - Can't Release Application
into Production  Config log file is below this e-mail.

In the case of a previous e-mail mod_jk works only on each second HTTP
request as the session is LOOPING in the connector. I have consistently
reproduced this on 3 separate builds.

Again I'm sticking with what works - my request remains as STATED below -
nothing more or less EXACTLY as stated. A bit like HOW README  FILES SHOULD
work in the real world.

AS STATED


Now if through some miracle someone out there has managed to REALLY build
this on current vanilla install of RH9 (not enterprise) I want a copy of
mod_jk2.so file,  httpd.conf, serer.xml, copy of the SOURCE
jakarta-tomcat -connector used, a README file with exactly what you did and
the best part for last I want a dump of your system output from the build of
the mod_jk2.so in order to make me a believer. Keep in mind I want to build
from source no binaries and Apache 2.0.48 connecting to Tomcat 4.1.29
through mod_jk2.so - all built from source just in case you mist my point.



WARNING: PLEASE DO NOT GIVE ME A ONE LINE RESPONSE

***

Real APOLOGIES to those of you who really get the message


George



***
This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was

generated by GNU Autoconf 2.57. Invocation command line was

$
./configure --with-apx2=/usr/local/apache2/bin/apxs --with-tomcat41=/usr/loc
al/jakarta-tomcat-4.1.29 --with-java-home=/usr/local/j2sdk1.4.1_02 --with-jn
i --with-pcre

## - ##

## Platform. ##

## - ##

hostname = sslaptop.gsss.net

uname -m = i686

uname -r = 2.4.20-8

uname -s = Linux

uname -v = #1 Thu Mar 13 17:54:28 EST 2003

/usr/bin/uname -p = unknown

/bin/uname -X = unknown

/bin/arch = i686

/usr/bin/arch -k = unknown

/usr/convex/getsysinfo = unknown

hostinfo = unknown

/bin/machine = unknown

/usr/bin/oslevel = unknown

/bin/universe = unknown

PATH: /usr/kerberos/sbin

PATH: /usr/kerberos/bin

PATH: /usr/local/j2sdk1.4.1_02/bin

PATH: /usr/local/jakarta-tomcat-4.1.29/server/lib

PATH: /usr/local/apache/bin

PATH: /usr/local/apache2/bin

PATH: /usr/local/jakarta-ant-1.5.1/bootstrap/bin

PATH: /usr/X11R6/bin

PATH: /usr/local/sbin

PATH: /usr/local/bin

PATH: /sbin

PATH: /bin

PATH: /usr/sbin

PATH: /usr/bin

PATH: /usr/X11R6/bin

PATH: /root/bin



## --- ##

## Core tests. ##

## --- ##

configure:1507: checking for a BSD-compatible install

configure:1561: result: /usr/bin/install -c

configure:1572: checking whether build environment is sane

configure:1615: result: yes

configure:1648: checking for gawk

configure:1664: found /bin/gawk

configure:1674: result: gawk

configure:1684: checking whether make sets $(MAKE)

configure:1704: result: yes

configure:1896: checking for gcc

configure:1912: found /usr/bin/gcc

configure:1922: result: gcc

configure:2166: checking for C compiler version

configure:2169: gcc --version /dev/null 5

gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Copyright (C) 2002 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2172: $? = 0

configure:2174: gcc -v /dev/null 5

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs

Configured with:
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
 --enable-shared --enable-threads=posix --disable-checking --with-system-zli
b --enable-__cxa_atexit --host=i386-redhat-linux

Thread model: posix

gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

configure:2177: $? = 0

configure:2179: gcc -V /dev/null 5

gcc: argument to `-V' is missing

configure:2182: $? = 1

configure:2206: checking for C compiler default output

configure:2209: gcc -L/usr/kerberos/lib conftest.c 5

configure:2212: $? = 0

configure:2258: result: a.out

configure:2263: checking whether the C compiler works

configure:2269: ./a.out

configure:2272: $? = 0

configure:2289: result: yes

configure:2296: checking whether we are cross compiling

configure:2298: result: no

configure:2301: checking for suffix of executables

configure:2303: gcc -o conftest -L/usr/kerberos/lib conftest.c 5

configure:2306: $? = 0

configure:2331: result:

configure:2337: checking for suffix of object files

configure:2359: gcc -c conftest.c 5

configure:2362: $? = 0

configure:2384: result: o

configure:2388: checking whether we are using the GNU C compiler

configure:2413: gcc -c conftest.c 5

configure:2416: $? = 0

configure:2419: test -s conftest.o

configure:2422: $? = 0


Re: Really dumb question -- how do I set up Tomcat 5 to run as a service on NT?

2004-01-02 Thread Bill Barker
The instructions to do it manually are at
http://jakarta.apache.org/commons/daemon/procrun.html.  There is also a new
'service.bat' file in the CVS
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/bin/service.bat,
that simplifies the process of manually installing Tomcat as a service.

Chang, Betty [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi -



I've looked through the docs,  and it says the following:

Tomcat will be installed as a Windows NT/2k/XP service no matter what
setting is selected.



However,  I  never ran an installation program - I just unzipped a file.
What do I run to install Tomcat 5 as a service?  I don't see an install
program.



Please forgive if this was a really dumb question.  I did try to scour
through the docs --  but a lot of the stuff is on the older versions of
Tomcat.



Thanks



Betty









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



Re: PDF display under Tomcat 4.1.29

2004-01-02 Thread Bill Barker
Bug?  4.1.29 will send back the header:
  Content-Type: application/pdf; charset=ISO-8859-1
which can be confusing to a lot of browsers :).  This is fixed in the CVS
code, and it is likely that 4.1.30 will come out in a couple of weeks.

There is quite a lot of discussion of this in the archives, if you want to
search for more info.

Paul Meyers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 When sending a dynamically created PDF file to a browser with content type
 application/pdf, the browser displays a file save dialog box.

 Under Tomcat versions 3.3.1 and 4.1.27, the PDF file is displayed using
the
 acrobat plugin.

 Something changed between versions 4.1.27 and 4.1.29 in the way a file is
 sent to a browser.  Seems as if the content type gets lost.
Configuration?
 Security?

 Paul M.




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



Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread Giuliano Gavazzi
At 1:36 pm +1100 2004/01/03, George Shafik wrote:
Yep - didn't get past first base - no make file generated!

look, also on MacOSX (BSD based then) it seems impossible to make the 
build process work. What I did, following the same step as a couple 
years back, is to use apxs directly. On MacOSX one also needs some 
extra files (dlcompat) that I don't think are required on Linux. If 
you like you could get the compilation scripts from my page 
http://www.humph.com/docs/mod_jk.html and see how I called apxs.

I think the options passed to the compiler and linker will have to be 
changed, they are  -Wc,-bundle -undefined suppress -flat_namespace 
-Wl,-bind_at_load for MacOSX. They should not be different from 
those required to compile any other apache module I guess! Also the 
path to the Java includes will be different, but that's easy.

Giuliano
--
H U M P H
   || |||
 software
Java  C++ Server/Client/Human Interface applications on MacOS - MacOS X
http://www.humph.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


none

2004-01-02 Thread dev+lists
Sorry, but it bothers me that once in a while I get this symantec 
scanner reply. This is to test by what it is triggered.
Giuliano

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


Re: MOD_JK2 also Fails aaaggggg@###!!!

2004-01-02 Thread Mark Eggers
George,

I am sending you the config.log and a script of
exactly what I did since it is rather large.

Here is my environment.  I realize that it is more
recent than yours.  However, I performed the exact
same operations on all previous versions of RedHat 9
with the same results.

[EMAIL PROTECTED] apache-system]$ uname -a
Linux phoenix 2.4.22-1.2135.nptl #1 Mon Dec 15
15:55:18 EST 2003 i686 i686 i386 GNU/Linux

[EMAIL PROTECTED] apache-system]$ gcc --version
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)

[EMAIL PROTECTED] apache-system]$ libtool --version
ltmain.sh (GNU libtool) 1.5 (1.1220.2.1 2003/04/14
22:48:00)

[EMAIL PROTECTED] apache-system]$ ld --version
GNU ld version 2.14.90.0.6 20030820

[EMAIL PROTECTED] apache-system]$ make --version
GNU Make version 3.79.1, by Richard Stallman and
Roland McGrath.

[EMAIL PROTECTED] native2]$ java -version
java version 1.4.2_02
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed
mode)

[EMAIL PROTECTED] native2]$ rpm -qa | grep gcc
gcc-objc-3.3.2-1
compat-gcc-7.3-2.96.118
gcc-c++-3.3.2-1
gcc-g77-3.3.2-1
gcc-java-3.3.2-1
gcc32-3.2.3-6
libgcc-3.3.2-1
gcc-gnat-3.3.2-1
gcc-3.3.2-1
compat-gcc-c++-7.3-2.96.118

I noticed that you appear to be compiling this as
root.  In general, this is a bad idea as root has
special paths, and in Fedora Core 1, uses an older
compiler to build the kernel.

In general, building this software as a generic user,
and then su'ing to root is a more productive approach.

Also, make sure that when you built the Apache web
server that you enabled shared modules.

/mde/
just my two cents . . . .

__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: Have some questions, also possible contract work up for grabs

2004-01-02 Thread graham_w
Thank you very much for the information.  I appreciate it.

~Graham

Quoting QM [EMAIL PROTECTED]:

 
 : Is Tomcat able to handle a steady 
 : stream of about 200 years efficiently without crashing, being unreliable,
 
 : etc.. ? I personally don't know the limitations of it as I am fairly new to
 
 : Java.
 
 Most scalability/stability concerns have more to do with the application
 code (e.g. the WAR you run via Tomcat) and the JDK than the container.
 Tomcat is sandwiched between the two. Perhaps someone else on the list can
 provide some hard numbers re: their average load.
 
 Also, pure statistics dictate that Tomcat itself is more thoroughly tested
 than any webapp run through it (assuming Tomcat is used for the webapp's
 dev  production). Most likely the bugs have already been discovered,
 especially in the 4.1 releases.  Tomcat 4's JSP compiler had a limited
 resource leak but that was it.
 
 
 :What would an ideal server be to handle that type of userbase?  Right now
 it's 
 :running on a 1ghz celeron with I believe 512mb of ram running linux.
 
 Again, depends largely on the app.  There is no way to know this number
 unless the code has been profiled and load-tested.
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net (C++ / Java / SSL)
 tech news -- http://www.RoarNetworX.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]