Quick Question

2002-08-12 Thread TOMITA_ALEX_NONLILLY

Hi all,

I wrote a simple java bean that reads a txt file, the problem is where do 
I need to put the txt file??...
What is the default directory in Tomcat??

when I put something like this in my java bean : 
FileReader("config.txt") 
Where does tomcat look for that file?

thanks
Alex



Quick question?

2001-10-03 Thread James Turner

Do you happen to know what directory Turbine tries to load
TurbineResources.properties from if you specify "." as the path in new
TurbineConfig?

Thanks,
James





Quick Question...

2001-12-03 Thread Richard S. Huntrods

Greetings!

I have a quick question.  I was running just fine on Tomcat 3.2.3.  I
have built servlets, which sit in
webapps/myapp/WEB-INF/classes/myapp/*.class

In Tomcat 3.2.3, this structure was picked up when Tomcat started, and
the servlets ran perfectly.  Note - there was no need for "web.xml" in
the directories, as I was just using defaults.  Everything ran.

I have now installed Tomcat 4.0.  Tomcat runs perfectly with the default
set of "webapps".  Now, I have replaced these with my set of classes (as
above) from 3.2.3, and Tomcat tries to start, but immediately quits.  If
I replace the default set of "webapps", it will run - so it is my stuff.

The quick question - Tomcat is supposed to automatically pick up the
classes in this directory structure whenever it starts, but is not doing
it the same as for 3.2.3.  I assume something simple has changed.  Can
anyone tell me what I need to add?  I tried adding a default "web.xml",
but that didn't seem to do it.

Thanks,

-Richard


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




quick question

2003-09-24 Thread Steven Garrett
Hi,

Can I envoke jsp from outside of the application directory.  For example, I
have /var/tomcat4/webapps/application/some.jsp.  Can I put some.jsp in
/home/apache/ (my apache docroot) and have it still work?

Thanks,

Steve

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



RE: Quick Question

2002-08-13 Thread Isabel Lameda

Try to create a file in your bean and see where Tomcat stores it

-Mensaje original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Enviado el: Lunes, 12 de Agosto de 2002 06:00 p.m.
Para: Tomcat Users List
Asunto: Quick Question


Hi all,

I wrote a simple java bean that reads a txt file, the problem is where do 
I need to put the txt file??...
What is the default directory in Tomcat??

when I put something like this in my java bean : 
FileReader("config.txt") 
Where does tomcat look for that file?

thanks
Alex

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




RE: Quick Question

2002-08-13 Thread Drinkwater, GJ (Glen)


tomcats default directory is where ever you called the startup.sh/bat file.
So if you dont use another script to call the startup.sh/bat file tomcats
default will be the bin directory.

Use this code to find the directory where WEB-INF is.  Then you can traverse
your directory structure from there. 

//get context path
ServletConfig scon = null ;
String workingDir = null;

public void init(ServletConfig config) {
scon = config ;
 }
 public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
  
//get working dir
ServletContext sc = scon.getServletContext();
workingDir = sc.getRealPath("");


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Quick Question

2002-08-13 Thread Michael E. Locasto

Alex,

Probably the current working directory, which is whatever directory Tomcat
was started out of (probably bin/, but not necessarily so). You can provide
a full file name in the code, or use your web.xml to set a context parameter
that indicates a base path to do read/write relative to in your servlet.

You could also put that file somewhere your web application's Classloader
will see it and load it via a findResource() or getResourceAsStream().

Regards,
Michael

- Original Message -
From: "Isabel Lameda" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, August 13, 2002 8:50 AM
Subject: RE: Quick Question


> Try to create a file in your bean and see where Tomcat stores it
>
> -Mensaje original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Enviado el: Lunes, 12 de Agosto de 2002 06:00 p.m.
> Para: Tomcat Users List
> Asunto: Quick Question
>
>
> Hi all,
>
> I wrote a simple java bean that reads a txt file, the problem is where do
> I need to put the txt file??...
> What is the default directory in Tomcat??
>
> when I put something like this in my java bean :
> FileReader("config.txt")
> Where does tomcat look for that file?
>
> thanks
> Alex
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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




RE: Quick Question

2002-08-13 Thread TOMITA_ALEX_NONLILLY

Hi all,

I'm trying to resolve this problem with all the solutions that you gave 
me,  but it doesn't work...
This is what I did:

in my java bean (not a servlet), I have this code:


public class DbBean {
   public  int Connect()  {
   InputStream is = 
Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
if (is == null) {
return 0;
}
else {
return 1;
}
}


then in my jsp, I called this method, and then I write the value (0 or 
1)..

The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in a 
package called "beans", and I start tomcat from TOMCAT_HOME/bin..
When I load the jsp, the method Connect of the DbBean (java bean) returned 
0, which means the InputStream is null, but if I put the txt file in
TOMCAT_HOME/bin, I had no problem, the method returned 1  why is 
that??.. I'm using Tomcat 3.2
Do I need to set something else in Tomcat??

thanks again
Alex Tomita













"Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
13/08/2002 08:11 a.m.
Please respond to Tomcat Users List

 
To: Tomcat Users List <[EMAIL PROTECTED]>
cc: 
Subject:RE: Quick Question




tomcats default directory is where ever you called the startup.sh/bat 
file.
So if you dont use another script to call the startup.sh/bat file tomcats
default will be the bin directory.

Use this code to find the directory where WEB-INF is.  Then you can 
traverse
your directory structure from there. 

//get context path
ServletConfig scon = null ;
String workingDir = null;
 
public void init(ServletConfig config) {
scon = config ;
 }
 public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
 
//get working dir
ServletContext sc = scon.getServletContext();
workingDir = sc.getRealPath("");


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






RE: Quick Question

2002-08-13 Thread Drinkwater, GJ (Glen)

hi

what you should try to do is either from your jsp use the method I suggested
before and pass the info to your bean, or if this is a config file, use this
method which works I have just tried it, to load your file into a properties
class.

Properties conf = new Properties();
conf.load(getClass().getResource("config.txt").openStream());

then you can extract the information.

glen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Quick Question

2002-08-14 Thread Durham David Cntr 805CSS/SCBE

post questions to the list please.  

It will work in a bean if you pass a reference to the servlet context to it.  I'm not 
all that familiar with using beans in jsp but I think that you will have to break out 
of the bean tags and actually make a method call like:  <% 
myBean.setServletContext(getServletContext()) %>


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 5:21 PM
To: Durham David Cntr 805CSS/SCBE
Subject: RE: Quick Question



the "getServletContext.getRealPath" will work in a java bean?? 

I'm trying to read a txt file from a java bean instead of a java servlet.   then I 
use the bean in a jsp page. 

thanks 
Alex 









Durham David Cntr 805CSS/SCBE <[EMAIL PROTECTED]> 
12/08/2002 05:12 p.m. 
Please respond to Tomcat Users List 

To:Tomcat Users List <[EMAIL PROTECTED]> 
cc:     
Subject:RE: Quick Question 




getServletContext.getRealPath("/config.txt") will return the path to config.txt in the 
root of your apps directory.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 5:00 PM
> To: Tomcat Users List
> Subject: Quick Question
> 
> 
> Hi all,
> 
> I wrote a simple java bean that reads a txt file, the problem 
> is where do 
> I need to put the txt file??...
> What is the default directory in Tomcat??
> 
> when I put something like this in my java bean : 
> FileReader("config.txt") 
> Where does tomcat look for that file?
> 
> thanks
> Alex
> 

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

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




RE: Quick Question

2002-08-14 Thread Larry Meadors

IMO, it seems like a bad idea to me to tie your bean 
code to a servlet context unless you REALLY need to.

To me, a better way would be to put the file in a 
directory under classes, and use the classloader of 
the current thread to get to the file.

This way, you do not need servlet.jar to use your bean 
if you every decide to use it outside of a servlet.

This is a very simple process. Here is an example:

private InputStream getFile(String name){
 return Thread.
  currentThread().
  getContextClassLoader().
  getResourceAsStream(name);
}

To read a properties file classes/myprops.properties 
for instance, you just do this:

Properties p = new Properties();
p.load(getFile("myprops.properties"));

Larry

>>> [EMAIL PROTECTED] 08/14/02 08:42 AM >>>
It will work in a bean if you pass a reference 
to the servlet context to it...

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Quick Question

2002-08-14 Thread Durham David Cntr 805CSS/SCBE

good point, although if you need to write to the file, getResourceAsStream doesn't 
work.  Is there something else along the same lines that will?


> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 10:11 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Quick Question
> 
> 
> IMO, it seems like a bad idea to me to tie your bean 
> code to a servlet context unless you REALLY need to.
> 
> To me, a better way would be to put the file in a 
> directory under classes, and use the classloader of 
> the current thread to get to the file.
> 
> This way, you do not need servlet.jar to use your bean 
> if you every decide to use it outside of a servlet.
> 
> This is a very simple process. Here is an example:
> 
> private InputStream getFile(String name){
>  return Thread.
>   currentThread().
>   getContextClassLoader().
>   getResourceAsStream(name);
> }
> 
> To read a properties file classes/myprops.properties 
> for instance, you just do this:
> 
> Properties p = new Properties();
> p.load(getFile("myprops.properties"));
> 
> Larry
> 
> >>> [EMAIL PROTECTED] 08/14/02 08:42 AM >>>
> It will work in a bean if you pass a reference 
> to the servlet context to it...
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




RE: Quick Question

2002-08-14 Thread Shapira, Yoav

Howdy,

>good point, although if you need to write to the file,
getResourceAsStream
>doesn't work.  Is there something else along the same lines that will?

How's about:

URL destinationURL = ...getResource(...);
URLConnection destinationConnection = URL.openConnection();
destinationConnection.setDoOutput();
OutputStream outputStream = destinationConnection.getOutputStream();
...

You are not guaranteed this will always work across containers.  I don't
think the spec says the container *has* to give you write permission to
URLs obtained this way.

Yoav Shapira
Millennium ChemInformatics

>
>
>> -Original Message-
>> From: Larry Meadors [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 14, 2002 10:11 AM
>> To: [EMAIL PROTECTED]
>> Subject: RE: Quick Question
>>
>>
>> IMO, it seems like a bad idea to me to tie your bean
>> code to a servlet context unless you REALLY need to.
>>
>> To me, a better way would be to put the file in a
>> directory under classes, and use the classloader of
>> the current thread to get to the file.
>>
>> This way, you do not need servlet.jar to use your bean
>> if you every decide to use it outside of a servlet.
>>
>> This is a very simple process. Here is an example:
>>
>> private InputStream getFile(String name){
>>  return Thread.
>>   currentThread().
>>   getContextClassLoader().
>>   getResourceAsStream(name);
>> }
>>
>> To read a properties file classes/myprops.properties
>> for instance, you just do this:
>>
>> Properties p = new Properties();
>> p.load(getFile("myprops.properties"));
>>
>> Larry
>>
>> >>> [EMAIL PROTECTED] 08/14/02 08:42 AM >>>
>> It will work in a bean if you pass a reference
>> to the servlet context to it...
>>
>> --
>> To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



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


RE: Quick Question

2002-08-14 Thread Larry Meadors

It is  little more work to get read/write access, but the getResource()
method will give you a URL object.

You can then use URL.getProtocol() to see if it is coming from a file or
something else (a jar or even http, if you use the URLClassLoader), then
use the URL.getFile() if it was a file to get the path to the file.

Might be a good idea if you want to do that to create a 
class that makes this more abstract so you have a single API to work
with instead of trying to remember all the ClassLoader/URL/File APIs...

I might just do that - it might be fun. ;-)

Larry

>>> [EMAIL PROTECTED] 08/14/02 09:45 AM >>>
good point, although if you need to write to the 
file, getResourceAsStream doesn't work.  Is there
something else along the same lines that will?


> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 10:11 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Quick Question
> 
> 
> IMO, it seems like a bad idea to me to tie your bean 
> code to a servlet context unless you REALLY need to.
> 
> To me, a better way would be to put the file in a 
> directory under classes, and use the classloader of 
> the current thread to get to the file.
> 
> This way, you do not need servlet.jar to use your bean 
> if you every decide to use it outside of a servlet.
> 
> This is a very simple process. Here is an example:
> 
> private InputStream getFile(String name){
>  return Thread.
>   currentThread().
>   getContextClassLoader().
>   getResourceAsStream(name);
> }
> 
> To read a properties file classes/myprops.properties 
> for instance, you just do this:
> 
> Properties p = new Properties();
> p.load(getFile("myprops.properties"));
> 
> Larry
> 
> >>> [EMAIL PROTECTED] 08/14/02 08:42 AM >>>
> It will work in a bean if you pass a reference 
> to the servlet context to it...
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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



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




RE: Quick Question

2002-08-14 Thread Larry Meadors

WOW! Cool, I did not know you could do that!

>>> [EMAIL PROTECTED] 08/14/02 09:54 AM >>>

URL destinationURL = ...getResource(...);
URLConnection destinationConnection = URL.openConnection();
destinationConnection.setDoOutput();
OutputStream outputStream = destinationConnection.getOutputStream();
...


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Quick Question

2002-08-12 Thread Durham David Cntr 805CSS/SCBE

getServletContext.getRealPath("/config.txt") will return the path to config.txt in the 
root of your apps directory.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 5:00 PM
> To: Tomcat Users List
> Subject: Quick Question
> 
> 
> Hi all,
> 
> I wrote a simple java bean that reads a txt file, the problem 
> is where do 
> I need to put the txt file??...
> What is the default directory in Tomcat??
> 
> when I put something like this in my java bean : 
> FileReader("config.txt") 
> Where does tomcat look for that file?
> 
> thanks
> Alex
> 

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




RE: Quick Question

2002-08-12 Thread Larry Meadors

If you are only reading the file, you could also put it in your
$/WEB-INF/classes folder and use the class loader to get an input
stream. That way, if you jar/war the file up, it will still find it.
Like this:

InputStream is = 
  Thread.
  currentThread().
  getContextClassLoader().
  getResourceAsStream("config.txt");

Also, a change to config.txt will trigger a reload, so in development,
you do not need to restart or otherwise force the file to get reloaded.

Not sure if this makes sense in your case, but it is another option.

Larry

>>> [EMAIL PROTECTED] 08/12/02 16:14 PM >>>
getServletContext.getRealPath("/config.txt") will return the path to
config.txt in the root of your apps directory.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 5:00 PM
> To: Tomcat Users List
> Subject: Quick Question
> 
> 
> Hi all,
> 
> I wrote a simple java bean that reads a txt file, the problem 
> is where do 
> I need to put the txt file??...
> What is the default directory in Tomcat??
> 
> when I put something like this in my java bean : 
> FileReader("config.txt") 
> Where does tomcat look for that file?
> 
> thanks
> Alex
> 

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



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




Re: Quick question?

2001-10-04 Thread Craig R. McClanahan



On Thu, 4 Oct 2001, James Turner wrote:

> Date: Thu, 4 Oct 2001 00:14:17 -0400
> From: James Turner <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Quick question?
>
> Do you happen to know what directory Turbine tries to load
> TurbineResources.properties from if you specify "." as the path in new
> TurbineConfig?
>

If it is using file I/O to read the config file (don't have a clue ... ask
the Turbine list) then it will try to resolve this against the current
working directory of the servlet container.  In other words, this will
vary depending on which container (and which version of the container) you
are using.  It also depends on whether you used the standard startup
scripts or not, and whether you had the TOMCAT_HOME or CATALINA_HOME
environment variable preset or not ...

Webapps that want to be portable should read config files using
ServletContext.getResource() instead.

> Thanks,
> James
>

Craig McClanahan




RE: Quick Question...

2001-12-04 Thread Richard S. Huntrods

>

Greetings!

The problem has been fixed.  Just by way of quick run-down, in case anyone else 
encounters this...

1. The supplied server.xml references "examples", and therefore MUST HAVE an examples 
subdirectory under the "webapps" directory.

I found this out running tomcat with the "run" command, instead of "start".  Start 
opens a new window, and the error is missed.  The missing directory was plain to see 
in the error messages using "run".  I added a dummy examples directory and everything 
worked.  Then I checked the various 'server.xml' files, and there is one without the 
examples, and it works fine.

SO - tomcat 4.0.1 is running fine.

I then ported the same info over to Solaris (where the 'real' work happens - W2K is 
just a development environment), unpacked the binaries, set up my directories (with 
the no-example server.xml), and all was well.

Only one Solaris glitch to report - Version 3.x has "stuff" in the shell scripts to 
make a good guess at "JAVA_HOME", while 4.0 has removed this.  Too bad - but I just 
put it back, and all works well.

CHeers,

-Richard

P.S. Replying above a quoted post is not merely for the MS-weenie.  I am NOT an MS 
fan, would NEVER use "Ouchlook" or any Billy-ware virus-friendly software.  I use 
Netscape for most email, Pine when I must.  BUT - here in educational circles (I teach 
Java at the university / college level), "pre-replies" are a courtesy.  We really hate 
reading 4000 lines of > >> >> >>>>>>>>>>>>> (zillions of nested quoted stuff) only to 
find someone say "I agree".  SO - replying a the TOP of a post gets to the meat of the 
reply immediately.

This is NOT a flame.  Merely another point of view, that is NOT Billy-influenced.  We 
have other, well-thought-out reasons for replying at the top of a post.

> Subject: Quick Question...
> Date: Mon, 03 Dec 2001 21:10:22 -0700
> From: "Richard S. Huntrods" <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>
> Greetings!
>
> I have a quick question.  I was running just fine on Tomcat 3.2.3.  I
> have built servlets, which sit in
> webapps/myapp/WEB-INF/classes/myapp/*.class
>
> In Tomcat 3.2.3, this structure was picked up when Tomcat started, and
> the servlets ran perfectly.  Note - there was no need for "web.xml" in
> the directories, as I was just using defaults.  Everything ran.
>
> I have now installed Tomcat 4.0.  Tomcat runs perfectly with the default
> set of "webapps".  Now, I have replaced these with my set of classes (as
> above) from 3.2.3, and Tomcat tries to start, but immediately quits.  If
> I replace the default set of "webapps", it will run - so it is my stuff.
>
> The quick question - Tomcat is supposed to automatically pick up the
> classes in this directory structure whenever it starts, but is not doing
> it the same as for 3.2.3.  I assume something simple has changed.  Can
> anyone tell me what I need to add?  I tried adding a default "web.xml",
> but that didn't seem to do it.
>
> Thanks,
>
> -Richard
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: quick question

2003-09-24 Thread Atreya Basu
Hi Steven,

You should be able to if your URI directive is something like, 
[uri:localhost/*.jsp].  The other thing that you need to do is set up 
the proper context for the JSP, so if you want to place them in 
/home/apache, you'll need to add the proper context directive in your 
server.xml file.

Atreya

Steven Garrett wrote:

Hi,

Can I envoke jsp from outside of the application directory.  For example, I
have /var/tomcat4/webapps/application/some.jsp.  Can I put some.jsp in
/home/apache/ (my apache docroot) and have it still work?
Thanks,

Steve

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

--

Developer
Greenfield Research Inc.
atreya(AT)greenfieldresearch(DOT)ca
(902)422-9426


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


Re[2]: Quick Question

2002-08-13 Thread Jacob Kjome

Hello TOMITA,

Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
is it running out the WEB-INF/classes or WEB-INF/lib folder of your
webapp.  I'm geussing the it is in one of Tomcat's classloaders
meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
Tomcat-4.1.x).

Those classloaders can't see the individual webapp classloaders.
However, libraries in your webapp *can* see Tomcat's plublic
classloaders (all bug server/lib, server/classes).

You may have to rearrange the location of your libraries.

Jake

Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC> Hi all,

TLC> I'm trying to resolve this problem with all the solutions that you gave 
TLC> me,  but it doesn't work...
TLC> This is what I did:

TLC> in my java bean (not a servlet), I have this code:


TLC> public class DbBean {
TLC>public  int Connect()  {
TLC>InputStream is = 
TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
TLC> if (is == null) {
TLC> return 0;
TLC> }
TLC> else {
TLC> return 1;
TLC> }
TLC> }


TLC> then in my jsp, I called this method, and then I write the value (0 or 
TLC> 1)..

TLC> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in a 
TLC> package called "beans", and I start tomcat from TOMCAT_HOME/bin..
TLC> When I load the jsp, the method Connect of the DbBean (java bean) returned 
TLC> 0, which means the InputStream is null, but if I put the txt file in
TLC> TOMCAT_HOME/bin, I had no problem, the method returned 1  why is 
TLC> that??.. I'm using Tomcat 3.2
TLC> Do I need to set something else in Tomcat??

TLC> thanks again
TLC> Alex Tomita













TLC> "Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
TLC> 13/08/2002 08:11 a.m.
TLC> Please respond to Tomcat Users List

 
TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: 
TLC> Subject:RE: Quick Question




TLC> tomcats default directory is where ever you called the startup.sh/bat 
TLC> file.
TLC> So if you dont use another script to call the startup.sh/bat file tomcats
TLC> default will be the bin directory.

TLC> Use this code to find the directory where WEB-INF is.  Then you can 
TLC> traverse
TLC> your directory structure from there. 

TLC> //get context path
TLC> ServletConfig scon = null ;
TLC> String workingDir = null;
 
TLC> public void init(ServletConfig config) {
TLC> scon = config ;
TLC>  }
TLC>  public void doPost(HttpServletRequest request, HttpServletResponse
TLC> response)
TLC> throws ServletException, IOException {
 
TLC> //get working dir
TLC> ServletContext sc = scon.getServletContext();
TLC> workingDir = sc.getRealPath("");


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






-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




Re[4]: Quick Question

2002-08-13 Thread Jacob Kjome

Hello TOMITA,

If the file exists in the same package as the Bean, then just do:

Properties props = new Properties();
try {
InputStream propsStream = this.getClass().getResourceAsStream("config.txt");
if (propsStream != null) {
props.load(propsStream);
propsStream.close();
}
} catch (IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}


When you use
Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt"),
you run the risk of finding a file with the same name somewhere earlier
in the classpath, although it should have been able to find your file
when one of the same name did not exist in $CATALINA_HOME/bin.


Jake

Tuesday, August 13, 2002, 10:54:15 AM, you wrote:

TLC> My bean is WEB-INF/classes






TLC> Jacob Kjome <[EMAIL PROTECTED]>
TLC> 13/08/2002 10:43 a.m.
TLC> Please respond to Tomcat Users List

 
TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: 
TLC> Subject:Re[2]: Quick Question



TLC> Hello TOMITA,

TLC> Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
TLC> is it running out the WEB-INF/classes or WEB-INF/lib folder of your
TLC> webapp.  I'm geussing the it is in one of Tomcat's classloaders
TLC> meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
TLC> Tomcat-4.1.x).

TLC> Those classloaders can't see the individual webapp classloaders.
TLC> However, libraries in your webapp *can* see Tomcat's plublic
TLC> classloaders (all bug server/lib, server/classes).

TLC> You may have to rearrange the location of your libraries.

TLC> Jake

TLC> Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC>> Hi all,

TLC>> I'm trying to resolve this problem with all the solutions that you 
TLC> gave 
TLC>> me,  but it doesn't work...
TLC>> This is what I did:

TLC>> in my java bean (not a servlet), I have this code:


TLC>> public class DbBean {
TLC>>public  int Connect()  {
TLC>>InputStream is = 
TLC>> 
TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
TLC>> if (is == null) {
TLC>> return 0;
TLC>> }
TLC>> else {
TLC>> return 1;
TLC>> }
TLC>> }


TLC>> then in my jsp, I called this method, and then I write the value (0 
TLC> or 
TLC>> 1)..

TLC>> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in 
TLC> a 
TLC>> package called "beans", and I start tomcat from TOMCAT_HOME/bin..
TLC>> When I load the jsp, the method Connect of the DbBean (java bean) 
TLC> returned 
TLC>> 0, which means the InputStream is null, but if I put the txt file in
TLC>> TOMCAT_HOME/bin, I had no problem, the method returned 1  why 
TLC> is 
TLC>> that??.. I'm using Tomcat 3.2
TLC>> Do I need to set something else in Tomcat??

TLC>> thanks again
TLC>> Alex Tomita













TLC>> "Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
TLC>> 13/08/2002 08:11 a.m.
TLC>> Please respond to Tomcat Users List

 
TLC>> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC>> cc: 
TLC>> Subject:RE: Quick Question




TLC>> tomcats default directory is where ever you called the startup.sh/bat 

TLC>> file.
TLC>> So if you dont use another script to call the startup.sh/bat file 
TLC> tomcats
TLC>> default will be the bin directory.

TLC>> Use this code to find the directory where WEB-INF is.  Then you can 
TLC>> traverse
TLC>> your directory structure from there. 

TLC>> //get context path
TLC>> ServletConfig scon = null ;
TLC>> String workingDir = null;
 
TLC>> public void init(ServletConfig config) {
TLC>> scon = config ;
TLC>>  }
TLC>>  public void doPost(HttpServletRequest request, HttpServletResponse
TLC>> response)
TLC>> throws ServletException, IOException {
 
TLC>> //get working dir
TLC>> ServletContext sc = scon.getServletContext();
TLC>> workingDir = sc.getRealPath("");


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









-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




Re[4]: Quick Question

2002-08-13 Thread Jacob Kjome

Hello TOMITA,

I know next to nothing about JSP.  Haven't touched it.  I use XMLC and
Barracuda to do presentation.  However, I would think that you should
be able to use getServletContext() or something analogous in JSP.

Jake

Tuesday, August 13, 2002, 11:13:44 AM, you wrote:

TLC> Can I use something like this in my jsp page (instead of a java sevlet) to 
TLC> get the parameter name?,
TLC> before that I set the parameter in my web.xml file like this:

TLC> 
TLC>   parameter name
TLC>   localhost
TLC> 

TLC> String value =  getServletContext().getInitParameter("parameter name");

TLC> because I'm confusing here because of the name "getServletContext". is 
TLC> it only works in a sevlet or it will work too in a jsp page???

TLC> thanks again 
TLC> Alex Tomita








TLC> [EMAIL PROTECTED]
TLC> 13/08/2002 10:54 a.m.
TLC> Please respond to Tomcat Users List

 
TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc:     Tomcat Users List <[EMAIL PROTECTED]>
TLC> Subject:Re: Re[2]: Quick Question



TLC> My bean is WEB-INF/classes






TLC> Jacob Kjome <[EMAIL PROTECTED]>
TLC> 13/08/2002 10:43 a.m.
TLC> Please respond to Tomcat Users List

 
TLC>     To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: 
TLC> Subject:Re[2]: Quick Question



TLC> Hello TOMITA,

TLC> Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
TLC> is it running out the WEB-INF/classes or WEB-INF/lib folder of your
TLC> webapp.  I'm geussing the it is in one of Tomcat's classloaders
TLC> meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
TLC> Tomcat-4.1.x).

TLC> Those classloaders can't see the individual webapp classloaders.
TLC> However, libraries in your webapp *can* see Tomcat's plublic
TLC> classloaders (all bug server/lib, server/classes).

TLC> You may have to rearrange the location of your libraries.

TLC> Jake

TLC> Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC>> Hi all,

TLC>> I'm trying to resolve this problem with all the solutions that you 
TLC> gave 
TLC>> me,  but it doesn't work...
TLC>> This is what I did:

TLC>> in my java bean (not a servlet), I have this code:


TLC>> public class DbBean {
TLC>>public  int Connect()  {
TLC>>InputStream is = 
TLC>> 
TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
TLC>> if (is == null) {
TLC>> return 0;
TLC>> }
TLC>> else {
TLC>> return 1;
TLC>> }
TLC>> }


TLC>> then in my jsp, I called this method, and then I write the value (0 
TLC> or 
TLC>> 1)..

TLC>> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in 

TLC> a 
TLC>> package called "beans", and I start tomcat from TOMCAT_HOME/bin..
TLC>> When I load the jsp, the method Connect of the DbBean (java bean) 
TLC> returned 
TLC>> 0, which means the InputStream is null, but if I put the txt file in
TLC>> TOMCAT_HOME/bin, I had no problem, the method returned 1  why 

TLC> is 
TLC>> that??.. I'm using Tomcat 3.2
TLC>> Do I need to set something else in Tomcat??

TLC>> thanks again
TLC>> Alex Tomita













TLC>> "Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
TLC>> 13/08/2002 08:11 a.m.
TLC>> Please respond to Tomcat Users List

 
TLC>> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC>> cc: 
TLC>> Subject:RE: Quick Question




TLC>> tomcats default directory is where ever you called the startup.sh/bat 


TLC>> file.
TLC>> So if you dont use another script to call the startup.sh/bat file 
TLC> tomcats
TLC>> default will be the bin directory.

TLC>> Use this code to find the directory where WEB-INF is.  Then you can 
TLC>> traverse
TLC>> your directory structure from there. 

TLC>> //get context path
TLC>> ServletConfig scon = null ;
TLC>> String workingDir = null;
 
TLC>> public void init(ServletConfig config) {
TLC>> scon = config ;
TLC>>  }
TLC>>  public void doPost(HttpServletRequest request, HttpServletResponse
TLC>> response)
TLC>> throws ServletException, IOException {
 
TLC>> //get working dir
TLC>> ServletContext sc = scon.getServletContext();
TLC>> workingDir = sc.getRealPath("");


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









-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




Manager application - quick question

2002-11-18 Thread Renato
Hi all,

I'll deploy the manager application to my users. Probably the only funcionality I'll 
let them use is to stop and start 
their web applications.

Which is the safest method ?

- reload ?
- stop / start ?
- indifferent ?

Thanks 
Renato.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Re[2]: Quick Question

2002-08-13 Thread TOMITA_ALEX_NONLILLY

My bean is WEB-INF/classes






Jacob Kjome <[EMAIL PROTECTED]>
13/08/2002 10:43 a.m.
Please respond to Tomcat Users List

 
To: Tomcat Users List <[EMAIL PROTECTED]>
cc: 
Subject:    Re[2]: Quick Question



Hello TOMITA,

Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
is it running out the WEB-INF/classes or WEB-INF/lib folder of your
webapp.  I'm geussing the it is in one of Tomcat's classloaders
meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
Tomcat-4.1.x).

Those classloaders can't see the individual webapp classloaders.
However, libraries in your webapp *can* see Tomcat's plublic
classloaders (all bug server/lib, server/classes).

You may have to rearrange the location of your libraries.

Jake

Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC> Hi all,

TLC> I'm trying to resolve this problem with all the solutions that you 
gave 
TLC> me,  but it doesn't work...
TLC> This is what I did:

TLC> in my java bean (not a servlet), I have this code:


TLC> public class DbBean {
TLC>public  int Connect()  {
TLC>InputStream is = 
TLC> 
Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
TLC> if (is == null) {
TLC> return 0;
TLC> }
TLC> else {
TLC> return 1;
TLC> }
TLC> }


TLC> then in my jsp, I called this method, and then I write the value (0 
or 
TLC> 1)..

TLC> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in 
a 
TLC> package called "beans", and I start tomcat from TOMCAT_HOME/bin..
TLC> When I load the jsp, the method Connect of the DbBean (java bean) 
returned 
TLC> 0, which means the InputStream is null, but if I put the txt file in
TLC> TOMCAT_HOME/bin, I had no problem, the method returned 1  why 
is 
TLC> that??.. I'm using Tomcat 3.2
TLC> Do I need to set something else in Tomcat??

TLC> thanks again
TLC> Alex Tomita













TLC> "Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
TLC> 13/08/2002 08:11 a.m.
TLC> Please respond to Tomcat Users List

 
TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: 
TLC> Subject:RE: Quick Question




TLC> tomcats default directory is where ever you called the startup.sh/bat 

TLC> file.
TLC> So if you dont use another script to call the startup.sh/bat file 
tomcats
TLC> default will be the bin directory.

TLC> Use this code to find the directory where WEB-INF is.  Then you can 
TLC> traverse
TLC> your directory structure from there. 

TLC> //get context path
TLC> ServletConfig scon = null ;
TLC> String workingDir = null;
 
TLC> public void init(ServletConfig config) {
TLC> scon = config ;
TLC>  }
TLC>  public void doPost(HttpServletRequest request, HttpServletResponse
TLC> response)
TLC> throws ServletException, IOException {
 
TLC> //get working dir
TLC> ServletContext sc = scon.getServletContext();
TLC> workingDir = sc.getRealPath("");


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






-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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






Re: Re[2]: Quick Question

2002-08-13 Thread TOMITA_ALEX_NONLILLY

Can I use something like this in my jsp page (instead of a java sevlet) to 
get the parameter name?,
before that I set the parameter in my web.xml file like this:


  parameter name
  localhost


String value =  getServletContext().getInitParameter("parameter name");

because I'm confusing here because of the name "getServletContext". is 
it only works in a sevlet or it will work too in a jsp page???

thanks again 
Alex Tomita








[EMAIL PROTECTED]
13/08/2002 10:54 a.m.
Please respond to Tomcat Users List

 
To: Tomcat Users List <[EMAIL PROTECTED]>
cc: Tomcat Users List <[EMAIL PROTECTED]>
    Subject:Re: Re[2]: Quick Question



My bean is WEB-INF/classes






Jacob Kjome <[EMAIL PROTECTED]>
13/08/2002 10:43 a.m.
Please respond to Tomcat Users List

 
To: Tomcat Users List <[EMAIL PROTECTED]>
    cc: 
Subject:Re[2]: Quick Question



Hello TOMITA,

Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
is it running out the WEB-INF/classes or WEB-INF/lib folder of your
webapp.  I'm geussing the it is in one of Tomcat's classloaders
meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
Tomcat-4.1.x).

Those classloaders can't see the individual webapp classloaders.
However, libraries in your webapp *can* see Tomcat's plublic
classloaders (all bug server/lib, server/classes).

You may have to rearrange the location of your libraries.

Jake

Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC> Hi all,

TLC> I'm trying to resolve this problem with all the solutions that you 
gave 
TLC> me,  but it doesn't work...
TLC> This is what I did:

TLC> in my java bean (not a servlet), I have this code:


TLC> public class DbBean {
TLC>public  int Connect()  {
TLC>InputStream is = 
TLC> 
Thread.currentThread().getContextClassLoader().getResourceAsStream("config.txt");
TLC> if (is == null) {
TLC> return 0;
TLC> }
TLC> else {
TLC> return 1;
TLC> }
TLC> }


TLC> then in my jsp, I called this method, and then I write the value (0 
or 
TLC> 1)..

TLC> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in 

a 
TLC> package called "beans", and I start tomcat from TOMCAT_HOME/bin..
TLC> When I load the jsp, the method Connect of the DbBean (java bean) 
returned 
TLC> 0, which means the InputStream is null, but if I put the txt file in
TLC> TOMCAT_HOME/bin, I had no problem, the method returned 1  why 

is 
TLC> that??.. I'm using Tomcat 3.2
TLC> Do I need to set something else in Tomcat??

TLC> thanks again
TLC> Alex Tomita













TLC> "Drinkwater, GJ (Glen)" <[EMAIL PROTECTED]>
TLC> 13/08/2002 08:11 a.m.
TLC> Please respond to Tomcat Users List

 
TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: 
TLC> Subject:RE: Quick Question




TLC> tomcats default directory is where ever you called the startup.sh/bat 


TLC> file.
TLC> So if you dont use another script to call the startup.sh/bat file 
tomcats
TLC> default will be the bin directory.

TLC> Use this code to find the directory where WEB-INF is.  Then you can 
TLC> traverse
TLC> your directory structure from there. 

TLC> //get context path
TLC> ServletConfig scon = null ;
TLC> String workingDir = null;
 
TLC> public void init(ServletConfig config) {
TLC> scon = config ;
TLC>  }
TLC>  public void doPost(HttpServletRequest request, HttpServletResponse
TLC> response)
TLC> throws ServletException, IOException {
 
TLC> //get working dir
TLC> ServletContext sc = scon.getServletContext();
TLC> workingDir = sc.getRealPath("");


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






-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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








Re: Re[4]: Quick Question

2002-08-13 Thread jeff . guttadauro


Hi, Alex.

 Since JSP's are turned into servlets before they are executed, I don't
see why you couldn't do this.  For your convenience, JSP's have some common
objects already available for use.  The "application" object is equivalent to
the javax.servlet.ServletContext object you would get by doing a
getServletContext() call.  So, application.getInitParameter("key") should do
the trick, too.

HTH,
-Jeff



   

Jacob Kjome

<[EMAIL PROTECTED]To: "Tomcat Users List" 
<[EMAIL PROTECTED]>  
m>   cc:   

 Subject: Re[4]: Quick Question

08/13/02   

12:00 PM   

Please 

respond to 

Jacob Kjome

   

   





Hello TOMITA,

I know next to nothing about JSP.  Haven't touched it.  I use XMLC and
Barracuda to do presentation.  However, I would think that you should
be able to use getServletContext() or something analogous in JSP.

Jake

Tuesday, August 13, 2002, 11:13:44 AM, you wrote:

TLC> Can I use something like this in my jsp page (instead of a java sevlet)
to
TLC> get the parameter name?,
TLC> before that I set the parameter in my web.xml file like this:

TLC> 
TLC>   parameter name
TLC>   localhost
TLC> 

TLC> String value =  getServletContext().getInitParameter("parameter name");

TLC> because I'm confusing here because of the name "getServletContext".
is
TLC> it only works in a sevlet or it will work too in a jsp page???

TLC> thanks again
TLC> Alex Tomita








TLC> [EMAIL PROTECTED]
TLC> 13/08/2002 10:54 a.m.
TLC> Please respond to Tomcat Users List


TLC> To:     Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc: Tomcat Users List <[EMAIL PROTECTED]>
TLC> Subject:Re: Re[2]: Quick Question



TLC> My bean is WEB-INF/classes






TLC> Jacob Kjome <[EMAIL PROTECTED]>
TLC> 13/08/2002 10:43 a.m.
TLC> Please respond to Tomcat Users List


TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
TLC> cc:
TLC> Subject:Re[2]: Quick Question



TLC> Hello TOMITA,

TLC> Where does your Bean exist?  Is it in one of Tomcat's classloaders, or
TLC> is it running out the WEB-INF/classes or WEB-INF/lib folder of your
TLC> webapp.  I'm geussing the it is in one of Tomcat's classloaders
TLC> meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
TLC> Tomcat-4.1.x).

TLC> Those classloaders can't see the individual webapp classloaders.
TLC> However, libraries in your webapp *can* see Tomcat's plublic
TLC> classloaders (all bug server/lib, server/classes).

TLC> You may have to rearrange the location of your libraries.

TLC> Jake

TLC> Tuesday, August 13, 2002, 9:29:19 AM, you wrote:

TLC>> Hi all,

TLC>> I'm trying to resolve this problem with all the solutions that you
TLC> gave
TLC>> me,  but it doesn't work...
TLC>> This is what I did:

TLC>> in my java bean (not a servlet), I have this code:


TLC>> public class DbBean {
TLC>>public  int Connect()  {
TLC>>InputStream is =
TLC>>
TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream
("config.txt");
TLC>> if (is == null) {
TLC>> return 0;
TLC>> }
TLC>> else {
TLC>> return 1;
TLC>> }
TLC>> }


TLC>> then in my jsp, I called this method, and then I write the value (0
TLC> or
TLC>> 1)..

TLC>> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is in

TLC> a
TLC>> package called 

Re: Re[4]: Quick Question

2002-08-13 Thread Michael E. Locasto

Check out the API too.

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/servletapi/index.html


Regards,
Michael

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 13, 2002 1:08 PM
Subject: Re: Re[4]: Quick Question


>
> Hi, Alex.
>
>  Since JSP's are turned into servlets before they are executed, I
don't
> see why you couldn't do this.  For your convenience, JSP's have some
common
> objects already available for use.  The "application" object is equivalent
to
> the javax.servlet.ServletContext object you would get by doing a
> getServletContext() call.  So, application.getInitParameter("key") should
do
> the trick, too.
>
> HTH,
> -Jeff
>
>
>
>
> Jacob Kjome
> <[EMAIL PROTECTED]To: "Tomcat Users List"
<[EMAIL PROTECTED]>
> m>   cc:
>  Subject: Re[4]: Quick
Question
> 08/13/02
> 12:00 PM
> Please
> respond to
> Jacob Kjome
>

>
>
>
>
>
> Hello TOMITA,
>
> I know next to nothing about JSP.  Haven't touched it.  I use XMLC and
> Barracuda to do presentation.  However, I would think that you should
> be able to use getServletContext() or something analogous in JSP.
>
> Jake
>
> Tuesday, August 13, 2002, 11:13:44 AM, you wrote:
>
> TLC> Can I use something like this in my jsp page (instead of a java
sevlet)
> to
> TLC> get the parameter name?,
> TLC> before that I set the parameter in my web.xml file like this:
>
> TLC> 
> TLC>   parameter name
> TLC>   localhost
> TLC> 
>
> TLC> String value =  getServletContext().getInitParameter("parameter
name");
>
> TLC> because I'm confusing here because of the name
"getServletContext".
> is
> TLC> it only works in a sevlet or it will work too in a jsp page???
>
> TLC> thanks again
> TLC> Alex Tomita
>
>
>
>
>
>
>
>
> TLC> [EMAIL PROTECTED]
> TLC> 13/08/2002 10:54 a.m.
> TLC> Please respond to Tomcat Users List
>
>
> TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> cc: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> Subject:Re: Re[2]: Quick Question
>
>
>
> TLC> My bean is WEB-INF/classes
>
>
>
>
>
>
> TLC> Jacob Kjome <[EMAIL PROTECTED]>
> TLC> 13/08/2002 10:43 a.m.
> TLC> Please respond to Tomcat Users List
>
>
> TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> cc:
> TLC> Subject:Re[2]: Quick Question
>
>
>
> TLC> Hello TOMITA,
>
> TLC> Where does your Bean exist?  Is it in one of Tomcat's classloaders,
or
> TLC> is it running out the WEB-INF/classes or WEB-INF/lib folder of your
> TLC> webapp.  I'm geussing the it is in one of Tomcat's classloaders
> TLC> meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib in
> TLC> Tomcat-4.1.x).
>
> TLC> Those classloaders can't see the individual webapp classloaders.
> TLC> However, libraries in your webapp *can* see Tomcat's plublic
> TLC> classloaders (all bug server/lib, server/classes).
>
> TLC> You may have to rearrange the location of your libraries.
>
> TLC> Jake
>
> TLC> Tuesday, August 13, 2002, 9:29:19 AM, you wrote:
>
> TLC>> Hi all,
>
> TLC>> I'm trying to resolve this problem with all the solutions that you
> TLC> gave
> TLC>> me,  but it doesn't work...
> TLC>> This is what I did:
>
> TLC>> in my java bean (not a servlet), I have this code:
>
>
> TLC>> public class DbBean {
> TLC>>public  int Connect()  {
> TLC>>InputStream is =
> TLC>>
> TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream
> ("config.txt");
> TLC>> if (is == null) {
> TLC>> return 0;
> TLC>> }
> TLC>> else {
> TLC>> return 1;
> TLC>> }
> TLC>> }
>
>
> TLC>> then in my jsp, I called this method, and then I write the value (0
> TLC> or
> TLC>> 1)..
>
> TLC>> The txt file is in "WEB-INF/classes/beans...", because "DbBean" is
in
>
> TLC> a
> TLC>> package called "beans", and I start tomcat from TOMCA

Re: Re[4]: Quick Question

2002-08-13 Thread TOMITA_ALEX_NONLILLY

thanks for the information, I'm going to test it out.







"Michael E. Locasto" <[EMAIL PROTECTED]>
13/08/2002 12:34 p.m.
Please respond to Tomcat Users List

 
To: Tomcat Users List <[EMAIL PROTECTED]>
cc: 
Subject:    Re: Re[4]: Quick Question



Check out the API too.

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/servletapi/index.html


Regards,
Michael

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 13, 2002 1:08 PM
Subject: Re: Re[4]: Quick Question


>
> Hi, Alex.
>
>  Since JSP's are turned into servlets before they are executed, I
don't
> see why you couldn't do this.  For your convenience, JSP's have some
common
> objects already available for use.  The "application" object is 
equivalent
to
> the javax.servlet.ServletContext object you would get by doing a
> getServletContext() call.  So, application.getInitParameter("key") 
should
do
> the trick, too.
>
> HTH,
> -Jeff
>
>
>
>
> Jacob Kjome
> <[EMAIL PROTECTED]To: "Tomcat Users List"
<[EMAIL PROTECTED]>
> m>   cc:
>  Subject: Re[4]: Quick
Question
> 08/13/02
> 12:00 PM
> Please
> respond to
> Jacob Kjome
>

>
>
>
>
>
> Hello TOMITA,
>
> I know next to nothing about JSP.  Haven't touched it.  I use XMLC and
> Barracuda to do presentation.  However, I would think that you should
> be able to use getServletContext() or something analogous in JSP.
>
> Jake
>
> Tuesday, August 13, 2002, 11:13:44 AM, you wrote:
>
> TLC> Can I use something like this in my jsp page (instead of a java
sevlet)
> to
> TLC> get the parameter name?,
> TLC> before that I set the parameter in my web.xml file like this:
>
> TLC> 
> TLC>   parameter name
> TLC>   localhost
> TLC> 
>
> TLC> String value =  getServletContext().getInitParameter("parameter
name");
>
> TLC> because I'm confusing here because of the name
"getServletContext".
> is
> TLC> it only works in a sevlet or it will work too in a jsp page???
>
> TLC> thanks again
> TLC> Alex Tomita
>
>
>
>
>
>
>
>
> TLC> [EMAIL PROTECTED]
> TLC> 13/08/2002 10:54 a.m.
> TLC> Please respond to Tomcat Users List
>
>
> TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> cc: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> Subject:Re: Re[2]: Quick Question
>
>
>
> TLC> My bean is WEB-INF/classes
>
>
>
>
>
>
> TLC> Jacob Kjome <[EMAIL PROTECTED]>
> TLC> 13/08/2002 10:43 a.m.
> TLC> Please respond to Tomcat Users List
>
>
> TLC> To: Tomcat Users List <[EMAIL PROTECTED]>
> TLC> cc:
> TLC> Subject:Re[2]: Quick Question
>
>
>
> TLC> Hello TOMITA,
>
> TLC> Where does your Bean exist?  Is it in one of Tomcat's classloaders,
or
> TLC> is it running out the WEB-INF/classes or WEB-INF/lib folder of your
> TLC> webapp.  I'm geussing the it is in one of Tomcat's classloaders
> TLC> meaning $CATALINA_HOME/common/lib, server/lib, or lib (shared/lib 
in
> TLC> Tomcat-4.1.x).
>
> TLC> Those classloaders can't see the individual webapp classloaders.
> TLC> However, libraries in your webapp *can* see Tomcat's plublic
> TLC> classloaders (all bug server/lib, server/classes).
>
> TLC> You may have to rearrange the location of your libraries.
>
> TLC> Jake
>
> TLC> Tuesday, August 13, 2002, 9:29:19 AM, you wrote:
>
> TLC>> Hi all,
>
> TLC>> I'm trying to resolve this problem with all the solutions that you
> TLC> gave
> TLC>> me,  but it doesn't work...
> TLC>> This is what I did:
>
> TLC>> in my java bean (not a servlet), I have this code:
>
>
> TLC>> public class DbBean {
> TLC>>public  int Connect()  {
> TLC>>InputStream is =
> TLC>>
> TLC> Thread.currentThread().getContextClassLoader().getResourceAsStream
> ("config.txt");
> TLC>> if (is == null) {
> TLC>> return 0;
> TLC>> }
> TLC>> else {
> TLC>> return 1;
> TLC>> }
> TLC>> }
>
>
> TLC>>

RE: Manager application - quick question

2002-11-18 Thread Cox, Charlie
both are safe. reload will be faster(one command vs two), but start/stop
will allow web.xml to be read again.

Charlie

> -Original Message-
> From: Renato [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 1:30 PM
> To: [EMAIL PROTECTED]
> Subject: Manager application - quick question
> 
> 
> Hi all,
> 
> I'll deploy the manager application to my users. Probably the 
> only funcionality I'll let them use is to stop and start 
> their web applications.
> 
> Which is the safest method ?
> 
> - reload ?
> - stop / start ?
> - indifferent ?
> 
> Thanks 
> Renato.
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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




quick question when getting started

2004-04-15 Thread Stephen Charles Huey
I'm upgrading from Tomcat 4 to 5 and I just installed Tomcat 5 on a dev
machine to play with it, and I know a couple things are organized a bit
differently, but the provided index page is weirding me out.  

I tried to add a line of text to the index.jsp in webapps\ROOT and when I
reload the page (that I browse to by going to localhost on my Win 2K
Server machine), that line of text isn't appearing.  I've tried adding
other bits, too, and I've tried restarting Tomcat, and I found a
catalina-root.jar in the WEB-INF\lib folder and deleted that in an effort
to get it to recompile the index.jsp, but nothing seems to be working! 
Why?

Here's an example of what I've modified in the HTML:

If you're seeing this page via a web browser, it means
Stephen has setup Tomcat successfully.

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



mod_jk and load balancing (quick question)

2001-04-23 Thread Matt Goss

Hi all,
Does mod_jk support load balancing??? Also does it work with tomcat 3.1
& 3.2 ???
Thanks :)
Matt


begin:vcard 
n:Goss;Matt
tel;fax:919-657-1501
tel;work:919-657-1432
x-mozilla-html:FALSE
url:www.rtci.com
org:RTCI;Custom Solutions
adr:;;201 Shannon Oaks Circle;Cary;NC;27511;US
version:2.1
email;internet:[EMAIL PROTECTED]
title:Web Developer
fn:Matt
end:vcard



Warp and Virtual Hosts (quick question)

2002-04-05 Thread Charlie Toohey

When configuring Apache's httpd.conf (or Vhosts.conf) with multiple
name-based virtual hosts, I can not find any documentation regarding the
WebAppConnection statement. Should I have a separate WebAppConnection within
each virtual host section, or should I just have one WebAppConnection in the
main section of httpd.conf, and then refer to that in each of the
WebAppDeploy statements that are within the virtual host sections (I do
understand that the WebAppDeploy statements for each given webapp needs to
be within the virtual host section --- it is the WebAppConnection which I'm
not sure about).

Thanks,
Charlie







--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: quick question when getting started

2004-04-15 Thread Michiel Toneman
Hi Stephen,

You've been tricked by the web.xml. The JSP's are pre-compiled to 
servlets and a mapping for the URL "/index.jsp" to this servlet has been 
inserted into web.xml. If you delete the servlet mapping in the web.xml, 
everything should be as normal, and your changes will be visible.

(this caught me out the first time too... ;-) )

Michiel

Stephen Charles Huey wrote:

I'm upgrading from Tomcat 4 to 5 and I just installed Tomcat 5 on a dev
machine to play with it, and I know a couple things are organized a bit
differently, but the provided index page is weirding me out.  

I tried to add a line of text to the index.jsp in webapps\ROOT and when I
reload the page (that I browse to by going to localhost on my Win 2K
Server machine), that line of text isn't appearing.  I've tried adding
other bits, too, and I've tried restarting Tomcat, and I found a
catalina-root.jar in the WEB-INF\lib folder and deleted that in an effort
to get it to recompile the index.jsp, but nothing seems to be working! 
Why?

Here's an example of what I've modified in the HTML:

If you're seeing this page via a web browser, it means
Stephen has setup Tomcat successfully.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Michiel Toneman  Software Engineer   Bibit Global Payment Services
Regulierenring 10  3981 LB  Bunnik   [EMAIL PROTECTED]
Tel. +31-30-6595168  Fax +31-30-6564464  http://www.bibit.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Warp and Virtual Hosts (quick question)

2002-04-05 Thread rsequeira


You could stick to one WebAppConnection statement (outside the virtual host
blocks) and then use the same "connection name" in all your WebAppDeploy
statements in all virtual hosts. But having multiple WebAppConnection
statements (one in each virtual host block) isn't wrong either.

RS





Charlie Toohey <[EMAIL PROTECTED]> on 04/05/2002 12:08:47 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:

Subject:  Warp and Virtual Hosts (quick question)

When configuring Apache's httpd.conf (or Vhosts.conf) with multiple
name-based virtual hosts, I can not find any documentation regarding the
WebAppConnection statement. Should I have a separate WebAppConnection
within
each virtual host section, or should I just have one WebAppConnection in
the
main section of httpd.conf, and then refer to that in each of the
WebAppDeploy statements that are within the virtual host sections (I do
understand that the WebAppDeploy statements for each given webapp needs to
be within the virtual host section --- it is the WebAppConnection which I'm
not sure about).

Thanks,
Charlie







--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>









--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Warp and Virtual Hosts (quick question)

2002-04-05 Thread Joseph Molnar

Ya the thing to watch is that the names for the connections must be unique
regardless of where you put them.


Joe

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 10:42 AM
Subject: Re: Warp and Virtual Hosts (quick question)


>
> You could stick to one WebAppConnection statement (outside the virtual
host
> blocks) and then use the same "connection name" in all your WebAppDeploy
> statements in all virtual hosts. But having multiple WebAppConnection
> statements (one in each virtual host block) isn't wrong either.
>
> RS
>
>
>
>
>
> Charlie Toohey <[EMAIL PROTECTED]> on 04/05/2002 12:08:47 PM
>
> Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Warp and Virtual Hosts (quick question)
>
> When configuring Apache's httpd.conf (or Vhosts.conf) with multiple
> name-based virtual hosts, I can not find any documentation regarding the
> WebAppConnection statement. Should I have a separate WebAppConnection
> within
> each virtual host section, or should I just have one WebAppConnection in
> the
> main section of httpd.conf, and then refer to that in each of the
> WebAppDeploy statements that are within the virtual host sections (I do
> understand that the WebAppDeploy statements for each given webapp needs to
> be within the virtual host section --- it is the WebAppConnection which
I'm
> not sure about).
>
> Thanks,
> Charlie
>
>
>
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Warp and Virtual Hosts (quick question)

2002-04-06 Thread Nikola Milutinovic

Charlie Toohey wrote:

> When configuring Apache's httpd.conf (or Vhosts.conf) with multiple
> name-based virtual hosts, I can not find any documentation regarding the
> WebAppConnection statement. Should I have a separate WebAppConnection within
> each virtual host section, or should I just have one WebAppConnection in the
> main section of httpd.conf, and then refer to that in each of the
> WebAppDeploy statements that are within the virtual host sections (I do
> understand that the WebAppDeploy statements for each given webapp needs to
> be within the virtual host section --- it is the WebAppConnection which I'm
> not sure about).

Never done this myself, since I'm still not in "production" environment, but...

There was an excellent article on java.sun.com on thi subject and basically it 
boils to this - docs on Tomcat side are lacking. In your server.xml, "warp" 
connector should reflect the VirtualHosts of your Apache setup. In the comments 
it says:



They meant "Apache" instead of "localhost".

 From that I'd conclude that each VirtualHost should have:

- one DNS entry
- one apache 
- one Tomcat ...
- one (at least) Warp connection between the two

For larger virtual hostings you might want to consider running several Tomcat 
instances for, either each one or groups of virtual hosts.

Nix.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Warp and Virtual Hosts (quick question)

2002-04-06 Thread Joseph Molnar

Hey folks. I think I am going to write something up on this because I have a
fairly complex situation that covers what you need to do to get virtual
hosts working and since documentation is non-existent. I figured it out by
experimenting and I now have a completely operational systems.  I don't have
the complete config where I am now so I will just describe and then send a
pointer out when the write up is done.

My general setup is as follows:

I am using JDK 1.4 with Tomcat 4.0.3, Apache 1.3.22 (with WARP so). I have 4
virtual hosts, some of them require (additionally) to be used via SSL and
non-SSL (so it is basically 8 name/port combinations).  Also, I wanted some
of them to be in different Java/Tomcat VM's since I don't want one going
down to take out others.

Generally speaking this is what I do:

In my httpd.conf, at the top, I list all of my connections since I share
some of the connections between different hosts (essentially you can and
should share a connection when you don't care if the VM goes down between
the two and if they are both either SSL or both not SSL covered).  Also,
make sure you tell Apache you are doing name virtual hosts (if they don't
have different IP's).

Then in the virtual hosts I put the WebAppDeploy. BUT since I am using JSP's
right off the bat and since I only want to manage the contents of a virtual
host in one place, the WebAppDeploy looks like this (even when the
connection is shared):

WebApp Deploy.connectiion

Yes it looks like they would then be sharing the exact same
applications...but that isn't true, I manage the virtual hosts in the
server.xml, which imo, is what you want to do (again manage from one place).

So let's switch to the server.xml's.  Since I run more than Tomcat instance
I have a set of scripts that startup the different instances, making sure to
set $CATALINA_HOME (mainly for the bin directory), and $CATALINA_BASE (for
the specific server instance).

In the server.xml (I will recall just one), I have one Server tag, and then
I have 2 Service takes. The difference Service areas are to make sure that I
properly cover SSL and non-SSL connections.  So in each of the Service areas
I tell it scheme="http" (or "https") and secure="false" (or "true") as is
necessary. BUT this doesn't actually turn on SSL, remember that SSL handling
is covered by Apache. This is so that when a JSP or Servlet asks if the
connection is secure, the answer will be yes.

So then in the Engine area you place your virtual hosts. This is through the
Host tag, making sure you specify name="virtual host name". I then have a
Context in that which directs to the appropriate root location (in the same
directory on the server I have different sub-directories for the http and
https based roots).

Anyway, this should be enough pointers, without many examples, to get you
going. Basically the sample server.xml in Tomcat has what you are looking
for BUT it implies that you don't do it with WARP because it is all under
the HTTP connector. But much of that you can actually use with WARP, and it
works well.

When I write it up I will include example scripts/conf/xml files and some of
the interesting things I found.  I think it will be a useful resource for
the community in generally (it can be frustrating, but I generally had fun
figuring it out).


Joseph Molnar
http://www.codesta.com/

- Original Message -
From: "Nikola Milutinovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, April 06, 2002 5:04 AM
Subject: Re: Warp and Virtual Hosts (quick question)


> Charlie Toohey wrote:
>
> > When configuring Apache's httpd.conf (or Vhosts.conf) with multiple
> > name-based virtual hosts, I can not find any documentation regarding the
> > WebAppConnection statement. Should I have a separate WebAppConnection
within
> > each virtual host section, or should I just have one WebAppConnection in
the
> > main section of httpd.conf, and then refer to that in each of the
> > WebAppDeploy statements that are within the virtual host sections (I do
> > understand that the WebAppDeploy statements for each given webapp needs
to
> > be within the virtual host section --- it is the WebAppConnection which
I'm
> > not sure about).
>
> Never done this myself, since I'm still not in "production" environment,
but...
>
> There was an excellent article on java.sun.com on thi subject and
basically it
> boils to this - docs on Tomcat side are lacking. In your server.xml,
"warp"
> connector should reflect the VirtualHosts of your Apache setup. In the
comments
> it says:
>
> 
>
> They meant "Apache" instead of "localhost".
>
>  From that I'd

quick question concerning the Client Deployer Package

2004-01-27 Thread Glanville, Jay
Hello all.  I have a quick question concerning the client deployer
package
(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html#Dep
loying%20using%20the%20Client%20Deployer%20Package).  There is a compile
target and a deploy target.  My assumption is that the deploy target
only deploys the web application and not the compiled code from the
compile target.

Is this assumption correct?

Thanks

JDG


--
Jay Glanville

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



Re: quick question concerning the Client Deployer Package

2004-01-27 Thread Remy Maucherat
Glanville, Jay wrote:
Hello all.  I have a quick question concerning the client deployer
package
(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html#Dep
loying%20using%20the%20Client%20Deployer%20Package).  There is a compile
target and a deploy target.  My assumption is that the deploy target
only deploys the web application and not the compiled code from the
compile target.
Is this assumption correct?
"compile" does JSP precompilation on your webapp (and will actually also 
compile to /WEB-INF/classes any Java class put in /WEB-INF/src). deploy 
uploads that precompiled application to the server.

--
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: quick question concerning the Client Deployer Package

2004-01-27 Thread Jay Glanville
Thanks

--
Jay Glanville


> -Original Message-
> From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 27, 2004 9:11 AM
> To: Tomcat Users List
> Subject: Re: quick question concerning the Client Deployer Package
> 
> 
> Glanville, Jay wrote:
> > Hello all.  I have a quick question concerning the client deployer
> > package
> > 
> (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howt
o.html#Dep
> loying%20using%20the%20Client%20Deployer%20Package).  There is a
compile
> target and a deploy target.  My assumption is that the deploy target
> only deploys the web application and not the compiled code from the
> compile target.
> 
> Is this assumption correct?

"compile" does JSP precompilation on your webapp (and will actually also

compile to /WEB-INF/classes any Java class put in /WEB-INF/src). deploy 
uploads that precompiled application to the server.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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



One quick question on running TC in security mode

2005-03-11 Thread Nikola Milutinovic
Hi all.
I'm faced with a situation where I need to deploy an application on a 
server that is running TC 4.1 with "-security" option enabled. I have 
figured out that I need to edit "catalina.policy" file and grant my 
application permissions. I'm testing config on my home machine running 
5.5.7. Now I'm slightly baffled.

The application needs to connect to a DB, send mail and write/read files 
from the file system. All is well except mail sending. This is my 
catalina policy file:

grant codeBase "file:/home/test/webapps/test/-" {
   permission java.net.SocketPermission "localhost:5432", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:3306", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:25", 
"resolve,connect";
   // permission java.net.SocketPermission "localhost:*", 
"resolve,connect";
   permission java.io.FilePermission "/", "read";
   permission java.io.FilePermission "/-", "read";
   permission java.io.FilePermission "/tmp/-", "read,write";
};

And this is what I get when a JSP page tries to send an e-mail:
*root cause*
java.security.AccessControlException: access denied (java.net.SocketPermission 
localhost resolve)

java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)

java.security.AccessController.checkPermission(AccessController.java:427)
Any idea what is wrong?
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: One quick question on running TC in security mode - still problems

2005-03-11 Thread Nikola Milutinovic
Nikola Milutinovic wrote:
Hi all.
I'm faced with a situation where I need to deploy an application on a 
server that is running TC 4.1 with "-security" option enabled. I have 
figured out that I need to edit "catalina.policy" file and grant my 
application permissions. I'm testing config on my home machine running 
5.5.7. Now I'm slightly baffled.

The application needs to connect to a DB, send mail and write/read 
files from the file system. All is well except mail sending. This is 
my catalina policy file:

grant codeBase "file:/home/test/webapps/test/-" {
   permission java.net.SocketPermission "localhost:5432", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:3306", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:25", 
"resolve,connect";
   // permission java.net.SocketPermission "localhost:*", 
"resolve,connect";
   permission java.io.FilePermission "/", "read";
   permission java.io.FilePermission "/-", "read";
   permission java.io.FilePermission "/tmp/-", "read,write";
};

Heh, found one cause, the mail jars were not in my WEB-INF/lib, but in 
the ${catalina.home}/common/lib. Now, I have modified the 
catalina.policy file:

grant {
   permission java.net.SocketPermission "localhost:25", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:3306", 
"resolve,connect";
   permission java.net.SocketPermission "localhost:5432", 
"resolve,connect";
};

Now sending starts, but I get the following exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME 
type text/plain

Am I missing something? When security is turned off, mail gets sent.
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]