Re: TC v5.5.12 Broke My Configuration

2005-09-27 Thread Peter Miller
Hi Bob,

I would suggest to try it with a directory name without spaces (Test 1).
Could be that tc5.5.12 handles directories with spaces not
correct/different than earlier versions.

Hth
Peter

Bob Bronson schrieb:

 Hi all,

 I've just tried to upgrade from TC v5.5.9 to v5.5.12 and it seems my
 (very simple) configuration is now broken.

 The following configuration works beautifully under 5.5.9 -- no
 exceptions, no warnings, just utter perfection.

 Here's a description of my configuration (BTW, CATALINA_HOME and
 JAvA_HOME are fine, I'm sure they're not causing the problem).

 I have CATALINA_BASE set to:
  C:\Projects\Configs\

 Within this Configs directory I have two sub-directories: conf and
 Engine_01 like this:
   C:\Projects\Configs\
   |
   +-conf\
   +-Engine01\


 Within the conf directory I have my server.xml and the default
 web.xml files. Here is the server.xml contents:

 Server port=10035 shutdown=SHUTDOWN debug=0
  Service name=Catalina
Connector port=80 /
Engine name=ENGINE_01 defaultHost=localhost
  Host name=localhost appBase=..\Sites\Test 1/
/Engine
  /Service
 /Server


 Notice I am using an engine named, Engine_01.

 In the Engine_01 directory I have a context fragment file named,
 ROOT.xml. Here is its one line contents:
   Context path=/ docBase=./


 In my server.xml you'll notice I have my appBase property set to
 ..\Sites\Test 1. Here is the Sites directory structure:

   C:\Projects\Sites\
   |
   +-Test 1\
   |
   +-index.html
   +-WEB-INF\
   |
   +-web.xml
   +-classes\
   +-root\


 It's all quite simple, I think. When I run under v5.5.9 it is perfect,
 as I said.

 Using the EXACT SAME configuration, running under v5.5.12, I see this
 WARNING and EXCEPTION when I start TC:

 WARNING: A docBase C:\Projects\Sites\Test 1\. inside the host appBase
 has been specified, and will be ignored
 Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext
 resourcesStart
 SEVERE: Error starting static Resources
 java.lang.IllegalArgumentException: Document base
 C:\Projects\Configs\..\Sites\Test 1\ROOT does not exist or is not a
 readable directory
at
 org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)

at
 org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3777)

at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3948)
at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)

at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
 org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)

at
 org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)

at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)

at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at
 org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at
 org.apache.catalina.core.StandardService.start(StandardService.java:450)
at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext start
 SEVERE: Error in resourceStart()
 Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext start
 SEVERE: Error getConfigured
 Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext start
 SEVERE: Context [] startup failed due to previous errors
 Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext stop
 INFO: Container
 org.apache.catalina.core.ContainerBase.[ENGINE_01].[localhost].[/] has
 not been started
 Sep 26, 2005 8:37:23 PM org.apache.coyote.http11.Http11BaseProtocol start
 INFO: Starting Coyote HTTP/1.1 on http-80
 Sep 26, 2005 8:37:23 PM org.apache.catalina.startup.Catalina start
 INFO: Server 

VS: isapi_redirector and danish chars

2005-09-27 Thread Michael Salmon
Hi Mark,

Tomcat 5.5.9 and redirector 1.2.14 running on Win2000.


/Michael

-Oprindelig meddelelse-
Fra: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sendt: 26. september 2005 22:42
Til: Tomcat Users List
Emne: Re: isapi_redirector and danish chars

Michael Salmon wrote:
 Hi everybody
 
  
 
 I have a problem with Isapi_redirector and danish chars. I have a
webapp
 downloading files with special Danish chars in the filename.
Everything
 woks fine when Tomcat is doing the hole show, but when I do the same
 thing through IIS and isapi_redirector I get and error.
 
  
 
 Any help would be appreciated.

Some version numbers would be a start...



-
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: Generic Types support in Tomcat?

2005-09-27 Thread Seak, Teng-Fong

Nikola Milutinovic wrote:

Tomcat 5 supports all the features of the underlying JVM, the problem 
is in the JSPs. They are compiled by Jasper + Eclipse compiler module, 
which, in version 5.5.9, has no support for Java5. Later versions of 
Tomcat have a newer version of Eclipse Compiler and it works. Also, 
you can plugin manually a newer version of Eclipse compiler, try to 
search the mailing list for posts on how to do it (simple, if I 
remember correctly).


Nix.


   I would just forget about it.  Nowadays, a simple search would give 
hundreds, if not thousands or millions, results.  The problem is I don't 
know what keyword(s) to use.  Last time I spent quite a lot of time (at 
least half an hour) to find out that Tomcat (well, JSP) couldn't support 
Java5.


   Thanks anyway.

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



mangae more than one context in META-INF/context.xml

2005-09-27 Thread [EMAIL PROTECTED]
Anyone knows how mangae more than one context in META-INF/context.xml?



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



Flexible way of defining application variables in text format?

2005-09-27 Thread Seak, Teng-Fong
   My webapp needs some application string variables for 
configuration.  For the moment, I hard-code them as class static 
properties and compiled.  But I'd like to know if there's any method to 
define such variables in a text file, something like the global.asa in 
ASP where we could simply write something like this withing the 
application_onstart subroutine:

application(myvar) = my value

   I like them to be withing text file because if even there's a need 
to change config, I'd like to just launch a text editor, edit it and 
start again!  I don't want to install Eclipse or other IDE in deployment 
server just in case we need to change some parameter and have to compile 
everything.  This is very inconvenient, non professional and stupid.  
And the client would probably not appreciate this.


   OK, I know I could write a wrapper function to parse that text file 
and assign the correct values, but is there a simpler way?  Is the 
answer lying in the web.xml file?  But its syntax seems quite 
complicated that I've no idea what to begin.


   TIA

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



[OT] RE: Flexible way of defining application variables in text format?

2005-09-27 Thread Allistair Crossley
Hi,

Just enter your variables into a text file called abc.properties with 
name/value pairs, e.g 

var1=val1
var2=val2

Although these will not automatically appear in application scope. You will 
need to write a tiny Servlet that you configure in web.xml, pass the filename 
as a servlet parameter, and set the servlet to load-on-startup=1. 

In your servlet, retrieve the filename and load the properties into a HashMap. 
Finally add it to the servlet context. Your application can now use the map 
from application scope, and better still, you can use it in JSTL syntax with 
$applicationScope.myprops['var1']

There are other ways but this is my recommended way.

Allistair.

 -Original Message-
 From: Seak, Teng-Fong [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 09:37
 To: Tomcat Users List
 Subject: Flexible way of defining application variables in 
 text format?
 
 
 My webapp needs some application string variables for 
 configuration.  For the moment, I hard-code them as class static 
 properties and compiled.  But I'd like to know if there's any 
 method to 
 define such variables in a text file, something like the 
 global.asa in 
 ASP where we could simply write something like this withing the 
 application_onstart subroutine:
 application(myvar) = my value
 
 I like them to be withing text file because if even 
 there's a need 
 to change config, I'd like to just launch a text editor, edit it and 
 start again!  I don't want to install Eclipse or other IDE in 
 deployment 
 server just in case we need to change some parameter and have 
 to compile 
 everything.  This is very inconvenient, non professional and stupid.  
 And the client would probably not appreciate this.
 
 OK, I know I could write a wrapper function to parse that 
 text file 
 and assign the correct values, but is there a simpler way?  Is the 
 answer lying in the web.xml file?  But its syntax seems quite 
 complicated that I've no idea what to begin.
 
 TIA
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT



Re:Flexible way of defining application variables in text format?

2005-09-27 Thread [EMAIL PROTECTED]
in web.xml u can set all the constants u want as:

 env-entry
env-entry-namenameVariavle/env-entry-name
env-entry-valuevalueVariable/env-entry-value
env-entry-typejava.lang.String or whatelse/env-entry-type
/env-entry

and use this for getting them
public static String  getEnvVar(String name)
  throws NamingException
  {
  String var=;
  try
  {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup( java:comp/env );
var = (String) envCtx.lookup( name );
  }
 catch (NamingException e) {
  e.printStackTrace();
}
return var;
  }

regards!!

-- Initial Header ---

From  : Seak, Teng-Fong [EMAIL PROTECTED]
To  : Tomcat Users List tomcat-user@jakarta.apache.org
Cc  :
Date  : Tue, 27 Sep 2005 10:36:30 +0200
Subject : Flexible way of defining application variables in text format?







 My webapp needs some application string variables for
 configuration.  For the moment, I hard-code them as class static
 properties and compiled.  But I'd like to know if there's any method to
 define such variables in a text file, something like the global.asa in
 ASP where we could simply write something like this withing the
 application_onstart subroutine:
 application(myvar) = my value

 I like them to be withing text file because if even there's a need
 to change config, I'd like to just launch a text editor, edit it and
 start again!  I don't want to install Eclipse or other IDE in deployment 
 server just in case we need to change some parameter and have to compile
 everything.  This is very inconvenient, non professional and stupid.
 And the client would probably not appreciate this.

 OK, I know I could write a wrapper function to parse that text file
 and assign the correct values, but is there a simpler way?  Is the
 answer lying in the web.xml file?  But its syntax seems quite
 complicated that I've no idea what to begin.

 TIA

 -
 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: Flexible way of defining application variables in text format?

2005-09-27 Thread Allistair Crossley
To make this easier in the presentation tier, you would probably want to make 
this method a static member of some class (if using scriplet), or a tag if 
attempting a non-scripted presentation tier (recommended). 

Allistair.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 09:50
 To: tomcat-user
 Subject: Re:Flexible way of defining application variables in text
 format?
 
 
 in web.xml u can set all the constants u want as:
 
  env-entry
 env-entry-namenameVariavle/env-entry-name
 env-entry-valuevalueVariable/env-entry-value
 env-entry-typejava.lang.String or whatelse/env-entry-type
 /env-entry
 
 and use this for getting them
 public static String  getEnvVar(String name)
   throws NamingException
   {
   String var=;
   try
   {
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup( java:comp/env );
 var = (String) envCtx.lookup( name );
   }
  catch (NamingException e) {
   e.printStackTrace();
 }
 return var;
   }
 
 regards!!
 
 -- Initial Header ---
 
 From  : Seak, Teng-Fong [EMAIL PROTECTED]
 To  : Tomcat Users List tomcat-user@jakarta.apache.org
 
 Cc  : 
 Date  : Tue, 27 Sep 2005 10:36:30 +0200
 Subject : Flexible way of defining application variables in 
 text format?
 
 
 
 
 
 
 
 
  My webapp needs some application string variables for 
  configuration.  For the moment, I hard-code them as class static 
  properties and compiled.  But I'd like to know if there's 
 any method to 
  define such variables in a text file, something like the 
 global.asa in 
  ASP where we could simply write something like this withing the 
  application_onstart subroutine:
  application(myvar) = my value
  
  I like them to be withing text file because if even 
 there's a need 
  to change config, I'd like to just launch a text editor, 
 edit it and 
  start again!  I don't want to install Eclipse or other IDE 
 in deployment 
 
  server just in case we need to change some parameter and 
 have to compile 
  everything.  This is very inconvenient, non professional 
 and stupid.  
  And the client would probably not appreciate this.
  
  OK, I know I could write a wrapper function to parse 
 that text file 
  and assign the correct values, but is there a simpler way?  Is the 
  answer lying in the web.xml file?  But its syntax seems quite 
  complicated that I've no idea what to begin.
  
  TIA
  
  
 -
  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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



HTTP header lines

2005-09-27 Thread Wilding, Gregory
How do I limit the amount of information disclosed in the HTTP header
lines within Tomcat

Thanks

 Gregory Wilding 
 EDS Business Exchange Services 
 Abney Park 
 Manchester Road 
 Cheadle 
 Cheshire SK8 2PD 
 Tel   +44 (0) 161 495 3488 
 Fax +44(0) 161 428 5009 
 mailto:[EMAIL PROTECTED] 
 
 


Re: Flexible way of defining application variables in text format?

2005-09-27 Thread NoKideen
On Tuesday 27 September 2005 15:36, Seak, Teng-Fong wrote:
 My webapp needs some application string variables for
 configuration.  For the moment, I hard-code them as class static
 properties and compiled.  But I'd like to know if there's any method to
 define such variables in a text file, something like the global.asa in
 ASP where we could simply write something like this withing the
 application_onstart subroutine:
 application(myvar) = my value

any better idea than this one ? without modification web.xml :-D


this is example to to read
-
import lib.ConfLineSeparator;
...
...
ConfLineSeparator c = new ConfLineSeparator(/whereis/thefile/file.conf);
out.println(c.getConf(dbPwd,VALUEifMissing)); 
...
...


this is example data file /whereis/thefile/file.conf
--
#CONFig Text Mode, 
#Place many Configuration here
#Format is : property=value or property = value
#there is no SPACE, space is WASTE of String :-p
#value is value not value or 'value'
#all Chars are case sensitive
#Add # char to comment

# Db Conf
dbPwd=secret


Try this API Class file
-
package lib;
import java.io.*;
import java.util.Vector;

public class ConfLineSeparator {
String[] all;
int i=0;
String currentProp, currentVal;
Vector p;
Vector v;

public ConfLineSeparator(String file) {
all = new String[2000]; //maximum
p = new Vector();
v = new Vector();

readFile(file);
processNow();
}
public void readFile(String file) {
debug( Reading +file);
try {
i=0;
FileInputStream fstream = new FileInputStream(file);
DataInputStream in = new DataInputStream(fstream);

while (in.available() !=0){
i++;
in.readLine();
}
in.close();


all = new String[i];

i=0;
fstream = new FileInputStream(file);
in = new DataInputStream(fstream);
while (in.available() !=0){
all[i++] = in.readLine();
debug( Reading Got this data +all[i-1]);
}
in.close();

} catch (Exception e) {
debug( Reading Exception +e.getMessage());
}
}

public void processNow() {
// trim it
for (int z=0;z  all.length; z++) {
all[z] = all[z].trim();
}

i=0;
for (int z=0;z  all.length; z++) {
if (all[z].startsWith(#)) {

} else if (all[z].startsWith(#end)) {
return;
} else if (all[z].indexOf('=')==-1) {

} else if (all[z]==null || all[z]==) {

} else {
try {
p.add(i,new 
String(all[z].substring(0,all[z].indexOf('=')).trim()));
v.add(i,new 
String(all[z].substring(all[z].indexOf('=')+1,all[z].length()).trim()));
} catch (Exception e) {
}
debug((i) +  = +p.get(i)+ value_is 
+v.get(i));
i++;
}

}

}

public String getConf(String prop, String IfValueNotFound) {
try {
int tmp = p.indexOf(prop);
if (tmp =0  tmpv.size())
return (String) v.get(tmp);
else
return IfValueNotFound;
} catch (Exception e) {
//e.printStackTrace();
return IfValueNotFound;
}
}

public void debug(String x) {
//System.out.println(x);
}
}

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



Re: HTTP header lines

2005-09-27 Thread Anto Paul
On 9/27/05, Wilding, Gregory [EMAIL PROTECTED] wrote:
 How do I limit the amount of information disclosed in the HTTP header
 lines within Tomcat


You can change the server name by modifying the file
org\apache\catalina\util\ServerInfo.properties which resides in
server\lib\catalina.jar. Extract this to server\classes and modify
values as needed.

--
rgds
Anto Paul

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



Re: Flexible way of defining application variables in text format?

2005-09-27 Thread Jilles van Gurp

NoKideen wrote:

On Tuesday 27 September 2005 15:36, Seak, Teng-Fong wrote:

My webapp needs some application string variables for
configuration.  For the moment, I hard-code them as class static
properties and compiled.  But I'd like to know if there's any method to
define such variables in a text file, something like the global.asa in
ASP where we could simply write something like this withing the
application_onstart subroutine:
application(myvar) = my value


any better idea than this one ? without modification web.xml :-D


this is example to to read
-
import lib.ConfLineSeparator;
...
...
ConfLineSeparator c = new ConfLineSeparator(/whereis/thefile/file.conf);
out.println(c.getConf(dbPwd,VALUEifMissing)); 
...

...


this is example data file /whereis/thefile/file.conf
--
#CONFig Text Mode, 
#Place many Configuration here

#Format is : property=value or property = value
#there is no SPACE, space is WASTE of String :-p
#value is value not value or 'value'
#all Chars are case sensitive
#Add # char to comment

# Db Conf
dbPwd=secret


Try this API Class file
-
package lib;
import java.io.*;
import java.util.Vector;

public class ConfLineSeparator {
String[] all;
int i=0;
String currentProp, currentVal;
Vector p;
Vector v;

public ConfLineSeparator(String file) {
all = new String[2000]; //maximum
p = new Vector();
v = new Vector();

		readFile(file);

processNow();
}
public void readFile(String file) {
debug( Reading +file);
try {
i=0;
FileInputStream fstream = new FileInputStream(file);
DataInputStream in = new DataInputStream(fstream);

while (in.available() !=0){
i++;
in.readLine();
}
in.close();

		
		all = new String[i];
		
		i=0;

fstream = new FileInputStream(file);
in = new DataInputStream(fstream);
while (in.available() !=0){
all[i++] = in.readLine();
debug( Reading Got this data +all[i-1]);
}
in.close();
		
		} catch (Exception e) {

debug( Reading Exception +e.getMessage());
}
}

public void processNow() {
// trim it
for (int z=0;z  all.length; z++) {
all[z] = all[z].trim();
}

i=0;
for (int z=0;z  all.length; z++) {
if (all[z].startsWith(#)) {

} else if (all[z].startsWith(#end)) {
return;
} else if (all[z].indexOf('=')==-1) {

} else if (all[z]==null || all[z]==) {

} else {
try {
p.add(i,new 
String(all[z].substring(0,all[z].indexOf('=')).trim()));
	v.add(i,new 
String(all[z].substring(all[z].indexOf('=')+1,all[z].length()).trim()));

} catch (Exception e) {
}
debug((i) +  = +p.get(i)+ value_is 
+v.get(i));
i++;
}

}

}

public String getConf(String prop, String IfValueNotFound) {
try {
int tmp = p.indexOf(prop);
if (tmp =0  tmpv.size())
return (String) v.get(tmp);
else
return IfValueNotFound;
} catch (Exception e) {
//e.printStackTrace();
return IfValueNotFound;
}
}

public void debug(String x) {
//System.out.println(x);
}
}

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



Use commons.configuration. Works beautifully and has the advantage that 
you don't need to change your deployment descriptor or server.xml if you 
want to change the configuration. With commons-configuration you can 
also reload and write the properties, store them in xml, a database or a 
simple 

Re: Generic Types support in Tomcat?

2005-09-27 Thread Nikola Milutinovic

Seak, Teng-Fong wrote:


Nikola Milutinovic wrote:

Tomcat 5 supports all the features of the underlying JVM, the problem 
is in the JSPs. They are compiled by Jasper + Eclipse compiler 
module, which, in version 5.5.9, has no support for Java5. Later 
versions of Tomcat have a newer version of Eclipse Compiler and it 
works. Also, you can plugin manually a newer version of Eclipse 
compiler, try to search the mailing list for posts on how to do it 
(simple, if I remember correctly).



   I would just forget about it.  Nowadays, a simple search would give 
hundreds, if not thousands or millions, results.  The problem is I 
don't know what keyword(s) to use.  Last time I spent quite a lot of 
time (at least half an hour) to find out that Tomcat (well, JSP) 
couldn't support Java5.



Well, just to clarify, JSPs *can* run Java5 idioms - if you provide 
Tomcat with a JSP/Java compiler that will undestand them. Servlets are 
compiled by you and will have no problems running on the desired JVM. 
OTOH, having Java code in JSPs is evil and should be moved to Servlets 
or Struts Actions or whatever is the equivalent in Java ServerFaces. JSP 
are for displaying only.


Having said that, I must contradict myself here. I have found that 
sometimes having a bit of Java code in JSP can clarify things, but it 
can also bring in a nightmare, especially with JSF. Keep Java code in 
JSPs to the minimum and if you have to use it, use it for presentation 
logic only. Business logic should be elsewhere.


Nix.

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



IIS 6 and Tomcat5.0 [Our Ref:CPT6950D]

2005-09-27 Thread fwalters

Hi
I need to connect to Tomcat5.0 using an isapi redirect filter. In
addition I would like to prevent any other access to Tomcat (other
than from IIS 6). How can I go about configuring Tomcat to achieve
this objective?



This e-mail is intended exclusively for the addressee.
If you are not the addressee you must not read, copy, use or disclose
the e-mail nor the content; please notify us immediately (by clicking Reply) 
and delete this e-mail.

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



Re: An error about Tomcat 4.0

2005-09-27 Thread Tim Funk

See the error logs ..
 java.lang.NoClassDefFoundError at
...
org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:72) 



For some reason - a class is missing. The source of the JSP should tell you 
the missing class.


-Tim

Greece wrote:

Hi,Everyone,
 
I am using cewolf to draw chart in Tomcat 4.0. And The program has been run successfully, but when I moved the same program file and used JAR file to the web server, whose OS is Solorias, there has been appearing the error message as below:
 
javax.servlet.ServletException

at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at 
org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:262)
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(JspServlet.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)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)




root cause 
java.lang.NoClassDefFoundError	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)	at java.lang.Class.newInstance0(Class.java:308)	at java.lang.Class.newInstance(Class.java:261)	at java.beans.Beans.instantiate(Beans.java:204)	at java.beans.Beans.instantiate(Beans.java:48)	at org.apache.jsp.fr110_0005fchartTest$jsp._jspService(fr110_0005fchartTest$jsp.java:72)	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(JspServlet.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) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 

Re: HTTP header lines

2005-09-27 Thread Tim Funk

There is a configuration parameter on the Connector called server. For example:

server='Its a secret 180/3.14'

-Tim

Wilding, Gregory wrote:


How do I limit the amount of information disclosed in the HTTP header
lines within Tomcat
 


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



setting more than one context in META-INF/context.xml

2005-09-27 Thread [EMAIL PROTECTED]
Hi all
I'd like to set more than one context in META-INF/context.xml
Any idea?
Is it usefulle creating another context.xml in METa-INF and how to configure 
it??
please help
Regards


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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Jess Holle

Dumb question:

How does one enable 1.5 source features in post 5.5.9 Tomcats?

I know how you can do it with the latest 5.0 sources (i.e. with Ant JSP 
compilation) but I'm still at 5.5.9 and wondering how this is controlled 
in 5.5.12.


--
Jess Holle

Nikola Milutinovic wrote:


Seak, Teng-Fong wrote:


   When I first saw the announcement that Tomcat 5.5 needs Java5 to
run, I thought it would supports Java5 features.  But it turns out that
it needs Java5 but not supports Java5.  Quite disappointed.  Anyway, I
have to go on with my webapp, so much for it.


Tomcat 5 supports all the features of the underlying JVM, the problem 
is in the JSPs. They are compiled by Jasper + Eclipse compiler module, 
which, in version 5.5.9, has no support for Java5. Later versions of 
Tomcat have a newer version of Eclipse Compiler and it works. Also, 
you can plugin manually a newer version of Eclipse compiler, try to 
search the mailing list for posts on how to do it (simple, if I 
remember correctly).


Nix.

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



Embedded Tomcat and shared objects...

2005-09-27 Thread Darryl L. Pierce
I have embedded Tomcat 5.0.28 into an application I'm writing. Tomcat is 
being used primarily as the configuration system. I would like to, from 
the servlet running within Tomcat, access objects that are a part of the 
main application itself, specific some configuration objects. Is there a 
way, while I'm created the instance of 
org.apache.catalina.startup.Embedded and all of the related objects, to 
set a reference to some objects? I tried setting it in the servlet 
context as I created the instance of org.apache.catalina.Context for my 
servlet's context but getServletContext() returns null at that point...

--
Darryl L. Pierce [EMAIL PROTECTED]
Homepage: http://mcpierce.multiply.com/
Bury me next to my wife. Nothing too fancy... - Ulysses S. Grant

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



How to share the session between two web-applications?

2005-09-27 Thread starki78
Hi I've a web-application with authentification
that is running on tomcat.
Now we have the problem that another webapplication
is deployed that shall work with the userobject
of the other web-application.
But I'm not able to enable a session-object being
valid for two web-applications.

Can someone give me a tip?

Ciao


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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Bjørn T Johansen
So how is this affecting the use of Tomcat 5.5.9?
I am using Java 5 features with Tomcat 5.5.9 without any problems, so what do I 
need to do
to discover Tomcat 5.5.9 shortcomings with respect to Java 5?


Regards,

BTJ

Christoph Kutzinski wrote:
 What's what story?
 
 Java 5 features are not supported in latest tomcat stable (5.5.9), but
 are in the latest alphas (5.5.10-5.5.12)
 Just as I said in my previous mail.
 
 Seak, Teng-Fong wrote:
 
 I've received an announcement mail telling that 5.5.12 is in alpha
 phase!  So what's this story?  Actually, I'm more interested in using
 the new for loop in Java5 than using generic.

 Christoph Kutzinski wrote:


 Hi,

 it is only since 5.5.10
 5.5.10 was already released, but it is only supposed to be alpha.
 I.e. not recommended for production use.
 I have no idea, when the next stable tomcat version will be released


 Christoph





 -
 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: Generic Types support in Tomcat?

2005-09-27 Thread Christoph Kutzinski

To be honest, I never tried it with 5.5.9
I just concluded it from the release notes and other posts on this 
mailing list.


AFAIK, tomcat uses the Eclipse JDT compiler by default to compile JSPs.
Maybe you have configured tomcat to use Suns javac?

Bjørn T Johansen wrote:

So how is this affecting the use of Tomcat 5.5.9?
I am using Java 5 features with Tomcat 5.5.9 without any problems, so what do I 
need to do
to discover Tomcat 5.5.9 shortcomings with respect to Java 5?


Regards,

BTJ

Christoph Kutzinski wrote:


What's what story?

Java 5 features are not supported in latest tomcat stable (5.5.9), but
are in the latest alphas (5.5.10-5.5.12)
Just as I said in my previous mail.

Seak, Teng-Fong wrote:



   I've received an announcement mail telling that 5.5.12 is in alpha
phase!  So what's this story?  Actually, I'm more interested in using
the new for loop in Java5 than using generic.

Christoph Kutzinski wrote:




Hi,

it is only since 5.5.10
5.5.10 was already released, but it is only supposed to be alpha.
I.e. not recommended for production use.
I have no idea, when the next stable tomcat version will be released


Christoph






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




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




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




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



Vacation

2005-09-27 Thread joykline
This message is generated automatically.  I am on vacation until 9/30.
Joyce

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



RE: Flexible way of defining application variables in text format?

2005-09-27 Thread Caldarale, Charles R
 From: NoKideen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Flexible way of defining application variables 
 in text format?
 
 Try this API Class file

Is there some reason you went to all this trouble rather than using
java.util.Properties?

 - Chuck


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

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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Bjørn T Johansen
Nope, I am just using the default installation and configurations...

BTJ

Christoph Kutzinski wrote:
 To be honest, I never tried it with 5.5.9
 I just concluded it from the release notes and other posts on this
 mailing list.
 
 AFAIK, tomcat uses the Eclipse JDT compiler by default to compile JSPs.
 Maybe you have configured tomcat to use Suns javac?
 
 Bjørn T Johansen wrote:
 
 So how is this affecting the use of Tomcat 5.5.9?
 I am using Java 5 features with Tomcat 5.5.9 without any problems, so
 what do I need to do
 to discover Tomcat 5.5.9 shortcomings with respect to Java 5?


 Regards,

 BTJ

 Christoph Kutzinski wrote:

 What's what story?

 Java 5 features are not supported in latest tomcat stable (5.5.9), but
 are in the latest alphas (5.5.10-5.5.12)
 Just as I said in my previous mail.

 Seak, Teng-Fong wrote:


I've received an announcement mail telling that 5.5.12 is in alpha
 phase!  So what's this story?  Actually, I'm more interested in using
 the new for loop in Java5 than using generic.

 Christoph Kutzinski wrote:



 Hi,

 it is only since 5.5.10
 5.5.10 was already released, but it is only supposed to be alpha.
 I.e. not recommended for production use.
 I have no idea, when the next stable tomcat version will be released


 Christoph






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



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



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

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

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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Christoph Kutzinski
To be clear: You are using Java 5 features (generics, for-each loop 
etc.) in JSPs?


Bjørn T Johansen wrote:

Nope, I am just using the default installation and configurations...

BTJ

Christoph Kutzinski wrote:


To be honest, I never tried it with 5.5.9
I just concluded it from the release notes and other posts on this
mailing list.

AFAIK, tomcat uses the Eclipse JDT compiler by default to compile JSPs.
Maybe you have configured tomcat to use Suns javac?

Bjørn T Johansen wrote:



So how is this affecting the use of Tomcat 5.5.9?
I am using Java 5 features with Tomcat 5.5.9 without any problems, so
what do I need to do
to discover Tomcat 5.5.9 shortcomings with respect to Java 5?


Regards,

BTJ

Christoph Kutzinski wrote:



What's what story?

Java 5 features are not supported in latest tomcat stable (5.5.9), but
are in the latest alphas (5.5.10-5.5.12)
Just as I said in my previous mail.

Seak, Teng-Fong wrote:




  I've received an announcement mail telling that 5.5.12 is in alpha
phase!  So what's this story?  Actually, I'm more interested in using
the new for loop in Java5 than using generic.

Christoph Kutzinski wrote:





Hi,

it is only since 5.5.10
5.5.10 was already released, but it is only supposed to be alpha.
I.e. not recommended for production use.
I have no idea, when the next stable tomcat version will be released


Christoph







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




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




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




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



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




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



RE: Flexible way of defining application variables in text format?

2005-09-27 Thread George Sexton
I use a properties file stored in the WEB-INF directory. Modifying the
web.xml is too error prone. Using another XML file is a lot harder than a
properties file. Just use the servlet context getResourceAsStream(), and
pass that to the properties.load() method.

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

 -Original Message-
 From: Seak, Teng-Fong [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 27, 2005 2:37 AM
 To: Tomcat Users List
 Subject: Flexible way of defining application variables in 
 text format?
 
 My webapp needs some application string variables for 
 configuration.  For the moment, I hard-code them as class static 
 properties and compiled.  But I'd like to know if there's any 
 method to 
 define such variables in a text file, something like the 
 global.asa in 
 ASP where we could simply write something like this withing the 
 application_onstart subroutine:
 application(myvar) = my value
 
 I like them to be withing text file because if even 
 there's a need 
 to change config, I'd like to just launch a text editor, edit it and 
 start again!  I don't want to install Eclipse or other IDE in 
 deployment 
 server just in case we need to change some parameter and have 
 to compile 
 everything.  This is very inconvenient, non professional and stupid.  
 And the client would probably not appreciate this.
 
 OK, I know I could write a wrapper function to parse that 
 text file 
 and assign the correct values, but is there a simpler way?  Is the 
 answer lying in the web.xml file?  But its syntax seems quite 
 complicated that I've no idea what to begin.
 
 TIA
 
 -
 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: Generic Types support in Tomcat?

2005-09-27 Thread Santosh Asbe
Hi all,
 A] I am using tomcat 4.1.30 ( 32 bit) with Apache 2.0.46 ( this is standard
apache which comes with RHEL 3.0). I am currently using RHEL 32 bit without
RAID confiuration.
 Now i am planning to move to 64 bit RHEL 3.0 with RAID configuration but he
the new Apache of RHEL 3.0 and same tomcat 4.1.30 ( 32 bit).
 I am facing a problem with mod_jk.
I feel it is 32 bit complied mod_jk.
 Can anyone help me with the solution
 B] Also my tomcat goes into hang state . So i have set an parameter
LD_ASSUME_KERNEL=2.4.21. That is my Linux kernel version. Is this ok. where
do i set this parameter. i have set it in the catalina.sh.
 C] Sometime when the tomcat is started it spwans more than one processes.
And then during shudown it creates problems. Also sometimes the list of open
files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot
respond.
 D] I am currently using 4.1.30 version of tomcat. Are there any fixes or
upgrades for this tomcat. Can you inform me the link for the same.
  Thanks in advance.
  regards,
 Santosh


Tomcat related help required

2005-09-27 Thread Santosh Asbe
Hi all,

A] I am using tomcat 4.1.30 ( 32 bit) with Apache 2.0.46 ( this is standard
apache which comes with RHEL 3.0). I am currently using RHEL 32 bit without
RAID confiuration.

Now i am planning to move to 64 bit RHEL 3.0 with RAID configuration but he
the new Apache of RHEL 3.0 and same tomcat 4.1.30 ( 32 bit).

I am facing a problem with mod_jk.
I feel it is 32 bit complied mod_jk.

Can anyone help me with the solution

B] Also my tomcat goes into hang state . So i have set an parameter
LD_ASSUME_KERNEL=2.4.21. That is my Linux kernel version. Is this ok. where
do i set this parameter. i have set it in the catalina.sh.

C] Sometime when the tomcat is started it spwans more than one processes.
And then during shudown it creates problems. Also sometimes the list of open
files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot
respond.

D] I am currently using 4.1.30 version of tomcat. Are there any fixes or
upgrades for this tomcat. Can you inform me the link for the same.


Thanks in advance.


regards,

Santosh


Re: Generic Types support in Tomcat?

2005-09-27 Thread Christoph Kutzinski

You should start a new discussion thread.
I cannot see how this is even remotely related to generic types and Tomcat.

Santosh Asbe wrote:

Hi all,
 A] I am using tomcat 4.1.30 ( 32 bit) with Apache 2.0.46 ( this is standard
apache which comes with RHEL 3.0). I am currently using RHEL 32 bit without
RAID confiuration.
 Now i am planning to move to 64 bit RHEL 3.0 with RAID configuration but he
the new Apache of RHEL 3.0 and same tomcat 4.1.30 ( 32 bit).
 I am facing a problem with mod_jk.
I feel it is 32 bit complied mod_jk.
 Can anyone help me with the solution
 B] Also my tomcat goes into hang state . So i have set an parameter
LD_ASSUME_KERNEL=2.4.21. That is my Linux kernel version. Is this ok. where
do i set this parameter. i have set it in the catalina.sh.
 C] Sometime when the tomcat is started it spwans more than one processes.
And then during shudown it creates problems. Also sometimes the list of open
files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot
respond.
 D] I am currently using 4.1.30 version of tomcat. Are there any fixes or
upgrades for this tomcat. Can you inform me the link for the same.
  Thanks in advance.
  regards,
 Santosh




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



RE: Please verify this is correct: Need multiple virtual directories for isapi_redirector

2005-09-27 Thread David Thielen
Asking again

Thanks - dave

David Thielen
303-499-2544
www.windwardreports.com

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 22, 2005 9:10 AM
To: 'Tomcat Users List'
Subject: Please verify this is correct: Need multiple virtual directories
for isapi_redirector

Hi;

I want to make sure this is correct:


If you want to run Tomcat against multiple websites, not just the default
website, this is what I have had to do.

This is on Windows 2003/IIS 6.0.

I removed isapi_redirector.dll from the default web site ISAPI Filters and
put it in the parent Web Sites ISAPI Filter properties.

I added a jakarta virtual directory for each website (and I have a lot.).

Now it appears to work.

??? - thanks - dave



-
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: Desperately need help: What is correct for workers.properties.minimal

2005-09-27 Thread David Thielen
Asking again - thanks - dave


David Thielen
303-499-2544
www.windwardreports.com

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 22, 2005 9:09 AM
To: 'Tomcat Users List'
Subject: Desperately need help: What is correct for
workers.properties.minimal

Hi;

I'm running Tomcat 5.5 on Windows 2003/IIS 6.0 using isapi_redirect

The isapi_redirect.exe installer creates a worker.properties.minimal of:
worker.list=wlb,jkstatus
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w
worker.jkstatus.type=status

While the docs show one of:
worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

First, what use is the load balancing if I have just one server running one
instance of Tomcat? Does it load balance within that one instance?

Second, what is jkstatus for?

Third, I am using the non-lb listing above. And it appears to work fine but
occasionally I am getting the following. What does it mean:

[Thu Sep 22 07:30:02 2005] [error] HttpExtensionProc::jk_isapi_plugin.c
(1029): could not get a worker for name ajp13
[Thu Sep 22 07:36:20 2005] [info]  ajp_send_request::jk_ajp_common.c (1178):
Socket 320 is not connected any more (errno=-1)
[Thu Sep 22 07:36:20 2005] [info]  ajp_send_request::jk_ajp_common.c (1202):
Error sending request. Will try another pooled connection

Thanks - dave



-
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: Please verify this is correct: Need multiple virtual directories for isapi_redirector

2005-09-27 Thread Allistair Crossley
Dave,

If it's working via a solution you've configured, and you are not writing a 
specification of how things will work, why do you keep asking this question?

With best intentions, Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 15:52
 To: 'Tomcat Users List'
 Subject: RE: Please verify this is correct: Need multiple virtual
 directories for isapi_redirector
 
 
 Asking again
 
 Thanks - dave
 
 David Thielen
 303-499-2544
 www.windwardreports.com
 
 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 22, 2005 9:10 AM
 To: 'Tomcat Users List'
 Subject: Please verify this is correct: Need multiple virtual 
 directories
 for isapi_redirector
 
 Hi;
 
 I want to make sure this is correct:
 
 
 If you want to run Tomcat against multiple websites, not just 
 the default
 website, this is what I have had to do.
 
 This is on Windows 2003/IIS 6.0.
 
 I removed isapi_redirector.dll from the default web site 
 ISAPI Filters and
 put it in the parent Web Sites ISAPI Filter properties.
 
 I added a jakarta virtual directory for each website (and I 
 have a lot.).
 
 Now it appears to work.
 
 ??? - thanks - dave
 
 
 
 -
 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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: IIS 6 and Tomcat5.0 [Our Ref:CPT6950D]

2005-09-27 Thread Tracy Spratt
Connect IIS 6 to Tomcat 5

I needed to set up a simple distributed system consisting of an outward
facing, secured IIS 6 web server and an internal, dedicated Flex server
running under Tomcat 5.  There is a lot of documentation out there but
that in itself is a problem.  It is difficult to know what really
applies and what is out of date.  I just successfully set up several
such systems using the Tomcat == IIS connector.  Following are the
steps I took, and comments and tips about what I have learned.

Here is a link to the connector documentation index, if you want to do
this the hard way:
http://jakarta.apache.org/tomcat/connectors-doc/

First the problem in a nutshell:
You can happily call your Flex applications from an IIS application
(like ASP.NET) on an internal development system by using the host name
(or IP address) and the port number.  For example, in a custom wrapper
this will work: http://myFlexServer:8080/flex/myApp/myFile.mxml.
However, if you try to use that custom wrapper from outside the
firewall, in other words, from the internet, you will find that port
8080, and most others, are blocked, and you cannot access your Flex
application.

One solution is a Jakarta Tomcat Connector, which directs calls to
your Flex app through the IIS web server to the Flex/Tomcat server.  You
can do the same this with JRUN, and, I suspect, other J2EE servers as
well.  This connector allows you to use the IIS web server in the URL
to the Flex app, without requiring any port specifications to gag the
firewall.  So the URL  to a Flex app like in the example above becomes:
http://www.myIISWebServer.com/flex/myApp/myFile.mxml. 

How does a connector work?  There are IIS and Tomcat parts.  The
Tomcat side is already set up for you in ...\Tomcat 5.0\conf\server.xml,
whose job it is to create Tomcat listeners on specified ports.  It
sets up the normal listener on, for example, port 8080, but it also sets
up a special listener on port 8009.  In fact, if you have the Tomcat log
level set to Info (the Monitor Tomcat menu/dialog, logging tab), you
can look in the log: ...\Tomcat 5.0\logs\stdout.log, and see the line:
INFO: JK2: ajp13 listening on /0.0.0.0:8009

But you can really just trust me, it is there.

On the IIS side, the connector works by using an ISAPI filter. This
filter watches URL s for certain contexts, and passes those contexts
on to the specified handler dll.  The simplest context is one of the
folders under the Tomcat webapps folder.  For example, /flex/, and
/samples/ (yes, these are the folders you think) are Tomcat contexts in
a default flex install.

Setting up IIS to use Tomcat connector
You actually have to do some work now, but not as much as you would
think by reading the documentation.

Note:  You want to be working with the JK connector, NOT the JK2
connector, which has been deprecated.  Never mind that the log shows
JK2, or that there is a jk2.properties file in the Tomcat\conf folder,
and that a google search will turn up a lot of people still using JK2.

First, obtain the connector installer: isapi_redirect-1.2.14.exe  It is
available from several locations including:
http://www.devlib.org/apache/jakarta/tomcat-connectors/jk/binaries/win32
/jk-1.2.14/

Now run the install. There does not appear to be any documentation for
the installer, but here is a link to a document that describes the
manual method of what the installer does, plus troubleshooting and
general info, just FYI.
http://jakarta.apache.org/tomcat/connectors-doc/howto/iis.html

Briefly, the install creates a folder structure and adds a few files to
it, sets some registry entries, creates an IIS virtual directory, adds
the isapi_redirect.dll to the IIS website ISAPI filters tab.  It should
take care of all the steps listed in the above howto document under
Configuring the ISAPI Redirector.

Next add a Web Service Extension.  This needs to be done manually
because the install works for IIS 5 and 6, but Web Service Extension
only applies to IIS 6.
*   Open the ... Administrative Tools, Internet Information Services
console.
*   In the tree on the left, click  Web Service Extensions
*   In the right hand pane, click Add a new Web Service Extension
*   For the Extension Name, enter: Jakarta Tomcat
*   Click the Add button.
*   Browse and select C:\Program Files\Apache Software
Foundation\Jakarta Isapi Redirector\bin\isapi_redirector.dll
*   Click the Allow button.  DO NOT MISS THIS STEP!
*   From the Services  MMC, restart IIS Admin

Now, the install defaults to looking for a Tomcat listener on localhost.
If your Tomcat is on a different server, as mine was, you will need to
make a simple edit.

On the IIS web server, edit:
C:\Program Files\Apache Software Foundation\Jakarta Isapi
Redirector\conf\workers.properties.minimal

Change the line that says:
worker.ajp13w.host=localhost
To:
worker.ajp13w.host= www.myIISWebServer.com
You can also use an IP address.  I do not know if a 

Re: Flexible way of defining application variables in text format?

2005-09-27 Thread NoKideen
On Tuesday 27 September 2005 16:48, Jilles van Gurp wrote:
 NoKideen wrote:
 
  this is example to to read
  -
  import lib.ConfLineSeparator;
  ...
  ...
  ConfLineSeparator c = new
  ConfLineSeparator(/whereis/thefile/file.conf);
  out.println(c.getConf(dbPwd,VALUEifMissing));
  ...
  ...
 Use commons.configuration. Works beautifully and has the advantage that
 you don't need to change your deployment descriptor or server.xml if you
 want to change the configuration. With commons-configuration you can
 also reload and write the properties, store them in xml, a database or a
 simple text file.


is there any example, I'd still confuse how to read dot properties file


I think may API was to odds :-D, yeah that was trouble
but there is one thing I like is comments using #



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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Nikola Milutinovic

Christoph Kutzinski wrote:


To be honest, I never tried it with 5.5.9
I just concluded it from the release notes and other posts on this 
mailing list.


AFAIK, tomcat uses the Eclipse JDT compiler by default to compile JSPs.
Maybe you have configured tomcat to use Suns javac?



That is one way of doing, the other is to download latest Eclipse JDT 
compiler and configure TC to use it.


Nix.

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



https from client to web server, http from web server proxy to tomcat,

2005-09-27 Thread nawar
We have an application from a 3rd party vendor that appears to be clueless on
how to support tomcat.

We currently use SSL at the Sun One Web Server front end, then standard http
from the proxy connection to tomcat.

The application has 5 modules, 4 of the modules work fine in this configuration,
in that the code returned to the webserver appears to remember that it came
from an https:// address.

Unfortunately, one of the modules (the most important one of course), refuses to
send the information back with https: - it constantly sends back http:

Since we are not using https between tomcat and the iPlanet proxy, the normal
proxyHost proxyPort (https.proxyHost and https.proxyPort) do not appear to help,
as they try and force https communications between Tomcat and iPlanet.

What I really need is a simple string translation, or other method that tells
Tomcat to send any responses back with https: in the string, but not to use
SSL for the communications.

Thanks,

LB

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



RE: Flexible way of defining application variables in text format?

2005-09-27 Thread Caldarale, Charles R
 From: NoKideen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Flexible way of defining application variables 
 in text format?
 
 is there any example, I'd still confuse how to read dot 
 properties file
 
 I think may API was to odds :-D, yeah that was trouble
 but there is one thing I like is comments using #

Fullly supported by the java.util.Properties class.  Read the API spec.

 - Chuck


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

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



How to configure a single JDBC connection via Tomcat's JDBC JNDI configurations for Oracle

2005-09-27 Thread Edmon Begoli
Anyone,

I want to configure Tomcat 5.5.x to access each database in the Oracle
cluster, and not using the pool.
This configuration is for database diagnostic puproses, so I need to create
a single connection everytime.

What is the most appropriate way to this using Oracle driver?

Currently I am doing this:

 Resource name=jdbc/server name
 auth=Container
 driverClassName=oracle.jdbc.driver.OracleDriver
 type=javax.sql.DataSource
 username=username
 password=password
 url=jdbc:oracle:thin:@server
 maxActive=1
 maxIdle=1
 maxWait=-1
 removeAbandoned=true
 logAbandoned=true
 removeAbandonedTimeout=300 /

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


RE: https from client to web server, http from web server proxy to tomcat,

2005-09-27 Thread Wick, Daniel
LB,

 
 We currently use SSL at the Sun One Web Server front end, 
 then standard http from the proxy connection to tomcat.

I believe you should have this type of setup:
Client -https-Sun WS -http-Tomcat  (proxy)
Client -https-Sun WS -http-Tomcat  (reverse proxy)

 
 The application has 5 modules, 4 of the modules work fine in 
 this configuration, in that the code returned to the 
 webserver appears to remember that it came from an https:// address.
 
 Unfortunately, one of the modules (the most important one of 
 course), refuses to send the information back with https: - 
 it constantly sends back http:

I believe this would be corrected with reverse proxy.  Tomcat shouldn't
send directly back to the client. It should send it to your web server
to be proxied back to the client.

Hope that helps you.

 --Dan

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



Re: (WAS) Generic Types support in Tomcat?

2005-09-27 Thread Nikola Milutinovic

Santosh Asbe wrote:


Hi all,
 



Hi. First of all, it is very advisable to use a separate thread when 
opening a new topic. I am not reprimanding you, I'm merely advising. I 
do not consider it rude to jump into someone elses thread of 
discussion - I do not consider this thread mine, in the first place. 
The problem is, this thread has been going on for some time and most 
people are not going to bother reading it at all, so you will loose 
valuable audience.



A] I am using tomcat 4.1.30 ( 32 bit) with Apache 2.0.46 ( this is standard
apache which comes with RHEL 3.0). I am currently using RHEL 32 bit without
RAID confiuration.
 



There is no 32-bit version of TC, it is Java application. JVM, of 
course, is and should be 32/64-bit.



Now i am planning to move to 64 bit RHEL 3.0 with RAID configuration but he
the new Apache of RHEL 3.0 and same tomcat 4.1.30 ( 32 bit).
I am facing a problem with mod_jk.
I feel it is 32 bit complied mod_jk.
 



It most likely is.


Can anyone help me with the solution
 



Unless you can locate a 64-bit version of mod_jk, try compiling your own 
version. You'll need apache-devel-* RPM for that. Some might say that 
even 32-bit version of mod_jk will work, but I would fly away from it - 
mod_jk is a sensitive pieve of software, connecting (multithreaded) 
Apache with multithreaded TC and the version should be as close to the 
target platform, as possible.



B] Also my tomcat goes into hang state . So i have set an parameter
LD_ASSUME_KERNEL=2.4.21. That is my Linux kernel version. Is this ok. where
do i set this parameter. i have set it in the catalina.sh.
 



The location is OK, but you should not use it on the new kernel. Is it 
2.6.x? Older releases of 2.6 branch had a problem with JVM and you had 
to set that parameter. New releases should be bug free.



C] Sometime when the tomcat is started it spwans more than one processes.
And then during shudown it creates problems. Also sometimes the list of open
files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot
respond.
 



Linux kernel 2.4 emulates threads through lightweight processes/tasks. 
There is nothing fundamentally wrong about it (perhaps internal resource 
ecconomics are misused), AFAIK, but the ps output is going to confuse 
you, showing each thread as a separate process. Nothing problematic 
about it.


The number of 1024 processes/threads is alarming, however. TC will 
normally wpawn idle worker threads to prepare for future requests, but 
the parameter is usually less than 100. I'd say your application is 
launching threads for some reason. Either that or there is a serious bug 
in your system.



D] I am currently using 4.1.30 version of tomcat. Are there any fixes or
upgrades for this tomcat. Can you inform me the link for the same.
 



4.1.30 is the last normal RPM, I know of. There are newer versions, 
check out www.JPackage.org. Word of caution, prepare for RPM dependancy 
nightmare, unless you're using some RPM management tool.


Nix.

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



save form-data in xml-file

2005-09-27 Thread Anne Milbert
Hi,

I got a problem in saving the data submitted by a form in a xml-file. I
wrote a servlet which uses a method createXML() to put the form-data into a
xml-file. The problem is: I can't run this method in the servlet. But if I
put it in a normal class and call it in the main-method everything works
fine.
What am I doing wrong?

Regards,
Anne


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



RE: save form-data in xml-file

2005-09-27 Thread Robyne Vaughn
not necessarily a tomcat question, but once-upon-a-time I had a similar
situation accessing JDBC data.  As long as I ran my app directly, I
could do so, but once embedded in servlet it would not.  It turned out
that it was an authorization problem.  While running the app directly, I
was logged in and had authorization, from the servlet, I had not
provided any password or signon.  I had to put a user-id and password
into my servlet-application to gain access to the data.

Robyne K. Vaughn

 
  _  



-Original Message-
From: Anne Milbert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 27, 2005 9:44 AM
To: tomcat-user@jakarta.apache.org
Subject: save form-data in xml-file


Hi,

I got a problem in saving the data submitted by a form in a xml-file. I
wrote a servlet which uses a method createXML() to put the form-data
into a xml-file. The problem is: I can't run this method in the servlet.
But if I put it in a normal class and call it in the main-method
everything works fine. What am I doing wrong?

Regards,
Anne


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



Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread NoKideen
is there anybody know how to do this ?
Running Tomcat as Non-Root under Linux listen for port 80

I'd try as tomcat , but there is error even if 
I do
# chown -R tomcat:root /usr/tomcat/*


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



Re: (WAS) Generic Types support in Tomcat?

2005-09-27 Thread Leon Rosenberg
  C] Sometime when the tomcat is started it spwans more than one processes.
 And then during shudown it creates problems. Also sometimes the list of open
 files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot
 respond.
 
 

 Linux kernel 2.4 emulates threads through lightweight processes/tasks.
 There is nothing fundamentally wrong about it (perhaps internal resource
 ecconomics are misused), AFAIK, but the ps output is going to confuse
 you, showing each thread as a separate process. Nothing problematic
 about it.

 The number of 1024 processes/threads is alarming, however. TC will
 normally wpawn idle worker threads to prepare for future requests, but
 the parameter is usually less than 100. I'd say your application is
 launching threads for some reason. Either that or there is a serious bug
 in your system.

On older system, kernel 2.4.x, there is indeed a problem with that
many threads.
After creating more then X thread, where X was about 500 for tomcat,
tomcat will not be able to create more threads and throw an
(confusing) OutOfMemoryError. If this occures it stops answering and
refuses futher service. You will then be able to monitor that tomcat
halfs its threads all 3-5 minutes, until it dies silently with ~40
threads. However, this is only partially tomcats problem (it shouldn't
die on OutOfMemoryErrors), but more of the JVM and the underlying
thread library. However with NPTL (which is default for 2.6.x
distributions) you can spawn enough threads (I think about 3500).

Anyway, ulimit of 1024 is very low, since tomcat watches all jsp files
for changes (unless you switched reloading off).

So my advice, upgrade to 2.6.x kernel (sarge under debian), set ulimit
to 8192, rethink your threading settings.  The only reason you could
actually need 1000 threads is having http 1.1 with keep-alives on and
users with slow connections.

regards
Leon

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



RE: Please verify this is correct: Need multiple virtual directories for isapi_redirector

2005-09-27 Thread David Thielen
I ask because I have come across way too many situations where something
works not by design, but by luck. And then it turns out that while it did
work - under certain circumstances it doesn't and I am left trying to find
the correct solution in the middle of an emergency.

Also, if this is the correct way to do it, I was going to post it in my blog
as I am sure others run across this same problem.

Thanks - dave


David Thielen
303-499-2544
www.windwardreports.com

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 27, 2005 8:57 AM
To: Tomcat Users List
Subject: RE: Please verify this is correct: Need multiple virtual
directories for isapi_redirector

Dave,

If it's working via a solution you've configured, and you are not writing a
specification of how things will work, why do you keep asking this question?

With best intentions, Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 15:52
 To: 'Tomcat Users List'
 Subject: RE: Please verify this is correct: Need multiple virtual
 directories for isapi_redirector
 
 
 Asking again
 
 Thanks - dave
 
 David Thielen
 303-499-2544
 www.windwardreports.com
 
 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 22, 2005 9:10 AM
 To: 'Tomcat Users List'
 Subject: Please verify this is correct: Need multiple virtual 
 directories
 for isapi_redirector
 
 Hi;
 
 I want to make sure this is correct:
 
 
 If you want to run Tomcat against multiple websites, not just 
 the default
 website, this is what I have had to do.
 
 This is on Windows 2003/IIS 6.0.
 
 I removed isapi_redirector.dll from the default web site 
 ISAPI Filters and
 put it in the parent Web Sites ISAPI Filter properties.
 
 I added a jakarta virtual directory for each website (and I 
 have a lot.).
 
 Now it appears to work.
 
 ??? - thanks - dave
 
 
 
 -
 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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential
and may be privileged. This email is intended solely for the named recipient
only; if you are not authorised you must not disclose, copy, distribute, or
retain this message or any part of it. If you have received this message in
error please contact the sender at once so that we may take the appropriate
action and avoid troubling you further.  Any views expressed in this message
are those of the individual sender.  QAS Limited has the right lawfully to
record, monitor and inspect messages between its employees and any third
party.  Your messages shall be subject to such lawful supervision as QAS
Limited deems to be necessary in order to protect its information, its
interests and its reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS
Limited cannot guarantee that attachments are virus free or compatible with
your systems and does not accept any liability in respect of viruses or
computer problems experienced.
/FONT


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


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



RE: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Peter Crowther
 From: NoKideen [mailto:[EMAIL PROTECTED] 
 Subject: Running Tomcat as Non-Root under Linux listen for port 80
 
 is there anybody know how to do this ?

Use the port redirection facilities in Linux (the details vary depending
on your kernel, but ipchains or iptables is a good place to start if I
recall) to forward all requests that come in on port 80 to port 8080.
That way, Linux can run as a non-root user but still see requests
arriving on port 80.

- Peter

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



AW: save form-data in xml-file

2005-09-27 Thread Anne Milbert
Hi Robyne,

Thanks for your reply. This seems to be the problem. But can you tell me if
I have to put password and userid in the source code of the servlet or in
the web.xml?

Regards,
Anne

-Ursprungliche Nachricht-
Von: Robyne Vaughn [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. September 2005 17:51
An: Tomcat Users List
Betreff: RE: save form-data in xml-file


not necessarily a tomcat question, but once-upon-a-time I had a similar
situation accessing JDBC data.  As long as I ran my app directly, I
could do so, but once embedded in servlet it would not.  It turned out
that it was an authorization problem.  While running the app directly, I
was logged in and had authorization, from the servlet, I had not
provided any password or signon.  I had to put a user-id and password
into my servlet-application to gain access to the data.

Robyne K. Vaughn


  _



-Original Message-
From: Anne Milbert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 27, 2005 9:44 AM
To: tomcat-user@jakarta.apache.org
Subject: save form-data in xml-file


Hi,

I got a problem in saving the data submitted by a form in a xml-file. I
wrote a servlet which uses a method createXML() to put the form-data
into a xml-file. The problem is: I can't run this method in the servlet.
But if I put it in a normal class and call it in the main-method
everything works fine. What am I doing wrong?

Regards,
Anne


-
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: save form-data in xml-file

2005-09-27 Thread Robyne Vaughn
I was afraid you'd want to know that - ha!   I'll have to go back and
try to find it.  If I remember correctly, there was a choice of either
way.  I could put it in the server.xml or in the code as a parameter to
the jdbc driver spec.
Robyne

Robyne K. Vaughn

 
  _  



-Original Message-
From: Anne Milbert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 27, 2005 10:38 AM
To: Tomcat Users List
Subject: AW: save form-data in xml-file


Hi Robyne,

Thanks for your reply. This seems to be the problem. But can you tell me
if I have to put password and userid in the source code of the servlet
or in the web.xml?

Regards,
Anne

-Ursprungliche Nachricht-
Von: Robyne Vaughn [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. September 2005 17:51
An: Tomcat Users List
Betreff: RE: save form-data in xml-file


not necessarily a tomcat question, but once-upon-a-time I had a similar
situation accessing JDBC data.  As long as I ran my app directly, I
could do so, but once embedded in servlet it would not.  It turned out
that it was an authorization problem.  While running the app directly, I
was logged in and had authorization, from the servlet, I had not
provided any password or signon.  I had to put a user-id and password
into my servlet-application to gain access to the data.

Robyne K. Vaughn


  _



-Original Message-
From: Anne Milbert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 27, 2005 9:44 AM
To: tomcat-user@jakarta.apache.org
Subject: save form-data in xml-file


Hi,

I got a problem in saving the data submitted by a form in a xml-file. I
wrote a servlet which uses a method createXML() to put the form-data
into a xml-file. The problem is: I can't run this method in the servlet.
But if I put it in a normal class and call it in the main-method
everything works fine. What am I doing wrong?

Regards,
Anne


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


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



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


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



Re: Generic Types support in Tomcat?

2005-09-27 Thread Bjørn T Johansen
Nope, I am using it in the java server code, not jsp...
Hence my question :)


BTJ

Christoph Kutzinski wrote:
 To be clear: You are using Java 5 features (generics, for-each loop
 etc.) in JSPs?
 
 Bjørn T Johansen wrote:
 
 Nope, I am just using the default installation and configurations...

 BTJ

 Christoph Kutzinski wrote:

 To be honest, I never tried it with 5.5.9
 I just concluded it from the release notes and other posts on this
 mailing list.

 AFAIK, tomcat uses the Eclipse JDT compiler by default to compile JSPs.
 Maybe you have configured tomcat to use Suns javac?

 Bjørn T Johansen wrote:


 So how is this affecting the use of Tomcat 5.5.9?
 I am using Java 5 features with Tomcat 5.5.9 without any problems, so
 what do I need to do
 to discover Tomcat 5.5.9 shortcomings with respect to Java 5?


 Regards,

 BTJ

 Christoph Kutzinski wrote:


 What's what story?

 Java 5 features are not supported in latest tomcat stable (5.5.9), but
 are in the latest alphas (5.5.10-5.5.12)
 Just as I said in my previous mail.

 Seak, Teng-Fong wrote:



   I've received an announcement mail telling that 5.5.12 is in alpha
 phase!  So what's this story?  Actually, I'm more interested in using
 the new for loop in Java5 than using generic.

 Christoph Kutzinski wrote:




 Hi,

 it is only since 5.5.10
 5.5.10 was already released, but it is only supposed to be alpha.
 I.e. not recommended for production use.
 I have no idea, when the next stable tomcat version will be released


 Christoph







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



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



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



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



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

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

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



Re: How to configure a single JDBC connection via Tomcat's JDBC JNDI configurations for Oracle

2005-09-27 Thread andy gordon
The attribute maxactive controls how big the pool is. if maxactive is set to 1 
then there can be only 1 per time. There are also non-dbcp solutions which have 
oracle examples described under JDBC datasources link in tomcat 5.5 doc at 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
good luck
 
- andy gordon

Edmon Begoli [EMAIL PROTECTED] wrote:
Anyone,

I want to configure Tomcat 5.5.x to access each database in the Oracle
cluster, and not using the pool.
This configuration is for database diagnostic puproses, so I need to create
a single connection everytime.

What is the most appropriate way to this using Oracle driver?

Currently I am doing this:

 
auth=Container
driverClassName=oracle.jdbc.driver.OracleDriver
type=javax.sql.DataSource
username=
password=

url=jdbc:oracle:thin:@
maxActive=1
maxIdle=1
maxWait=-1
removeAbandoned=true
logAbandoned=true
removeAbandonedTimeout=300 /

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

RE: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Peter Crowther
 From: Peter Crowther 
 That way, Linux can run as a non-root user but still see requests
 arriving on port 80.

Sorry.  Brain fade.  Replace 'Linux' with 'Tomcat' in the above.

- Peter

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



Re: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Andrés Glez .

Use jsvc.

- Original Message - 
From: NoKideen [EMAIL PROTECTED]

To: tomcat-user@jakarta.apache.org
Sent: Tuesday, September 27, 2005 6:13 PM
Subject: Running Tomcat as Non-Root under Linux listen for port 80



is there anybody know how to do this ?
Running Tomcat as Non-Root under Linux listen for port 80

I'd try as tomcat , but there is error even if 
I do

# chown -R tomcat:root /usr/tomcat/*


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





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



Re: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Joost de Heer
NoKideen said:
 is there anybody know how to do this ?
 Running Tomcat as Non-Root under Linux listen for port 80

80 is a privileged port ( 1024) and you need root-rights to bind to a
privileged port.

If the problem is that you don't have access to root, ask the admin to
implement sudo.

Joost


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



RE: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Phillip Qin
Create a normal user $TOMCAT_USER

/bin/su $TOMCAT_USER -- $CATALINA_HOME/bin/startup.sh

Owner is root, group is $TOMCAT_USER.

-Original Message-
From: NoKideen [mailto:[EMAIL PROTECTED] 
Sent: September 27, 2005 12:14 PM
To: tomcat-user@jakarta.apache.org
Subject: Running Tomcat as Non-Root under Linux listen for port 80

is there anybody know how to do this ?
Running Tomcat as Non-Root under Linux listen for port 80

I'd try as tomcat , but there is error even if 
I do
# chown -R tomcat:root /usr/tomcat/*


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


!DSPAM:43396f67114289339113072!


re: https to web server, http from proxy to tomcat

2005-09-27 Thread nawar
We are currently using an nsapi plugin module for our proxy component.
As far as I know, it does not support reverse-proxy setup.

Since we are using the standard Sun One Web Server, I am not familiar with 
reverse proxy.

If you could shed some lite on this, or point me in the right direction, I 
would greatly appreciate it.

Thanks,

LB

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



Re: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread David Smith
a.k.a. Commons-Daemon (http://jakarta.apache.org/commons/daemon/)

Works beautifully.

--David

Andrés Glez. wrote:

 Use jsvc.

 - Original Message - From: NoKideen [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Sent: Tuesday, September 27, 2005 6:13 PM
 Subject: Running Tomcat as Non-Root under Linux listen for port 80


 is there anybody know how to do this ?
 Running Tomcat as Non-Root under Linux listen for port 80

 I'd try as tomcat , but there is error even if I do
 # chown -R tomcat:root /usr/tomcat/*


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



ManagerX for 5.5.9

2005-09-27 Thread Paul Singleton

Which version of ManagerX should I use with Tomcat 5.5.9?
5.5-1.6 or 5.5-1.7.1?

I have tried installing each, following their instructions
(copy the jar and web.xml as appropriate) but am stuck on the
third instruction (Have fun!) and am not having any.  Should
I start the Manager in the usual way, and should I notice any
difference?  I am using it because I have several virtual hosts,
both name-based and (where SSL is requirede) address-based, and
wish to manage the whole lot together.

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.7/112 - Release Date: 26/Sep/2005


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



saving files in webapp folder from deletion?

2005-09-27 Thread Thomas Corte

Hi there,

I have a setup in which certain trusted users of a web application X may 
upload new content files which are then put into webapps/X/content to be 
served from there.
The problem is that everything unter /webapps/X is *deleted* by Tomcat 
upon undeploy, including the uploaded stuff.


My question is: what would be the best way to deal with this?
Of course, I'd love to put the uploaded files into directories *outside* 
of webapps/X, but there seems to be no way to let Tomcat serve them then 
as part of webapp X.
A possibility I'm currently considering is to backup the files by an 
Application Listener prior the the undeployment and to restore them upon 
re-deploy.


Any thoughts?

--
Thomas Corte
[EMAIL PROTECTED]

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



Re: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Pete Stevens
On Tue, 27 Sep 2005, Joost de Heer wrote:

 NoKideen said:
  is there anybody know how to do this ?
  Running Tomcat as Non-Root under Linux listen for port 80

 80 is a privileged port ( 1024) and you need root-rights to bind to a
 privileged port.

 If the problem is that you don't have access to root, ask the admin to
 implement sudo.

Here's a guide on how to set it up.

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

Pete

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

They may not have invented corruption in NYC, but they have tried to perfect it.
-- seen on the internet

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



JMX Method to check JDBC connection acivity?

2005-09-27 Thread Edmon Begoli
Is there a handy MBean in Tomcat that would allow me to do on demand check
if the connection to the database is up?

I've looked at DataSource but that one does not expose getConnection, and
the one that requires username and password throws RMI permission exception.
I would really like to have something simple as can connect or similar.

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


Re: Question about tomcat startup ConcurrentModificationException

2005-09-27 Thread Jilles van Gurp
The fix is to replace the mx4j jar file in the release (bin/jmx.jar) 
with the fixed version (latest 2.1.x) which has been available for a 
long time now from the mx4j project site.


You might also search this mailinglist. This must be one of the more 
frequently raised topics. I know I found the right answer here half a 
year ago or so.


I'd really appreciate a stable 5.0.x release with the fix. I've known 
about this bug for more than half a year now and I still encounter it at 
least once a week at customers. I then need to explain that it is not 
our product that is broken but tomcat and that it's a well known issue 
and it is easy to fix. Basically all our customers run into this issue.


Lets face it, 5.0.28 is basically broken because of this easy to fix 
bug. People claim it rarely occurs (and consequently that it is 
perfectly acceptable to occasionally fail to launch with an obscure 
exception). Yet, I can't launch my webapp on an unpatched tomcat 5.0.28 
unless I fix this first. Sometimes I forget on a clean install and then 
seconds later slap my forward. Just do a 5.0.28_01 with the fixed jar or 
finally move 5.0.30 to a stable release (I can't convince customers to 
install beta software) but please fix it one way or the other.


Jilles

Tim Funk wrote:
Search bugzilla.  There is a bug report about 
ConcurrentModificationException - it has to do with mx4j having a race 
condition. The bug describes a fix.


-Tim

Maurice Yarrow wrote:


Hello Tomcat people

When tomcat is restarted, it occasionally (1 in 25 times)
gets the below exception.  (tomcat 5.0.28, on Fedora Core 1)

What is the significance of this?

Thanks
Maurice


INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 26, 2005 9:29:19 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Sep 26, 2005 9:29:19 AM org.apache.coyote.tomcat5.MapperListener init
WARNING: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap.putAllForCreate(HashMap.java:424)
at java.util.HashMap.clone(HashMap.java:656)
at 
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at 
mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:160 


-
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: saving files in webapp folder from deletion?

2005-09-27 Thread Leon Rosenberg
setup X as context/webapp (incl. an empty WEB-INF) and probably a
web.xml. this should be sufficent, unless you have something else
badly broken :-)

lg
leon

On 9/27/05, Thomas Corte [EMAIL PROTECTED] wrote:
 Hi there,

 I have a setup in which certain trusted users of a web application X may
 upload new content files which are then put into webapps/X/content to be
 served from there.
 The problem is that everything unter /webapps/X is *deleted* by Tomcat
 upon undeploy, including the uploaded stuff.

 My question is: what would be the best way to deal with this?
 Of course, I'd love to put the uploaded files into directories *outside*
 of webapps/X, but there seems to be no way to let Tomcat serve them then
 as part of webapp X.
 A possibility I'm currently considering is to backup the files by an
 Application Listener prior the the undeployment and to restore them upon
 re-deploy.

 Any thoughts?

 --
 Thomas Corte
 [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: Embedded Tomcat and shared objects...

2005-09-27 Thread Leon Rosenberg
Aehm, without looking deeper into context initialization, just a short guess:
what about making your configuration objects a singleton with
public static CLASSNAME getInstance()
or
provide a factory for them?

regards
leon

On 9/27/05, Darryl L. Pierce [EMAIL PROTECTED] wrote:
 I have embedded Tomcat 5.0.28 into an application I'm writing. Tomcat is
 being used primarily as the configuration system. I would like to, from
 the servlet running within Tomcat, access objects that are a part of the
 main application itself, specific some configuration objects. Is there a
 way, while I'm created the instance of
 org.apache.catalina.startup.Embedded and all of the related objects, to
 set a reference to some objects? I tried setting it in the servlet
 context as I created the instance of org.apache.catalina.Context for my
 servlet's context but getServletContext() returns null at that point...
 --
 Darryl L. Pierce [EMAIL PROTECTED]
 Homepage: http://mcpierce.multiply.com/
 Bury me next to my wife. Nothing too fancy... - Ulysses S. Grant

 -
 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: saving files in webapp folder from deletion?

2005-09-27 Thread Thomas Corte

Hi,

Leon Rosenberg wrote:


setup X as context/webapp (incl. an empty WEB-INF) and probably a
web.xml. this should be sufficent, unless you have something else
badly broken :-)


So you mean I should create a second web app/context Y and put the 
uploaded files there?

If this is the suggestion, it would create new problems:

- The upload code in X would have to use absolute paths to point
  to directories within the reach of Y.
- I didn't mention it before, but access to parts of the uploaded
  content, as well as to the upload form itself, must be restricted
  by a sign-on process implemented in webapp X.
  However, if the content is served by another webapp Y, this would
  prove difficult since there is no session sharing across webapps, is
  there?

--
Thomas Corte
[EMAIL PROTECTED]

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



RE: Problem defining JNDI data source.

2005-09-27 Thread Sastry Malladi
In tomcat 5.5.9, defining the resources under the Context element seems to 
have this kind of an issue. One way to resolve this is to define your 
datasource (i.e, Resource) under Server/GlobalNamingResources element  and 
then define a ResourceLink  in context.xml (in the same location as 
server.xml). Hope this helps.

This worked for us.

Sastry Malladi,
Architect
SpikeSource 


 I'm having difficulty defining a JNDI data source using C3P0 pooling in 
 Tomcat 5.5.9.  Here is the context descriptor for my app:
 
 Context path=/ems reloadable=true
 Logger className=org.apache.catalina.logger.SystemOutLogger 
 verbosity=4 timestamp=true/
 Loader className=org.apache.catalina.loader.DevLoader 
 reloadable=true debug=1/
 Resource
 name=jdbc/EmsDb
 description=DB Connection
 auth=Container
 driverClass=net.sourceforge.jtds.jdbc.Driver
 minPoolSize=5
 maxPoolSize=10
 acquireIncrement=1
 user=sa
 password=
 factory=org.apache.naming.factory.BeanFactory
 type=com.mchange.v2.c3p0.ComboPooledDataSource
 jdbcUrl=jdbc:jtds:sqlserver://mars:1433/ems?autoReconnect=true
 /
 /Context
 
 Here is the resource-ref portion of my application descriptor:
 
   resource-ref
   descriptionDatabase Connection/description
 res-ref-namejdbc/EmsDb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
   /resource-ref
 
 And here is the error I get from Tomcat when deploying the application:
 2005-09-27 00:55:33,559 [http-8080-Processor25] ERROR 
 JDBCExceptionReporter - Cannot create JDBC driver of class '' for 
 connect URL 'null'
 
 It almost seems as if the resource-ref is somehow overriding the 
 Resource definition in the application context.
 Any suggestions?
 
 Thanks,
 Dave
 
 
 -
 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: Problem defining JNDI data source.

2005-09-27 Thread David C. Hicks
Thanks, I'll give it a try.  I think that's the one combination I have 
*not* tried yet.  :-)


Sastry Malladi wrote:

In tomcat 5.5.9, defining the resources under the Context element seems to 
have this kind of an issue. One way to resolve this is to define your 
datasource (i.e, Resource) under Server/GlobalNamingResources element  and 
then define a ResourceLink  in context.xml (in the same location as 
server.xml). Hope this helps.


This worked for us.

Sastry Malladi,
Architect
SpikeSource 

 

 



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



Re: Flexible way of defining application variables in text format?

2005-09-27 Thread matador
Seak, Teng-Fong [EMAIL PROTECTED] wrote in news:4339048E.30608
@yahoo.com:

 My webapp needs some application string variables for 
 configuration.  For the moment, I hard-code them as class static 
 properties and compiled.  But I'd like to know if there's any method to 
 define such variables in a text file, something like the global.asa in 
 ASP where we could simply write something like this withing the 
 application_onstart subroutine:
 application(myvar) = my value

 
 TIA

database.  using props files you have to bounce the app to get changes to 
take effect unless you write your own properties loader that runs as a 
thread, or checks file timestamps, etc.  

imo, its all too messy, db based config is far superior


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



Re: saving files in webapp folder from deletion?

2005-09-27 Thread Pham Tran Quoc Viet
Create x outside of webapps and create a soft link within webapps that
points to x.
Then, within server.xml add the following lines:
Context docBase=absolute path to x soft link path=link name
allowLinking=true/

That's it. Everytime the soft link is hit, tomcat will follow the
symbolic link get the appropriate requested file under x.

On 9/27/05, Thomas Corte [EMAIL PROTECTED] wrote:
 Hi,

 Leon Rosenberg wrote:

  setup X as context/webapp (incl. an empty WEB-INF) and probably a
  web.xml. this should be sufficent, unless you have something else
  badly broken :-)

 So you mean I should create a second web app/context Y and put the
 uploaded files there?
 If this is the suggestion, it would create new problems:

 - The upload code in X would have to use absolute paths to point
to directories within the reach of Y.
 - I didn't mention it before, but access to parts of the uploaded
content, as well as to the upload form itself, must be restricted
by a sign-on process implemented in webapp X.
However, if the content is served by another webapp Y, this would
prove difficult since there is no session sharing across webapps, is
there?

 --
 Thomas Corte
 [EMAIL PROTECTED]

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




--
Pham Tran Quoc Viet

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