StandardContext is added to host but won't start

2005-05-04 Thread Erik Hellman \(KA/EAB\)
I'm trying to create and deploy a StandardContext (i.e., a webapp) inside my 
Servlet: 

StandardContext theContext = new StandardContext()
theContext.setDisplayName(thePath);
theContext.setDocBase(myBaseDir + thePath);
theContext.setName(thePath);
theContext.setPath(thePath);
 
myHost.addChild(theContext);
 
theContext.start();

The webapp gets added and is displayed when I check the manager, but it won't 
start.
 
Any suggestions?
 
regards,
Erik
 
 



Deply/undeploy applications from a Servlet

2005-05-03 Thread Erik Hellman \(KA/EAB\)
I've managed to figure out how to list all installed applications by callind 
findChildren() on the current Host-object. However, now I wish to be able to 
deploy/undeply applications through this servlet. Basically, I need a reload 
command for a set of applications. First, all application with a certain prefix 
are undeployed. The content of a specific directory is then scanned and all 
subdirectories are deployed.
 
The reason for this is that I wish have a system that can be installed several 
times with different versions. Each version has its own user-interface that is 
launched through Java Web Start. Whenever I install a new version of the 
system, I simply call /reload on my manager application which then deploys 
all available applications.
 
So my questions is, how do I create, deploy and undeploy a web-application from 
a Servlet?
 
regards,
Erik


List all installed web applications from Servlet

2005-04-28 Thread Erik Hellman \(KA/EAB\)
Is it possible to retrieve a list of all currently installed web applications 
through a Servlet? I also need to be able to deploy/undeploy web applications 
through a Servlet. I can't seem to find any appropriate classes in the Tomcat 
API for this purpose.
 
regards,
Erik


RE: List all installed web applications from Servlet

2005-04-28 Thread Erik Hellman \(KA/EAB\)
Sure, the manager application would do the job. However, I can't seem to find 
the source for it? Where in the CVS would I find it?

// Erik

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 28, 2005 12:16 PM
To: Tomcat Users List
Subject: Re: List all installed web applications from Servlet


See the manager application -  it lists all webapps runnign as well as 
exposes a way to stop and start each of them.

-Tim

Erik Hellman (KA/EAB) wrote:
 Is it possible to retrieve a list of all currently installed web applications 
 through a Servlet? I also need to be able to deploy/undeploy web applications 
 through a Servlet. I can't seem to find any appropriate classes in the Tomcat 
 API for this purpose.
  
 regards,
 Erik
 

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


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



RE: contextAdmin question

2001-05-09 Thread Erik Hellman
Title: RE: contextAdmin question



Ok. I 
need to create a war-file? But that can't be all. I must somehow tell tomcat to 
read that war-file also. How/where do I do that? (Ok, this answer could probably 
be found in a doc somewhere, but I'm quite lazy.. ;).

// 
Erik

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 08, 2001 
  2:22 AMTo: [EMAIL PROTECTED]Subject: RE: 
  contextAdmin question
  if a war file is in the webapps directory, the context will be 
  build upon starting tomcat automatically, assuming the AutoStart interceptor 
  has been disabled. The context section in server.xml is to 
  hardcode certain parameters such as reloadable, crosscontext etc.
  the war gets expanded into a dir of the same name upon startup 
  as the context gets initiated at startup. 
  -Original Message- From: Pavan 
  Seth [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, May 07, 2001 7:37 PM To: [EMAIL PROTECTED] Subject: Re: 
  contextAdmin question 
  You mean to say that..if i create a new one like 
  below.. 
  Context path="/admin"  
  docBase="webapps/admin"  
  crossContext="true"  
  debug="0"  
  reloadable="true"  
  trusted="false"   /Context 
  it is not persistent? It disappears after restart/restop? 
  --- [EMAIL PROTECTED] wrote:  
  That was a really good question, and not knowing the  answer, I copied my  server.xml 
  file, renamed one of the copies, and  started 
  tomcat. Added new  contexts, shut down tomcat, and 
  compared the two  files. Apparently the 
   answer* to your question is "yes, you will have 
  to  manually code new contexts  into your server.xml file if you want them  (contexts, that is) to persist  
  between start/stops of tomcat."   * == This answer derived on a Win98 box running  Tomcat 3.2.1. YMMV.   So my follow-up question is: does anyone know if  this is the intended  functionality of 
  the contextAdmin tool? And beyond  that: where can 
  I find  more information about requested, 
  recommended,  planned, and existing Tomcat 
   administration tools/servlets. Anyone? 
  Anyone?Here's 
  another question regarding the contextAdmin  
  application that comes   with Tomcat. 
  Is it possible to 
  save the new context created to  server.xml in any 
  way so   that it will exists when I restart 
  tomcat, or do I  have to write this code 
myself?   
 

  __ 
  Do You Yahoo!? Yahoo! Auctions - buy 
  the things you want at great prices http://auctions.yahoo.com/ 



trusted application

2001-05-07 Thread Erik Hellman

I get the following error when accessing the /admin pages and trying to
view all contexts:

Error: 500
Location: /admin/contextAdmin/contextAdmin.jsp
You must mark the administration application as trusted

How and where do i do this?

// Erik




contextAdmin question

2001-05-07 Thread Erik Hellman

Here's another question regarding the contextAdmin application that comes
with Tomcat.

Is it possible to save the new context created to server.xml in any way so
that it will exists when I restart tomcat, or do I have to write this code
myself?

// Erik




connectors problem in tomcat4b (latest nightly build)

2001-05-04 Thread Erik Hellman

Downloaded latest tomcat 4 beta. Installed it successfully.

Trying to compile everything in the connectors directory (like
mod_webapp.so). I get this error when running make:

Compiling sources in lib...
make[1]: Entering directory
`/usr/java/jakarta/jakarta-tomcat-4.0/connectors/lib'
- Compiling wa_main.c
In file included from wa_main.c:59:
/usr/java/jakarta/jakarta-tomcat-4.0/connectors/include/wa.h:71:22:
apr_main.h: No such file or directory
In file included from wa_main.c:59:
/usr/java/jakarta/jakarta-tomcat-4.0/connectors/include/wa.h:85:24:
wa_general.h: No such file or directory
make[1]: *** [wa_main.o] Error 1
make[1]: Leaving directory
`/usr/java/jakarta/jakarta-tomcat-4.0/connectors/lib'
make: *** [all] Error 2

Guess there is a misspelling, it should be apr_general.h and wa_main.h
instead. Ok, that works better (should I report that as a bug or?).

Now what? How do i use that little lib i got in apache2?

thanks,
Erik




contextAdmin

2001-05-04 Thread Erik Hellman

Ok, I give up. How do I log into the contextAdmin that comes with jakarta?

// Erik



Tomcat 4b3 with apache

2001-05-02 Thread Erik Hellman

Ok, since i didn't recieve any response to my last question I try it again.

Where can I find the source for mod_jk.do in the tomcat 4.0 b3 source? If it
isn't there, where can I find it?

// Erik




RE: Tomcat 4b3 with apache

2001-05-02 Thread Erik Hellman

Ahh. Didn't find that in any doc...

Anyway. Edited Makedefs and set the correct paths etc. Ran 'make' and got
this:

make[1]: Entering directory
`/usr/java/jakarta/jakarta-tomcat-4.0/connectors/webapplib'
gcc -O6 -Wall -Wstrict-prototypes  -I../webapplib -c wa.c -o wa.o
In file included from ../webapplib/wa.h:99,
 from wa.c:62:
../webapplib/wa_config.h:75: warning: function declaration isn't a prototype
In file included from ../webapplib/wa.h:101,
 from wa.c:62:
../webapplib/wa_memorypool.h:77: warning: function declaration isn't a
prototype
wa.c:68: parse error before `*'
wa.c:68: warning: function declaration isn't a prototype
wa.c: In function `wa_init':
wa.c:69: `wa_connections' undeclared (first use in this function)
wa.c:69: (Each undeclared identifier is reported only once
wa.c:69: for each function it appears in.)
wa.c:72: `cb' undeclared (first use in this function)
wa.c:73: `wa_callbacks' undeclared (first use in this function)
wa.c:76: warning: implicit declaration of function `wa_callback_debug'
wa.c:76: `WA_LOG' undeclared (first use in this function)
wa.c:77: warning: implicit declaration of function `wa_callback_serverinfo'
wa.c:77: `WA_NAME' undeclared (first use in this function)
wa.c:77: parse error before string constant
wa.c:82: structure has no member named `prov'
wa.c: In function `wa_destroy':
wa.c:94: `wa_connections' undeclared (first use in this function)
wa.c:98: structure has no member named `prov'
wa.c:99: `WA_LOG' undeclared (first use in this function)
wa.c:103: `wa_callbacks' undeclared (first use in this function)
make[1]: *** [wa.o] Error 1
make[1]: Leaving directory
`/usr/java/jakarta/jakarta-tomcat-4.0/connectors/webapplib'
make: *** [webapplib/libwebapp.a] Error 2

Is it me or is it the source?

// Erik

 -Original Message-
 From: Patxi Echarte [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 02, 2001 10:23 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat 4b3 with apache


 Hi, you have to build mod_webapp.so

 The sources are in the connectors directory.

 Patxi

 On Wed, 2 May 2001 10:16:06 +0200
 Erik Hellman [EMAIL PROTECTED] wrote:

  Ok, since i didn't recieve any response to my last question I
 try it again.
 
  Where can I find the source for mod_jk.do in the tomcat 4.0 b3
 source? If it
  isn't there, where can I find it?
 
  // Erik
 


 --

 [Patxi Echarte Ayerra]
  [EMAIL PROTECTED]
  NMP-New Media Publishing
  Tel. 948 197 983
  http://www.nmp.es
 --




More tomcat4 apache2 problems

2001-05-02 Thread Erik Hellman

Since I couldn't compile mod_webapp.so on tomcat4.0b3 I downloaded 4.0-dev
(latest) and tried that one. Installed tomcat without any problem. Ran the
configure-script in the connectors-directory with the correct paths
in --with-apache and --with-apr. Got myself a cute little lib in the
lib-dir.

Now what? There is no Makefile in the apache-1.3 dir. I tried running apxs
manually on the source there, but that didn't work.

Any suggestions?

// Erik




Livin' on the edge...

2001-04-30 Thread Erik Hellman

Ok. I like to test things before it's really stable...

Got Tomcat 4.0b3 up and running.
Got Apache 2.0b16 up and running.

Need to compile mod_jk.so for apache2. Where in the jakarta-tomcat-4.0
source tree can I find it? Does it work with apache 2?

And finally; Is tomcat 4.0 (or will it be) much faster than 3.x?

rgds
Erik Hellman




Tomcat 4.0 b3 installation on Apache

2001-04-27 Thread Erik Hellman

Hi!

I don't know if this question has been answered earlier or not, but I
couldn't find anything in the archive. Is there a good FAQ/HOWTO/Guide on
installing Jakarta 4.0 b3 on Apache anywhere? I found the online manual for
Jakarta 3.2, but is there any available for Jakarta 4?

We have tested Jakarta 3.x and come to the conclusion that it isn't fast
enough for our purpose. But we like developing web application using
JSP+Servlets so we would prefer using it if we can speed it up.

I'm also interrested to know what sort of template solution for web-pages
would be best? I've tried Struts and found it to be way to slow.

rgds
Erik Hellman




Compileproblem with Jakarta 4.0b3

2001-04-27 Thread Erik Hellman

Ok. I finally found out what I needed for installing tomcat 4.0b3 on apache.
Installed all necessary distributions (JNDI,JAXP etc) and set the enviroment
variables correctly (checked and double checked ;).

Now I get this compile error when running './build.sh dist'

build-main:
[javac] Compiling 245 source files to
/usr/java/jakarta/jakarta-tomcat-4.0/catalina/build/classes
[javac]
/usr/java/jakarta/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/
core/ApplicationFilterConfig.java:251: Method
init(org.apache.catalina.core.ApplicationFilterConfig) not found in
interface javax.servlet.Filter.
[javac] filter.init(this);
[javac]^
[javac]
/usr/java/jakarta/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/
core/ApplicationFilterConfig.java:274: Method destroy() not found in
interface javax.servlet.Filter.
[javac] filter.destroy();
[javac]   ^
[javac]
/usr/java/jakarta/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/
core/ApplicationFilterConfig.java:305: Method destroy() not found in
interface javax.servlet.Filter.
[javac] this.filter.destroy();
[javac]^
[javac] Note: 8 files use or override a deprecated API.  Recompile with
-deprecation for details.
[javac] 3 errors, 1 warning

BUILD FAILED

/usr/java/jakarta/jakarta-tomcat-4.0/catalina/build.xml:108: Compile failed,
messages should have been provided.

Any idea what's wrong? I use the jakarta-servletapi-4.0.

rgds
Erik Hellman