jikes with tomcat 4.0.3???

2002-06-14 Thread Miller, Andy

Is this possible, i've googled, searched this mailing list,  but can't
turn up much info. Seems people are having trouble with UTF-8
encoding???
 
Thanks,
 
Andy Miller
[EMAIL PROTECTED]



ROOT.war / server.xml context / tomcat 4.0.3 problem.. help!

2002-06-07 Thread Miller, Andy

I've got a ROOT.war file that I build for my app, when i deploy it to
/webapps with the default server.xml config file, it extracts
upon tomcat startup.  The problem is i need to configure some logging &
connection pool info that my app uses in my server.xml.  When i modify
the server.xml file as shown below to configure the the default webapp
it only works if ROOT.war is already extracted.  If I remove the ROOT
directory, tomcat barfs on startup saying that it couldn't find
/WEB-INF/web.xml (because it hasn't extracted the ROOT.war file yet).
Is it possible to move all my configuration into web.xml or is there
some other file that tomcat can read in the .war file to get this
info??? Or is there someone to tell tomcat that this info is in a .war
file and it needs to be extracted first??? I just don't know how to
configure the connection pool info if not in the server.xml file, and if
I put it there, it just doesn't get around to extracting the ROOT.war
file before it tries to access the files.  Does this make any sense???
 

 
 
 
   
 
 
  
   user
   castor
  
  
   password
   
  
  
   driverClassName
   com.inet.tds.TdsDriver
  
  
   driverName
 
jdbc:inetdae7:spitfiredev.X.com:1433?database=midgardDb
  
  
   maxActive
   30
  
  
   maxIdle
   2
  
  
   validationQuery
   Select * from tbl_states where id=1
  
 

 
Thanks,
 
Andy Miller
[EMAIL PROTECTED]



RE: Tomcat / JBoss / JNDI lookup not working - HELP!

2002-06-03 Thread Miller, Andy

That was all it took! Thanks a million!

-Original Message-
From: HÃ¥kon Hansen [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: Tomcat / JBoss / JNDI lookup not working - HELP!


On Mon, 3 Jun 2002 11:48:14 -0500
"Miller, Andy" <[EMAIL PROTECTED]> wrote:

> I have seperate instances of Tomcat and JBoss running on the same 
> machine.  I'm trying to do a JNDI lookup of a JMS queue that's 
> configured in JBoss from Tomcat but cannot get it to work.

I have not taken the time to fully analyze your problem, but I have 
had similar problems with JNDI lookups JBoss 3.0 / Tomcat 4.0. 

What I had to do, was to set the initial factory as a System property before creating 
the InitialContext for the first time, like this:

System.setProperty("java.naming.factory.initial", 
"org.jnp.interfaces.NamingContextFactory");


Good luck!


Yours, Haakon Hansen, Norway

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


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




Tomcat / JBoss / JNDI lookup not working - HELP!

2002-06-03 Thread Miller, Andy

I have seperate instances of Tomcat and JBoss running on the same
machine.  I'm trying to do a JNDI lookup of a JMS queue that's
configured in JBoss from Tomcat but cannot get it to work.  I can see
the JNDI tree from the JBoss' JNDIView and all looks fine, here's a a
snapshot of the Global JNDI Namespace:
 

Global JNDI Namespace

  +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- jmx:miller-dp:rmi (class: org.jboss.jmx.server.RMIConnectorImpl)
  +- TopicConnectionFactory[link -> ConnectionFactory] (class:
javax.naming.LinkRef)
  +- UserTransactionSessionFactory (class:
org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl)
  +- RMIXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- QueueConnectionFactory[link -> ConnectionFactory] (class:
javax.naming.LinkRef)
  +- topic (class: org.jnp.interfaces.NamingContext)
  |   +- example (class: org.jboss.mq.SpyTopic)
  |   +- testTopic (class: org.jboss.mq.SpyTopic)
  |   +- bob (class: org.jboss.mq.SpyTopic)
  +- queue (class: org.jnp.interfaces.NamingContext)
  |   +- D (class: org.jboss.mq.SpyQueue)
  |   +- C (class: org.jboss.mq.SpyQueue)
  |   +- loggingQueue (class: org.jboss.mq.SpyQueue)
  |   +- B (class: org.jboss.mq.SpyQueue)
  |   +- A (class: org.jboss.mq.SpyQueue)
  |   +- controlQueue (class: org.jboss.mq.SpyQueue)
  |   +- testQueue (class: org.jboss.mq.SpyQueue)
  |   +- ex (class: org.jboss.mq.SpyQueue)
  |   +- DLQ (class: org.jboss.mq.SpyQueue)
  |   +- F (class: org.jboss.mq.SpyQueue)
  |   +- E (class: org.jboss.mq.SpyQueue)
  +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  +- RMIConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  +- UserTransaction (class:
org.jboss.tm.usertx.client.ClientUserTransaction)
  +- jmx (class: org.jboss.jmx.server.JMXAdaptorImpl)
  +- servercollector (class: org.jboss.management.ServerDataCollector)
  +- UILXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- UILConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)

I've copied the JNDI Properties to the tomcat/common/classes directory,
and copied all the client JARS to the tomcat/classes/lib directory.
Froma JSP running under Tomcat,  I do a new InitialContext() and then do
a  lookup on "QueueConnectionFactory" I get:
 
javax.servlet.ServletException: Name QueueConnectionFactory is not bound
in this Context
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:463)
at
org.apache.jsp.test_0005fjndi$jsp._jspService(test_0005fjndi$jsp.java:17
3)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

When i I do execute the following code:
 
Hashtable env = ctx.getEnvironment();
Enumeration enum = env.keys();
System.out.println("displayEnv number of keys "+env.size());
while (enum.hasMoreElements()) {
String key = (String)enum.nextElement();
Object value = env.get(key);
System.out.println(key+"="+value);
}
I get:


java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
java.naming.provider.url=localhost:1099

java.naming.factory.url.pkgs=org.apache.naming:org.jboss.naming:org.jnp.
interfaces

 
What am I doing wrong??? I've been banging my head against a wall for
three days over this.  Does anyone have any clues??? Oh, btw, I tried
changing the JBoss JNDI port to 1066, but it made no difference. Thanks.
 
Andy Miller
[EMAIL PROTECTED]
HP Invent



RE: index.jsp not getting sent via mod_jk to tomcat??

2002-05-23 Thread Miller, Andy

I know your 'ghetto' solutions will work.  They are my last resort.

thanks

-Original Message-
From: Phillip Morelock [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 4:06 PM
To: Tomcat Users List
Subject: Re: index.jsp not getting sent via mod_jk to tomcat??


is that in response to my "sort of" solution?

sounds like you're messing with httpd.conf, which I liken to mad science
when you involve tomcat connectors ;)

fillup


On 5/23/02 2:02 PM, "Miller, Andy" <[EMAIL PROTECTED]> wrote:

> Darn, thought I was on to something there.  I setup an alias thusly:
> 
> Alias / "e:/mycodebase/index.jsp"
> 
> But it just returned my index.jsp, unprocessed, to the browser... 
> bummer
> 
> -Original Message-
> From: Phillip Morelock [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 3:47 PM
> To: Tomcat Users List
> Subject: Re: index.jsp not getting sent via mod_jk to tomcat??
> 
> 
> i've got a "ghetto-fabulous" solution -- just put an index.html there 
> with a 0-delay refresh or a javascript refresh.
> 
> I actually do it with a php script that sends a redirect header 
> instead, because for some reason apache's default "index.php" thing 
> will still work (if you have PHP installed, that is).
> 
> I know this isn't exactly what you wanted but I, too, get puzzled by 
> the layering of TC/Connector/Apache, etc. sometimes....and often I 
> just find a good little workaround like this rather than futz with 
> configuration.
> 
> good luck
> fillup
> 
> 
> On 5/23/02 1:38 PM, "Miller, Andy" <[EMAIL PROTECTED]> wrote:
> 
>> I guess this is actually more of an apache question, but i'm using 
>> mod_jk to get my apache2 webserver to use Tomcat 4.03.  All is good, 
>> except that I have a default page configured in apache to index.jsp 
>> (via DirectoryIndex directive in httpd.conf),  i've got mod_jk 
>> configured to foward .jsp to Tomcat, but when i go to 
>> http://mysite.com it says Access Forbidden!, if i goto 
>> http://mysite.com/index.jsp it works just fine.
>> 
>> Any ideas?
>> 
>> Thanks,
>> 
>> Andy Miller
>> [EMAIL PROTECTED]
>> 
>> ps. here's the bottom of my httpd.conf file:
>> 
>> ### Hook for Tomcat
>> 
>> LoadModule jk_module modules/mod_jk.dll
>> 
>> 
>> JkWorkersFile "e:/java/tomcat-4.0.3/conf/workers.properties"
>> JkLogFile "e:/java/tomcat-4.0.3/logs/mod_jk.log"
>> 
>> JkLogLevel info
>> 
>> jkMount /examples/* ajp13
>> jkMount /tomcat-docs/* ajp13
>> JkMount /servlet/* ajp13
>> JkMount /*.jsp ajp13
>> JKMount /*.do ajp13
>> 
> 
> 
> --
> To unsubscribe, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 


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


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




RE: index.jsp not getting sent via mod_jk to tomcat??

2002-05-23 Thread Miller, Andy

Darn, thought I was on to something there.  I setup an alias thusly:

Alias / "e:/mycodebase/index.jsp"

But it just returned my index.jsp, unprocessed, to the browser... bummer

-Original Message-
From: Phillip Morelock [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 3:47 PM
To: Tomcat Users List
Subject: Re: index.jsp not getting sent via mod_jk to tomcat??


i've got a "ghetto-fabulous" solution -- just put an index.html there
with a 0-delay refresh or a javascript refresh.

I actually do it with a php script that sends a redirect header instead,
because for some reason apache's default "index.php" thing will still
work (if you have PHP installed, that is).

I know this isn't exactly what you wanted but I, too, get puzzled by the
layering of TC/Connector/Apache, etc. sometimesand often I just find
a good little workaround like this rather than futz with configuration.

good luck
fillup


On 5/23/02 1:38 PM, "Miller, Andy" <[EMAIL PROTECTED]> wrote:

> I guess this is actually more of an apache question, but i'm using 
> mod_jk to get my apache2 webserver to use Tomcat 4.03.  All is good, 
> except that I have a default page configured in apache to index.jsp 
> (via DirectoryIndex directive in httpd.conf),  i've got mod_jk 
> configured to foward .jsp to Tomcat, but when i go to 
> http://mysite.com it says Access Forbidden!, if i goto 
> http://mysite.com/index.jsp it works just fine.
> 
> Any ideas?
> 
> Thanks,
> 
> Andy Miller
> [EMAIL PROTECTED]
> 
> ps. here's the bottom of my httpd.conf file:
> 
> ### Hook for Tomcat
> 
> LoadModule jk_module modules/mod_jk.dll
> 
> 
> JkWorkersFile "e:/java/tomcat-4.0.3/conf/workers.properties"
> JkLogFile "e:/java/tomcat-4.0.3/logs/mod_jk.log"
> 
> JkLogLevel info
> 
> jkMount /examples/* ajp13
> jkMount /tomcat-docs/* ajp13
> JkMount /servlet/* ajp13
> JkMount /*.jsp ajp13
> JKMount /*.do ajp13
> 


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


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




index.jsp not getting sent via mod_jk to tomcat??

2002-05-23 Thread Miller, Andy

I guess this is actually more of an apache question, but i'm using
mod_jk to get my apache2 webserver to use Tomcat 4.03.  All is good,
except that I have a default page configured in apache to index.jsp (via
DirectoryIndex directive in httpd.conf),  i've got mod_jk configured to
foward .jsp to Tomcat, but when i go to http://mysite.com it says Access
Forbidden!, if i goto http://mysite.com/index.jsp it works just fine.  
 
Any ideas?
 
Thanks,
 
Andy Miller
[EMAIL PROTECTED]
 
ps. here's the bottom of my httpd.conf file:
 
### Hook for Tomcat

  LoadModule jk_module modules/mod_jk.dll

 
JkWorkersFile "e:/java/tomcat-4.0.3/conf/workers.properties"
JkLogFile "e:/java/tomcat-4.0.3/logs/mod_jk.log"
 
JkLogLevel info
 
jkMount /examples/* ajp13
jkMount /tomcat-docs/* ajp13
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JKMount /*.do ajp13



RE: stop log files getting reinitialized?

2002-05-22 Thread Miller, Andy

Never mind.. Answered my own question:




-Original Message-
From: Miller, Andy 
Sent: Wednesday, May 22, 2002 2:32 PM
To: Tomcat Users List
Subject: stop log files getting reinitialized?


Is there anyway to stop tomcat from re-initializing output logs after a
restart?  It's a real pain not being able to just type "tail -f
stdout.log" and leave that window open.  What happens is that after
stopping tomcat, the file gets reset to 0bytes and after starting it
again, nothing is displayed in my tail window.  I have to close it an
open it again, by which time all the pertinent output log has streamed
by.  
 
Surely others have found a workaround
 
Thanks
 
Andy Miller
[EMAIL PROTECTED]

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




stop log files getting reinitialized?

2002-05-22 Thread Miller, Andy

Is there anyway to stop tomcat from re-initializing output logs after a
restart?  It's a real pain not being able to just type "tail -f
stdout.log" and leave that window open.  What happens is that after
stopping tomcat, the file gets reset to 0bytes and after starting it
again, nothing is displayed in my tail window.  I have to close it an
open it again, by which time all the pertinent output log has streamed
by.  
 
Surely others have found a workaround
 
Thanks
 
Andy Miller
[EMAIL PROTECTED]



RE: Multiple server.xml files with Tomcat 4.0.3??

2002-05-22 Thread Miller, Andy

Great, works like a champ! I just modified my command thus:

tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-Djava.class.path=%JAVACLASSPATH% -Dcatalina.home="%TOMCAT_HOME%" -Xrs
-start org.apache.catalina.startup.Bootstrap -params -config
"%TOMCAT_HOME%\conf\server-local.xml" start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%TOMCAT_HOME%\logs\stdout.log" -err "%TOMCAT_HOME%\logs\stderr.log" 

And it works like a champ!  Cheers!

-Original Message-
From: John Roth [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 12:06 PM
To: 'Tomcat Users List'
Subject: RE: Multiple server.xml files with Tomcat 4.0.3??


I run a similar environment, but even though we don't use tomcat.exe to
start a service (we use jk_nt_service.exe to create, which uses
wrapper.properties to start) the start parameters should be the same.
There are a couple of choices:

1. add another parameter to the command below:
-Dcatalina.base={environment var pointing to the appropriate directory,
or hard coded path} or 
2. add -config parameter to startup pointing to the specific server.xml
(or whatever name you want)

Example: (from my wrapper.properties)
wrapper.cmd_line=$(wrapper.javabin) -Xrs -Xms128m -Xmx256m
-Djava.security.policy=="$(wrapper.tomcat_policy)"
-Dcatalina.base="$(wrapper.tomcat_base)"
-Dcatalina.home="$(wrapper.tomcat_home)" -classpath
$(wrapper.class_path) $(wrapper.startup_class) -config
$(wrapper.server_xml) start

Notes: 
- when setting up multiple environments, especially on the same machine,
pay close attention to the addresses/ports in use.  You will have to
change the individual shutdown ports for each instance, as the listen on
0.0.0.0.  Adding an address="x.x.x.x" to each  will force
each connector to listen on a specific address instead of 0.0.0.0, so
all instances can use the default :8080 port.
- using catalina.base has some additional benefits/(or drawbacks,
depending on your opinion):  each environment I have set up uses it's
own directory structure for webapps, works, etc., so that all
environments can have their own data, deployment processes, etc.  Like
you, I have specific instances for dev, qa, staging, demo and
production, ranging across 2/3/4 machines (depending on what is going
on). Another advantage is the fact that I can move an instance to
another machine, and have it running in a few minutes simply by
removing/adding the specific IP address for the instance, and copying
the entire directory structure over.

Hope this helps,
John


-Original Message-
From: Miller, Andy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 12:42 PM
To: Tomcat Users List
Subject: Multiple server.xml files with Tomcat 4.0.3??


I'm pretty new to Tomcat so please be patient with me if this is an
obvious question.  I'm trying to port our dev environment over to Tomact
from Resin and have come across a slight roadblock.  We have different
environments for local development, dev server, qa server, and
production.  Each environment requires different db connection pools, as
well as a few other minor tweaks in the server.xml from environment to
environment.  With resin, i can pass in a -conf parameter when i start
it up to give it the name of the appropriate config to use for that
environment (-conf resin-local.conf, -conf resin-qa.conf, etc).  Is
there a similar functionality with Tomcat 4.0.3 and it's server.xml
config file?  I really can't find much documenation on this.
 
Also, for note, i'm running tomcat as a service with the tomcat.exe
-install paramater which works great, not sure if that makes a
difference to what can be passed via the command line but my bat file to
set this up is as follows:
 
tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-Djava.class.path=%JAVACLASSPATH% -Dcatalina.home="%TOMCAT_HOME%" -Xrs
-start org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%TOMCAT_HOME%\logs\stdout.log" -err "%TOMCAT_HOME%\logs\stderr.log"
 
 
Thanks,
 
Andy Miller
[EMAIL PROTECTED]

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




Multiple server.xml files with Tomcat 4.0.3??

2002-05-22 Thread Miller, Andy

I'm pretty new to Tomcat so please be patient with me if this is an
obvious question.  I'm trying to port our dev environment over to Tomact
from Resin and have come across a slight roadblock.  We have different
environments for local development, dev server, qa server, and
production.  Each environment requires different db connection pools, as
well as a few other minor tweaks in the server.xml from environment to
environment.  With resin, i can pass in a -conf parameter when i start
it up to give it the name of the appropriate config to use for that
environment (-conf resin-local.conf, -conf resin-qa.conf, etc).  Is
there a similar functionality with Tomcat 4.0.3 and it's server.xml
config file?  I really can't find much documenation on this.
 
Also, for note, i'm running tomcat as a service with the tomcat.exe
-install paramater which works great, not sure if that makes a
difference to what can be passed via the command line but my bat file to
set this up is as follows:
 
tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-Djava.class.path=%JAVACLASSPATH% -Dcatalina.home="%TOMCAT_HOME%" -Xrs
-start org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%TOMCAT_HOME%\logs\stdout.log" -err "%TOMCAT_HOME%\logs\stderr.log"
 
 
Thanks,
 
Andy Miller
[EMAIL PROTECTED]