Re: Working with the Jakarta NT Service document

2003-12-11 Thread Bill Barker
It's with the TC 3.3 download.  Go to
http://jakarta.apache.org/site/binindex.cgi, click on the 'Tomcat 3' link,
click on the 'bin' link, and you will find it.

"Scott Schlatter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The document is great, except for section 1.  "Get a hold on the NT
> Executable"
>
> The link doesn't link to the jk_nt_service.exe,  and I cannot find the
pesky
> file on the apache site at all... in fact, there is no "win32/i386"
> directory in any of the binary archives that I found.
>
> The document is unclear on where to find this .exe.  I haven't found it
yet,
> but hold out hope that it does exist...
>
> Scott
>
> _
> Winterize your home with tips from MSN House & Home.
> http://special.msn.com/home/warmhome.armx




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



Re: [WORKAROUND] Re: VERY weird problem with commons-logging and Tomcat5

2003-12-11 Thread Jacob Kjome
You can also use a repository selector.  BTW, do you have log4j.jar *and* 
commons-logging.jar (not commons-logging-api.jar) in WEB-INF/lib?  If not, 
put them there and try this scenario again.  A repository selector should 
not be necessary in this situation.  However, I always use one as it 
guarantees separate logger repositories for each application (based on JNDI 
namespace) with no chance of stepping on each other whether or not I have 
log4j.jar in WEB-INF/lib or a parent classloader.

Jake

At 12:40 AM 12/12/2003 +0100, you wrote:
Hi!

I still do not know what is causing this behavior, but I found a 
workaround in case anyone else stumbles upon this problem:

In my log4j.properties I left the log4j.rootCategory property alone and 
only set log4j.category.package.name.of.my.classes properties for each 
package in my webapp to DEBUG.
This way I only get the DEBUG output of my own classes and not ALL debug 
messages generated by the container.
I still wonder why my log4j.properties in /WEB-INF/classes should 
reconfigure the container's whole logging mechanism. Either this is a 
major bug or tomcat4's doing it right was one.

'Till later

Phil

Philipp Taprogge wrote:

Hi!
I have a very disgusting problem here... I am developing a webapp which 
uses commons-logging and log4j.
All I do is use the commons' Log and LogFactory in my application and 
place a log4j.properties file in my WEB-INF/classes.
This property file looks like this (w/out the CR in the middle line of 
course):
log4j.rootCategory=DEBUG, warthoglog
log4j.appender.warthoglog=org.apache.log4j.RollingFileAppender
log4j.appender.warthoglog.layout=org.apache.log4j.PatternLayout
log4j.appender.warthoglog.layout.ConversionPattern=%d{ISO8601}
[%-15C{1}] %-5p - %m%n
log4j.appender.warthoglog.File=${catalina.home}/logs/warthog.log
log4j.appender.warthoglog.MaxFileSize=2048KB
log4j.appender.warthoglog.MaxBackupIndex=20
log4j.appender.warthoglog.Append=true
This works fine, except that I get not only my application's log messages 
but _ALL_ tomcat debug logging in this file, which firstly slows down my 
machine (no wonder) and secondly grows the logfile to a few MBs just from 
startup.
What the heck am I doing wrong here? This setup worked perfectly in the 
last tomcat4.
Can anyone advice?
Philipp Taprogge


--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams
-
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]


newbie simple question... SOLVED !!!

2003-12-11 Thread Andres Ledesma
 Hi everybody again,

I went to the logs and found the cause of the error, so if anybody was going 
to anwser, I thanks, but it's not necessary already.


Andres Ledesma
Ibilnet Software Inc.
==
"Solo quienes se arriesgan a llegar lejos, saben cuan lejos se puede llegar"

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



[WORKAROUND] Re: VERY weird problem with commons-logging and Tomcat5

2003-12-11 Thread Philipp Taprogge
Hi!

I still do not know what is causing this behavior, but I found a 
workaround in case anyone else stumbles upon this problem:

In my log4j.properties I left the log4j.rootCategory property alone 
and only set log4j.category.package.name.of.my.classes properties for 
each package in my webapp to DEBUG.
This way I only get the DEBUG output of my own classes and not ALL 
debug messages generated by the container.
I still wonder why my log4j.properties in /WEB-INF/classes should 
reconfigure the container's whole logging mechanism. Either this is a 
major bug or tomcat4's doing it right was one.

'Till later

	Phil

Philipp Taprogge wrote:

Hi!

I have a very disgusting problem here... I am developing a webapp which 
uses commons-logging and log4j.
All I do is use the commons' Log and LogFactory in my application and 
place a log4j.properties file in my WEB-INF/classes.
This property file looks like this (w/out the CR in the middle line of 
course):

log4j.rootCategory=DEBUG, warthoglog
log4j.appender.warthoglog=org.apache.log4j.RollingFileAppender
log4j.appender.warthoglog.layout=org.apache.log4j.PatternLayout
log4j.appender.warthoglog.layout.ConversionPattern=%d{ISO8601}
[%-15C{1}] %-5p - %m%n
log4j.appender.warthoglog.File=${catalina.home}/logs/warthog.log
log4j.appender.warthoglog.MaxFileSize=2048KB
log4j.appender.warthoglog.MaxBackupIndex=20
log4j.appender.warthoglog.Append=true
This works fine, except that I get not only my application's log 
messages but _ALL_ tomcat debug logging in this file, which firstly 
slows down my machine (no wonder) and secondly grows the logfile to a 
few MBs just from startup.
What the heck am I doing wrong here? This setup worked perfectly in the 
last tomcat4.

Can anyone advice?

Philipp Taprogge



--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: google yourself

2003-12-11 Thread yuval
There is email archive of this list
www.mail-archive.com

- Original Message - 
From: "Oscar Carrillo" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 12:26 AM
Subject: RE: google yourself


> LOL. I know that's happened to me too.
>
> That's when I know I'm in trouble :)
>
> Oscar
>
> On Thu, 11 Dec 2003, Januski, Ken
> wrote:
>
> > The sad part of googling yourself is when you google for answers to a
> > certain problem and end up getting an earlier post of your own on same
topic
> > as the first result.
> >
> > -Original Message-
> > From: Adam Hardy [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 4:30 PM
> > To: Tomcat Users List
> > Subject: Re: google yourself
> >
> >
> > Amazingly it seems that google is down. Bang goes another myth.
> >
> > On 12/11/2003 02:41 PM Nikola Milutinovic wrote:
> > > Ostad, James wrote:
> > >
> > >> have you googled yourself at goole.com?
> > >> I don't know how they get all of our listserv communications.
> > >>
> > >> Any one knows how they do that?
> > >
> > >
> > > There is a web archive of this list.
> > >
> > > 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]



RE: google yourself

2003-12-11 Thread Oscar Carrillo
LOL. I know that's happened to me too.

That's when I know I'm in trouble :)

Oscar

On Thu, 11 Dec 2003, Januski, Ken 
wrote:

> The sad part of googling yourself is when you google for answers to a
> certain problem and end up getting an earlier post of your own on same topic
> as the first result.
> 
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 4:30 PM
> To: Tomcat Users List
> Subject: Re: google yourself
> 
> 
> Amazingly it seems that google is down. Bang goes another myth.
> 
> On 12/11/2003 02:41 PM Nikola Milutinovic wrote:
> > Ostad, James wrote:
> > 
> >> have you googled yourself at goole.com?
> >> I don't know how they get all of our listserv communications.
> >>
> >> Any one knows how they do that?
> > 
> > 
> > There is a web archive of this list.
> > 
> > Nix.
> 
> 
> 


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



Re: context

2003-12-11 Thread Jerald Powel

Hi Adam,

 It's sorted. To cut a long story short, the same people who 'configured' it so 
that webapps was completey separated from Tomcat, and removed the examples, also 
decided to use a renamed server.xml. Once I figured that out, and added the context, 
it ran fine. A joy of being a contractor? 

 Perhaps you can answer me this to close..why in my experience was it not 
necessary to add a context for an app to run successfully, but on this occasion it was?

many thanks

G.

Hi Jerald,
I'm sorry but I've never had a Status 500 - no context configured.

There must be something freaky in your context configuration. Is the 
manager app running? That is normally at localhost:8080/manager/html

What does that say you have running in terms of contexts?

What directories do you have in your webapps dir and what contexts do 
you have configured in conf/server.xml and conf/Catalina/localhosts/*.xml?

BTW what TC version are you running?

Adam

On 12/11/2003 01:19 AM Jerald Powel wrote:
> Yes, they are all (3) running on different ports. All of them running
> apps quite happily. This particular one is running a single WAR OK,
> and my app - not OK. (HTTP Status 500 - No Context configured to
> process this request). I haven't played with the root context.
> Manager app?! Like I said, all apps bar the two I talk of have been
> removed. On looking, there is NO root context! (TC was configured by
> a third party before my arival)
> 
> thanks for your assistance
> 
> G.
> 
> Jerald, what happens then? You just get a message saying 'requested
> resource not available'?
> 
> Presumably your different tomcats are on different ports and don't 
> interfere with each other?
> 
> Also can you run the manager app? What does it say is running?
> 
> You say you removed all other contexts - so your app is running as
> the root context? I believe you must have a root context.
> 
> Adam
> 
> On 12/09/2003 11:13 PM Jerald Powel wrote:
> 
>> Sorry for any impropriety re the hijacking!
>> 
>> I have a WAR running successfully under webapps. All other examples
>> etc have been removed. I am running several instances/versions of 
>> Tomcat on the same box, and have no CATALINA_HOME env. variable 
>> defined. I am trying to port my app from the one version to the 
>> other. The WAR runs, my app doesn't!
>> 
>> Thanks for any help
>> 
>> G.
>> 
>> Prostrate yourself to a tongue lashing for hijacking someone else's
>> thread as well! You should start a new thread when you post a new 
>> topic.
>> 
>> Unfortunately you haven't provided enough info. Start a new thread 
>> and include details like your CATALINA_HOME and CATALINA_BASE 
>> variables and whether your root, manager & jsp-examples contexts
>> are accessible.
> 
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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




-
   BT Yahoo! Broadband - Save £80 when you order online today. Hurry! Offer ends 21st 
December 2003. The way the internet was meant to be. 

Re: How To Install an APP under Tomcat 4.1.29 ???

2003-12-11 Thread BAO RuiXian
Richard Migneron wrote:

Yep, you assumed right.

It's not that Tomcat ain't starting (I can get in the Admin
menu and add users, I can get to the manager window
(.../manager/html)), it's just that I can't add our purchased
app !!!  (BMC-Remedy's mid-tier add).
I read a doc I got late and it seems that I also have to
install the "mod_jk.so" module...  I'll try this Monday when I
 

mod_jk.so is only to make Apache as a front end to contact Tomcat. You 
might first make Tomcat work with your new App.

get back to work...  hopefully, it'll work, I've lost enough
time already on this on account that nobody except management
likes this app anyway
Thanks,

Richard
 

snip...


 


7) We start APACHE, no problem so far (it listens on 8080)
8) We've modified the server.xml to change the port to 8000
Seems you have a strange port configuration. Usually, Apache listens on 
port 80, while Tomcat listens on port 8080.

What would I put in the 3 boxes to install the app 

We've tried plenty of stuff and logically, you'd put something
like :
Context Path (optional) : /mid-tier
XML Configuration file URL: /files/ar/mid-tier
WAR or Directory URL:   (I don't have a clue)
 

I think your whole 'mid-tier' should be under $TOMCAT-HOME/webapps 
directory.


file, here is the line I added :


 

I think now 'mid-tier' is sitting on a wrong place.

Best

Bao

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


Re: Default context for web app

2003-12-11 Thread Kent Boogaart
Hi Adam,

I am currently running against version 4.1.27 of Tomcat. I did not alter the
name of my deploy directory. Here is my  element (with env entries
removed):


...


My WAR file is called eSM.war and, as you can see, my deploy directory is
$TOMCAT_HOME/webapps/eSM. Note, however, that Tomcat uses
$TOMCAT_HOME/work/Standalone/localhost/_ as the working directory for the
web app since the path is "".

Regards,
Kent

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



RE: google yourself

2003-12-11 Thread Januski, Ken
The sad part of googling yourself is when you google for answers to a
certain problem and end up getting an earlier post of your own on same topic
as the first result.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 4:30 PM
To: Tomcat Users List
Subject: Re: google yourself


Amazingly it seems that google is down. Bang goes another myth.

On 12/11/2003 02:41 PM Nikola Milutinovic wrote:
> Ostad, James wrote:
> 
>> have you googled yourself at goole.com?
>> I don't know how they get all of our listserv communications.
>>
>> Any one knows how they do that?
> 
> 
> There is a web archive of this list.
> 
> Nix.


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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


Re: How To Install an APP under Tomcat 4.1.29 ???

2003-12-11 Thread Richard Migneron
Yep, you assumed right.

It's not that Tomcat ain't starting (I can get in the Admin
menu and add users, I can get to the manager window
(.../manager/html)), it's just that I can't add our purchased
app !!!  (BMC-Remedy's mid-tier add).

I read a doc I got late and it seems that I also have to
install the "mod_jk.so" module...  I'll try this Monday when I
get back to work...  hopefully, it'll work, I've lost enough
time already on this on account that nobody except management
likes this app anyway

Thanks,

Richard

> I assume these are typos in the email, not your config:
>
>  > CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
>^
>
>  >   > docbase=""/files/ar/mid-tier" reloadable="true"/>
>   ^ ^
> If tomcat has trouble loading the Context i would expect to see
> exceptions in the
$CATALINA_HOME/logs/localhost_log.-MM-dd.txt log
> file, logging to which is enabled by default.
>
> As in java, xml is case-sensitive and docBase!=docbase.
>
> The manager and admin webapps are setup as non-WAR apps with
a docBase
> outside the user webapp base. Take a look at
> $CATALINA_HOME/webapps/manager.xml
>
>
> As for configuring Tomcat with Apache:
> http://jakarta.apache.org/tomcat/faq/connectors.html
>
> HTH,
>
> Jon
>
> Richard Migneron wrote:
>
> > Hi all,
> >
> > I'm new to Tomcat.  We have a small problem under Solaris 8.
> >
> > 1) We've read the documentation
> > 2) We've skimped through all the past messages in the archive
> > 3) Apache 1.3.29 has been configured with the following :
> >
> > --enable-rule=SHARED_CODE
> > --enable-module=rewrite --enable-shared=rewrite
> > --enable-module=proxy --enable-shared=proxy
> >
> > 4) jakarta was installed in a directory under apache
> > 5) The j2sdk1.4.2_02 was installed in /usr
> > 6) In the S50apache, there are :
> > 
> > JAVA_HOME=/usr/j2sdk1.4.2_02
> > CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
> > APACHE_HOME=/files/apache
> > CONF_FILE=/files/apache/conf/httpd.conf
> >
> > 7) We start APACHE, no problem so far (it listens on 8080)
> > 8) We've modified the server.xml to change the port to 8000
> > 9) We've added an user admin with admin and manager roles
> > 10) In the S51tomcat, there are :
> >
> > CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
> > JAVA_HOME=/usr/j2sdk1.4.2_02
> > 
> > export CATALINA_HOME JAVA_HOME
> >
> > 11) We start Tomcat, no problem so far (it listens on 8000)
> > 12) We get to the Manager Window to try to install an
> > application.  The application is called "mid-tier", it resides
> > in "/files/ar/mid-tier", in this directory there is a WEB-INF
> > directory (amongst others).
> >
> > What would I put in the 3 boxes to install the app 
> >
> > We've tried plenty of stuff and logically, you'd put something
> > like :
> >
> > Context Path (optional) : /mid-tier
> > XML Configuration file URL: /files/ar/mid-tier
> > WAR or Directory URL:   (I don't have a clue)
> >
> > This application is not using WARs.
> >
> > Now, I've tried installing it directly by hand in the
server.xml
> > file, here is the line I added :
> >
> >  > docbase=""/files/ar/mid-tier" reloadable="true"/>
> >
> > With this line we see the app appearing on the manager
page, but
> > when we go into it, we are in a directory structure (a la ftp
> > type) and when we try to launch it, it gives an error message
> > on account that the config file is not correct !
> >
> > I think the sole line in the server.xml is not enough !!!
> > By the way, they don't have an ounce of documentation on
> > configuring this thing on Apache+Tomcat, although they've done
> > it before on a Apache 1.3.27 + Tomcat 4.0.6.
> >
> > Any help would be welcomed (before they ask me to revert to
> > Apache 1.3.27 + ServLet Exec 4.1.1, arrgghh!!)
> >
> > Thanks,
> >
> > Richard

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




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



Load testing question

2003-12-11 Thread Howard Jim
Hello,

I am running tomcat 4.1.18 using modjk2 from apache 2.0.46.

I have been doing some playing around with Jmeter, running some scenarios against the 
application.  Apache is setup to only handle the SSL and connections, with everything 
being passed to Tomcat, including static pages and images (Legacy setup).

I can simulate a few users without much problem.  I have logging turned up pretty 
good, and am tailing the apache log for one.  It is showing me all the handoffs from 
apache to tomcat through the connector.  Here is a sample of what I think is standard 
running in steady state:

[Thu Dec 11 16:33:53 2003] [notice] jk2_init() Found child 19943 in scoreboard slot 49
[Thu Dec 11 16:33:53 2003] [notice] workerEnv.init() ok 
/dta1/webs/agPrograms/conf/workers2.properties
[Thu Dec 11 16:33:53 2003] [notice] workerEnv.init() create slot epStat.49
[Thu Dec 11 16:33:57 2003] [notice] mod_jk2 Shutting down
[Thu Dec 11 16:34:00 2003] [notice] jk2_init() Found child 19945 in scoreboard slot 32
[Thu Dec 11 16:34:00 2003] [notice] workerEnv.init() ok 
/dta1/webs/agPrograms/conf/workers2.properties
[Thu Dec 11 16:34:00 2003] [notice] workerEnv.init() create slot epStat.32
[Thu Dec 11 16:34:02 2003] [notice] mod_jk2 Shutting down
[Thu Dec 11 16:34:07 2003] [notice] mod_jk2 Shutting down
[Thu Dec 11 16:34:12 2003] [notice] mod_jk2 Shutting down
[Thu Dec 11 16:34:14 2003] [notice] jk2_init() Found child 19952 in scoreboard slot 13
[Thu Dec 11 16:34:14 2003] [notice] workerEnv.init() ok 
/dta1/webs/agPrograms/conf/workers2.properties
[Thu Dec 11 16:34:14 2003] [notice] workerEnv.init() create slot epStat.13
[Thu Dec 11 16:34:17 2003] [notice] mod_jk2 Shutting down

etc.  Everything appears to be working well.  The Catalina log appears to contain what 
I would expect.

When I increase the load, I see a new line appear every so often:

[Thu Dec 11 16:35:27 2003] [error] mod_jk child init 1 0


I have 2 questions.  First, does the first part of the log look reasonable?  2) What 
does this [error] entry really mean?  I have done all sorts of google searches, read 
the jakarta site from front to back, etc, and I still don't seem to get it.

Thanks for your time.

Jim


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



Re: Image Viewing

2003-12-11 Thread Ben Souther
It sounds like what you're asking is: 
How can you allow users to view images via the app without allowing them to 
look at them directly with a browser?

If that's what you want to do, it can be accomplished by writing a servlet 
that streams images and use it as the "src" attribute to your image tags.
This should get you started:

package img;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletException;

public class ImageServlet extends HttpServlet{

public void doGet(HttpServletRequest request,
  HttpServletResponse response)
  throws ServletException{
try{
response.setContentType("image/jpg");
OutputStream o = response.getOutputStream();

BufferedInputStream in = new BufferedInputStream(
getServletContext()
   .getResourceAsStream(
"/WEB-INF/forbidden_images/axis.jpg"));

byte[] buf = new byte[32 * 1024]; // 32k buffer
int nRead = 0;
while( (nRead = in.read(buf)) != -1 ) {
o.write(buf, 0, nRead);
}
o.flush();
o.close();
return;
}catch(Exception e){
// do something..
}
}
}
~
~
I'm not a streaming guru. It works but
someone else might be able to show you a more
elegant way to do it or how to do it from a JSP.
You'll probably want to pass the image's file name in the querystring.

Good Luck
-Ben








On Thursday 11 December 2003 01:29 pm, you wrote:
> Howdy,
> You asked how to block the user from seeing the images by putting the
> address in the browser.  I told you one possible way, e.g. by putting
> them under WEB-INF.  You can still access them from your servlets and
> JSPs from this location, but users can't.  What part is unclear?
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-Original Message-
>
> From: Kiran Patel [mailto:[EMAIL PROTECTED]
>
> >Sent: Thursday, December 11, 2003 1:28 PM
> >To: [EMAIL PROTECTED]
> >Subject: Image Viewing
> >
> >Thank you for the replay and your help.  If I move the images under
>
> WEB-INF
>
> >folder, I can't access the images from the application through the
> >internet.  The images can only be viewed if you login and start the
> >application not by typing the url.  For security purpose.  Please help
>
> me
>
> >if anybody know how to do that.  Thank you.
> >
> >Kiran Patel
> >
> >Howdy,
> >Put the images directory under the WEB-INF directory and change your
> >servlet accordingly.
> >
> >Yoav Shapira
> >Millennium ChemInformatics
> >
> >>-Original Message-
> >>From: Kiran Patel [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, December 11, 2003 9:53 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: Image Viewing
> >>
> >>I am using jsp and tomcat 4.1 for my web application.  My application=
> >
> >is
> >
> >>viewing image which is in the webapps/image folder.  This image can
> >
> >also be
> >
> >>viewed from the internet by just typing the url.  I want to block thi=
> >
> >s
> >
> >>since these are the confidential images.  Does anybody know how to do=
> >
> >that.
> >
> >>Thanks in advance.
> >>
> >>Kiran Patel
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



errors from mod_jk2 / apache2

2003-12-11 Thread jon yeargers
After pounding my head on mod_jk2 for a few days I finally got the
tomcat examples dir to appear.. woot!.. but my apache2 log is filling
with errors v quickly. Can someone shed light on what configuration
problems I have? Surely this isn't the normal output... 
 
[Thu Dec 11 13:51:18 2003] [notice] caught SIGTERM, shutting down
[Thu Dec 11 13:55:23 2003] [notice] Digest: generating secret for digest
authentication ...
[Thu Dec 11 13:55:23 2003] [notice] Digest: done
[Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error
creating channel.jni:jni ( channel.jni, jni)
[Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create
channel.jni:jni
[Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error
creating vm: ( vm, )
[Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create vm:
[Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error
creating worker.jni:onStartup ( worker.jni, onStartup)
[Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create
worker.jni:onStartup
[Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error
creating worker.jni:onShutdown ( worker.jni, onShutdown)
[Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create
worker.jni:onShutdown
[Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18552 in
scoreboard slot 0
[Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:55:23 2003] [error] mod_jk child init 1 0
[Thu Dec 11 13:55:23 2003] [error] jk2_init() Can't find child 18554 in
scoreboard
[Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:55:23 2003] [error] mod_jk child init 1 -2
[Thu Dec 11 13:55:23 2003] [notice] Apache-AdvancedExtranetServer/2.0.44
(Mandrake Linux/11mdk) mod_ssl/2.0.44 OpenSSL/0.9.7a mod_jk2/2.0.2
configured -- resuming normal operations
[Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18553 in
scoreboard slot 1
[Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18555 in
scoreboard slot 3
[Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18556 in
scoreboard slot 4
[Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:56:05 2003] [error] jk2_init() Can't find child 18558 in
scoreboard
[Thu Dec 11 13:56:05 2003] [notice] workerEnv.init() ok
/etc/httpd/2.0/conf/workers2.properties
[Thu Dec 11 13:56:05 2003] [error] mod_jk child init 1 -2
[Thu Dec 11 13:56:46 2003] [error] channelSocket.open() connect failed
localhost:8019 111 Connection refused 
[Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed
ajp13:localhost:8019
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect
endpoint errno=111 Connection refused
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding
ajp13:localhost:8019 1 1
[Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint
ajp13:localhost:8019 error_state 1
[Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for
ajp13:localhost:8019
[Thu Dec 11 13:56:46 2003] [error] channelUn.connect() connect failed 2
No such file or directory
[Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed
ajp13:/opt/33/work/jk2.socket
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect
endpoint errno=2 No such file or directory
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding
ajp13:/opt/33/work/jk2.socket 1 1
[Thu Dec 11 13:56:46 2003] [notice] channelUn.close(): close unix socket
-1 
[Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint
ajp13:/opt/33/work/jk2.socket error_state 1
[Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for
ajp13:/opt/33/work/jk2.socket
[Thu Dec 11 13:56:46 2003] [notice] shm.createSlot() Create 1 0x40573000
0x40575000
[Thu Dec 11 13:56:46 2003] [notice] workerEnv.init() create slot
epStat.1
[Thu Dec 11 13:56:46 2003] [error] channelSocket.open() connect failed
localhost:8019 111 Connection refused 
[Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed
ajp13:localhost:8019
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect
endpoint errno=111 Connection refused
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding
ajp13:localhost:8019 1 1
[Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint
ajp13:localhost:8019 error_state 1
[Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for
ajp13:localhost:8019
[Thu Dec 11 13:56:46 2003] [error] channelUn.connect() connect failed 2
No such file or directory
[Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed
ajp13:/opt/33/work/jk2.socket
[Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect
endpoint errno=2 No such file or directory
[Thu De

Remember Me in Tomcat 5

2003-12-11 Thread Matt Raible
I have a "Remember Me" feature that I've been using in my webapps, and
I'm having a hard time figuring out how to make it work (securely) on
Tomcat 5.  It works fine on Tomcat 4. Let me first explain how it works.

1. I put login.jsp and loginerror.jsp in a "security" folder at the root
of my webapp.
2. I add form-based authentication configuration to web.xml - where
/security/login.jsp and /security/loginerror.jsp are my form-login-page
and form-error-page.
3. I have a LoginServlet that is the "action" of my form in login.jsp.
This servlet sets cookies for the user's username, password and a
rememberMe flag (if they want to be remembered).  It sets the cookies on
the request.getContextPath()+"/security/" path.  This means that these
cookies will only be accessible when this URL is present.
4. I have a LoginFilter that maps to "/security/*" that determines if
the user wants to be remembered, and if so, forwards them to the
LoginServlet with the "j_username" and "j_password" as part of the URL.

This all works great on Tomcat 4.1.x.  On Tomcat 5, the form-login-page
is presented via a forward, instead of a redirect like Tomcat 4.  So I
had to add a FORWARD to my LoginFilter mapping
in order to get the filter to be invoked.  This was easy enough.

The problem I'm experiencing now is that I can't get access to the
rememberMe-related cookies in my Filter because they are set on the path
"/myApp/security/" instead of "/".  I could move the paths for my
cookies to be "/" - but then anyone that logs in has access to those
cookies - and if my app allows JavaScript, they could probably write
some code to get user's passwords.  Anyone know of an easier workaround?

Matt



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



Re: Directly j_security_check on Tomcat realms

2003-12-11 Thread Adam Hardy
On 12/11/2003 04:42 PM Grzegorz Samborski wrote:
I have 2 aplications on Tomcat 4.1.29, one is designed for users(customers) another is designed for admin on both I use tomcat realms. 
I want to log on user from admin app. 
How to do that?
I understand that i need to call directly j_security_check on user's app.
How can I call directly j_security_check 
and how to set user,password and requested page ?
It is complicated. You might try httpclient, which will send the request 
from your server back to itself. I would however recommend some other 
approach, for instance the single-sign-on facility as outlined in the 
Jakarta tomcat docs website.

Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5.0.16 : manager-app access - solved

2003-12-11 Thread Adam Hardy
Ah! If only you hadn't dropped the thread! Oh well, glad you got it sorted.

As for the commas, looks like you found a bug - although I would check 
that user_roles="admin" works for admin only as well.

Adam

On 12/11/2003 04:09 PM Dirk Griesbach wrote:
I traced the problem down to the 'user_role' entry in the database:
The role of the user used by the manager-app had role "admin,manager"
(like in 'tomcat-users.xml' in a memory Realm) which does not work.
Changing the user_role to 'manager' puts it..but now the admin-app using
the same user complains.
Maybe class
"org.apache.catalina.realm.DataSourceRealm" works different than
"org.apache.catalina.realm.UserDatabaseRealm"
regarding comma seperated roles ?
grisi
- Original Message -
From: Dirk Griesbach <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 9:57 AM
Subject: Re: Tomcat 5.0.16 : manager-app access


Hi Adam,

thanx for your hint, is there a FAQ or Readme on TC5 I missed ?

I moved the manager.xml to ...\conf\catalina\localhost.
It has the following content:
"

  

"
You're right, the Realm is defined in the server.xml:
"
...

...

   

   

"
Unfortunately: no effect, "403 - Access to the requested resource has been
denied"
The admin-app still shows no entry in 'User database"
Is there something else that's worth having a look at ?

Dirk

- Original Message -
From: Adam Hardy <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 10:17 PM
Subject: Re: Tomcat 5.0.16 : manager-app access


On 12/10/2003 05:49 PM Dirk Griesbach wrote:

hello folks,

a question on datasource realms and the manager app:

When I installed TC 5.0.16 'out-of-the-box' I could start the
manager-app.

Then I deployed our webapp (manually), configured a DataSourceRealm
using mysql

for authentification, configured SSL, form based LogIn and ... the
webapp works fine.

(The resource name is still "UserDatabase")

But if I now try to use the manager-app I get the error: "403 - access
denied" without even being prompted.

I've modified "..server\webapps\manager\WEB-INF\web.xml" so that it
reads:

"...
  UserDatabase
  javax.sql.DataSource

"
and "..server\webapps\manager\manager.xml" that it reads

"...


"
no effect.
Even more strange the behaviour of the "admin-app":

The Login-screen appears as usual and login data that complies with
the

the DataSource Realm is being accepted.

Clicking on "dataSource" shows up the 'mysql-jdbc' Installation.
Clicking on 'user database' showsnothing.
Clicking on 'user roles, groups' etc. results in an error
"The server encountered an internal error (Error retrieving attribute
groups) that prevented it from fulfilling this request."

Admin-app uses struts with TagLibs, is there something hardcoded in
there ?

Why do the these two applications not recognize the new Realm ?


Hi Dirk,
presumably you configured the realm in the server.xml.
You need to put the manager.xml file in conf/Catalina/localhost/ which
is the new place for it in 5.x
Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
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]



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread BAO RuiXian
Nadia Kunkov wrote:

Well, there is nothing in the log, just starting/stopping Tomcat stuff...
I can run any example in the /examples dir without a problem.
I'm running as root, I'm logged in as root (I know it's bad, I have my reasons for it now) so I should have permissions to my test dir.
I did login to manager as tomcat, could that be a problem?  How do I log out?  Should I add root to tomcat_users.xml and make it a manager?
Thanks
 

Have you tried to add a ... block for 'test' 
application, just like 'example' has in the 
$TOMCAT-HOME/conf/server.conf file? You may try that taking the 
'example' block as a template for modification.

Best

Bao

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 12:38 PM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available


A few things to check.

1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
   Always start there.
2.) Make sure Tomcat can find the javac compiler.
   Do you have a full j2sdk installed or just a JRE?
   Tomcat will run with a JRE but won't be able to 
   compile your JSPs without access to javac.
   If not, go to http://java.sun.com and get a full j2sdk.

   Is your JAVA_HOME evironment variable set?
Type: echo $JAVA_HOME at the shell to verify.
It should point to the root directory of your j2sdk.
Example:  /usr/local/j2sdk1.4.2
   Is your JAVA_HOME evironment variable PROPERLY set?
Type:  $JAVA_HOME/bin/javac at the shell.
If you get a "Command not found" message, it's not.
   Another way to make sure that Tomcat can see your javac compiler
   is to run (not just look at, but run) the JSP examples that ship with
   Tomcat.
3.) Check the permissions of the directories and files that you've created   
   and make sure that that whatever user that is running Tomcat has 
   permission to access those files.

Let us know what you find.

-Ben









On Thursday 11 December 2003 12:29 pm, you wrote:
 

Did that. Same message: The requested rsource not available.
Something else is wrong...
Thanks.
-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:29 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available
You don't need to run the install and you don't need a web.xml file.

Create a directory under webapps (test) and create a WEB-INF directory in
it.
Put a JSP in the test directory (test.jsp).  The following will do:
<%="Hello World"%>
Restart Tomcat.

Point to http://localhost:8080/test/test.jsp with your browser.

On Thursday 11 December 2003 11:26 am, you wrote:
   

Thanks.  I did http://localhost:8080/manager/install?war=test and got the
error: "Access to the specified resource has been denied/forbidden". 
What does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:
 (I'm
not logged in to the machine as Tomcat but I thin it has nothing to do
with it, right?) When I try to to http://localhost:8080/manager/list I
get the same error... Can you give me any idea on what is going on?
Thanks
N.K.

-Original Message-
From: BAO RuiXian [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:50 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available
Nadia Kunkov wrote:
 

Hi, I've just installed Tomcat4.1.29 and it's my first time configuring
it from the scratch.  I'm able to go to http://localhost:8080/examples
or http://localhost:8080/tomcat-docs/index.html.  But I have also
created a new directory under $Tomcat_home/webapps called test.  Under
that I created WEB-INF and copied one of my old web.xml files over
   




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


Re: google yourself

2003-12-11 Thread Adam Hardy
Amazingly it seems that google is down. Bang goes another myth.

On 12/11/2003 02:41 PM Nikola Milutinovic wrote:
Ostad, James wrote:

have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.
Any one knows how they do that?


There is a web archive of this list.

Nix.


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5.0.16 : manager-app access

2003-12-11 Thread Adam Hardy
Hi Dirk,
re: a FAQ or whatever, it's just a case of reading the tomcat 5 docs on 
the Jakarta website where appropriate.

The manager app will only let you log on with the role 'manager'. If 
your user in that realm isn't in the role, you won't get in. You can 
change this in the server/webapps/manager/WEB-INF/web.xml config.

However you say you don't even get the chance to login? Strange.

I'm not familiar with the admin app. Are you saying that your realm 
should show up there but doesn't?

And the realm works fine for your app and for the admin app, but not for 
the manager app?

Judging by the error in the admin app you spoke of, I would guess that 
there is something wrong with the roles configuration in your realm. Do 
you use roles in your own app? If so and it works, then perhaps it's not 
that problem. But I'd look there first.

Adam

On 12/11/2003 09:57 AM Dirk Griesbach wrote:
thanx for your hint, is there a FAQ or Readme on TC5 I missed ?

I moved the manager.xml to ...\conf\catalina\localhost.
It has the following content:
"

   

"
You're right, the Realm is defined in the server.xml:
"
...

...




 
"
Unfortunately: no effect, "403 - Access to the requested resource has been
denied"
The admin-app still shows no entry in 'User database"
Is there something else that's worth having a look at ?

Dirk

- Original Message -
From: Adam Hardy <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 10:17 PM
Subject: Re: Tomcat 5.0.16 : manager-app access


On 12/10/2003 05:49 PM Dirk Griesbach wrote:

hello folks,

a question on datasource realms and the manager app:

When I installed TC 5.0.16 'out-of-the-box' I could start the
manager-app.

Then I deployed our webapp (manually), configured a DataSourceRealm
using mysql

for authentification, configured SSL, form based LogIn and ... the
webapp works fine.

(The resource name is still "UserDatabase")

But if I now try to use the manager-app I get the error: "403 - access
denied" without even being prompted.

I've modified "..server\webapps\manager\WEB-INF\web.xml" so that it
reads:

"...
  UserDatabase
  javax.sql.DataSource

"
and "..server\webapps\manager\manager.xml" that it reads

"...


"
no effect.
Even more strange the behaviour of the "admin-app":

The Login-screen appears as usual and login data that complies with the
the DataSource Realm is being accepted.

Clicking on "dataSource" shows up the 'mysql-jdbc' Installation.
Clicking on 'user database' showsnothing.
Clicking on 'user roles, groups' etc. results in an error
"The server encountered an internal error (Error retrieving attribute
groups) that prevented it from fulfilling this request."

Admin-app uses struts with TagLibs, is there something hardcoded in
there ?

Why do the these two applications not recognize the new Realm ?


Hi Dirk,
presumably you configured the realm in the server.xml.
You need to put the manager.xml file in conf/Catalina/localhost/ which
is the new place for it in 5.x


--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 4.1.29 Clustering

2003-12-11 Thread Pitre, Russell
Hello All,  

 

I think this may be a question for Filip.I am testing a network load
balancing and tomcat clustering configuration
(InMemorySessionReplication)..Here's my setup:

 

I have two servers both of which have IIS 5 and Tomcat 4.1.29 installed.
I am using Microsoft Network Load Balancing Services to do my front end
load balancing/failover detection in front of the two IIS web
serversI implemented the JK2 connector between IIS and Tomcat on
both of the boxes.  NLB services and the JK2 Connector setup are working
great!  I downloaded tomcat-javagroups.jar and javagroups.jar and put
them in my /server/lib directory.I also have the following in webapp
 element:

 




 

I copied and pasted the above from here:
http://www.theserverside.com/resources/article.jsp?l=Tomcat

 

When I start up Tomcat I see the EXPECTED error that the
InSessionMemoryReplication mbean is not found.   Cool.

 

I can access static content no problem such as an html page but, when I
go to access .jsp page I receive the following error in the localhost
log.

 

2003-12-11 15:55:56 JspFactoryImpl: Exception initializing page context

java.lang.NullPointerException

at
org.apache.catalina.session.InMemoryReplicationManager.createSession(InM
emoryReplicationManager.java:212)

at
org.apache.catalina.session.InMemoryReplicationManager.createSession(InM
emoryReplicationManager.java:242)

at
org.apache.coyote.tomcat4.CoyoteRequest.doGetSession(CoyoteRequest.java:
1882)

 

 

 

I'm not sure what to make of thisI know I need to make all of my
session attributes implement java.io.Serializable..But, I haven't
even put anything into my session yetI'm just accessing a jsp
that is bare bones with just a simple "hello" string..

 

 

Any Ideas?

 

 

 



admin interface: jdbcrealm usage

2003-12-11 Thread Ostad, James
I have implemented the jdbcrealm user authentication.
Now when I go to the tomcat admin site, there is no sign of our users
and roles.

Am I supposed to assume that once I moved to jdbcrealm, I should forget
about the admin site for user control?

any comment?

thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]


Out---> (3)



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



Re: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Antonio Fiol Bonnín

So . what your telling me, is that it's a concurrency problem
created by having "object attributes"?  That if they were, in fact being
called more like:
	doProcess2 ();

than like:

	doProcess1 ();

I wouldn't have these problems?  Very interesting.
 

Not quite. I don't really understand your structue, but it seems it 
needs some refactoring.

Please write back and ensure that's what you mean . because I'm
pretty sure it is.  Oh, fun.  Here I go to change  some 100K lines
of code :-)
 

As a rule of thumb, do not let your "req" and "res" leave local scope 
(do not "store" them anywhere [attribute, static attribute, other 
object, ...]).

If you need help with the refactoring and I can access your code, I 
might help on saturday. (Which timezone do you live on?)

Yours,

Antonio Fiol


smime.p7s
Description: S/MIME Cryptographic Signature


Re: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Antonio Fiol Bonnín
Sorry, but I think your solution is not completely thread safe, because
you do not declare doGet synchronized. If you did that, it would be
thread safe. But what is the point then? Declare the servlet as
"implements SingleThreadModel", and you are done!

Obviously, you will not avoid other global or out of scope variables
concurrency problems with that.

Yours,

Antonio Fiol


Altankov Peter wrote:

>If you go for the SingleThreadModel, try this to workaround your problem:
>
>public class TestServlet extends HttpServlet implements SingleThreadModel {
>...
>}
>
>However, this interface does not prevent synchronization problems that result from 
>servlets accessing shared resources such as static class variables or classes outside 
>the scope of the servlet and moreover its 
>depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax/servlet/SingleThreadModel.html)
>
>In general avoid any global variables in the scope of the servlet class definition 
>unless you know what you are doing. Use method variables instead.
>If you decide to go for the real problem solution, either declare the req and res 
>objects in the, lets say,  doGet method and pass them to the forward method, or keep 
>their declaration in the servlet class but mark the forward method as syncronized 
>(causing threads to enter it one by one).
>
>Here are your hnt snipplets:
>
>// the workaround
>public class TestServlet extends HttpServlet {
>private HttpServletRequest req;
>private HttpServletResponse res;
>[...]
>public void doGet(HttpServletRequest request, HttpServletResponse response)
>throws ServletException, IOException
>{
>[.]
>forward("whatever");
>}
>
>protected synchronized void forward(String s) {
>[.. Here is where you refer the global req and res objects ..]
>[.. but its safe, since the method is marked as synchronized ..]
>}
>}
>
>-- Or --
>
>// some real solution
>public class TestServlet extends HttpServlet {
>public void doGet(HttpServletRequest request, HttpServletResponse response)
>throws ServletException, IOException
>{
>HttpServletRequest req;
>HttpServletResponse res;
>[]
>forward("whatever", req, res);
>
>}
>protected void forward(String s, HttpServletRequest req, HttpServletResponse 
> res) {
>[...]
>}
>}
>
>
>I hope this helps.
>
>
>-Original Message-
>From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
>Sent: 11 Декември 2003 г. 16:28
>To: Tomcat Users List
>Subject: Re: response.reset() and forward() ... problematic? DBCP related?
>
>
>Hi!
>
>Antonio Fiol Bonnín wrote:
>
>  
>
>>My guess:
>>
>>req and res are attributes of the Servlet, like in:
>>public class TestServlet extends HttpServlet {
>>private HttpServletRequest req;
>>private HttpServletResponse res;
>>[...]
>>}
>>
>>So you are calling "forward(s)" for a request once req and res have
>>been
>>overwritten by another request.
>>
>>
>
>Hmm... Im a bit lost here... could anyone perhaps be so kind and post
>a code snipplet of how a thread safe use of a Servlet's request and
>response attribute could look like? I have not been working with
>Servlets for too long and I worried I might run into the same problem.
>  
>



smime.p7s
Description: S/MIME Cryptographic Signature


VERY weird problem with commons-logging and Tomcat5

2003-12-11 Thread Philipp Taprogge
Hi!

I have a very disgusting problem here... I am developing a webapp 
which uses commons-logging and log4j.
All I do is use the commons' Log and LogFactory in my application and 
place a log4j.properties file in my WEB-INF/classes.
This property file looks like this (w/out the CR in the middle line of 
course):

log4j.rootCategory=DEBUG, warthoglog
log4j.appender.warthoglog=org.apache.log4j.RollingFileAppender
log4j.appender.warthoglog.layout=org.apache.log4j.PatternLayout
log4j.appender.warthoglog.layout.ConversionPattern=%d{ISO8601}
[%-15C{1}] %-5p - %m%n
log4j.appender.warthoglog.File=${catalina.home}/logs/warthog.log
log4j.appender.warthoglog.MaxFileSize=2048KB
log4j.appender.warthoglog.MaxBackupIndex=20
log4j.appender.warthoglog.Append=true
This works fine, except that I get not only my application's log 
messages but _ALL_ tomcat debug logging in this file, which firstly 
slows down my machine (no wonder) and secondly grows the logfile to a 
few MBs just from startup.
What the heck am I doing wrong here? This setup worked perfectly in 
the last tomcat4.

Can anyone advice?

	Philipp Taprogge

--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: context

2003-12-11 Thread Adam Hardy
Hi Jerald,
I'm sorry but I've never had a Status 500 - no context configured.
There must be something freaky in your context configuration. Is the 
manager app running? That is normally at localhost:8080/manager/html

What does that say you have running in terms of contexts?

What directories do you have in your webapps dir and what contexts do 
you have configured in conf/server.xml and conf/Catalina/localhosts/*.xml?

BTW what TC version are you running?

Adam

On 12/11/2003 01:19 AM Jerald Powel wrote:
Yes, they are all (3) running on different ports. All of them running
apps quite happily. This particular one is running a single WAR OK,
and my app - not OK. (HTTP Status 500 - No Context configured to
process this request). I haven't played with the root context.
Manager app?! Like I said, all apps bar the two I talk of have been
removed. On looking, there is NO root context! (TC was configured by
a third party before my arival)
thanks for your assistance

G.

Jerald, what happens then? You just get a message saying 'requested
resource not available'?
Presumably your different tomcats are on different ports and don't 
interfere with each other?

Also can you run the manager app? What does it say is running?

You say you removed all other contexts - so your app is running as
the root context? I believe you must have a root context.
Adam

On 12/09/2003 11:13 PM Jerald Powel wrote:

Sorry for any impropriety re the hijacking!

I have a WAR running successfully under webapps. All other examples
 etc have been removed. I am running several instances/versions of 
Tomcat on the same box, and have no CATALINA_HOME env. variable 
defined. I am trying to port my app from the one version to the 
other. The WAR runs, my app doesn't!

Thanks for any help

G.

Prostrate yourself to a tongue lashing for hijacking someone else's
 thread as well! You should start a new thread when you post a new 
topic.

Unfortunately you haven't provided enough info. Start a new thread 
and include details like your CATALINA_HOME and CATALINA_BASE 
variables and whether your root, manager & jsp-examples contexts
are accessible.





--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat Manager App Question

2003-12-11 Thread Swaminathan Gurumoorthy
I was playing with the manager app to install my application on Tomcat in Windows 200. 
I have a myApp.war and also a context file myApp.xml which has resource definitions 
for my project.
 
Now I tried something like this from my browser.
 
http://localhost:8080/manager/install?path=/myApp&war=jar:file://C:/myAppDir/myApp.war!&config=file://C:/myAppDir/myApp.xml
 
It gives me a 
FAIL - Encountered exception java.net.MalformedURLException: no !/ in spec

error.

What am I doing wrong. I need to get this working so that I can use the Tomcat Ant 
tasks to install.

TIA

Swami



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Re: Can't get jk2 to work!

2003-12-11 Thread Dola Woolfe
Thanks!

Yes, I'm intrested in the simplest to get running!
So... which one is the "normal socket configuration".
I know it's a stupid question, but I don't know the
answer.

Is it OK that instructions are for 4.1 and I'm using
5.0?

Thanks once again!


--- Mark Eggers <[EMAIL PROTECTED]> wrote:
> JK2 and JK are two different beasts.
> 
> If you are going to use JK instructions in
> httpd.conf
> (which is what you have), then you will need to use
> mod_jk.dll.
> 
> Go to here:
> 
> http://jakarta.apache.org/site/binindex.cgi
> 
> and select the JK 1.2 binaries to download.
> 
> If you are going to use JK2, then you need to follow
> these instructions:
> 
> For jk2.properties:
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configtcex.html
> 
> For workers2.properties:
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configtcex.html
> 
> The normal socket configuration is probably the
> simplest to get running.
> 
> Also, see the following links:
> http://jakarta.apache.org/tomcat/faq/
>
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto
>
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links
> 
> HTH
> /mde/
> just my two cents . . . .
> 
> __
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Can't get jk2 to work!

2003-12-11 Thread Mark Eggers
JK2 and JK are two different beasts.

If you are going to use JK instructions in httpd.conf
(which is what you have), then you will need to use
mod_jk.dll.

Go to here:

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

and select the JK 1.2 binaries to download.

If you are going to use JK2, then you need to follow
these instructions:

For jk2.properties:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configtcex.html

For workers2.properties:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configtcex.html

The normal socket configuration is probably the
simplest to get running.

Also, see the following links:
http://jakarta.apache.org/tomcat/faq/
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links

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

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Default context for web app

2003-12-11 Thread Adam Hardy
On 12/11/2003 12:51 AM Kent Boogaart wrote:
Wow - thanks for all the help people. Just thought I'd update you on how I
resolved this.
Firstly, I removed all  elements from "conf/server.xml" except my
own. Then I set "autoDeploy" to "false" on the  element.
This almost got everything working as required. However, the admin and
manager web apps were still deployed which was unacceptable because they
would be available via a live IP. This was because the "deployXML" attribute
was set to "true". I set this to "false" and then only my context was
deployed.
Hi Kent,
just so I can compare notes, what did you name your deploy directory? 
ROOT or something else?

And what version are you running again?

Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP Compile in Ant with Tomcat 5.0.16

2003-12-11 Thread Remy Maucherat
Larry Karnowski wrote:
All,
I've disovered the cause of my problems with the Ant build using the 
JspC task.  I'm documenting the workaround here for anyone else having 
similar problems.

I thought that the JSP Ant build was successful even though I was seeing 
errors with runtime compilation in Tomcat because Ant was reporting a 
BUILD SUCCESSFUL.  However, after checking the generated *.java files, I 
found that the same files that were causing Tomcat to fail were also 
failing in Ant, only quietly.  The JspC task was creating zero-length 
Java files that Javac was then quietly ignoring.  This is because of two 
problems below:

1) Apache bug #25452 
((http://issues.apache.org/bugzilla/show_bug.cgi?id=25452), where the 
Ant build is not notified if there are any JspC compile issues.  Instead 
it creates zero-length Java files.

2) I didn't have my commons-logging-api configured correctly.  I 
strongly recommend adding the following to your Java command in your Ant 
shell script to ensure proper error logging during JSP compiles:

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog 
-Dorg.apache.commons.logging.simplelog.defaultlog=info 
-Dorg.apache.commons.logging.simplelog.showdatetime=true

These properties will tell JspC to use the SimpleLog class which sends 
its log messages to stderr.  You might still get a BUILD SUCCESSFUL 
report from Ant, but a human can look back through the build output and 
see any error messages.  Also, you can do a check for empty Java files. 
 (example "find builddir -name \*.java -empty")

I hope this helps, and thanks to Rémy for looking!
It's easy to set those properties in the Ant script. I think I'll add them.
The nightly build should have the fix and make the build fail (I didn't 
try it though).

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


RE: very basic winNT question

2003-12-11 Thread George Sexton
I think more likely, you need to increase your environment size by
specifiying /E: in your command line to run CMD.

-Original Message-
From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 10:49 AM
To: 'Tomcat-User List'
Subject: very basic winNT question


Hello folks, i know, this a list for Java and Tomcat, but i´m
facing
a problem that is a P.A., does anybody here know how can i change winNT
command line limit? That´s ´cause my CLASSPATH grew bigger and now my
Java
tools are complaining about it.

Regards,
Edson


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



Re: How To Install an APP under Tomcat 4.1.29 ???

2003-12-11 Thread Jon Wingfield
I assume these are typos in the email, not your config:

> CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
  ^
>  docbase=""/files/ar/mid-tier" reloadable="true"/>
 ^ ^
If tomcat has trouble loading the Context i would expect to see 
exceptions in the $CATALINA_HOME/logs/localhost_log.-MM-dd.txt log 
file, logging to which is enabled by default.

As in java, xml is case-sensitive and docBase!=docbase.

The manager and admin webapps are setup as non-WAR apps with a docBase 
outside the user webapp base. Take a look at 
$CATALINA_HOME/webapps/manager.xml

As for configuring Tomcat with Apache:
http://jakarta.apache.org/tomcat/faq/connectors.html
HTH,

Jon

Richard Migneron wrote:

Hi all,

I'm new to Tomcat.  We have a small problem under Solaris 8.

1) We've read the documentation
2) We've skimped through all the past messages in the archive
3) Apache 1.3.29 has been configured with the following :
--enable-rule=SHARED_CODE
--enable-module=rewrite --enable-shared=rewrite
--enable-module=proxy --enable-shared=proxy
4) jakarta was installed in a directory under apache
5) The j2sdk1.4.2_02 was installed in /usr
6) In the S50apache, there are :
JAVA_HOME=/usr/j2sdk1.4.2_02
CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
APACHE_HOME=/files/apache
CONF_FILE=/files/apache/conf/httpd.conf
7) We start APACHE, no problem so far (it listens on 8080)
8) We've modified the server.xml to change the port to 8000
9) We've added an user admin with admin and manager roles
10) In the S51tomcat, there are :
CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
JAVA_HOME=/usr/j2sdk1.4.2_02
export CATALINA_HOME JAVA_HOME

11) We start Tomcat, no problem so far (it listens on 8000)
12) We get to the Manager Window to try to install an
application.  The application is called "mid-tier", it resides
in "/files/ar/mid-tier", in this directory there is a WEB-INF
directory (amongst others).
What would I put in the 3 boxes to install the app 

We've tried plenty of stuff and logically, you'd put something
like :
Context Path (optional) : /mid-tier
XML Configuration file URL: /files/ar/mid-tier
WAR or Directory URL:   (I don't have a clue)
This application is not using WARs.

Now, I've tried installing it directly by hand in the server.xml
file, here is the line I added :

With this line we see the app appearing on the manager page, but
when we go into it, we are in a directory structure (a la ftp
type) and when we try to launch it, it gives an error message
on account that the config file is not correct !
I think the sole line in the server.xml is not enough !!!
By the way, they don't have an ounce of documentation on
configuring this thing on Apache+Tomcat, although they've done
it before on a Apache 1.3.27 + Tomcat 4.0.6.
Any help would be welcomed (before they ask me to revert to
Apache 1.3.27 + ServLet Exec 4.1.1, arrgghh!!)
Thanks,

Richard
_
Richard Migneron
Yahoo Messenger ID: rmigneron
PGP Fingerprint : EFFE 44E3 894A 7051 F86E E532 4880 9534 E1FB
BD33
"Isn't having a smoking section in a restaurant like
having a peeing section in a swimming pool ?"
Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)



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


Can't get jk2 to work!

2003-12-11 Thread Dola Woolfe
Hi,

I'm trying to get JK2 to work to integrate Apache
2.0.48 with Tomcat 5.0.

I've followed instructions verbatim from
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/quickhowto.html

Perhaps, that's the answer to my question (5.0 vs
4.1), in which case please point me to Tomcat 5.0
integration instructions.

Otherwise, here's an excerpt from httpd.conf:


LoadModule jk_module modules/mod_jk.dll
AddModule mod_jk.c 
JkWorkersFile C:/Program Files/Apache
Group/Apache2/conf/workers.properties 
JkLogFile C:/Program Files/Apache
Group/Apache2/conf/mod_jk.log 
JkLogLevel info 
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " 
JkOptions +ForwardKeySize +ForwardURICompat
-ForwardDirectories 
JkRequestLogFormat "%w %V %T" 
JkMount /examples/* worker1 


where I took mod_jk2-2.0.43.dll and renamed it
mod_jk.dll.

My workers.properties is unchanged from the example.

Thanks!


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Nadia Kunkov
Yes, my $Java_Home is fine, finds javac, and example servlets/jsp are running. Log is 
no help, nothing interesting in it.  I'm logged in to my machine as root and start 
tomcat as root.  I know that it sometimes changes the context and runs under Tomcat.  
In Tomcat4.0 it was set in conf/tomcat4.conf and there the user would be set to Tomcat 
even though it was started as root. But I don't know if there is anything like that in 
this version.
Thanks for working through this thing with me

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available


Don't worry about the manager for now.

Did you start tomcat as root?  If so, it's probably not a permissions example.
Did you check everything else on my list below?




On Thursday 11 December 2003 02:05 pm, you wrote:
> Well, there is nothing in the log, just starting/stopping Tomcat stuff...
> I can run any example in the /examples dir without a problem.
> I'm running as root, I'm logged in as root (I know it's bad, I have my
> reasons for it now) so I should have permissions to my test dir. I did
> login to manager as tomcat, could that be a problem?  How do I log out? 
> Should I add root to tomcat_users.xml and make it a manager? Thanks
>
> -Original Message-
> From: Ben Souther [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 12:38 PM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
>
>
> A few things to check.
>
> 1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
> Always start there.
>
> 2.) Make sure Tomcat can find the javac compiler.
> Do you have a full j2sdk installed or just a JRE?
> Tomcat will run with a JRE but won't be able to
> compile your JSPs without access to javac.
> If not, go to http://java.sun.com and get a full j2sdk.
>
> Is your JAVA_HOME evironment variable set?
>   Type: echo $JAVA_HOME at the shell to verify.
>   It should point to the root directory of your j2sdk.
>   Example:  /usr/local/j2sdk1.4.2
>
> Is your JAVA_HOME evironment variable PROPERLY set?
>   Type:  $JAVA_HOME/bin/javac at the shell.
>   If you get a "Command not found" message, it's not.
>
> Another way to make sure that Tomcat can see your javac compiler
> is to run (not just look at, but run) the JSP examples that ship with
> Tomcat.
>
> 3.) Check the permissions of the directories and files that you've created
> and make sure that that whatever user that is running Tomcat has
> permission to access those files.
>
> Let us know what you find.
>
> -Ben
>
> On Thursday 11 December 2003 12:29 pm, you wrote:
> > Did that. Same message: The requested rsource not available.
> > Something else is wrong...
> > Thanks.
> >
> > -Original Message-
> > From: Ben Souther [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 11:29 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat4.1.29 Requested resource not available
> >
> >
> > You don't need to run the install and you don't need a web.xml file.
> >
> > Create a directory under webapps (test) and create a WEB-INF directory in
> > it.
> >
> > Put a JSP in the test directory (test.jsp).  The following will do:
> > <%="Hello World"%>
> >
> > Restart Tomcat.
> >
> > Point to http://localhost:8080/test/test.jsp with your browser.
> >
> > On Thursday 11 December 2003 11:26 am, you wrote:
> > > Thanks.  I did http://localhost:8080/manager/install?war=test and got
> > > the error: "Access to the specified resource has been
> > > denied/forbidden". What does that mean?  In
> > > $Tomcat_Home/conf/tomcat_users.xml I have this:  > > password = "Tomcat" roles = "tomcat,manager"/> (I'm not logged in to
> > > the machine as Tomcat but I thin it has nothing to do with it, right?)
> > > When I try to to http://localhost:8080/manager/list I get the same
> > > error... Can you give me any idea on what is going on? Thanks
> > > N.K.
> > >
> > > -Original Message-
> > > From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 11, 2003 10:50 AM
> > > To: Tomcat Users List
> > > Subject: Re: Tomcat4.1.29 Requested resource not available
> > >
> > > Nadia Kunkov wrote:
> > > >Hi, I've just installed Tomcat4.1.29 and it's my first time
> > > > configuring it from the scratch.  I'm able to go to
> > > > http://localhost:8080/examples or
> > > > http://localhost:8080/tomcat-docs/index.html.  But I have also
> > > > created a new directory under $Tomcat_home/webapps called test. 
> > > > Under that I created WEB-INF and copied one of my old web.xml files
> > > > over there.  When I try to access http://localhost:8080/test/  I get
> > > > a message: resource not available.  I know I'm missing something
> > > > really simple but I
> > >
> > > I think you need to install it first. For example by the following way:
> > >
>

Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Ben Souther
Don't worry about the manager for now.

Did you start tomcat as root?  If so, it's probably not a permissions example.
Did you check everything else on my list below?




On Thursday 11 December 2003 02:05 pm, you wrote:
> Well, there is nothing in the log, just starting/stopping Tomcat stuff...
> I can run any example in the /examples dir without a problem.
> I'm running as root, I'm logged in as root (I know it's bad, I have my
> reasons for it now) so I should have permissions to my test dir. I did
> login to manager as tomcat, could that be a problem?  How do I log out? 
> Should I add root to tomcat_users.xml and make it a manager? Thanks
>
> -Original Message-
> From: Ben Souther [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 12:38 PM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
>
>
> A few things to check.
>
> 1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
> Always start there.
>
> 2.) Make sure Tomcat can find the javac compiler.
> Do you have a full j2sdk installed or just a JRE?
> Tomcat will run with a JRE but won't be able to
> compile your JSPs without access to javac.
> If not, go to http://java.sun.com and get a full j2sdk.
>
> Is your JAVA_HOME evironment variable set?
>   Type: echo $JAVA_HOME at the shell to verify.
>   It should point to the root directory of your j2sdk.
>   Example:  /usr/local/j2sdk1.4.2
>
> Is your JAVA_HOME evironment variable PROPERLY set?
>   Type:  $JAVA_HOME/bin/javac at the shell.
>   If you get a "Command not found" message, it's not.
>
> Another way to make sure that Tomcat can see your javac compiler
> is to run (not just look at, but run) the JSP examples that ship with
> Tomcat.
>
> 3.) Check the permissions of the directories and files that you've created
> and make sure that that whatever user that is running Tomcat has
> permission to access those files.
>
> Let us know what you find.
>
> -Ben
>
> On Thursday 11 December 2003 12:29 pm, you wrote:
> > Did that. Same message: The requested rsource not available.
> > Something else is wrong...
> > Thanks.
> >
> > -Original Message-
> > From: Ben Souther [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 11:29 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat4.1.29 Requested resource not available
> >
> >
> > You don't need to run the install and you don't need a web.xml file.
> >
> > Create a directory under webapps (test) and create a WEB-INF directory in
> > it.
> >
> > Put a JSP in the test directory (test.jsp).  The following will do:
> > <%="Hello World"%>
> >
> > Restart Tomcat.
> >
> > Point to http://localhost:8080/test/test.jsp with your browser.
> >
> > On Thursday 11 December 2003 11:26 am, you wrote:
> > > Thanks.  I did http://localhost:8080/manager/install?war=test and got
> > > the error: "Access to the specified resource has been
> > > denied/forbidden". What does that mean?  In
> > > $Tomcat_Home/conf/tomcat_users.xml I have this:  > > password = "Tomcat" roles = "tomcat,manager"/> (I'm not logged in to
> > > the machine as Tomcat but I thin it has nothing to do with it, right?)
> > > When I try to to http://localhost:8080/manager/list I get the same
> > > error... Can you give me any idea on what is going on? Thanks
> > > N.K.
> > >
> > > -Original Message-
> > > From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 11, 2003 10:50 AM
> > > To: Tomcat Users List
> > > Subject: Re: Tomcat4.1.29 Requested resource not available
> > >
> > > Nadia Kunkov wrote:
> > > >Hi, I've just installed Tomcat4.1.29 and it's my first time
> > > > configuring it from the scratch.  I'm able to go to
> > > > http://localhost:8080/examples or
> > > > http://localhost:8080/tomcat-docs/index.html.  But I have also
> > > > created a new directory under $Tomcat_home/webapps called test. 
> > > > Under that I created WEB-INF and copied one of my old web.xml files
> > > > over there.  When I try to access http://localhost:8080/test/  I get
> > > > a message: resource not available.  I know I'm missing something
> > > > really simple but I
> > >
> > > I think you need to install it first. For example by the following way:
> > >
> > > http://localhost:8080/manager/install?war=test
> > >
> > > Best
> > >
> > > Bao
> > >
> > > >can't figure it out.  Permissions are fine.
> > > >I appreciate your help.
> > > >N.K.
> > > >
> > > >
> > > >
> > > >-
> > > >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-mai

Re: JSP Compile in Ant with Tomcat 5.0.16

2003-12-11 Thread Larry Karnowski
All,
I've disovered the cause of my problems with the Ant build using the 
JspC task.  I'm documenting the workaround here for anyone else having 
similar problems.

I thought that the JSP Ant build was successful even though I was seeing 
errors with runtime compilation in Tomcat because Ant was reporting a 
BUILD SUCCESSFUL.  However, after checking the generated *.java files, I 
found that the same files that were causing Tomcat to fail were also 
failing in Ant, only quietly.  The JspC task was creating zero-length 
Java files that Javac was then quietly ignoring.  This is because of two 
problems below:

1) Apache bug #25452 
((http://issues.apache.org/bugzilla/show_bug.cgi?id=25452), where the 
Ant build is not notified if there are any JspC compile issues.  Instead 
it creates zero-length Java files.

2) I didn't have my commons-logging-api configured correctly.  I 
strongly recommend adding the following to your Java command in your Ant 
shell script to ensure proper error logging during JSP compiles:

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog 
-Dorg.apache.commons.logging.simplelog.defaultlog=info 
-Dorg.apache.commons.logging.simplelog.showdatetime=true

These properties will tell JspC to use the SimpleLog class which sends 
its log messages to stderr.  You might still get a BUILD SUCCESSFUL 
report from Ant, but a human can look back through the build output and 
see any error messages.  Also, you can do a check for empty Java files. 
 (example "find builddir -name \*.java -empty")

I hope this helps, and thanks to Rémy for looking!
Larry Karnowski
Remy Maucherat wrote:
Larry Karnowski wrote:

All,
I'm getting error messages while compiling JSPs at runtime inside 
Tomcat but not when I compile the same JSPs with the  Ant task.

I've upgraded my Ant build to use the new  tag (the 
org.apache.jasper.JspC class) instead of the old  tag that came 
with Ant.  (It doesn't work with Tomcat 5.0.16.)  All my JSPs compile 
fine with the new class.


 and  are the same, as long as the task classname is the 
same :) So you should be able to rename jasper2.

However, when I actually put the JSPs in my webapp for Tomcat to 
compile, I get a few compilation errors.  Note that I'm compiling my 
JSPs as a quality assurance step, not to ship precompiled Java classes. 


This is a very good practice. It does allow detecting many trivial 
errors much faster.

 I'm trying to find errors at build time rather than run time.

The problem comes with a poorly-coded JSP include action like this:



I'll be the first to admit this is poor style, and I'm not too upset 
that Tomcat won't compile it.  I can easily fix it by removing the 
trailing tag and making it an empty tag.  However, my normal method of 
finding these types of errors is failing me -- my Ant JSP build.


Standard JSPs are not XML. Maybe that's the problem. You should post the 
error you're getting, BTW.

This is my build.xml snippet:

This is the error message I get from Tomcat:
Expected "param" tag with "name" and "value" attributes
I've started combing through the Jasper code to find what's different 
when compiling inside Tomcat as opposed to inside Ant.  I've looked 
through all the top-level Jasper wrappering code that gathers the 
compilation options, but nothing seems significantly different.  None 
of the compile options seem to be relevant to this issue.

There must be something going on deeper in the actual JSP compilation 
code.  Does anyone have any idea what's happening?




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


RE: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Nadia Kunkov
Well, there is nothing in the log, just starting/stopping Tomcat stuff...
I can run any example in the /examples dir without a problem.
I'm running as root, I'm logged in as root (I know it's bad, I have my reasons for it 
now) so I should have permissions to my test dir.
I did login to manager as tomcat, could that be a problem?  How do I log out?  Should 
I add root to tomcat_users.xml and make it a manager?
Thanks

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 12:38 PM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available



A few things to check.

1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
Always start there.

2.) Make sure Tomcat can find the javac compiler.
Do you have a full j2sdk installed or just a JRE?
Tomcat will run with a JRE but won't be able to 
compile your JSPs without access to javac.
If not, go to http://java.sun.com and get a full j2sdk.

Is your JAVA_HOME evironment variable set?
Type: echo $JAVA_HOME at the shell to verify.
It should point to the root directory of your j2sdk.
Example:  /usr/local/j2sdk1.4.2

Is your JAVA_HOME evironment variable PROPERLY set?
Type:  $JAVA_HOME/bin/javac at the shell.
If you get a "Command not found" message, it's not.

Another way to make sure that Tomcat can see your javac compiler
is to run (not just look at, but run) the JSP examples that ship with
Tomcat.

3.) Check the permissions of the directories and files that you've created   
and make sure that that whatever user that is running Tomcat has 
permission to access those files.

Let us know what you find.

-Ben










On Thursday 11 December 2003 12:29 pm, you wrote:
> Did that. Same message: The requested rsource not available.
> Something else is wrong...
> Thanks.
>
> -Original Message-
> From: Ben Souther [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 11:29 AM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
>
> You don't need to run the install and you don't need a web.xml file.
>
> Create a directory under webapps (test) and create a WEB-INF directory in
> it.
>
> Put a JSP in the test directory (test.jsp).  The following will do:
> <%="Hello World"%>
>
> Restart Tomcat.
>
> Point to http://localhost:8080/test/test.jsp with your browser.
>
> On Thursday 11 December 2003 11:26 am, you wrote:
> > Thanks.  I did http://localhost:8080/manager/install?war=test and got the
> > error: "Access to the specified resource has been denied/forbidden". 
> > What does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:
> >  (I'm
> > not logged in to the machine as Tomcat but I thin it has nothing to do
> > with it, right?) When I try to to http://localhost:8080/manager/list I
> > get the same error... Can you give me any idea on what is going on?
> > Thanks
> > N.K.
> >
> > -Original Message-
> > From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 10:50 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat4.1.29 Requested resource not available
> >
> > Nadia Kunkov wrote:
> > >Hi, I've just installed Tomcat4.1.29 and it's my first time configuring
> > > it from the scratch.  I'm able to go to http://localhost:8080/examples
> > > or http://localhost:8080/tomcat-docs/index.html.  But I have also
> > > created a new directory under $Tomcat_home/webapps called test.  Under
> > > that I created WEB-INF and copied one of my old web.xml files over
> > > there.  When I try to access http://localhost:8080/test/  I get a
> > > message: resource not available.  I know I'm missing something really
> > > simple but I
> >
> > I think you need to install it first. For example by the following way:
> >
> > http://localhost:8080/manager/install?war=test
> >
> > Best
> >
> > Bao
> >
> > >can't figure it out.  Permissions are fine.
> > >I appreciate your help.
> > >N.K.
> > >
> > >
> > >
> > >-
> > >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: Tomcat 5 and oracle

2003-12-11 Thread Jonathan Drnek
I got it. 

I was not putting the  in my metrology2.xml file

Thanks for the help

Jon

-Original Message-
From: Jonathan Drnek 
Sent: Thursday, December 11, 2003 1:30 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle

I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like


  
  
  
 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like


  
  
  


My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:



  
  
  




  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
url
jdbc:oracle:thin:@holl302h:1521:ORDT
  
  
password
junk
  
  
maxActive
4
  
  
maxWait
5000
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
username
ordline
  
  
maxIdle
2
  

   
  





  

  
  
  

  


I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction => Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt =>[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

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



Question - TOMCAT

2003-12-11 Thread Mirna Misere
Does anyone have a solution to this problem?  I would appreciate the help.
I can't resolve the problem  with TOMCAT  connector.
I get the following error  "java.io.IOException: Cannot recover key"
The keytool execution finalized succefull.
Calling from browser the  link  https://:8443doesn't
display dspace page.

- environment  :

JAVA_HOME=/usr/local/j2sdk1.4.2_02
JAVA_JRE=/usr/local/j2sdk1.4.2_02/jre
CATALINA_HOME=/usr/local/tomcat-5
JSSE_HOME=$JAVA_HOME/jre/lib
CLASSPATH=.:${JAVA_HOME}/lib:${ANT_HOME}/lib:${JAVA_HOME}/jre/lib:/lib:/dspace/lib
PSQL_HOME=/usr/local/pgsql
LD_LIBRARY_PATH=/usr/local/pgsql/lib:/dspace/lib

- /usr/local/tomcat-5/conf/server.xml




-  /usr/local/tomcat-5/logs/catalina.out

SEVERE: Error starting endpoint
java.io.IOException: Cannot recover key
at
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:151)
at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:127)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:281)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:303)
at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:217)
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1396)
at
org.apache.catalina.core.StandardService.start(StandardService.java:528)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2343)
at org.apache.catalina.startup.Catalina.start(Catalina.java:580)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
Dec 11, 2003 1:18:34 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  Protocol handler start failed: java.io.IOException:
Cannot recover key
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1398)
at
org.apache.catalina.core.StandardService.start(StandardService.java:528)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2343)
at org.apache.catalina.startup.Catalina.start(Catalina.java:580)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
Dec 11, 2003 1:18:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 27788 ms





Kind regards,



   

  Tom De Mulder

  <[EMAIL PROTECTED]>Para: Mirna Misere <[EMAIL 
PROTECTED]>   
   cc: 

  13/11/2003 08:55 Asunto:   Re: Question - webapp module  

  a.m. 

   

   





On Wed, 12 Nov 2003, Mirna Misere wrote:

>Thank for you  response, now  I have other problem,  when I tried to
>configure tomcat to work with SSL, I followed the
>instruction in server.xml to generate a server certificate. When I run the
>command  :
> "keytool -genkey -alias tomcat -keyalg RSA", it gives me the above
error.
>JAVA_HOME=/usr/local/jdk1.2.2

You're running a version of Java that is too old. Install Java 1.4 or
higher, because that's the only version that has SSL included.

>Other question, dspace have  other languages, spanich for example.

Not yet. Currently if you want DSpace in another language, you have to
translate it yourself.


Kind regards,

--
Tom De Mulder <[EMAIL PROTECTED]> - Cambridge University Computing Service
  DSpace @ Cambridge
->13/11/2003 : The Moon is Waning Gibbous (77% of Full)





===
Este mensaje y sus anexos son confidenciales y d

Re: Image Viewing

2003-12-11 Thread epyonne
Kiran,

Yoav is right.  The best way is to hide your files inside WEB-INF.  You are
contradicting yourself by saying you don't want people to access the images
thru URL, but then you want to access those images yourself thru URL.  You
are not making sense and it is very bad design architecture.

I am guessing your intention is to maintain the images, is that right?  If
true, you can always set yourself up as the admin to the server, then access
it thru VPN, FTP, or some sort of remote access.

Futhermore, you can always set up an administration module to your
application for maintenance purpose, which is the preferred way.

Hope this helps.


- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 12:29 PM
Subject: RE: Image Viewing



Howdy,
You asked how to block the user from seeing the images by putting the
address in the browser.  I told you one possible way, e.g. by putting
them under WEB-INF.  You can still access them from your servlets and
JSPs from this location, but users can't.  What part is unclear?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 1:28 PM
>To: [EMAIL PROTECTED]
>Subject: Image Viewing
>
>Thank you for the replay and your help.  If I move the images under
WEB-INF
>folder, I can't access the images from the application through the
>internet.  The images can only be viewed if you login and start the
>application not by typing the url.  For security purpose.  Please help
me
>if anybody know how to do that.  Thank you.
>
>Kiran Patel
>
>Howdy,
>Put the images directory under the WEB-INF directory and change your
>servlet accordingly.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 11, 2003 9:53 AM
>>To: [EMAIL PROTECTED]
>>Subject: Image Viewing
>>
>>I am using jsp and tomcat 4.1 for my web application.  My application=
>
>is
>>viewing image which is in the webapps/image folder.  This image can
>also be
>>viewed from the internet by just typing the url.  I want to block thi=
>s
>>since these are the confidential images.  Does anybody know how to do=
>
>that.
>>Thanks in advance.
>>
>>Kiran Patel



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Image Viewing

2003-12-11 Thread Shapira, Yoav

Howdy,
You asked how to block the user from seeing the images by putting the
address in the browser.  I told you one possible way, e.g. by putting
them under WEB-INF.  You can still access them from your servlets and
JSPs from this location, but users can't.  What part is unclear?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 1:28 PM
>To: [EMAIL PROTECTED]
>Subject: Image Viewing
>
>Thank you for the replay and your help.  If I move the images under
WEB-INF
>folder, I can't access the images from the application through the
>internet.  The images can only be viewed if you login and start the
>application not by typing the url.  For security purpose.  Please help
me
>if anybody know how to do that.  Thank you.
>
>Kiran Patel
>
>Howdy,
>Put the images directory under the WEB-INF directory and change your
>servlet accordingly.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 11, 2003 9:53 AM
>>To: [EMAIL PROTECTED]
>>Subject: Image Viewing
>>
>>I am using jsp and tomcat 4.1 for my web application.  My application=
>
>is
>>viewing image which is in the webapps/image folder.  This image can
>also be
>>viewed from the internet by just typing the url.  I want to block thi=
>s
>>since these are the confidential images.  Does anybody know how to do=
>
>that.
>>Thanks in advance.
>>
>>Kiran Patel



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Serving files from a jar

2003-12-11 Thread Vijay Kandy
I understand. Thanks Yoav.

-Vijay

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 1:29 PM
To: Tomcat Users List
Subject: RE: Serving files from a jar



Howdy,
No, there is no way to do that with current servers (it would defeat the
purpose of jarring/zipping files).

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 1:27 PM
>To: 'Tomcat Users List'
>Subject: RE: Serving files from a jar
>
>Thank you. Is there a way to "tell" the container to extract a certain
>zip/jar file within a war while it is being unpacked by the container?
>
>-Vijay
>
>-Original Message-
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 12:15 PM
>To: Tomcat Users List
>Subject: RE: Serving files from a jar
>
>
>
>Howdy,
>A WAR file can contain images and static files outside a jar -- in
fact,
>WAR is designed to do exactly that.
>
>To serve images directly out of a zip or jar files you have to write a
>servlet -- what would be the URL for these images? ;)
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 11, 2003 11:44 AM
>>To: 'Tomcat Users List'
>>Subject: Serving files from a jar
>>
>>Hello All,
>>
>>Does Tomcat serve static files out of a jar file? If so what are the
>>conditions?
>>
>>I have several .html and .gif files and when I deploy a war file that
>>includes these static content (as individual files in a folder) Tomcat
>>serves them perfectly fine. However I would like to zip them as a
>bundle
>>separate from the class files. Any ideas?
>>
>>Thank you,
>>Vijay
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Tomcat 5 and oracle

2003-12-11 Thread Jonathan Drnek
I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like


  
  
  
 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like


  
  
  


My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:



  
  
  




  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
url
jdbc:oracle:thin:@holl302h:1521:ORDT
  
  
password
junk
  
  
maxActive
4
  
  
maxWait
5000
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
username
ordline
  
  
maxIdle
2
  

   
  





  

  
  
  

  


I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction => Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt =>[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

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



RE: Serving files from a jar

2003-12-11 Thread Shapira, Yoav

Howdy,
No, there is no way to do that with current servers (it would defeat the
purpose of jarring/zipping files).

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 1:27 PM
>To: 'Tomcat Users List'
>Subject: RE: Serving files from a jar
>
>Thank you. Is there a way to "tell" the container to extract a certain
>zip/jar file within a war while it is being unpacked by the container?
>
>-Vijay
>
>-Original Message-
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 12:15 PM
>To: Tomcat Users List
>Subject: RE: Serving files from a jar
>
>
>
>Howdy,
>A WAR file can contain images and static files outside a jar -- in
fact,
>WAR is designed to do exactly that.
>
>To serve images directly out of a zip or jar files you have to write a
>servlet -- what would be the URL for these images? ;)
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-Original Message-
>>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 11, 2003 11:44 AM
>>To: 'Tomcat Users List'
>>Subject: Serving files from a jar
>>
>>Hello All,
>>
>>Does Tomcat serve static files out of a jar file? If so what are the
>>conditions?
>>
>>I have several .html and .gif files and when I deploy a war file that
>>includes these static content (as individual files in a folder) Tomcat
>>serves them perfectly fine. However I would like to zip them as a
>bundle
>>separate from the class files. Any ideas?
>>
>>Thank you,
>>Vijay
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Image Viewing

2003-12-11 Thread Kiran Patel
Thank you for the replay and your help.  If I move the images under WEB-INF folder, I 
can't access the images from the application through the internet.  The images can 
only be viewed if you login and start the application not by typing the url.  For 
security purpose.  Please help me if anybody know how to do that.  Thank you.

Kiran Patel

Howdy,
Put the images directory under the WEB-INF directory and change your
servlet accordingly.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 9:53 AM
>To: [EMAIL PROTECTED]
>Subject: Image Viewing
>
>I am using jsp and tomcat 4.1 for my web application.  My application=

is
>viewing image which is in the webapps/image folder.  This image can
also be
>viewed from the internet by just typing the url.  I want to block thi=
s
>since these are the confidential images.  Does anybody know how to do=

that.
>Thanks in advance.
>
>Kiran Patel

RE: Serving files from a jar

2003-12-11 Thread Vijay Kandy
Thank you. Is there a way to "tell" the container to extract a certain
zip/jar file within a war while it is being unpacked by the container? 

-Vijay

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 12:15 PM
To: Tomcat Users List
Subject: RE: Serving files from a jar



Howdy,
A WAR file can contain images and static files outside a jar -- in fact,
WAR is designed to do exactly that.

To serve images directly out of a zip or jar files you have to write a
servlet -- what would be the URL for these images? ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 11:44 AM
>To: 'Tomcat Users List'
>Subject: Serving files from a jar
>
>Hello All,
>
>Does Tomcat serve static files out of a jar file? If so what are the
>conditions?
>
>I have several .html and .gif files and when I deploy a war file that
>includes these static content (as individual files in a folder) Tomcat
>serves them perfectly fine. However I would like to zip them as a
bundle
>separate from the class files. Any ideas?
>
>Thank you,
>Vijay
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Tomcat 5 Newbie

2003-12-11 Thread Dola Woolfe
Great Tim, Thank you.

A couple words on why you would want to buffer?


--- Tim Funk <[EMAIL PROTECTED]> wrote:
> You need it to be in kb, not k:
> <%@ page import="html.*" buffer="16kb" %>
> 
> Per the spec: [Table JSP.2-1]
> Specifies the buffering model for the initial “out”
> JspWriter to handle 
> content output from the page.
> If “none”, then there is no buffering and all output
> is written directly 
> through to the ServletResponse PrintWriter. The size
> can only be specified in 
> kilobytes, and the suffix “kb” is mandatory.
> If a buffer size is specified then output is
> buffered with a buffer size not 
> less than that specified.
> Depending upon the value of the “autoFlush”
> attribute, the contents of this 
> buffer is either automatically flushed, or an
> exception is raised, when 
> overflow would occur.
> The default is buffered with an implementation
> buffer size of not less than 8kb.
> 
> -Tim
> 
> Dola Woolfe wrote:
> 
> > Hi Tim,
> > 
> > I have
> > 
> > <%@ page import="html.*" buffer="16k" %>
> > 
> > Is this not OK? I have to admit I don't even know
> why
> > one would want to play change it.
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



2 Tomcat on the same server

2003-12-11 Thread yuval
Hi,

Is it possible to run 2 tomcats on the same server?
And if so how do i configure the jk2 to work with both of them?


Yuval


newbie simple question...

2003-12-11 Thread Andres Ledesma
Hi everybody,

I'm pretty new to Tomcat and jsp development, I'm running tomcat 4.1 over red 
hat 8. 

I redirected default port to 80 on server.xml, and created an index.jsp page 
in wich I insert other jsp pages I created as templates usign :

 
 
... etc

In the beginning it worked fine, but at some point it stoped working, so after 
issuing an http://localhost, just a blank page appears, so obviously, that 
header.jsp and footer.sjp are not found anymore..

Testin I did insert a <%= new java.util.Date() %> just above the include 
directive, and it works fine, I get the Date Time anwser, but not the page I 
asked to be inserted for...

I been looking around, trying to find something in previous postings, but I 
couldn't get anything, so I write here hope anybody can help.

Thanks in advance

-- 
Andres Ledesma
Ibilnet Software Inc.
==
"Solo quienes se arriesgan a llegar lejos, saben cuan lejos se puede llegar"

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



JTA support in Tomcat

2003-12-11 Thread Swaminathan Gurumoorthy
We have a web application using Struts/Tomcat 4.1.18. We use the DAO pattern using 
JDBC to persist data. Right now our transactions are done using the Connection object. 
 
I am getting into a situation where I need to do a two phase commit in two different 
datasources. And I realise I may have to go the JTA way. How do I implement JTA in 
Tomcat? Does it support it?
 
TIA.
Swami


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Ben Souther

A few things to check.

1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs
Always start there.

2.) Make sure Tomcat can find the javac compiler.
Do you have a full j2sdk installed or just a JRE?
Tomcat will run with a JRE but won't be able to 
compile your JSPs without access to javac.
If not, go to http://java.sun.com and get a full j2sdk.

Is your JAVA_HOME evironment variable set?
Type: echo $JAVA_HOME at the shell to verify.
It should point to the root directory of your j2sdk.
Example:  /usr/local/j2sdk1.4.2

Is your JAVA_HOME evironment variable PROPERLY set?
Type:  $JAVA_HOME/bin/javac at the shell.
If you get a "Command not found" message, it's not.

Another way to make sure that Tomcat can see your javac compiler
is to run (not just look at, but run) the JSP examples that ship with
Tomcat.

3.) Check the permissions of the directories and files that you've created   
and make sure that that whatever user that is running Tomcat has 
permission to access those files.

Let us know what you find.

-Ben










On Thursday 11 December 2003 12:29 pm, you wrote:
> Did that. Same message: The requested rsource not available.
> Something else is wrong...
> Thanks.
>
> -Original Message-
> From: Ben Souther [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 11:29 AM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
>
> You don't need to run the install and you don't need a web.xml file.
>
> Create a directory under webapps (test) and create a WEB-INF directory in
> it.
>
> Put a JSP in the test directory (test.jsp).  The following will do:
> <%="Hello World"%>
>
> Restart Tomcat.
>
> Point to http://localhost:8080/test/test.jsp with your browser.
>
> On Thursday 11 December 2003 11:26 am, you wrote:
> > Thanks.  I did http://localhost:8080/manager/install?war=test and got the
> > error: "Access to the specified resource has been denied/forbidden". 
> > What does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:
> >  (I'm
> > not logged in to the machine as Tomcat but I thin it has nothing to do
> > with it, right?) When I try to to http://localhost:8080/manager/list I
> > get the same error... Can you give me any idea on what is going on?
> > Thanks
> > N.K.
> >
> > -Original Message-
> > From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 10:50 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat4.1.29 Requested resource not available
> >
> > Nadia Kunkov wrote:
> > >Hi, I've just installed Tomcat4.1.29 and it's my first time configuring
> > > it from the scratch.  I'm able to go to http://localhost:8080/examples
> > > or http://localhost:8080/tomcat-docs/index.html.  But I have also
> > > created a new directory under $Tomcat_home/webapps called test.  Under
> > > that I created WEB-INF and copied one of my old web.xml files over
> > > there.  When I try to access http://localhost:8080/test/  I get a
> > > message: resource not available.  I know I'm missing something really
> > > simple but I
> >
> > I think you need to install it first. For example by the following way:
> >
> > http://localhost:8080/manager/install?war=test
> >
> > Best
> >
> > Bao
> >
> > >can't figure it out.  Permissions are fine.
> > >I appreciate your help.
> > >N.K.
> > >
> > >
> > >
> > >-
> > >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]



How To Install an APP under Tomcat 4.1.29 ???

2003-12-11 Thread Richard Migneron
Hi all,

I'm new to Tomcat.  We have a small problem under Solaris 8.

1) We've read the documentation
2) We've skimped through all the past messages in the archive
3) Apache 1.3.29 has been configured with the following :

--enable-rule=SHARED_CODE
--enable-module=rewrite --enable-shared=rewrite
--enable-module=proxy --enable-shared=proxy

4) jakarta was installed in a directory under apache
5) The j2sdk1.4.2_02 was installed in /usr
6) In the S50apache, there are :

JAVA_HOME=/usr/j2sdk1.4.2_02
CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
APACHE_HOME=/files/apache
CONF_FILE=/files/apache/conf/httpd.conf

7) We start APACHE, no problem so far (it listens on 8080)
8) We've modified the server.xml to change the port to 8000
9) We've added an user admin with admin and manager roles
10) In the S51tomcat, there are :

CATALINA_HOME=/files/apache/jakarta-omcat-4.1.29
JAVA_HOME=/usr/j2sdk1.4.2_02

export CATALINA_HOME JAVA_HOME

11) We start Tomcat, no problem so far (it listens on 8000)
12) We get to the Manager Window to try to install an
application.  The application is called "mid-tier", it resides
in "/files/ar/mid-tier", in this directory there is a WEB-INF
directory (amongst others).

What would I put in the 3 boxes to install the app 

We've tried plenty of stuff and logically, you'd put something
like :

Context Path (optional) : /mid-tier
XML Configuration file URL: /files/ar/mid-tier
WAR or Directory URL:   (I don't have a clue)

This application is not using WARs.

Now, I've tried installing it directly by hand in the server.xml
file, here is the line I added :



With this line we see the app appearing on the manager page, but
when we go into it, we are in a directory structure (a la ftp
type) and when we try to launch it, it gives an error message
on account that the config file is not correct !

I think the sole line in the server.xml is not enough !!!
By the way, they don't have an ounce of documentation on
configuring this thing on Apache+Tomcat, although they've done
it before on a Apache 1.3.27 + Tomcat 4.0.6.

Any help would be welcomed (before they ask me to revert to
Apache 1.3.27 + ServLet Exec 4.1.1, arrgghh!!)

Thanks,

Richard
_
Richard Migneron
Yahoo Messenger ID: rmigneron
PGP Fingerprint : EFFE 44E3 894A 7051 F86E E532 4880 9534 E1FB
BD33
"Isn't having a smoking section in a restaurant like
having a peeing section in a swimming pool ?"

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




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



RE: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Nadia Kunkov
Did that. Same message: The requested rsource not available.
Something else is wrong...
Thanks.

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:29 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available


You don't need to run the install and you don't need a web.xml file.

Create a directory under webapps (test) and create a WEB-INF directory in it.

Put a JSP in the test directory (test.jsp).  The following will do:
<%="Hello World"%>

Restart Tomcat.

Point to http://localhost:8080/test/test.jsp with your browser.






On Thursday 11 December 2003 11:26 am, you wrote:
> Thanks.  I did http://localhost:8080/manager/install?war=test and got the
> error: "Access to the specified resource has been denied/forbidden".  What
> does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:  name = "Tomcat" password = "Tomcat" roles = "tomcat,manager"/> (I'm not
> logged in to the machine as Tomcat but I thin it has nothing to do with it,
> right?) When I try to to http://localhost:8080/manager/list I get the same
> error... Can you give me any idea on what is going on?
> Thanks
> N.K.
>
> -Original Message-
> From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 10:50 AM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
> Nadia Kunkov wrote:
> >Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it
> > from the scratch.  I'm able to go to http://localhost:8080/examples or
> > http://localhost:8080/tomcat-docs/index.html.  But I have also created a
> > new directory under $Tomcat_home/webapps called test.  Under that I
> > created WEB-INF and copied one of my old web.xml files over there.  When
> > I try to access http://localhost:8080/test/  I get a message: resource
> > not available.  I know I'm missing something really simple but I
>
> I think you need to install it first. For example by the following way:
>
> http://localhost:8080/manager/install?war=test
>
> Best
>
> Bao
>
> >can't figure it out.  Permissions are fine.
> >I appreciate your help.
> >N.K.
> >
> >
> >
> >-
> >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: Serving files from a jar

2003-12-11 Thread Shapira, Yoav

Howdy,
A WAR file can contain images and static files outside a jar -- in fact,
WAR is designed to do exactly that.

To serve images directly out of a zip or jar files you have to write a
servlet -- what would be the URL for these images? ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 11:44 AM
>To: 'Tomcat Users List'
>Subject: Serving files from a jar
>
>Hello All,
>
>Does Tomcat serve static files out of a jar file? If so what are the
>conditions?
>
>I have several .html and .gif files and when I deploy a war file that
>includes these static content (as individual files in a folder) Tomcat
>serves them perfectly fine. However I would like to zip them as a
bundle
>separate from the class files. Any ideas?
>
>Thank you,
>Vijay
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie question

2003-12-11 Thread Wendell Holmes
Tomcat will not serve any files in WEB-INF or below that directly to a user,
so that's probably why it's not in the dir listing.

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 9:55 AM
To: Tomcat Users List
Subject: Re: Newbie question


First:
Did Netbeans create a deployment descriptor for you (WEB-INF/web.xml)?
If so, look for a servlet mapping in the descriptor. It will look something 
like this:

  
HelloWorldServlet
/HelloWorld
  

"HelloWorldServlet" being the name of your servlet and and "HelloWorld"
being 
the mapping.

If so, you can access your servlet with the following URL:
http://localhost:8080/YOUR_APP_NAME/HelloWorld

Second:  
If you create your own directory under TOMCAT_HOME/webapps,
you will need to create a sub-directory called WEB-INF in order for Tomcat
to 
autoDeploy it as an application.





On Thursday 11 December 2003 11:50 am, you wrote:
> Hello All,
>
> Hope someone can help me out.
> I developed a servlet using Netbeans and when I tried to deploy it I had
> problem
> In an attempt to debug, I went back to Netbeans and created the simplest
> servlet I could,
>  it just prints out some text. Works fine in development environment.
> Netbeans has option to build test.war file for me, did that.
> put test.war file in $CATALINA_HOME/webapps
> restarted tomcat
> I can see new directory test with WEB-INF/classes/test.class in it
> point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory
> listing with nothing in it
> if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it
like
> $CATALINA_HOME/webapps/test/junk.html
> if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
> with junk.html
> shouldn't I see WEB-INF in directory listing??
> I've messed with Netbeans/Tomcat in the past and I thought all I had to do
> was make war file
> dump it in webapps dir and restart Tomcat
> seems like a path problem to the servlet
>
> linux 2.4.18 tomcat 5.0.16
>
> Anybody see what I'm missing
>
> Thanx
> 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: Newbie question

2003-12-11 Thread Dave Robbins
I figured it out :-)
the path to the servlet name foo is

http:/www.xxx.yyy.zzz:8080/test/servlet/foo

 

-Original Message-
From: Dave Robbins [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:51 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie question


Hello All,

Hope someone can help me out.
I developed a servlet using Netbeans and when I tried to deploy it I had
problem
In an attempt to debug, I went back to Netbeans and created the simplest
servlet I could,
 it just prints out some text. Works fine in development environment.
Netbeans has option to build test.war file for me, did that.
put test.war file in $CATALINA_HOME/webapps
restarted tomcat
I can see new directory test with WEB-INF/classes/test.class in it
point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory listing
with nothing in it
if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it like
$CATALINA_HOME/webapps/test/junk.html
if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
with junk.html
shouldn't I see WEB-INF in directory listing??
I've messed with Netbeans/Tomcat in the past and I thought all I had to do
was make war file
dump it in webapps dir and restart Tomcat
seems like a path problem to the servlet

linux 2.4.18 tomcat 5.0.16

Anybody see what I'm missing

Thanx
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: Newbie question

2003-12-11 Thread Ben Souther
First:
Did Netbeans create a deployment descriptor for you (WEB-INF/web.xml)?
If so, look for a servlet mapping in the descriptor. It will look something 
like this:

  
HelloWorldServlet
/HelloWorld
  

"HelloWorldServlet" being the name of your servlet and and "HelloWorld" being 
the mapping.

If so, you can access your servlet with the following URL:
http://localhost:8080/YOUR_APP_NAME/HelloWorld

Second:  
If you create your own directory under TOMCAT_HOME/webapps,
you will need to create a sub-directory called WEB-INF in order for Tomcat to 
autoDeploy it as an application.





On Thursday 11 December 2003 11:50 am, you wrote:
> Hello All,
>
> Hope someone can help me out.
> I developed a servlet using Netbeans and when I tried to deploy it I had
> problem
> In an attempt to debug, I went back to Netbeans and created the simplest
> servlet I could,
>  it just prints out some text. Works fine in development environment.
> Netbeans has option to build test.war file for me, did that.
> put test.war file in $CATALINA_HOME/webapps
> restarted tomcat
> I can see new directory test with WEB-INF/classes/test.class in it
> point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory
> listing with nothing in it
> if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it like
> $CATALINA_HOME/webapps/test/junk.html
> if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
> with junk.html
> shouldn't I see WEB-INF in directory listing??
> I've messed with Netbeans/Tomcat in the past and I thought all I had to do
> was make war file
> dump it in webapps dir and restart Tomcat
> seems like a path problem to the servlet
>
> linux 2.4.18 tomcat 5.0.16
>
> Anybody see what I'm missing
>
> Thanx
> 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: Tomcat 5 Newbie

2003-12-11 Thread Tim Funk
You need it to be in kb, not k:
<%@ page import="html.*" buffer="16kb" %>
Per the spec: [Table JSP.2-1]
Specifies the buffering model for the initial “out” JspWriter to handle 
content output from the page.
If “none”, then there is no buffering and all output is written directly 
through to the ServletResponse PrintWriter. The size can only be specified in 
kilobytes, and the suffix “kb” is mandatory.
If a buffer size is specified then output is buffered with a buffer size not 
less than that specified.
Depending upon the value of the “autoFlush” attribute, the contents of this 
buffer is either automatically flushed, or an exception is raised, when 
overflow would occur.
The default is buffered with an implementation buffer size of not less than 8kb.

-Tim

Dola Woolfe wrote:

Hi Tim,

I have

<%@ page import="html.*" buffer="16k" %>

Is this not OK? I have to admit I don't even know why
one would want to play change it.


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


Newbie question

2003-12-11 Thread Dave Robbins
Hello All,

Hope someone can help me out.
I developed a servlet using Netbeans and when I tried to deploy it I had
problem
In an attempt to debug, I went back to Netbeans and created the simplest
servlet I could,
 it just prints out some text. Works fine in development environment.
Netbeans has option to build test.war file for me, did that.
put test.war file in $CATALINA_HOME/webapps
restarted tomcat
I can see new directory test with WEB-INF/classes/test.class in it
point browser an http:/www.xxx.yyy.zzz:8080/test and I get directory listing
with nothing in it
if I make junk.html file in $CATALINA_HOME/webapps/test. I can load it like
$CATALINA_HOME/webapps/test/junk.html
if I just give it http:/www.xxx.yyy.zzz:8080/test I see directory listing
with junk.html
shouldn't I see WEB-INF in directory listing??
I've messed with Netbeans/Tomcat in the past and I thought all I had to do
was make war file
dump it in webapps dir and restart Tomcat
seems like a path problem to the servlet

linux 2.4.18 tomcat 5.0.16

Anybody see what I'm missing

Thanx
Dave


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



Serving files from a jar

2003-12-11 Thread Vijay Kandy
Hello All,

Does Tomcat serve static files out of a jar file? If so what are the
conditions? 

I have several .html and .gif files and when I deploy a war file that
includes these static content (as individual files in a folder) Tomcat
serves them perfectly fine. However I would like to zip them as a bundle
separate from the class files. Any ideas?

Thank you,
Vijay

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



Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Ben Souther
You don't need to run the install and you don't need a web.xml file.

Create a directory under webapps (test) and create a WEB-INF directory in it.

Put a JSP in the test directory (test.jsp).  The following will do:
<%="Hello World"%>

Restart Tomcat.

Point to http://localhost:8080/test/test.jsp with your browser.






On Thursday 11 December 2003 11:26 am, you wrote:
> Thanks.  I did http://localhost:8080/manager/install?war=test and got the
> error: "Access to the specified resource has been denied/forbidden".  What
> does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:  name = "Tomcat" password = "Tomcat" roles = "tomcat,manager"/> (I'm not
> logged in to the machine as Tomcat but I thin it has nothing to do with it,
> right?) When I try to to http://localhost:8080/manager/list I get the same
> error... Can you give me any idea on what is going on?
> Thanks
> N.K.
>
> -Original Message-
> From: BAO RuiXian [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 10:50 AM
> To: Tomcat Users List
> Subject: Re: Tomcat4.1.29 Requested resource not available
>
> Nadia Kunkov wrote:
> >Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it
> > from the scratch.  I'm able to go to http://localhost:8080/examples or
> > http://localhost:8080/tomcat-docs/index.html.  But I have also created a
> > new directory under $Tomcat_home/webapps called test.  Under that I
> > created WEB-INF and copied one of my old web.xml files over there.  When
> > I try to access http://localhost:8080/test/  I get a message: resource
> > not available.  I know I'm missing something really simple but I
>
> I think you need to install it first. For example by the following way:
>
> http://localhost:8080/manager/install?war=test
>
> Best
>
> Bao
>
> >can't figure it out.  Permissions are fine.
> >I appreciate your help.
> >N.K.
> >
> >
> >
> >-
> >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: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread BAO RuiXian
Nadia Kunkov wrote:

Thanks.  I did http://localhost:8080/manager/install?war=test and got the error: "Access to the specified resource has been denied/forbidden".  What does that mean?  In $Tomcat_Home/conf/tomcat_users.xml I have this:

(I'm not logged in to the machine as Tomcat but I thin it has nothing to do with it, right?)
 

I think you need to first log in as 'tomcat', and then you have the role 
of 'manager' to install your new applicatio 'test.

Best

Bao

When I try to to http://localhost:8080/manager/list I get the same error...
Can you give me any idea on what is going on?
Thanks
N.K.
-Original Message-
From: BAO RuiXian [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:50 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available
Nadia Kunkov wrote:

 

Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it from the scratch.  I'm able to go to http://localhost:8080/examples or http://localhost:8080/tomcat-docs/index.html.  But I have also created a new directory under $Tomcat_home/webapps called test.  Under that I created WEB-INF and copied one of my old web.xml files over there.  When I try to access http://localhost:8080/test/  I get a message: resource not available.  I know I'm missing something really simple but I 

   

I think you need to install it first. For example by the following way:

http://localhost:8080/manager/install?war=test

Best

Bao

 

can't figure it out.  Permissions are fine.
I appreciate your help.
N.K.


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


   



 



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


Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Philipp Taprogge
Hi!

Nadia Kunkov wrote:

Thanks.  I did http://localhost:8080/manager/install?war=test and got the error: "Access to 
the specified resource has been denied/forbidden".  What does that mean?  In 
$Tomcat_Home/conf/tomcat_users.xml I have this:

(I'm not logged in to the machine as Tomcat but I thin it has nothing to do with it, 
right?)
When I try to to http://localhost:8080/manager/list I get the same error...
Can you give me any idea on what is going on?
Im not entirely sure, but this sounds like a permission problem 
outside tomcat. What platform are you running tomcat on? If it's a 
Un*x, check whether the user running tomcat has read access to the war 
file. Have you tried uploading the war from your browser instead?

	Phil

--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5 Newbie

2003-12-11 Thread Dola Woolfe
Hi Tim,

I have

<%@ page import="html.*" buffer="16k" %>

Is this not OK? I have to admit I don't even know why
one would want to play change it.

Pavel
--- Tim Funk <[EMAIL PROTECTED]> wrote:
> You probbaly have <[EMAIL PROTECTED] buffer='BAD VALUE HERE' %>
> 
> -Tim
> 
> Dola Woolfe wrote:
> 
> > Hi,
> > 
> > Just switched from Tomcat 3.4 to 5.0 (Win
> platform). I
> > copied my entire application from the old webapps
> dir
> > to the new one, but when I start Tomcat (through
> the
> > start menu) everything seems to run correctly,
> except
> > I get the following error when I got to
> > localhost:8080/myapp/index.jsp
> > 
> > org.apache.jasper.JasperException: /index.jsp(1,1)
> > Page directive: invalid value for buffer
> > at
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Nadia Kunkov
Thanks.  I did http://localhost:8080/manager/install?war=test and got the error: 
"Access to the specified resource has been denied/forbidden".  What does that mean?  
In $Tomcat_Home/conf/tomcat_users.xml I have this:

(I'm not logged in to the machine as Tomcat but I thin it has nothing to do with it, 
right?)
When I try to to http://localhost:8080/manager/list I get the same error...
Can you give me any idea on what is going on?
Thanks
N.K.

-Original Message-
From: BAO RuiXian [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:50 AM
To: Tomcat Users List
Subject: Re: Tomcat4.1.29 Requested resource not available


Nadia Kunkov wrote:

>Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it from the 
>scratch.  I'm able to go to http://localhost:8080/examples or 
>http://localhost:8080/tomcat-docs/index.html.  But I have also created a new 
>directory under $Tomcat_home/webapps called test.  Under that I created WEB-INF and 
>copied one of my old web.xml files over there.  When I try to access 
>http://localhost:8080/test/  I get a message: resource not available.  I know I'm 
>missing something really simple but I 
>
I think you need to install it first. For example by the following way:

http://localhost:8080/manager/install?war=test

Best

Bao

>can't figure it out.  Permissions are fine.
>I appreciate your help.
>N.K.
>
>
>
>-
>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: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Ben Souther
Why are you declaring req and res as global variables?
The request and respnose objects get passed to the doGet and doPost methods 
by the container.  




On Thursday 11 December 2003 11:06 am, you wrote:
> A word of warning - synchronizing the forward() method does not stop
> another thread from changing the values of the 'req' and 'res' variables,
> so you will still get problems if you implement the first solution.
>
> -Original Message-
> From: Altankov Peter [mailto:[EMAIL PROTECTED]
> Sent: 11 December 2003 16:00
> To: Tomcat Users List
> Subject: RE: response.reset() and forward() ... problematic? DBCP related?
>
>
> If you go for the SingleThreadModel, try this to workaround your problem:
>
> public class TestServlet extends HttpServlet implements
> SingleThreadModel {
> ...
> }
>
> However, this interface does not prevent synchronization problems that
> result from servlets accessing shared resources such as static class
> variables or classes outside the scope of the servlet and moreover its
> depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/java
>x /servlet/SingleThreadModel.html)
>
> In general avoid any global variables in the scope of the servlet class
> definition unless you know what you are doing. Use method variables
> instead. If you decide to go for the real problem solution, either declare
> the req and res objects in the, lets say,  doGet method and pass them to
> the forward method, or keep their declaration in the servlet class but mark
> the forward method as syncronized (causing threads to enter it one by one).
>
> Here are your hnt snipplets:
>
> // the workaround
> public class TestServlet extends HttpServlet {
> private HttpServletRequest req;
> private HttpServletResponse res;
> [...]
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException,
> IOException
> {
> [.]
> forward("whatever");
> }
>
> protected synchronized void forward(String s) {
> [.. Here is where you refer the global req and res objects
> ..]
> [.. but its safe, since the method is marked as
> synchronized ..]
> }
> }
>
> -- Or --
>
> // some real solution
> public class TestServlet extends HttpServlet {
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException,
> IOException
> {
> HttpServletRequest req;
> HttpServletResponse res;
> []
> forward("whatever", req, res);
>
> }
> protected void forward(String s, HttpServletRequest req,
> HttpServletResponse res) {
> [...]
> }
> }
>
>
> I hope this helps.
>
>
> -Original Message-
> From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
> Sent: 11 Декември 2003 г. 16:28
> To: Tomcat Users List
> Subject: Re: response.reset() and forward() ... problematic? DBCP related?
>
>
> Hi!
>
> Antonio Fiol Bonnín wrote:
> > My guess:
> >
> > req and res are attributes of the Servlet, like in:
> > public class TestServlet extends HttpServlet {
> > private HttpServletRequest req;
> > private HttpServletResponse res;
> > [...]
> > }
> >
> > So you are calling "forward(s)" for a request once req and res have
> > been
> > overwritten by another request.
>
> Hmm... Im a bit lost here... could anyone perhaps be so kind and post
> a code snipplet of how a thread safe use of a Servlet's request and
> response attribute could look like? I have not been working with
> Servlets for too long and I worried I might run into the same problem.
>
> Thanks in advance
>
> Phil

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



Re: extended log format

2003-12-11 Thread Kumar M
Thank you Tim and Yoav.
I just got this working with 4.1.29 with the help of the documents you referred to and 
the one at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html#Access%20Log%20Valve
 
Logging has been so easy with Tomcat!. 

Tim Funk <[EMAIL PROTECTED]> wrote:
Its in 4.1.29 and 5. The code is the same for both. I thought I had better 
docs for this somewhere.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/valves/ExtendedAccessLogValve.html

Anyhow - Its configured a lot like the AccessLogValve


-Tim

Shapira, Yoav wrote:

> Howdy,
> Read the AccessLogValve documentation (on the Valve configuration
> reference page). I believe ELF support was added in tomcat 5.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> 
>>-Original Message-
>>From: Kumar M [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 11, 2003 10:38 AM
>>To: [EMAIL PROTECTED]
>>Subject: extended log format
>>
>>Hello!
>>
>>Can tomcat 4.1.29 support logging access information in Extended Log
> 
> Format
> 
>>(ELF)? If so how to configure the server.xml for this type of logging.
> 
> I
> 
>>would like the following to be logged.
>>
>>Client IP, User, timstamp, status, request, protocol/version, response
>>time, referrer, browser and custom cookies.
>>
>>Many Thanks & regards
>>Kumar
>>
>>
>>-
>>Do you Yahoo!?
>>New Yahoo! Photos - easier uploading and sharing
> 
> 
> 
> 
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

cgi script not launching in Tomcat 5.0

2003-12-11 Thread Li, William
Hi,

I did the config as per the documentation for CGI.  I have a script
/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi and it works fine on
command line.  But Tomcat doesn't like it:

2003-12-11 10:54:41 cgi: findCGI calc: name=printenv.cgi,
path=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
scriptname=/cgi-bin/printenv.cgi, cginame=/printenv.cgi
2003-12-11 10:54:41 cgi: runCGI(envp=[{CONTENT_TYPE=, SERVER_PORT=8080,
REMOTE_ADDR=127.0.0.1, GATEWAY_INTERFACE=CGI/1.1, QUERY_STRING=,
X_TOMCAT_SCRIPT_PATH=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
REMOTE_HOST=127.0.0.1, SERVER_SOFTWARE=TOMCAT, PATH_INFO=, AUTH_TYPE=,
SERVER_PROTOCOL=, REQUEST_METHOD=GET, REMOTE_USER=, REMOTE_IDENT=,
SERVER_NAME=localhost.localdomain, CONTENT_LENGTH=,
SCRIPT_NAME=/cgi-bin/printenv.cgi}],
command=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi)
2003-12-11 10:54:41 cgi: runCGI (stderr):Can't open perl script
""/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi"": No such file or
directory
2003-12-11 10:54:41 cgi: runCGI: 1 lines received on stderr

Can anyone help?  Thanks!


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



RE: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Bodycombe, Andrew
A word of warning - synchronizing the forward() method does not stop another
thread from changing the values of the 'req' and 'res' variables, so you
will still get problems if you implement the first solution.

-Original Message-
From: Altankov Peter [mailto:[EMAIL PROTECTED] 
Sent: 11 December 2003 16:00
To: Tomcat Users List
Subject: RE: response.reset() and forward() ... problematic? DBCP related?


If you go for the SingleThreadModel, try this to workaround your problem:

public class TestServlet extends HttpServlet implements
SingleThreadModel {
...
}

However, this interface does not prevent synchronization problems that
result from servlets accessing shared resources such as static class
variables or classes outside the scope of the servlet and moreover its
depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax
/servlet/SingleThreadModel.html)

In general avoid any global variables in the scope of the servlet class
definition unless you know what you are doing. Use method variables instead.
If you decide to go for the real problem solution, either declare the req
and res objects in the, lets say,  doGet method and pass them to the forward
method, or keep their declaration in the servlet class but mark the forward
method as syncronized (causing threads to enter it one by one).

Here are your hnt snipplets:

// the workaround
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException,
IOException
{
[.]
forward("whatever");
}

protected synchronized void forward(String s) {
[.. Here is where you refer the global req and res objects
..]
[.. but its safe, since the method is marked as synchronized
..]
}
}

-- Or --

// some real solution
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException,
IOException
{
HttpServletRequest req;
HttpServletResponse res;
[]
forward("whatever", req, res);

}
protected void forward(String s, HttpServletRequest req,
HttpServletResponse res) {
[...]
}
}


I hope this helps.


-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: 11 Декември 2003 г. 16:28
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP related?


Hi!

Antonio Fiol Bonnín wrote:

> My guess:
>
> req and res are attributes of the Servlet, like in:
> public class TestServlet extends HttpServlet {
> private HttpServletRequest req;
> private HttpServletResponse res;
> [...]
> }
>
> So you are calling "forward(s)" for a request once req and res have
> been
> overwritten by another request.

Hmm... Im a bit lost here... could anyone perhaps be so kind and post
a code snipplet of how a thread safe use of a Servlet's request and
response attribute could look like? I have not been working with
Servlets for too long and I worried I might run into the same problem.

Thanks in advance

Phil

--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams


-
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: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Federico Fernandez Cruz
Thanks! Now it works! :-)

I can access my web application through SSL. How can I get all those SSL 
variables that apache has already set ? Should I tell something more to JK?

Thanks!
Jörg Werner wrote:
Hello!

Please take a look at this thread
http://www.mail-archive.com/[EMAIL PROTECTED]/msg110822.html
In short, the solution is to build mod_jk2 from 
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz and not from the sources 
bundled with tomcat. I had the same problem and it now works.

Jörg
 




smime.p7s
Description: S/MIME Cryptographic Signature


RE: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Altankov Peter
If you go for the SingleThreadModel, try this to workaround your problem:

public class TestServlet extends HttpServlet implements SingleThreadModel {
...
}

However, this interface does not prevent synchronization problems that result from 
servlets accessing shared resources such as static class variables or classes outside 
the scope of the servlet and moreover its 
depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax/servlet/SingleThreadModel.html)

In general avoid any global variables in the scope of the servlet class definition 
unless you know what you are doing. Use method variables instead.
If you decide to go for the real problem solution, either declare the req and res 
objects in the, lets say,  doGet method and pass them to the forward method, or keep 
their declaration in the servlet class but mark the forward method as syncronized 
(causing threads to enter it one by one).

Here are your hnt snipplets:

// the workaround
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
[.]
forward("whatever");
}

protected synchronized void forward(String s) {
[.. Here is where you refer the global req and res objects ..]
[.. but its safe, since the method is marked as synchronized ..]
}
}

-- Or --

// some real solution
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
HttpServletRequest req;
HttpServletResponse res;
[]
forward("whatever", req, res);

}
protected void forward(String s, HttpServletRequest req, HttpServletResponse 
res) {
[...]
}
}


I hope this helps.


-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: 11 Декември 2003 г. 16:28
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP related?


Hi!

Antonio Fiol Bonnín wrote:

> My guess:
>
> req and res are attributes of the Servlet, like in:
> public class TestServlet extends HttpServlet {
> private HttpServletRequest req;
> private HttpServletResponse res;
> [...]
> }
>
> So you are calling "forward(s)" for a request once req and res have
> been
> overwritten by another request.

Hmm... Im a bit lost here... could anyone perhaps be so kind and post
a code snipplet of how a thread safe use of a Servlet's request and
response attribute could look like? I have not been working with
Servlets for too long and I worried I might run into the same problem.

Thanks in advance

Phil

--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams


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

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



Re: Tomcat4.1.29 Requested resource not available

2003-12-11 Thread BAO RuiXian
Nadia Kunkov wrote:

Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it from the scratch.  I'm able to go to http://localhost:8080/examples or http://localhost:8080/tomcat-docs/index.html.  But I have also created a new directory under $Tomcat_home/webapps called test.  Under that I created WEB-INF and copied one of my old web.xml files over there.  When I try to access http://localhost:8080/test/  I get a message: resource not available.  I know I'm missing something really simple but I 

I think you need to install it first. For example by the following way:

http://localhost:8080/manager/install?war=test

Best

Bao

can't figure it out.  Permissions are fine.
I appreciate your help.
N.K.


-
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: extended log format

2003-12-11 Thread Tim Funk
Its in 4.1.29 and 5. The code is the same for both. I thought I had better 
docs for this somewhere.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/valves/ExtendedAccessLogValve.html

Anyhow - Its configured a lot like the AccessLogValve

-Tim

Shapira, Yoav wrote:

Howdy,
Read the AccessLogValve documentation (on the Valve configuration
reference page).  I believe ELF support was added in tomcat 5.
Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Kumar M [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:38 AM
To: [EMAIL PROTECTED]
Subject: extended log format
Hello!

Can tomcat 4.1.29 support logging access information in Extended Log
Format

(ELF)? If so how to configure the server.xml for this type of logging.
I

would like the following to be logged.

Client IP, User, timstamp, status, request, protocol/version, response
time, referrer, browser and custom cookies.
Many Thanks & regards
Kumar
-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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


Re: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Anthony Presley
Below 

On Thu, 2003-12-11 at 00:49, Antonio Fiol Bonnín wrote:
> Anthony Presley wrote:
> 
> [... reduced to a minimum, but the problem still there ...]
> 
> >  protected void forward(String s) {
> >  ServletConfig sc = null;
> >  ServletContext sContext = null;
> >  RequestDispatcher rd = null;
> >  
> >  sc = this.getServletConfig();
> >  sContext = sc.getServletContext();
> >  rd = sContext.getRequestDispatcher(s);
> >  rd.forward(req, res);
> >  
> >
> 
> Hey! Where are you getting "req" and "res" from?!! My guess at the end.

These are, as you described, declared more or less.  However, I'm
actually declaring them from a class hierarchy ... meaning that I have a
super class, which has req and res in it, and all of my servlet's derive
from it.  When they call a forward, I then do not need to (necessarily)
call it with request and response.  IE, 

class Super {
protected Request req;
protected Response res;

set (Request r1, Response r2) {
req = r1;
res = r2;
}

forward1 (String s) {
// Get rd
rd.forward (req, res);
}

forward2 (String s, Request r1, Response r2) {
// Get rd
rd.forward (r1, r2);
}
}

class Sub extends Super {
doProcess1 () {
set (request, response);
.
forward1 ("/index.jsp");
}

doProcess2 () {
.
forward2 ("/index.jsp", request, response);
}
}

So . what your telling me, is that it's a concurrency problem
created by having "object attributes"?  That if they were, in fact being
called more like:

doProcess2 ();

than like:

doProcess1 ();

I wouldn't have these problems?  Very interesting.

Please write back and ensure that's what you mean . because I'm
pretty sure it is.  Oh, fun.  Here I go to change  some 100K lines
of code :-)

--Anthony

> 
> >3.  I've bumped the response buffer (in the servlet) from 8K to 75K
> >(75000), which reduces the errors, but they are still present.  Is there
> >a GOOD way to estimate the amount needed?
> >  
> >
> 
> No need to increase anything. It might alleviate the problem or even 
> improve performance (??), but not solve anything.
> 
> >4.  Using DBCP 1.0  using the latest DBCP (1.1?), seems to reduce
> >the errors further (1 in 10, approx).  I've rewritten the code to ensure
> >that connections are being opened / closed locally, and quickly.  Timing
> >it shows that the DB connection is pulled from the pool for about 2300
> >milli, and the JSP runs for about 2 milli to display.
> >  
> >
> 
> Same here. The shorter your DB connections are open, the better, but 
> this will not solve your problem.
> 
> >I'm not 100% sure yet if the problem persists in the JSP (using a simple
> >JSP and simple servlet does not cause these problems, however, the
> >greater the complexity, the higher the likelihood of getting these
> >errors  which baffle's me, because rerequesting it shows up fine,
> >with nothing in the logs) or the servlet.
> >  
> >
> 
> But the greater the complexity, the greater your chances to get two 
> users using your servlet concurrently.
> 
> >Anyone seen this before?  I'm about at my wits end.  Been refactoring
> >for a week now, and still it persists.
> >  
> >
> 
> Yes. I found it to be a very common mistake. Now you know where the 
> problem lies, you probably already thought of a solution specific to 
> your case.
> 
> My guess:
> 
> req and res are attributes of the Servlet, like in:
> public class TestServlet extends HttpServlet {
> private HttpServletRequest req;
> private HttpServletResponse res;
> [...]
> }
> 
> So you are calling "forward(s)" for a request once req and res have been 
> overwritten by another request.
> 
> Just in case my English is too bad, and so that the archive is useful 
> for people searching it:
> 
> - NEVER use object attributes in Servlets, as a rule of thumb.
> - ALWAYS use local variables instead.
> 
> If you really cannot follow the above, then:
> 
> - Make sure that you need ONLY ONE INSTANCE of the object stored in that 
> attribute.
> - One instance for: all concurrent users, and all successive requests.
> - Make sure that this instance is THREAD SAFE.
> - A typical example of this is the use of a logger.
> - Another example are STATIC attributes, which are, in general, less 
> error-prone in this context.
> 
> If you really cannot follow any of the above, there is still one solution:
> 
> - Make sure your servlet "implements SingleThreadModel". This will 
> ensure a different instance is used for all concurrent requests, or that 
> no concurrent requests will occur.
> 
> 
> Hope that helps.
> 
> 
> Antonio Fiol


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

RE: extended log format

2003-12-11 Thread Shapira, Yoav

Howdy,
Read the AccessLogValve documentation (on the Valve configuration
reference page).  I believe ELF support was added in tomcat 5.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kumar M [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 10:38 AM
>To: [EMAIL PROTECTED]
>Subject: extended log format
>
>Hello!
>
>Can tomcat 4.1.29 support logging access information in Extended Log
Format
>(ELF)? If so how to configure the server.xml for this type of logging.
I
>would like the following to be logged.
>
>Client IP, User, timstamp, status, request, protocol/version, response
>time, referrer, browser and custom cookies.
>
>Many Thanks & regards
>Kumar
>
>
>-
>Do you Yahoo!?
>New Yahoo! Photos - easier uploading and sharing



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



extended log format

2003-12-11 Thread Kumar M
Hello!
 
Can tomcat 4.1.29 support logging access information in Extended Log Format (ELF)? If 
so how to configure the server.xml for this type of logging. I would like the 
following to be logged.
 
Client IP, User, timstamp, status, request, protocol/version, response time, referrer, 
browser and custom cookies. 
 
Many Thanks & regards
Kumar


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Directly j_security_check on Tomcat realms

2003-12-11 Thread Grzegorz Samborski
I have 2 aplications on Tomcat 4.1.29, one is designed for users(customers) another is 
designed for admin on both I use tomcat realms. 
I want to log on user from admin app. 
How to do that?
I understand that i need to call directly j_security_check on user's app.
How can I call directly j_security_check 
and how to set user,password and requested page ?

greetings
Greg Samborski

Tomcat4.1.29 Requested resource not available

2003-12-11 Thread Nadia Kunkov
Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it from the 
scratch.  I'm able to go to http://localhost:8080/examples or 
http://localhost:8080/tomcat-docs/index.html.  But I have also created a new directory 
under $Tomcat_home/webapps called test.  Under that I created WEB-INF and copied one 
of my old web.xml files over there.  When I try to access http://localhost:8080/test/  
I get a message: resource not available.  I know I'm missing something really simple 
but I can't figure it out.  Permissions are fine.
I appreciate your help.
N.K.



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



Tomcat 5.0.16 : manager-app access - solved

2003-12-11 Thread Dirk Griesbach
I traced the problem down to the 'user_role' entry in the database:
The role of the user used by the manager-app had role "admin,manager"
(like in 'tomcat-users.xml' in a memory Realm) which does not work.
Changing the user_role to 'manager' puts it..but now the admin-app using
the same user complains.

Maybe class
"org.apache.catalina.realm.DataSourceRealm" works different than
"org.apache.catalina.realm.UserDatabaseRealm"
regarding comma seperated roles ?

grisi
- Original Message -
From: Dirk Griesbach <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 9:57 AM
Subject: Re: Tomcat 5.0.16 : manager-app access


> Hi Adam,
>
> thanx for your hint, is there a FAQ or Readme on TC5 I missed ?
>
> I moved the manager.xml to ...\conf\catalina\localhost.
> It has the following content:
> "
>  debug="0" privileged="true">
>
> type="javax.sql.DataSource"/>
> 
> "
> You're right, the Realm is defined in the server.xml:
>
> "
> ...
> 
> ...
>auth="Container"
>   type="javax.sql.DataSource" />
>
> 
> 
> 
>  
> "
> Unfortunately: no effect, "403 - Access to the requested resource has been
> denied"
> The admin-app still shows no entry in 'User database"
>
> Is there something else that's worth having a look at ?
>
> Dirk
>
> - Original Message -
> From: Adam Hardy <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Sent: Wednesday, December 10, 2003 10:17 PM
> Subject: Re: Tomcat 5.0.16 : manager-app access
>
>
> > On 12/10/2003 05:49 PM Dirk Griesbach wrote:
> > > hello folks,
> > >
> > > a question on datasource realms and the manager app:
> > >
> > > When I installed TC 5.0.16 'out-of-the-box' I could start the
> manager-app.
> > >
> > > Then I deployed our webapp (manually), configured a DataSourceRealm
> using mysql
> > > for authentification, configured SSL, form based LogIn and ... the
> webapp works fine.
> > > (The resource name is still "UserDatabase")
> > >
> > > But if I now try to use the manager-app I get the error: "403 - access
> denied" without even being prompted.
> > >
> > > I've modified "..server\webapps\manager\WEB-INF\web.xml" so that it
> reads:
> > >
> > > "...
> > >UserDatabase
> > >javax.sql.DataSource
> > > 
> > > "
> > >
> > > and "..server\webapps\manager\manager.xml" that it reads
> > >
> > > "...
> > >  > > type="javax.sql.DataSource"/>
> > > 
> > > "
> > > no effect.
> > >
> > > Even more strange the behaviour of the "admin-app":
> > >
> > > The Login-screen appears as usual and login data that complies with
the
> the DataSource Realm is being accepted.
> > > Clicking on "dataSource" shows up the 'mysql-jdbc' Installation.
> > > Clicking on 'user database' showsnothing.
> > > Clicking on 'user roles, groups' etc. results in an error
> > > "The server encountered an internal error (Error retrieving attribute
> groups) that prevented it from fulfilling this request."
> > > Admin-app uses struts with TagLibs, is there something hardcoded in
> there ?
> > >
> > > Why do the these two applications not recognize the new Realm ?
> >
> >
> > Hi Dirk,
> > presumably you configured the realm in the server.xml.
> >
> > You need to put the manager.xml file in conf/Catalina/localhost/ which
> > is the new place for it in 5.x
> >
> > Adam
> > --
> > struts 1.1 + tomcat 5.0.16 + java 1.4.2
> > Linux 2.4.20 Debian
> >
> > -
> > 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: Image Viewing

2003-12-11 Thread Shapira, Yoav

Howdy,
Put the images directory under the WEB-INF directory and change your
servlet accordingly.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 9:53 AM
>To: [EMAIL PROTECTED]
>Subject: Image Viewing
>
>I am using jsp and tomcat 4.1 for my web application.  My application
is
>viewing image which is in the webapps/image folder.  This image can
also be
>viewed from the internet by just typing the url.  I want to block this
>since these are the confidential images.  Does anybody know how to do
that.
>Thanks in advance.
>
>Kiran Patel



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Image Viewing

2003-12-11 Thread Kiran Patel
I am using jsp and tomcat 4.1 for my web application.  My application is viewing image 
which is in the webapps/image folder.  This image can also be viewed from the internet 
by just typing the url.  I want to block this since these are the confidential images. 
 Does anybody know how to do that.  Thanks in advance.

Kiran Patel

Apache 2.0.46 + Tomcat5 + JK2 problems

2003-12-11 Thread Jason Symons
I'm testing getting Apache 2 and Tomcat5 to work together using JK2 and 
JNI... I had it working fine under Tomcat 4, but when I try to migrate 
the same settings over Tomcat5 Apache just gives a generic 500 error 
when trying to pull up any page. It doesn't matter if the page exists or 
not either, I still get the error. I think it might be something like 
tomcat not being loaded properly through jni, but the paths in the 
workers2.properties file and the environment variables are set properly, 
can anybody offer any suggestions?

JS



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


Re: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Philipp Taprogge
Hi!

Antonio Fiol Bonnín wrote:

My guess:

req and res are attributes of the Servlet, like in:
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
}
So you are calling "forward(s)" for a request once req and res have been 
overwritten by another request.
Hmm... Im a bit lost here... could anyone perhaps be so kind and post 
a code snipplet of how a thread safe use of a Servlet's request and 
response attribute could look like? I have not been working with 
Servlets for too long and I worried I might run into the same problem.

Thanks in advance

	Phil

--
"I love deadlines, I love the whooshing noise they make as they go by"
- Douglas Adams
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: jsp page with enctype="MULTIPART/FORM-DATA"

2003-12-11 Thread Pitre, Russell
This should help you out.I tested it and worked like a charm!

http://www.onjava.com/pub/a/onjava/2003/06/25/commons.html?page=3



Russ



-Original Message-
From: FTP Admin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 4:29 PM
To: Tomcat Users List
Subject: jsp page with enctype="MULTIPART/FORM-DATA"

Hi,

Hi there,

when I add the following: enctype="MULTIPART/FORM-DATA"

in a FORM element in a jsp page, then the values of the FORM parameters 
doesn't get propagated to the action servelet The servlet receives 
nulls only!!! If i skip the enctype="MULTIPART/FORM-DATA" in the FORM, 
everything (the parameters do retain their values!) works fine! Any 
explanation???

I need this modification in order to include file upload capabilities 
into my servlet!

Thanks


-
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: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Jörg Werner
Hello!

Please take a look at this thread
http://www.mail-archive.com/[EMAIL PROTECTED]/msg110822.html

In short, the solution is to build mod_jk2 from 
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz and not from the sources 
bundled with tomcat. I had the same problem and it now works.

Jörg
-- 
Dipl-Phys. Jörg Werner  [EMAIL PROTECTED]
Universität Stuttgart
5. physikalisches Institut  Telefon: 0711/685-4951
Pfaffenwaldring 57  Telefax: 0711/685-3810
D-70550 Stuttgart
Visit our Homepage: http://www.physik.uni-stuttgart.de/institute/pi/5/
index.html
My private Homepage: http://schreibubi.pi5.physik.uni-stuttgart.de/
GPG-Key fingerprint: 6630 6A73 7725 483C 1594  1D64 3F92 5251 8710 EDF6



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



Re: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Nikola Milutinovic
Federico Fernandez Cruz wrote:

By "whole web application" I mean the entire application... well...

I have a context inside Tomcat called UserMan. I want to map an Apache 
URL to this application...

In my workers2.properties I put these lines...

[uri:/UserMan]
info=Example webapp in the default context.
context=/UserMan
debug=0
This should suffice, although you haven't specified a worker for this context.

[uri:/UserMan/*]
info=Extension mapping
But my JSPs redirect to /UserMan/nav/ and I get errors about resource 
not available...  then I have to put another lines

[uri:/UserMan/nav/*.jsp]
info=Extension mapping
I think that this method is  error prone so that was my question. How to 
map the whole web application?
Maybe I am doing something wrong.. (sure!)
Here is mine (although I haven't tried accessing in subdir):

[logger]
level=DEBUG
[config:]
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock
[status:]
info=Status worker, displays runtime informations
[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
[uri:www.elektrovojvodina.co.yu/racun]
info=Consumer bill
group=ajp13:unixsock
context=/racun
Nix.

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


RE: Default context for web app

2003-12-11 Thread Shapira, Yoav

Howdy,
Glad to hear the advice on autoDeploy worked -- thanks for posting the
followup.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Kent Boogaart [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 10, 2003 6:52 PM
>To: '[EMAIL PROTECTED]'
>Subject: Re: Default context for web app
>
>Wow - thanks for all the help people. Just thought I'd update you on
how I
>resolved this.
>
>Firstly, I removed all  elements from "conf/server.xml" except
my
>own. Then I set "autoDeploy" to "false" on the  element.
>
>This almost got everything working as required. However, the admin and
>manager web apps were still deployed which was unacceptable because
they
>would be available via a live IP. This was because the "deployXML"
>attribute
>was set to "true". I set this to "false" and then only my context was
>deployed.
>
>Thanks again!
>
>Kent
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in jndi implementation : Tomcat 5 - jndi problem

2003-12-11 Thread Shapira, Yoav

Howdy,
It's not a bug in the tomcat implementation -- tomcat does not have an
external JNDI provider, while most full J2EE servers like the ones you
mention do.  So you can't connect to tomcat's JNDI contexts from outside
the tomcat JVM.

Please don't jump to conclusions without asking ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Frank Renaers [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 11, 2003 3:04 AM
>To: [EMAIL PROTECTED]
>Subject: Bug in jndi implementation : Tomcat 5 - jndi problem
>
>Hi,
>
>I assume it's a bug in the Tomcat jndi implementation, because my test
>is successfull when I use another jndi - implementation (Weblogic,
>Websphere, ...)
>
>Greetings,
>
>Frank
>
>>  -Original Message-
>> From:Frank Renaers
>> Sent:woensdag 10 december 2003 11:58
>> To:  [EMAIL PROTECTED]
>> Subject: Tomcat 5 - jndi problem
>>
>> Hi,
>>
>> Is it possible to browse the Tomcat jndi context from within another
vm.
>> I wrote a small junit test to test this, but it always fails !!
>> It always throws a javax.naming.NameNotFoundException: Name java:comp
is
>not bound in this Context
>>
>> My jndi.properties contains the following settings :
>>
java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
>> java.naming.provider.url=http://localhost:8080
>>
>> My conf.xml :
>> 
>> 
>>
>>   
>>   
>> 
>>
>> My test :
>>
>> public void testDataSource() throws Exception {
>>
>> // Obtain our environment naming context
>> javax.naming.Context initCtx = new
javax.naming.InitialContext();
>> javax.naming.Context envCtx = (javax.naming.Context)
>initCtx.lookup("java:comp/env/simpleValue");
>>
>> }
>> }
>>
>> Thanks,
>>
>> Frank Renaers
>>
>>



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Federico Fernandez Cruz
By "whole web application" I mean the entire application... well...

I have a context inside Tomcat called UserMan. I want to map an Apache 
URL to this application...

In my workers2.properties I put these lines...

[uri:/UserMan]
info=Example webapp in the default context.
context=/UserMan
debug=0
[uri:/UserMan/*]
info=Extension mapping
But my JSPs redirect to /UserMan/nav/ and I get errors about resource 
not available...  then I have to put another lines

[uri:/UserMan/nav/*.jsp]
info=Extension mapping
I think that this method is  error prone so that was my question. How to 
map the whole web application?
Maybe I am doing something wrong.. (sure!)

Thanks!



Nikola Milutinovic wrote:

Federico Fernandez Cruz wrote:

Hi all!

I am using tomcat 5 and I want to do some integration work with 
Apache and mod_jk2.

Is there a direct way to map a whole web application in apache? It 
works but I have to write a lot of  [uri:*] commands in mi 
workers2.properties file.


What do you mean by "whole web application"?

That URI mapping IS mapping one whole web-app.

I am planning to do some work with Apache SSL. Will I be able to read 
all those SSL variables from Tomcat?


You should be able to access client certificate via HttpRequest object.

Nix.

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




smime.p7s
Description: S/MIME Cryptographic Signature


Re: google yourself

2003-12-11 Thread Nikola Milutinovic
Ostad, James wrote:

have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.
Any one knows how they do that?
There is a web archive of this list.

Nix.

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


google yourself

2003-12-11 Thread Ostad, James
have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.

Any one knows how they do that?

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]


Out---> (3)



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



Re: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Nikola Milutinovic
Federico Fernandez Cruz wrote:

Hi all!

I am using tomcat 5 and I want to do some integration work with Apache 
and mod_jk2.

Is there a direct way to map a whole web application in apache? It works 
but I have to write a lot of  [uri:*] commands in mi 
workers2.properties file.
What do you mean by "whole web application"?

That URI mapping IS mapping one whole web-app.

I am planning to do some work with Apache SSL. Will I be able to read 
all those SSL variables from Tomcat?
You should be able to access client certificate via HttpRequest object.

Nix.

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


lost session

2003-12-11 Thread Lassaad Ghanmi
 
hello,
 want redirect a client from SSL to non-SSL; but I lose the session. 
can you help me, please,
 
best regards,
 
Lassaad.
 
=
DESIGN AND REUSE
www.design-reuse.com  
=
Lassaad Ghanmi
Phone : +33 476 70 64 72
Fax : +33 476 70 64 53
Email : [EMAIL PROTECTED] 
5 Place Robert Schuman
38025 Grenoble Cedex 1
FRANCE
 



Apache Tomcat jk2... is it possible?

2003-12-11 Thread Federico Fernandez Cruz
Hi all!

I am using tomcat 5 and I want to do some integration work with Apache 
and mod_jk2.

Is there a direct way to map a whole web application in apache? It works 
but I have to write a lot of  [uri:*] commands in mi 
workers2.properties file.

I have tried WebXml2Jk but when I insert the file (using Include) I get 
a lot of errors about Alias first and  JkUriSet Host later...

I am planning to do some work with Apache SSL. Will I be able to read 
all those SSL variables from Tomcat?

Any help will be appreciated! TIA




smime.p7s
Description: S/MIME Cryptographic Signature


collision of requests

2003-12-11 Thread Sergei P. Volin
Hi All,

I've observed a few times how 2 the same requests that came from the 2 different 
user's hosts collide. By that I mean that the normal execution of that 2 requests is 
interrupted and server throws 500 error to BOTH users.
How can it be?
Tomcat 4.1.24/Struts1.1.3

Thanks in advance,
Sergei Volin.

Working with the Jakarta NT Service document

2003-12-11 Thread Scott Schlatter
The document is great, except for section 1.  "Get a hold on the NT 
Executable"

The link doesn't link to the jk_nt_service.exe,  and I cannot find the pesky 
file on the apache site at all... in fact, there is no "win32/i386" 
directory in any of the binary archives that I found.

The document is unclear on where to find this .exe.  I haven't found it yet, 
but hold out hope that it does exist...

Scott

_
Winterize your home with tips from MSN House & Home. 
http://special.msn.com/home/warmhome.armx

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


Not owner: Error while opening the workers, jk will not work

2003-12-11 Thread José Antonio Puga Facal
	Hi managers!

	I tried to solve this problems through various ways but I couldn't find 
the solution.
	Any ideas?
	Thank you very much in advance.

Toni Puga

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


Re: JNDI, DataSource, and ClassCastException

2003-12-11 Thread Jon Wingfield
It looks like a ClassLoader issue. Casting the same class loaded by two 
different CLs causes a ClassCastException. Have you got the jar 
containing org.enhydra.jdbc.pool.StandardXAPoolDataSource in more than 
one place?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

HTH,

Jon

Marc Dugger wrote:
I have a situation where I am attempting to downcast a DataSource resource
into the exact class that getClass().getName() reports the object is, but
it's causing a ClassCastException.
--> server.xml:




...more


...more

workDir="C:\Code\loanauditor\src\webapp\workbench\WEB-INF\work"
reloadable="true" debug="0">

type="org.enhydra.jdbc.pool.StandardXAPoolDataSource"/>


--> web.xml


DB Connection
jdbc/loanauditor
org.enhydra.jdbc.pool.StandardXAPoolDataSource
Container

--> constructor from abstract class, AbstractDAO.java:

protected AbstractDAO() {
try {
Context ctx = new InitialContext();
Object o = ctx.lookup("java:comp/env/jdbc/loanauditor");
log.debug("loanauditor from JNDI: " + o.getClass().getName());
ds = (org.enhydra.jdbc.pool.StandardXAPoolDataSource) o;
ds.setJdbcTestStmt("SELECT 1");
} catch (NamingException ne) {
log.fatal(ne.getMessage(), ne);
throw new RuntimeException(ne);
}
}
--> logging:

2003-12-04 05:25:39,157 [main] DEBUG
com.socotech.loanauditor.dao.AbstractDAO - loanauditor from JNDI:
org.enhydra.jdbc.pool.StandardXAPoolDataSource
--> stacktrace:

java.lang.ClassCastException
at com.socotech.loanauditor.dao.AbstractDAO.(AbstractDAO.java:31)
at
com.socotech.loanauditor.dao.TorqueDomainTypeDAO.(TorqueDomainTypeDAO.
java:34)
at
com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getInstance(TorqueDomainTyp
eDAO.java:29)
at
com.socotech.loanauditor.dao.DAOFactory.getDomainTypeDAO(DAOFactory.java:79)
at
com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInitialized(Do
mainTypeLoader.java:32)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3271)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3613)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Thanks in advance for any insight.



-
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: Tomcat 5 Newbie

2003-12-11 Thread Tim Funk
You probbaly have <[EMAIL PROTECTED] buffer='BAD VALUE HERE' %>

-Tim

Dola Woolfe wrote:

Hi,

Just switched from Tomcat 3.4 to 5.0 (Win platform). I
copied my entire application from the old webapps dir
to the new one, but when I start Tomcat (through the
start menu) everything seems to run correctly, except
I get the following error when I got to
localhost:8080/myapp/index.jsp
org.apache.jasper.JasperException: /index.jsp(1,1)
Page directive: invalid value for buffer
at


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


  1   2   >