Error: Tomcat v4.0 vs v4.1

2003-07-09 Thread Friza Taib

Hi, 

I have problem running the jsp in the Tomcat v4.0. Whereby everything is fine with 
v4.1. Below is the error message. What can cause the problem? Thanx if somebody can 
help. 


StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception 
org.apache.jasper.JasperException: Unable to compile class for JSP 
D:\Tomcat 4.0\work\localhost\_\requester\a_0005flogin$jsp.java:61: Incompatible type 
for method. Explicit cast needed to convert java.lang.Throwable to 
java.lang.Exception. 
if (pageContext != null) pageContext.handlePageException(t); 
 ^ 
1 error 



-Friza 

_
Get Your Web-based E-mail from MyStar Mail at http://thestar.com.my


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



Re: Relative URL problem

2003-07-09 Thread Bill Barker

"White, Joshua A (HTSC, CASD)" <[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> Bill,
>
> Is this a server.xml or web.xml option?  Where should I be looking?  If
> tomcat does a redirect to http://localhost:8080/myapp/, should I then see
> this in the browser?

Yes, you should.  Since you haven't told me which version of Tomcat you are
using, I'm going to assume 4.1.x.  If you have your Context configured as:
  
then Tomcat should decide that a request for http://localhost:8008/myapp is
really a request for http://localhost:8080/myapp/ and redirect you there.
If this isn't working, then you can submit a bugreport to
http://nagoya.apache.org/bugzilla.  However, you are going to have to
provide more information about your config then you have done so far if you
want a developer to take a look at your problem.

>
> Joshua
>
>
>
> -Original Message-
> From: Bill Barker [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 11:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Relative URL problem
>
>
> It would help to know your config.  e.g. Both Apache and Tomcat will
respond
> to a request for http://localhost:8080/myapp by sending a redirect to
> http://localhost:8080/myapp/ .
>
> "White, Joshua A (HTSC, CASD)" <[EMAIL PROTECTED]> wrote in
> message
>
news:[EMAIL PROTECTED]
> > I currently server my jsp files from under the web-inf/jsp directory.
> >
> > If I call my application using http://localhost:8080/myapp, my images do
> not
> > appear at all.  If I call my application using
> http://localhost:8080/myapp/
> > (note the trailing slash) everything works fine.  Subsequent calls to
> other
> > resources contain the slash (for example
> > http://localhost:8080/myapp/myservlet).
> >
> > Any advice for handling relative urls on my default page?
> >
> > Regards,
> >
> > Joshua
> >
> >
> >
> >
> >
> > This communication, including attachments, is for the exclusive use of
> > addressee and may contain proprietary, confidential or privileged
> > information. If you are not the intended recipient, any use, copying,
> > disclosure, dissemination or distribution is strictly prohibited. If
> > you are not the intended recipient, please notify the sender
> > immediately by return email and delete this communication and destroy
all
> copies.




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



RE: session expiry

2003-07-09 Thread Krause Karin
Hi Paul,
Session timeout can be configured in the deployment descriptor of your servlet 
(web.xml).
see servlet spec 2.3
"the session-timeout element defines the default session timeout
interval for all sessions created in this web application. The
specified timeout must be expressed in a whole number of minutes.
If the timeout is 0 or less, the container ensures the default
behaviour of sessions is never to time out."

Example

30

Regards Karin

-Original Message-
From: Paul Wallace [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 10. Juli 2003 07:58
To: Tomcat Users List
Subject: RE: session expiry


Thank you for that. And where is the length of default session expiry
defined? How do I configure session life span for TC?

Thanks

Paul. 


> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session
life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


-
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: error in startup of embedded tomcat

2003-07-09 Thread Bill Barker
AFAIK, using Embedded requires that you set up all of Tomcat yourself.  I
suppose that it would be possible to create the Server, and feed it
'server.xml', but that would really defeat the purpose ;-).

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I get the following errors in syslog when I try and run tomcat as an
> embedded process.  My question has to do with the NamingContextListener, I
> do not reference this in my server.xml, or application web.xml.  Where
> would this be coming from and why would I need it?
>
> Thank you.
>
> Jul  8 22:32:38 localhost.localdomain INFO -
> NamingContextListener[/null/localhost/myprog]: Creating JNDI naming
> context
> Jul  8 22:32:38 localhost.localdomain INFO -
> NamingContextListener[/null/localhost/myprog]:   Resource parameters for
> UserTransaction = null
> Jul  8 22:32:38 localhost.localdomain INFO - StandardManager[/myprog]:
> Seeding random number generator class java.security.SecureRandom
> Jul  8 22:32:38 localhost.localdomain INFO - StandardManager[/myprog]:
> Seeding of random number generator has been completed
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Context startup failed due to previous errors
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Stopping
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Stopping filters
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Processing standard container shutdown
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Sending application stop events
> Jul  8 22:32:38 localhost.localdomain INFO - StandardContext[/myprog]:
> Stopping complete




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



Pb with webapp admin

2003-07-09 Thread Yannick Monclin
Hi,

i use a tomcat 4.1.18 on a Linux RedHat 7.3
All my directories "images" are a linux link in my webapp, so i have put 
this on my server xml betwen the two tag "context"



so it's work, but when i use the webapp admin in order to change some 
other parameters and when i commit, tomcat delete the line of my 
linkin my server.xml so i lost my images when he reboot...

Do you know why ?

Do you use all the time webapp admin ? or just a "vi" on the server.xml ?

I use the webapp admin, because i can make a change without shuting down 
tomcat, do you know how i must do for commiting change in my server .xml 
whithout restarting tomcat ?

thanks for your advice
Yannick


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


Re: RES: [off-topic] - Where can i find Oreilly's package for uploadi ng fi les?

2003-07-09 Thread Bill Barker
Personally, I prefer jakarta-commons/fileupload for this type of thing.  The
ASF licence is much more commercial-friendly than the Oreilly licence, and
it is much easier to configure (at least IMHO).

"Jose Euclides da Silva Junior - DATAPREVRJ"
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> thank you too.
>
> -Mensagem original-
> De: John Turner [mailto:[EMAIL PROTECTED]
> Enviada em: quarta-feira, 9 de julho de 2003 15:54
> Para: Tomcat Users List
> Assunto: Re: RES: [off-topic] - Where can i find Oreilly's package for
> uploadi ng fi les?
>
>
>
> http://www.servlets.com/cos/index.html
>
> John
>
> On Wed, 9 Jul 2003 15:27:38 -0300, Jose Euclides da Silva Junior -
> DATAPREVRJ <[EMAIL PROTECTED]> wrote:
>
> > I am not looking for examples, just the own package.
> > Euclides.
> >
> > -Mensagem original-
> > De: Rick Roberts [mailto:[EMAIL PROTECTED]
> > Enviada em: quarta-feira, 9 de julho de 2003 15:33
> > Para: Tomcat Users List
> > Assunto: Re: [off-topic] - Where can i find Oreilly's package for
> > uploading fi les?
> >
> >
> > Not sure if this is what you are after but:
> > There is a MultiPartRequest Class in the "Java Servlet Programming"
Book.
> >
> > http://examples.oreilly.com/jservlet2/
> >
> > HTH,
> >
> > Rick
> >
> > Jose Euclides da Silva Junior - DATAPREVRJ wrote:
> >> Hi, i have tried to search for , but i didnt find it. Can somebody help
> > me?
> >> Thanks in advance,
> >> Euclides.
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
>
>
>
> --
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
> -
> 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: session expiry

2003-07-09 Thread Paul Wallace
Thank you for that. And where is the length of default session expiry
defined? How do I configure session life span for TC?

Thanks

Paul. 


> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session
life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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



Configuring tomcat to use seperate conf/server.xml files

2003-07-09 Thread Owen Fellows
Hi,

I'm trying to configure multiple instances of the same tomcat.

I want to have one tomcat and one webapp but multiple server.xml files (distinct datasourve per application).

Is this possible in tomcat 4.1.12.
I've tried setting CATALINA_HOME to the tomcat installation
and setting CATALINA_BASE to be the directory with conf/server.xml in.
It seems to find the webapp (via a sym link) but get the following output in the logs dir

2003-07-10 15:17:27 WebappLoader[]: Deploying class repositories to work directory /Standalone/localhost/_
2003-07-10 15:17:27 WebappLoader[]: Reloading checks are enabled for this Context
2003-07-10 15:17:27 ContextConfig[]: Missing application web.xml, using defaults only
2003-07-10 15:17:27 StandardManager[]: Seeding random number generator class 
java.security.SecureRandom
2003-07-10 15:17:27 StandardManager[]: Seeding of random number generator has been 
completed
2003-07-10 15:17:27 StandardWrapper[:default]: Loading container servlet default
2003-07-10 15:17:27 StandardWrapper[:invoker]: Loading container servlet invoker
and
2003-07-10 15:17:33 StandardHost[localhost]: Removing web application at context path
Thanks for any help,
Owen


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


Re: session expiry

2003-07-09 Thread harsh

> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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



session expiry

2003-07-09 Thread Paul Wallace
Hello All,

A simple one? I have my session defined in a servlet thus:

 

 

HttpSession session = req.getSession();

session.setAttribute("userSession", h); 

 

how or where do define session parameters such as expiry? I would
ideally like my session to die when I call a specified method e.g 

 

public void close() {

 

  // kill my session here

 

} 

or failing that, how do I define a length of time for the session life?

 

Thanks

 

Paul.



XML DOCTYPE problem

2003-07-09 Thread Brian Menke
Hi everyone,

I have created a JSP page that use the jstl xml tag library, specifically
using
xpath. Everything works perfectly fine as long as I don't have a doctype
declaration like the following in my XML instance:



If I remove it, everything works great, but if I don't, I get a java error
like this:

org.apache.jasper.JasperException: Could not resolve entity reference:
"///c:/dtds/innovtech/datasheet.dtd"

I have to have the doctype in the xml. Does anyone know how I can fix this??

I did post this to the taglib email list, but it doesn't seem to get near
the traffic as this group.

Thanks!

-Brian


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



JDBCRealm and Session Time-Outs

2003-07-09 Thread Rick Roberts
If my session times-out, I want to
send the user back to the login form and
force a new JDBCRealm authentication.
I'm using Form AUTH, but I don't think that
Form AUTH would be any different than Basic AUTH
in this regard.
I think that what I want to do, would be
easy if I could just invalidate the
JDBCRealm authentication when the session times-out.
How can I invalidate a JDBCRealm login?

Is there a more standard approach to this problem?

Thanks,

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to create servlet?

2003-07-09 Thread Kwok Peng Tuck
.java is the source file, the one you use to compose your program. It is 
like any other text file, you can use any text editor to create a .java 
source file.
The .class file is a compiled version of the .java file, ready for 
execution by the servlet container.

For your second question, you only need to define the servlet name, as 
you have already earlier declared the servlet name  like this:


   SomeName
  com.company.name.Servlet

So when you do the servlet mapping you use the servlet name instead. 

Your servlets should be located in 
$CATALINA_HOME/webapps/$WEBAPP/WEB-INF/lib/$JARFILE if you pack them up 
as a jar
or in $CATALINA_HOME/webapps/$WEBAPP/WEB-INF/classes  if you did not 
pack them up in a jar file.

kitty winslet wrote:

In WEB-INF\classes\ I always find 2 kind of file SendMailServlet.java 

and SendMailServlet.class,

what is the difference btw *.java and *.class ?

In the servlet mapping fields, why it only shows the 

name of the servlet, not the full path to where it 

located for example c:\tomcat\webapps\examples\WEB-INF\classes\SendMailServlet?

Robert Wray <[EMAIL PROTECTED]> wrote:

The SendMailServlet code should be located in tomcat_installation_directory\webapps\examples\WEB-INF\classes\SendMailServlet.javaThe web.xml file in the WEB-INF directory should have a tags:  SendMailServlet SendMailServlet and  SendMailServlet /SendMailServlet which tell tomcat where to find the servlet when you request http://localhost:/examples/SendMailServletAt 07:07 AM 09/07/2003 -0400, you wrote:>To create/use servlets, you just need to folow Sun's Servlet Specification.>>http://java.sun.com/webservices/docs/1.1/tutorial/doc/>http://servlets.com/index.tea>http://moreservlets.com/>>-Tim>



-
Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.
 



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


Re: how to create servlet?

2003-07-09 Thread kitty winslet

In WEB-INF\classes\ I always find 2 kind of file SendMailServlet.java 

and SendMailServlet.class,

what is the difference btw *.java and *.class ?

In the servlet mapping fields, why it only shows the 

name of the servlet, not the full path to where it 

located for example c:\tomcat\webapps\examples\WEB-INF\classes\SendMailServlet?

Robert Wray <[EMAIL PROTECTED]> wrote:

The SendMailServlet code should be located in 
tomcat_installation_directory\webapps\examples\WEB-INF\classes\SendMailServlet.javaThe 
web.xml file in the WEB-INF directory should have a tags:  
SendMailServlet 
SendMailServlet and  
SendMailServlet 
/SendMailServlet which tell tomcat 
where to find the servlet when you request 
http://localhost:/examples/SendMailServletAt 07:07 AM 09/07/2003 -0400, you 
wrote:>To create/use servlets, you just need to folow Sun's Servlet 
Specification.>>http://java.sun.com/webservices/docs/1.1/tutorial/doc/>http://servlets.com/index.tea>http://moreservlets.com/>>-Tim>




-
Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

Re: Client prematurely closes connection = junk in reponse

2003-07-09 Thread Bill Connor
See below...

On Wed, 2003-07-09 at 15:10, Michael Wille wrote:
> Hello All,
> 
> I am experiencing a very strange problem and don't know exactly how to fix it.  The 
> problem is garbled junk characters are being prepended to the response output stream 
> that the browser receives.  This only happens for Internet Explorer and it seems 
> very random.  It is very difficult to reproduce.  I've never seen it happen under 
> Mozilla.
> 
> Before I launch into my questions, let me explain our setup.
> 
> We have Tomcat 4.1.12 behind Apache 1.3.27.  Running on tomcat is a custom 
> application.  Part of what it does is maintain a library of digital assets.  These 
> assets can be movies, pdfs, images, etc.  When browsing the library of assets, you 
> have several options: view thumbnail, view fullsize, download, etc.  While all 
> static images used in the web pages are served up by Apache, all of these assets are 
> served by a special 'proxy' servlet in tomcat.  This is done primarily for security. 
>  All access to this restricted material is monitored via this proxy servlet.
> 
> The code for the proxy is basically:
> 
> File file = new File(filePath);
> FileInputStream fis = new FileInputStream(file);
> ServletOutputStream outStream = response.getOutputStream();
> long fileLength = file.length();
>
> response.setContentLength((int) fileLength);
> response.addHeader("Pragma", "no-cache");
>
> if(action.equals("download")) {
> // We need to set the attachment header that only some browsers listen to. (the 
> good ones)
> response.setHeader("Content-Disposition","attachment; filename=" + fileName + 
> ";");
> // Then because some browsers don't follow standards (IE) we have to set the 
> mime type as a bogus value
> response.setContentType("doner/x-fileshare-native");
> } else {
> // if we are just viewing, let the browser know the correct mime type.
> response.setContentType(asset.getMimeType());
> }
> 
> byte[] buffer = new byte[1024];
> int numBytes = 0;
> int totalBytes = 0;
> while(totalBytes < fileLength) {
> numBytes = fis.read(buffer);
> totalBytes += numBytes;
> outStream.write(buffer);
> } 

You don't want to write the whole buffer, just what was read. Try write(
buffer, 0, numBytes )

> fis.read(buffer);
> fis.close();
> 
> The reason I post this code is because I believe that the garbled junk is the 
> remains of an aborted file download.  My guess is that sometime during the while 
> loop that writes the contents of the file to the stream, the user opened another 
> page (possibly without the browser closing the connection?).  This problem is 
> reproducible (though not very easily) when a large file is opened for viewing or 
> download.   While the transfer is occuring, click on another link.  1 out of 3 times 
> you see the garbled junk.  Sometimes it happens more often, sometimes less.
> 
> So, am I going off in the wrong direction with this?  If not, is there anyway to 
> check to see if the connection was closed or aborted during servlet processing?  
> Does anyone have any ideas or thoughts about this?
> 
> Thanks for any help!
> 
> -Mike
-- 
Bill Connor <[EMAIL PROTECTED]>


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



Re: Running Tomcat as Windows Service

2003-07-09 Thread Jerry Holyfield
Get a thread dump of the tomcat process.

Hi,

I want to install Tomcat 4.1.2 as windows service. My servlets should
connect to another server over SSl-Connection. I did install tomcat as a
service, but when my client connects to the servlet, tomcat hangs down,and 
I
have to restart the service manually. If I start Tomcat using the batch 
file
, everything works fine. Is it better to use JavaService? The problem
happens especially when running the whole thing in a Citrix environment.



Please help a.s.a.p. Yours anis
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


"INFO: RESET" in catalina.out & Server 500 under load

2003-07-09 Thread Fletcher Cocquyt
Hi Fellow Tomcat users,
I am seeing the following errors in my catalina.out logfile when running
any kind of load against the server using apache bench:
Jul 9, 2003 5:36:42 PM org.apache.jk.server.JkCoyoteHandler action
INFO: RESET 
Jul 9, 2003 5:36:42 PM org.apache.jk.server.JkCoyoteHandler action
INFO: RESET
 
These correspond to in a 1:1 ratio with the number of Server Error 500
org.apache.jasper.JasperException: ORA-00933: SQL command not properly
ended error messages returned from the apache bench test.
Eg when I run:
/opt/http-2.0.45/bin/ab -c 5 -n 100 http://
 /main.jsp
 
I get roughly 40-50% error rates:
 
Benchmarking  (be patient).done
Server Software:Apache/2.0.45

Server Hostname:
Server Port:80
Document Path:  /main.jsp
Document Length:30399 bytes
Concurrency Level:  5
Time taken for tests:   1.548 seconds
Complete requests:  100
Failed requests:42
   (Connect: 0, Length: 42, Exceptions: 0)
Broken pipe errors: 0
Non-2xx responses:  42
 
 
The configuration is:
Test client: Solaris 9 server running apache bench hitting:
 
Test Web Server: Solaris 9 Sunfire 280R running Apache 2.0.45:
Worker.properties:
# All the workers that we know about
worker.list=app-01
# Set properties for app-01 (ajp13)
worker.app-01.type=ajp13
worker.app-01.host= # first instance on app-01
worker.app-01.port=8009
worker.app-01.cachesize=10
worker.app-01.cache_timeout=600
worker.app-01.socket_keepalive=1
worker.app-01.socket_timeout=300
Solaris 9 Sunfire 280R running tomcat 4.1.24 
>From server.xml:
url
   jdbc:oracle:thin:@:1521:dev

maxActive
20
 
 
maxIdle
10
 
 
maxWait
1
 
 
   removeAbadoned
   true
 
 
   logAdandoned
   true
 
 
Anyone know what causes these errors under relatively light load?
The same test against a Linux development web/apache tomcat server does
this error free with many more users (hitting the same oracle database
instance with the same URL connect string)
Throughput on sftp between these servers is error free 11000kB/s 
What extra logging can I do to see what's causing the errors?
What tuning parameters might help this configuration?
 
Thanks in advance,
 
Fletcher Cocquyt
Senior Systems Administrator
[EMAIL PROTECTED]
 


Tomcat Closes HTTPS Port

2003-07-09 Thread Lars Hellgren
Hello,

 

Here is a Windows XP, JDK 1.4.1, Tomcat 4.1.24 problem that I'm not sure
of how to tackle.  We have been running our new Tomcat application with
an HTTP and an HTTPS port for a few weeks.  During this time there have
been two occasions on which the HTTPS port has become closed for no
apparent reason denying any further requests.  The log files seem to
contain no information pertaining to this problem.

 

Thanks for any help,

Lars

 



Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
It's all working now!
Form AUTH and JDBCRealm.
Works as advertised! :)
I had 2 errors in my "login.jsp" file.
Once I closed my  with 
and changed "j_passsword" to "j_password"
It worked!!

I can attribute ALL of my problems to my poor typing and review skills.

Thanks again for your help.

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Client prematurely closes connection = junk in reponse

2003-07-09 Thread Michael Wille
Hello All,

I am experiencing a very strange problem and don't know exactly how to fix it.  The 
problem is garbled junk characters are being prepended to the response output stream 
that the browser receives.  This only happens for Internet Explorer and it seems very 
random.  It is very difficult to reproduce.  I've never seen it happen under Mozilla.

Before I launch into my questions, let me explain our setup.

We have Tomcat 4.1.12 behind Apache 1.3.27.  Running on tomcat is a custom 
application.  Part of what it does is maintain a library of digital assets.  These 
assets can be movies, pdfs, images, etc.  When browsing the library of assets, you 
have several options: view thumbnail, view fullsize, download, etc.  While all static 
images used in the web pages are served up by Apache, all of these assets are served 
by a special 'proxy' servlet in tomcat.  This is done primarily for security.  All 
access to this restricted material is monitored via this proxy servlet.

The code for the proxy is basically:

File file = new File(filePath);
FileInputStream fis = new FileInputStream(file);
ServletOutputStream outStream = response.getOutputStream();
long fileLength = file.length();
   
response.setContentLength((int) fileLength);
response.addHeader("Pragma", "no-cache");
   
if(action.equals("download")) {
// We need to set the attachment header that only some browsers listen to. (the 
good ones)
response.setHeader("Content-Disposition","attachment; filename=" + fileName + ";");
// Then because some browsers don't follow standards (IE) we have to set the mime 
type as a bogus value
response.setContentType("doner/x-fileshare-native");
} else {
// if we are just viewing, let the browser know the correct mime type.
response.setContentType(asset.getMimeType());
}

byte[] buffer = new byte[1024];
int numBytes = 0;
int totalBytes = 0;
while(totalBytes < fileLength) {
numBytes = fis.read(buffer);
totalBytes += numBytes;
outStream.write(buffer);
}   
fis.read(buffer);
fis.close();

The reason I post this code is because I believe that the garbled junk is the remains 
of an aborted file download.  My guess is that sometime during the while loop that 
writes the contents of the file to the stream, the user opened another page (possibly 
without the browser closing the connection?).  This problem is reproducible (though 
not very easily) when a large file is opened for viewing or download.   While the 
transfer is occuring, click on another link.  1 out of 3 times you see the garbled 
junk.  Sometimes it happens more often, sometimes less.

So, am I going off in the wrong direction with this?  If not, is there anyway to check 
to see if the connection was closed or aborted during servlet processing?  Does anyone 
have any ideas or thoughts about this?

Thanks for any help!

-Mike



Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Ben Souther
redirects can be a problem (some firewalls don't allow them.)

I'd go with the forwards.

Did all servlet apps have to have a static HTML welcome page before JSP came 
into being?


On Wednesday 09 July 2003 04:51 pm, Mike Curwen wrote:
> A-HAAA!!!   Yes, there is...
>
> but in the next version of the spec  :(
>
> (Tomcat 5)
>
> So for now, we all have to have a jsp file that does the kickmeto trick.
>
> > -Original Message-
> > From: Ben Souther [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 3:52 PM
> > To: Tomcat Users List
> > Subject: Re: setting up a root servlet / getting images to
> > appear in Tomcat 4.1.24
> >
> >
> > I see what you mean.
> > Is there no way to map the welcome-file-list  element in
> > web.xml to a servlet?
> >
> > On Wednesday 09 July 2003 04:38 pm, Mark Biciunas wrote:
> > > That servlet will work great as will the configuration - no
> >
> > question
> >
> > > about it.  But try updating your configuration so that you
> >
> > acccess it
> >
> > > as:
> > >
> > > http://localhost:8080   (note the removal of /hello).
> > >
> > > The solution I presented is only relevant to the situation
> >
> > when there
> >
> > > is no path (ie: /hello).
> > >
> > > Please try it and let me know what you find.
> > >
> > > Mark Biciunas
> > > Agorex Inc
> > > (905) 274-6785
> > > [EMAIL PROTECTED]
> > > - Original Message -
> > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, July 09, 2003 4:30 PM
> > > Subject: Re: setting up a root servlet / getting images to
> >
> > appear in
> >
> > > Tomcat 4.1.24
> > >
> > > > This servlet displays images just fine from the root context. It
> > > > uses the root context that comes standard with tomcat.
> >
> > I'm hitting
> >
> > > > it with this URL: http://localhost:8080/hello
> > > >
> > > >
> > > > import javax.servlet.*;
> > > > import javax.servlet.http.*;
> > > > import java.io.*;
> > > >
> > > > public class HelloWorldExample  extends HttpServlet{
> > > >
> > > > public void doGet(HttpServletRequest  request,
> > > >   HttpServletResponse response)
> > > >  throws ServletException,
> > > > IOException{
> > > >
> > > > response.setContentType("text/html");
> > > > PrintWriter out = response.getWriter();
> > > > out.println("hello world");
> > > > out.println("");
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > > Here is the web.xml:
> > > >
> > > > 
> > > >
> > > >  > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> >
> > Application 2.3//EN"
> >
> > > > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> > > >
> > > > 
> > > >   Welcome to Tomcat
> > > >   
> > > >  Welcome to Tomcat
> > > >   
> > > >   
> > > > 
> > > > Hello
> > > > 
> > > > 
> > > > HelloWorldExample
> > > > 
> > > >   
> > > >   
> > > > Hello
> > > > /hello
> > > >   
> > > > 
> > > >
> > > >
> > > >
> > > > Is this what you are trying to do?
> > > >
> > > > On Wednesday 09 July 2003 04:18 pm, John Turner wrote:
> > > > > I'm just trying to understand why it was necessary.
> > > > >
> > > > > Our apps have mixed content, and we did not have to configure
> > > > > things as you've described.
> > > > >
> > > > > John
> > > > >
> > > > > On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
> > >
> > > <[EMAIL PROTECTED]>
> > >
> > > > > wrote:
> > > > > > As I understand it, the servlet will receive all
> >
> > requests other
> >
> > > > > > than those that have been re-routed through servlet-mappings.
> > > > > >
> > > > > > Just out of curiosity, do you see a problem with this
> >
> > approach?
> >
> > > > > > Mark Biciunas
> > > > > > Agorex Inc
> > > > > > (905) 274-6785
> > > > > > [EMAIL PROTECTED]
> > > > > > - Original Message -
> > > > > > From: "John Turner" <[EMAIL PROTECTED]>
> > > > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > > > Sent: Wednesday, July 09, 2003 3:57 PM
> > > > > > Subject: Re: setting up a root servlet / getting images to
> > > > > > appear in Tomcat 4.1.24
> > > > > >
> > > > > >> So you have a servlet that is intercepting all
> >
> > requests, other
> >
> > > > > >> than image requests?
> > > > > >>
> > > > > >> John
> > > > > >>
> > > > > >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> > > > > >
> > > > > > <[EMAIL PROTECTED]>
> > > > > >
> > > > > >> wrote:
> > > > > >> > Actually, the point of the article is to explain
> >
> > how NOT to
> >
> > > > > >> > deliver
> > > > > >>
> > > > > >> the
> > > > > >>
> > > > > >> > images via the servlet and to allow Tomcat to serve images
> > >
> > > normally -
> > >
> > > > > >> > something that doesn't happen if you are using a root
> > > > > >> > context.
> > > > > >> >
> > > > > >> > It is only when you configure server.xml  with a blank
> > > > > >> > context path
> > > > > >>
> > > > > >> (ie:
> > > > > >> > ) that you
> > > > > >>

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread John Turner
Thanks for the info.

John

On Wed, 9 Jul 2003 15:43:51 -0500, Mike Curwen <[EMAIL PROTECTED]> wrote:



-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED] Sent: Wednesday, 
July 09, 2003 3:31 PM
To: Tomcat Users List
Subject: Re: setting up a root servlet / getting images to appear in 
Tomcat 4.1.24



OK.  I still don't get it, but I don't want to prolong the thread.

Thanks for the info.


I'm not sure where the confusion is.  It's an extremely limited case,
but valid (I think).
if you want a servlet run when someone says:  www.somesite.com/
Then you need to do 2 things in Tomcat stand-alone
map "" to your web app in server.xml
map *ALL* incoming requests in web.xml to the servlet that ought to
respond.
But this has the additional effect of mapping requests for images and
style sheets and such.
alternate (less confusing?) approach:
Use a welcome-file list.  If you request www.somesite.com/ then your
welcome-file will be kickmeto.jsp
kickmeto.jsp does a forward, include or sendRedirect (whichever you
like) that goes to your "actual" front-door servlet.
response.sendRedirect("foo");

/foo is a single, non-monolithic mapping, and so now images and css are
served statically, and your front-door servlet is also serving all
requests made to /foo (which kickmeto.jsp accomplishes).
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mike Curwen
A-HAAA!!!   Yes, there is...

but in the next version of the spec  :(

(Tomcat 5)

So for now, we all have to have a jsp file that does the kickmeto trick.

> -Original Message-
> From: Ben Souther [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 3:52 PM
> To: Tomcat Users List
> Subject: Re: setting up a root servlet / getting images to 
> appear in Tomcat 4.1.24
> 
> 
> I see what you mean.
> Is there no way to map the welcome-file-list  element in 
> web.xml to a servlet?
> 
> 
> On Wednesday 09 July 2003 04:38 pm, Mark Biciunas wrote:
> > That servlet will work great as will the configuration - no 
> question 
> > about it.  But try updating your configuration so that you 
> acccess it 
> > as:
> >
> > http://localhost:8080   (note the removal of /hello).
> >
> > The solution I presented is only relevant to the situation 
> when there 
> > is no path (ie: /hello).
> >
> > Please try it and let me know what you find.
> >
> > Mark Biciunas
> > Agorex Inc
> > (905) 274-6785
> > [EMAIL PROTECTED]
> > - Original Message -
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 09, 2003 4:30 PM
> > Subject: Re: setting up a root servlet / getting images to 
> appear in 
> > Tomcat 4.1.24
> >
> > > This servlet displays images just fine from the root context. It 
> > > uses the root context that comes standard with tomcat. 
> I'm hitting 
> > > it with this URL: http://localhost:8080/hello
> > >
> > >
> > > import javax.servlet.*;
> > > import javax.servlet.http.*;
> > > import java.io.*;
> > >
> > > public class HelloWorldExample  extends HttpServlet{
> > >
> > > public void doGet(HttpServletRequest  request,
> > >   HttpServletResponse response)
> > >  throws ServletException, 
> > > IOException{
> > >
> > > response.setContentType("text/html");
> > > PrintWriter out = response.getWriter();
> > > out.println("hello world");
> > > out.println("");
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > Here is the web.xml:
> > >
> > > 
> > >
> > >  > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
> Application 2.3//EN"
> > > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> > >
> > > 
> > >   Welcome to Tomcat
> > >   
> > >  Welcome to Tomcat
> > >   
> > >   
> > > 
> > > Hello
> > > 
> > > 
> > > HelloWorldExample
> > > 
> > >   
> > >   
> > > Hello
> > > /hello
> > >   
> > > 
> > >
> > >
> > >
> > > Is this what you are trying to do?
> > >
> > > On Wednesday 09 July 2003 04:18 pm, John Turner wrote:
> > > > I'm just trying to understand why it was necessary.
> > > >
> > > > Our apps have mixed content, and we did not have to configure 
> > > > things as you've described.
> > > >
> > > > John
> > > >
> > > > On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
> >
> > <[EMAIL PROTECTED]>
> >
> > > > wrote:
> > > > > As I understand it, the servlet will receive all 
> requests other 
> > > > > than those that have been re-routed through servlet-mappings.
> > > > >
> > > > > Just out of curiosity, do you see a problem with this 
> approach?
> > > > >
> > > > > Mark Biciunas
> > > > > Agorex Inc
> > > > > (905) 274-6785
> > > > > [EMAIL PROTECTED]
> > > > > - Original Message -
> > > > > From: "John Turner" <[EMAIL PROTECTED]>
> > > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, July 09, 2003 3:57 PM
> > > > > Subject: Re: setting up a root servlet / getting images to 
> > > > > appear in Tomcat 4.1.24
> > > > >
> > > > >> So you have a servlet that is intercepting all 
> requests, other 
> > > > >> than image requests?
> > > > >>
> > > > >> John
> > > > >>
> > > > >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> > > > >
> > > > > <[EMAIL PROTECTED]>
> > > > >
> > > > >> wrote:
> > > > >> > Actually, the point of the article is to explain 
> how NOT to 
> > > > >> > deliver
> > > > >>
> > > > >> the
> > > > >>
> > > > >> > images via the servlet and to allow Tomcat to serve images
> >
> > normally -
> >
> > > > >> > something that doesn't happen if you are using a root 
> > > > >> > context.
> > > > >> >
> > > > >> > It is only when you configure server.xml  with a blank 
> > > > >> > context path
> > > > >>
> > > > >> (ie:
> > > > >> > ) that you 
> > > > >> > run into
> > > > >>
> > > > >> this
> > > > >>
> > > > >> > problem.  If you specify a path (ie:  > > > >> > path="myservlet" docBase="myservlet" debug="0"/> then the 
> > > > >> > problem doesn't appear.
> > > > >> >
> > > > >> > Hope this helps,
> > > > >> >
> > > > >> > Mark Biciunas
> > > > >> > [EMAIL PROTECTED]
> > > > >> > - Original Message -
> > > > >> > From: "John Turner" <[EMAIL PROTECTED]>
> > > > >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > >> > Sent: Wednesday, July 09, 2003 3:19 PM
> > > > >> > Subject: Re: setting up a root servlet / getting images to 
> 

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Ben Souther
I see what you mean.
Is there no way to map the welcome-file-list  element in web.xml to a servlet?


On Wednesday 09 July 2003 04:38 pm, Mark Biciunas wrote:
> That servlet will work great as will the configuration - no question about
> it.  But try updating your configuration so that you acccess it as:
>
> http://localhost:8080   (note the removal of /hello).
>
> The solution I presented is only relevant to the situation when there is no
> path (ie: /hello).
>
> Please try it and let me know what you find.
>
> Mark Biciunas
> Agorex Inc
> (905) 274-6785
> [EMAIL PROTECTED]
> - Original Message -
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 4:30 PM
> Subject: Re: setting up a root servlet / getting images to appear in Tomcat
> 4.1.24
>
> > This servlet displays images just fine from the root context.
> > It uses the root context that comes standard with tomcat.
> > I'm hitting it with this URL:
> > http://localhost:8080/hello
> >
> >
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> > import java.io.*;
> >
> > public class HelloWorldExample  extends HttpServlet{
> >
> > public void doGet(HttpServletRequest  request,
> >   HttpServletResponse response)
> >  throws ServletException,
> > IOException{
> >
> > response.setContentType("text/html");
> > PrintWriter out = response.getWriter();
> > out.println("hello world");
> > out.println("");
> > }
> > }
> >
> >
> >
> >
> > Here is the web.xml:
> >
> > 
> >
> >  > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> >
> > 
> >   Welcome to Tomcat
> >   
> >  Welcome to Tomcat
> >   
> >   
> > 
> > Hello
> > 
> > 
> > HelloWorldExample
> > 
> >   
> >   
> > Hello
> > /hello
> >   
> > 
> >
> >
> >
> > Is this what you are trying to do?
> >
> > On Wednesday 09 July 2003 04:18 pm, John Turner wrote:
> > > I'm just trying to understand why it was necessary.
> > >
> > > Our apps have mixed content, and we did not have to configure things as
> > > you've described.
> > >
> > > John
> > >
> > > On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
>
> <[EMAIL PROTECTED]>
>
> > > wrote:
> > > > As I understand it, the servlet will receive all requests other than
> > > > those
> > > > that have been re-routed through servlet-mappings.
> > > >
> > > > Just out of curiosity, do you see a problem with this approach?
> > > >
> > > > Mark Biciunas
> > > > Agorex Inc
> > > > (905) 274-6785
> > > > [EMAIL PROTECTED]
> > > > - Original Message -
> > > > From: "John Turner" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, July 09, 2003 3:57 PM
> > > > Subject: Re: setting up a root servlet / getting images to appear in
> > > > Tomcat
> > > > 4.1.24
> > > >
> > > >> So you have a servlet that is intercepting all requests, other than
> > > >> image
> > > >> requests?
> > > >>
> > > >> John
> > > >>
> > > >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> > > >
> > > > <[EMAIL PROTECTED]>
> > > >
> > > >> wrote:
> > > >> > Actually, the point of the article is to explain how NOT to
> > > >> > deliver
> > > >>
> > > >> the
> > > >>
> > > >> > images via the servlet and to allow Tomcat to serve images
>
> normally -
>
> > > >> > something that doesn't happen if you are using a root context.
> > > >> >
> > > >> > It is only when you configure server.xml  with a blank context
> > > >> > path
> > > >>
> > > >> (ie:
> > > >> > ) that you run
> > > >> > into
> > > >>
> > > >> this
> > > >>
> > > >> > problem.  If you specify a path (ie:  > > >> > docBase="myservlet" debug="0"/> then the problem doesn't appear.
> > > >> >
> > > >> > Hope this helps,
> > > >> >
> > > >> > Mark Biciunas
> > > >> > [EMAIL PROTECTED]
> > > >> > - Original Message -
> > > >> > From: "John Turner" <[EMAIL PROTECTED]>
> > > >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > >> > Sent: Wednesday, July 09, 2003 3:19 PM
> > > >> > Subject: Re: setting up a root servlet / getting images to appear
>
> in
>
> > > >> > Tomcat
> > > >> > 4.1.24
> > > >> >
> > > >> >> Just so I'm clearyou want to deliver the images via the
>
> servlet?
>
> > > >> >> I'm
> > > >> >> missing why you have to declare the MIME types of images at
> > > >
> > > > all...Tomcat
> > > >
> > > >> > is
> > > >> >
> > > >> >> perfectly capable of serving them in a standard HTTP/1.1 manner
> > > >>
> > > >> without
> > > >>
> > > >> > any
> > > >> >
> > > >> >> intervention from a servlet, and without any additional
> > > >>
> > > >> configuration.
> > > >>
> > > >> >> John
> > > >> >>
> > > >> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> > > >> >
> > > >> > <[EMAIL PROTECTED]>
> > > >> >
> > > >> >> wrote:
> > > >> >> > This email formally presents what I have learne

Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
I'm going to start a new thread now because I no longer
need help getting JDBCRealm to work.
Now I need some help getting FORM AUTH to work with
JDBCRealm.
--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mike Curwen


> -Original Message-
> From: John Turner [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 3:31 PM
> To: Tomcat Users List
> Subject: Re: setting up a root servlet / getting images to 
> appear in Tomcat 4.1.24
> 
> 
> 
> OK.  I still don't get it, but I don't want to prolong the thread.
> 
> Thanks for the info.


I'm not sure where the confusion is.  It's an extremely limited case,
but valid (I think).
 
if you want a servlet run when someone says:  www.somesite.com/

Then you need to do 2 things in Tomcat stand-alone
map "" to your web app in server.xml
map *ALL* incoming requests in web.xml to the servlet that ought to
respond.

But this has the additional effect of mapping requests for images and
style sheets and such.

alternate (less confusing?) approach:
Use a welcome-file list.  If you request www.somesite.com/ then your
welcome-file will be kickmeto.jsp

kickmeto.jsp does a forward, include or sendRedirect (whichever you
like) that goes to your "actual" front-door servlet.

response.sendRedirect("foo");

/foo is a single, non-monolithic mapping, and so now images and css are
served statically, and your front-door servlet is also serving all
requests made to /foo (which kickmeto.jsp accomplishes).  


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



Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mark Biciunas
That servlet will work great as will the configuration - no question about
it.  But try updating your configuration so that you acccess it as:

http://localhost:8080   (note the removal of /hello).

The solution I presented is only relevant to the situation when there is no
path (ie: /hello).

Please try it and let me know what you find.

Mark Biciunas
Agorex Inc
(905) 274-6785
[EMAIL PROTECTED]
- Original Message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 4:30 PM
Subject: Re: setting up a root servlet / getting images to appear in Tomcat
4.1.24


> This servlet displays images just fine from the root context.
> It uses the root context that comes standard with tomcat.
> I'm hitting it with this URL:
> http://localhost:8080/hello
>
>
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
>
> public class HelloWorldExample  extends HttpServlet{
>
> public void doGet(HttpServletRequest  request,
>   HttpServletResponse response)
>  throws ServletException, IOException{
>
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
> out.println("hello world");
> out.println("");
> }
> }
>
>
>
>
> Here is the web.xml:
>
> 
>
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>   Welcome to Tomcat
>   
>  Welcome to Tomcat
>   
>   
> 
> Hello
> 
> 
> HelloWorldExample
> 
>   
>   
> Hello
> /hello
>   
> 
>
>
>
> Is this what you are trying to do?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Wednesday 09 July 2003 04:18 pm, John Turner wrote:
> > I'm just trying to understand why it was necessary.
> >
> > Our apps have mixed content, and we did not have to configure things as
> > you've described.
> >
> > John
> >
> > On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
> >
> > wrote:
> > > As I understand it, the servlet will receive all requests other than
> > > those
> > > that have been re-routed through servlet-mappings.
> > >
> > > Just out of curiosity, do you see a problem with this approach?
> > >
> > > Mark Biciunas
> > > Agorex Inc
> > > (905) 274-6785
> > > [EMAIL PROTECTED]
> > > - Original Message -
> > > From: "John Turner" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, July 09, 2003 3:57 PM
> > > Subject: Re: setting up a root servlet / getting images to appear in
> > > Tomcat
> > > 4.1.24
> > >
> > >> So you have a servlet that is intercepting all requests, other than
> > >> image
> > >> requests?
> > >>
> > >> John
> > >>
> > >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> > >
> > > <[EMAIL PROTECTED]>
> > >
> > >> wrote:
> > >> > Actually, the point of the article is to explain how NOT to deliver
> > >>
> > >> the
> > >>
> > >> > images via the servlet and to allow Tomcat to serve images
normally -
> > >> > something that doesn't happen if you are using a root context.
> > >> >
> > >> > It is only when you configure server.xml  with a blank context path
> > >>
> > >> (ie:
> > >> > ) that you run into
> > >>
> > >> this
> > >>
> > >> > problem.  If you specify a path (ie:  > >> > docBase="myservlet" debug="0"/> then the problem doesn't appear.
> > >> >
> > >> > Hope this helps,
> > >> >
> > >> > Mark Biciunas
> > >> > [EMAIL PROTECTED]
> > >> > - Original Message -
> > >> > From: "John Turner" <[EMAIL PROTECTED]>
> > >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > >> > Sent: Wednesday, July 09, 2003 3:19 PM
> > >> > Subject: Re: setting up a root servlet / getting images to appear
in
> > >> > Tomcat
> > >> > 4.1.24
> > >> >
> > >> >> Just so I'm clearyou want to deliver the images via the
servlet?
> > >> >> I'm
> > >> >> missing why you have to declare the MIME types of images at
> > >
> > > all...Tomcat
> > >
> > >> > is
> > >> >
> > >> >> perfectly capable of serving them in a standard HTTP/1.1 manner
> > >>
> > >> without
> > >>
> > >> > any
> > >> >
> > >> >> intervention from a servlet, and without any additional
> > >>
> > >> configuration.
> > >>
> > >> >> John
> > >> >>
> > >> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> > >> >
> > >> > <[EMAIL PROTECTED]>
> > >> >
> > >> >> wrote:
> > >> >> > This email formally presents what I have learned over the past
> > >>
> > >> couple
> > >>
> > >> >> > days
> > >> >> > about setting up a servlet to be accessed as root (ie:
> > >> >>
> > >> >> www.myservlet.com
> > >> >>
> > >> >> > instead of www.myservlet.com/somepath) without loosing access to
> > >> >>
> > >> >> images
> > >> >>
> > >> >> > and
> > >> >> > other mime types.  It is based primarily on advice received from
> > >>
> > >> Bill
> > >>
> > >> >> > Barker
> > >> >> > and Stefan Radzom as well as the hints and suggestions of many
> > >
> > > oth

Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
Just a quick update.

My JDBCRealm works if I use Basic AUTH.
Only trouble I have now is getting Form AUTH to work.
--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread John Turner
OK.  I still don't get it, but I don't want to prolong the thread.

Thanks for the info.

John

On Wed, 9 Jul 2003 16:30:08 -0400, Mark Biciunas <[EMAIL PROTECTED]> 
wrote:

It became necessary only when we tried to create a servlet that is 
accessed
without any path information (ie: www.mysite.com instead of
www.mysite.com/myservlet).  Of course, if you have specified a static 
html
page as the welcoming page to your site, you may never need to access a
servlet without a path.  In our case, we have no static html, everything 
is
generated on the fly with servlets, so we ran into the problem.

Mark Biciunas
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 4:18 PM
Subject: Re: setting up a root servlet / getting images to appear in 
Tomcat
4.1.24


I'm just trying to understand why it was necessary.

Our apps have mixed content, and we did not have to configure things as
you've described.
John

On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
wrote:

> As I understand it, the servlet will receive all requests other than
> those
> that have been re-routed through servlet-mappings.
>
> Just out of curiosity, do you see a problem with this approach?
>
> Mark Biciunas
> Agorex Inc
> (905) 274-6785
> [EMAIL PROTECTED]
> - Original Message -
> From: "John Turner" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 3:57 PM
> Subject: Re: setting up a root servlet / getting images to appear in
> Tomcat
> 4.1.24
>
>
>>
>> So you have a servlet that is intercepting all requests, other than
>> image
>> requests?
>>
>> John
>>
>> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> <[EMAIL PROTECTED]>
>> wrote:
>>
>> > Actually, the point of the article is to explain how NOT to deliver
>> the
>> > images via the servlet and to allow Tomcat to serve images normally 
-
>> > something that doesn't happen if you are using a root context.
>> >
>> > It is only when you configure server.xml  with a blank context path
>> (ie:
>> > ) that you run into
>> this
>> > problem.  If you specify a path (ie: 
>> > docBase="myservlet" debug="0"/> then the problem doesn't appear.
>> >
>> > Hope this helps,
>> >
>> > Mark Biciunas
>> > [EMAIL PROTECTED]
>> > - Original Message -
>> > From: "John Turner" <[EMAIL PROTECTED]>
>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> > Sent: Wednesday, July 09, 2003 3:19 PM
>> > Subject: Re: setting up a root servlet / getting images to appear 
in
>> > Tomcat
>> > 4.1.24
>> >
>> >
>> >>
>> >> Just so I'm clearyou want to deliver the images via the 
servlet?
>> >> I'm
>> >> missing why you have to declare the MIME types of images at
> all...Tomcat
>> > is
>> >> perfectly capable of serving them in a standard HTTP/1.1 manner
>> without
>> > any
>> >> intervention from a servlet, and without any additional
>> configuration.
>> >>
>> >> John
>> >>
>> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
>> > <[EMAIL PROTECTED]>
>> >> wrote:
>> >>
>> >> > This email formally presents what I have learned over the past
>> couple
>> >> > days
>> >> > about setting up a servlet to be accessed as root (ie:
>> >> www.myservlet.com
>> >> > instead of www.myservlet.com/somepath) without loosing access to
>> >> images
>> >> > and
>> >> > other mime types.  It is based primarily on advice received from
>> Bill
>> >> > Barker
>> >> > and Stefan Radzom as well as the hints and suggestions of many
> others.
>> >> > As
>> >> > you are looking at this solution, please bear in mind that I am
not
> an
>> >> > expert in Tomcat configuration and there is likely a lot of 
things
>> I
>> > have
>> >> > missed.  I welcome any additional advice / corrections people 
have
>> to
>> >> > offer.
>> >> >
>> >> >
>> >> > Setting up a servlet to be accessed without a path (ie:
>> >> > www.myservlet.com)
>> >> > is fairly easy if you pay attention to a couple of extra steps.
> First
>> >> > this
>> >> > is to deploy your application in the webapps directory as usual
>> (ie:
>> >> > webapps/myservlet).  Next, update conf/servlet.xml so that you
have
>> a
>> >> > root
>> >> > context that looks like:
>> >> >
>> >> > 
>> >> >
>> >> > This will tell tomcat to serve ALL incoming requests to your
>> servlet,
>> >> > including requests for images, etc.  If your servlet is not set 
up
>> to
>> >> > handle
>> >> > mime types, then your images, etc. will seem to disappear.  To
make
>> >> sure
>> >> > the
>> >> > images, etc. are handled correctly, you need to map them out in
>> your
>> >> > WEB-INF/web.xml as follows:
>> >> >
>> >> > 
>> >> > myservlet
>> >> > mypackage.MyServlet
>> >> > 
>> >> >
>> >> > 
>> >> > myservlet
>> >> > /
>> >> > 
>> >> >
>> >> > 
>> >> > default
>> >> > *.gif
>> >> > 
>> >> >
>> >> > 
>> >> > default
>> >> > *.jpg
>> >> > 
>> >> >
>> >> > What is happining here in the first two sections is that you 
have
>> >> > identified

Adding multiple params to redirect header

2003-07-09 Thread Boris Folgmann
Hi!

Does anybody know a good method to pass all parameters from one request to
another one using a redirect header? I can read all parameters of the
original request with request.getParameterMap(), but how can I get them
into the URL used for the redirect header?

cu,
boris


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



Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mark Biciunas
It became necessary only when we tried to create a servlet that is accessed
without any path information (ie: www.mysite.com instead of
www.mysite.com/myservlet).  Of course, if you have specified a static html
page as the welcoming page to your site, you may never need to access a
servlet without a path.  In our case, we have no static html, everything is
generated on the fly with servlets, so we ran into the problem.

Mark Biciunas
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 4:18 PM
Subject: Re: setting up a root servlet / getting images to appear in Tomcat
4.1.24


>
> I'm just trying to understand why it was necessary.
>
> Our apps have mixed content, and we did not have to configure things as
> you've described.
>
> John
>
> On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
> wrote:
>
> > As I understand it, the servlet will receive all requests other than
> > those
> > that have been re-routed through servlet-mappings.
> >
> > Just out of curiosity, do you see a problem with this approach?
> >
> > Mark Biciunas
> > Agorex Inc
> > (905) 274-6785
> > [EMAIL PROTECTED]
> > - Original Message -
> > From: "John Turner" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 09, 2003 3:57 PM
> > Subject: Re: setting up a root servlet / getting images to appear in
> > Tomcat
> > 4.1.24
> >
> >
> >>
> >> So you have a servlet that is intercepting all requests, other than
> >> image
> >> requests?
> >>
> >> John
> >>
> >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> > <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >> > Actually, the point of the article is to explain how NOT to deliver
> >> the
> >> > images via the servlet and to allow Tomcat to serve images normally -
> >> > something that doesn't happen if you are using a root context.
> >> >
> >> > It is only when you configure server.xml  with a blank context path
> >> (ie:
> >> > ) that you run into
> >> this
> >> > problem.  If you specify a path (ie:  >> > docBase="myservlet" debug="0"/> then the problem doesn't appear.
> >> >
> >> > Hope this helps,
> >> >
> >> > Mark Biciunas
> >> > [EMAIL PROTECTED]
> >> > - Original Message -
> >> > From: "John Turner" <[EMAIL PROTECTED]>
> >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >> > Sent: Wednesday, July 09, 2003 3:19 PM
> >> > Subject: Re: setting up a root servlet / getting images to appear in
> >> > Tomcat
> >> > 4.1.24
> >> >
> >> >
> >> >>
> >> >> Just so I'm clearyou want to deliver the images via the servlet?
> >> >> I'm
> >> >> missing why you have to declare the MIME types of images at
> > all...Tomcat
> >> > is
> >> >> perfectly capable of serving them in a standard HTTP/1.1 manner
> >> without
> >> > any
> >> >> intervention from a servlet, and without any additional
> >> configuration.
> >> >>
> >> >> John
> >> >>
> >> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> >> > <[EMAIL PROTECTED]>
> >> >> wrote:
> >> >>
> >> >> > This email formally presents what I have learned over the past
> >> couple
> >> >> > days
> >> >> > about setting up a servlet to be accessed as root (ie:
> >> >> www.myservlet.com
> >> >> > instead of www.myservlet.com/somepath) without loosing access to
> >> >> images
> >> >> > and
> >> >> > other mime types.  It is based primarily on advice received from
> >> Bill
> >> >> > Barker
> >> >> > and Stefan Radzom as well as the hints and suggestions of many
> > others.
> >> >> > As
> >> >> > you are looking at this solution, please bear in mind that I am
not
> > an
> >> >> > expert in Tomcat configuration and there is likely a lot of things
> >> I
> >> > have
> >> >> > missed.  I welcome any additional advice / corrections people have
> >> to
> >> >> > offer.
> >> >> >
> >> >> >
> >> >> > Setting up a servlet to be accessed without a path (ie:
> >> >> > www.myservlet.com)
> >> >> > is fairly easy if you pay attention to a couple of extra steps.
> > First
> >> >> > this
> >> >> > is to deploy your application in the webapps directory as usual
> >> (ie:
> >> >> > webapps/myservlet).  Next, update conf/servlet.xml so that you
have
> >> a
> >> >> > root
> >> >> > context that looks like:
> >> >> >
> >> >> > 
> >> >> >
> >> >> > This will tell tomcat to serve ALL incoming requests to your
> >> servlet,
> >> >> > including requests for images, etc.  If your servlet is not set up
> >> to
> >> >> > handle
> >> >> > mime types, then your images, etc. will seem to disappear.  To
make
> >> >> sure
> >> >> > the
> >> >> > images, etc. are handled correctly, you need to map them out in
> >> your
> >> >> > WEB-INF/web.xml as follows:
> >> >> >
> >> >> > 
> >> >> > myservlet
> >> >> > mypackage.MyServlet
> >> >> > 
> >> >> >
> >> >> > 
> >> >> > myservlet
> >> >> > /
> >> >> > 
> >> >> >
> >> >> > 
> >> >> > default
> >> >> > *.gif
> >> >> > 
> >> >> >
> >> >> > 
> >> >> > default
> >> >> > *

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Ben Souther
This servlet displays images just fine from the root context.
It uses the root context that comes standard with tomcat.
I'm hitting it with this URL:
http://localhost:8080/hello


import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class HelloWorldExample  extends HttpServlet{

public void doGet(HttpServletRequest  request,
  HttpServletResponse response)
 throws ServletException, IOException{

response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("hello world");
out.println("");
}
}




Here is the web.xml:



http://java.sun.com/dtd/web-app_2_3.dtd";>


  Welcome to Tomcat
  
 Welcome to Tomcat
  
  

Hello


HelloWorldExample

  
  
Hello
/hello
  




Is this what you are trying to do?



















On Wednesday 09 July 2003 04:18 pm, John Turner wrote:
> I'm just trying to understand why it was necessary.
>
> Our apps have mixed content, and we did not have to configure things as
> you've described.
>
> John
>
> On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas <[EMAIL PROTECTED]>
>
> wrote:
> > As I understand it, the servlet will receive all requests other than
> > those
> > that have been re-routed through servlet-mappings.
> >
> > Just out of curiosity, do you see a problem with this approach?
> >
> > Mark Biciunas
> > Agorex Inc
> > (905) 274-6785
> > [EMAIL PROTECTED]
> > - Original Message -
> > From: "John Turner" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 09, 2003 3:57 PM
> > Subject: Re: setting up a root servlet / getting images to appear in
> > Tomcat
> > 4.1.24
> >
> >> So you have a servlet that is intercepting all requests, other than
> >> image
> >> requests?
> >>
> >> John
> >>
> >> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
> >
> > <[EMAIL PROTECTED]>
> >
> >> wrote:
> >> > Actually, the point of the article is to explain how NOT to deliver
> >>
> >> the
> >>
> >> > images via the servlet and to allow Tomcat to serve images normally -
> >> > something that doesn't happen if you are using a root context.
> >> >
> >> > It is only when you configure server.xml  with a blank context path
> >>
> >> (ie:
> >> > ) that you run into
> >>
> >> this
> >>
> >> > problem.  If you specify a path (ie:  >> > docBase="myservlet" debug="0"/> then the problem doesn't appear.
> >> >
> >> > Hope this helps,
> >> >
> >> > Mark Biciunas
> >> > [EMAIL PROTECTED]
> >> > - Original Message -
> >> > From: "John Turner" <[EMAIL PROTECTED]>
> >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >> > Sent: Wednesday, July 09, 2003 3:19 PM
> >> > Subject: Re: setting up a root servlet / getting images to appear in
> >> > Tomcat
> >> > 4.1.24
> >> >
> >> >> Just so I'm clearyou want to deliver the images via the servlet?
> >> >> I'm
> >> >> missing why you have to declare the MIME types of images at
> >
> > all...Tomcat
> >
> >> > is
> >> >
> >> >> perfectly capable of serving them in a standard HTTP/1.1 manner
> >>
> >> without
> >>
> >> > any
> >> >
> >> >> intervention from a servlet, and without any additional
> >>
> >> configuration.
> >>
> >> >> John
> >> >>
> >> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> >> >
> >> > <[EMAIL PROTECTED]>
> >> >
> >> >> wrote:
> >> >> > This email formally presents what I have learned over the past
> >>
> >> couple
> >>
> >> >> > days
> >> >> > about setting up a servlet to be accessed as root (ie:
> >> >>
> >> >> www.myservlet.com
> >> >>
> >> >> > instead of www.myservlet.com/somepath) without loosing access to
> >> >>
> >> >> images
> >> >>
> >> >> > and
> >> >> > other mime types.  It is based primarily on advice received from
> >>
> >> Bill
> >>
> >> >> > Barker
> >> >> > and Stefan Radzom as well as the hints and suggestions of many
> >
> > others.
> >
> >> >> > As
> >> >> > you are looking at this solution, please bear in mind that I am not
> >
> > an
> >
> >> >> > expert in Tomcat configuration and there is likely a lot of things
> >>
> >> I
> >>
> >> > have
> >> >
> >> >> > missed.  I welcome any additional advice / corrections people have
> >>
> >> to
> >>
> >> >> > offer.
> >> >> >
> >> >> >
> >> >> > Setting up a servlet to be accessed without a path (ie:
> >> >> > www.myservlet.com)
> >> >> > is fairly easy if you pay attention to a couple of extra steps.
> >
> > First
> >
> >> >> > this
> >> >> > is to deploy your application in the webapps directory as usual
> >>
> >> (ie:
> >> >> > webapps/myservlet).  Next, update conf/servlet.xml so that you have
> >>
> >> a
> >>
> >> >> > root
> >> >> > context that looks like:
> >> >> >
> >> >> > 
> >> >> >
> >> >> > This will tell tomcat to serve ALL incoming requests to your
> >>
> >> servlet,
> >>
> >> >> > including requests for images, etc.  If your servlet is not set up
> >>
> >> to
> >>
> >> >> > handle
> >> >> > mime types, then

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread John Turner
I'm just trying to understand why it was necessary.

Our apps have mixed content, and we did not have to configure things as 
you've described.

John

On Wed, 9 Jul 2003 16:04:06 -0400, Mark Biciunas <[EMAIL PROTECTED]> 
wrote:

As I understand it, the servlet will receive all requests other than 
those
that have been re-routed through servlet-mappings.

Just out of curiosity, do you see a problem with this approach?

Mark Biciunas
Agorex Inc
(905) 274-6785
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:57 PM
Subject: Re: setting up a root servlet / getting images to appear in 
Tomcat
4.1.24


So you have a servlet that is intercepting all requests, other than 
image
requests?

John

On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
wrote:

> Actually, the point of the article is to explain how NOT to deliver 
the
> images via the servlet and to allow Tomcat to serve images normally -
> something that doesn't happen if you are using a root context.
>
> It is only when you configure server.xml  with a blank context path 
(ie:
> ) that you run into 
this
> problem.  If you specify a path (ie: 
> docBase="myservlet" debug="0"/> then the problem doesn't appear.
>
> Hope this helps,
>
> Mark Biciunas
> [EMAIL PROTECTED]
> - Original Message -
> From: "John Turner" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 3:19 PM
> Subject: Re: setting up a root servlet / getting images to appear in
> Tomcat
> 4.1.24
>
>
>>
>> Just so I'm clearyou want to deliver the images via the servlet?
>> I'm
>> missing why you have to declare the MIME types of images at
all...Tomcat
> is
>> perfectly capable of serving them in a standard HTTP/1.1 manner 
without
> any
>> intervention from a servlet, and without any additional 
configuration.
>>
>> John
>>
>> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> <[EMAIL PROTECTED]>
>> wrote:
>>
>> > This email formally presents what I have learned over the past 
couple
>> > days
>> > about setting up a servlet to be accessed as root (ie:
>> www.myservlet.com
>> > instead of www.myservlet.com/somepath) without loosing access to
>> images
>> > and
>> > other mime types.  It is based primarily on advice received from 
Bill
>> > Barker
>> > and Stefan Radzom as well as the hints and suggestions of many
others.
>> > As
>> > you are looking at this solution, please bear in mind that I am not
an
>> > expert in Tomcat configuration and there is likely a lot of things 
I
> have
>> > missed.  I welcome any additional advice / corrections people have 
to
>> > offer.
>> >
>> >
>> > Setting up a servlet to be accessed without a path (ie:
>> > www.myservlet.com)
>> > is fairly easy if you pay attention to a couple of extra steps.
First
>> > this
>> > is to deploy your application in the webapps directory as usual 
(ie:
>> > webapps/myservlet).  Next, update conf/servlet.xml so that you have 
a
>> > root
>> > context that looks like:
>> >
>> > 
>> >
>> > This will tell tomcat to serve ALL incoming requests to your 
servlet,
>> > including requests for images, etc.  If your servlet is not set up 
to
>> > handle
>> > mime types, then your images, etc. will seem to disappear.  To make
>> sure
>> > the
>> > images, etc. are handled correctly, you need to map them out in 
your
>> > WEB-INF/web.xml as follows:
>> >
>> > 
>> > myservlet
>> > mypackage.MyServlet
>> > 
>> >
>> > 
>> > myservlet
>> > /
>> > 
>> >
>> > 
>> > default
>> > *.gif
>> > 
>> >
>> > 
>> > default
>> > *.jpg
>> > 
>> >
>> > What is happining here in the first two sections is that you have
>> > identified
>> > the servlet class and mapping for your servlet.  This is more or 
less
> the
>> > same as you would do for any servlet.  If you do nothing more than
>> this,
>> > your servlet will (should) work, but you will not see any images
since
>> > picture.gif would match to a url-pattern of "/" and get sent to 
your
>> > servlet
>> > for processing.
>> >
>> > In the second two sections, we are telling Tomcat that anything 
that
>> > matches
>> > a pattern of *.gif or *.jpg should be sent to the default servlet.
>> Now
>> > any
>> > requests that match *.gif or *.jpg will be handled correctly.  If 
you
>> > need
>> > to support more mime types, simply create more servlet mappings.
>> >
>> > Where did the default servlet come from?  It is already configured 
in
>> > conf/web.xml.  Remember that conf/web.xml is automatically read
before
>> > your
>> > WEB-INF/web.xml  so it can do it's thing without you having to 
worry
>> > about
>> > it at all.  The trick is to use url-patterns to send requests back 
to
> the
>> > default servlet so that they don't end up in your servlet.
>> >
>> > The above solution will work great as long as you don't have to 
many
> mime
>> > types to deal with.  If you need to handle lots of diferent types 
of
>> > requests, 

Re: Setup Default Context to point to specific webapp

2003-07-09 Thread John Turner
This is what I have.

The goal: http://www.host.com works.  Environment: Apache 2.0.43, mod_jk, 
Tomcat 4.1.18, Solaris 8.

httpd.conf:

NameVirtualHost *


 LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug

   ServerName www.host.com
   DocumentRoot /usr/local/jakarta-tomcat-4.1.18/webapps/host
   # Static files
   Alias /host "/usr/local/jakarta-tomcat-4.1.18/webapps/host"
   
   Options Indexes FollowSymLinks
   DirectoryIndex index.jsp
   
   # Deny direct access to WEB-INF and META-INF
   #
   
   AllowOverride None
   deny from all
   
   
   AllowOverride None
   deny from all
   
   JkMount /host/*.do  ajp13
   JkMount /host/*.jsp  ajp13


server.xml:


   
   
   


dir structure:

CATALINA_HOME
..webapps
host
..index.html
..index.jsp
..WEB-INF
web.xml
With the above configuration, http://www.host.com/index.jsp works, 
http://www.host.com/index.html is a META REFRESH to index.jsp.

HTH

John

On Wed, 9 Jul 2003 15:06:09 -0500, David Nelson 
<[EMAIL PROTECTED]> wrote:

I have that set, still no luck. same error.

- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 2:38 PM
Subject: Re: Setup Default Context to point to specific webapp

First thing I would try is:

JkMount /* ajp13

John

On Wed, 9 Jul 2003 14:29:55 -0500, David Nelson <[EMAIL PROTECTED]
ind.com> wrote:
> Thanks for the quick reply John.
>
> I have commented out the listener so we have the auto-generation
> straight, now I added a JkMount / ajp13
> thinking that would map to my context in server.xml.  However, when I
try
> www.mysight.com/ I receive a 404 The requested resource (/) is
> unavailable.
>
> Additionally, I have the following in server.xml:
> 
> crossContext="true" override="true">
>
> This seems like a similar phenomenon to the email:
> Subject: Re: setting up a root servlet / getting images to appear in
> Tomcat 4.1.24
>
> I'm staring at a Tomcat manual right now and am missing the forest for
> the trees.  Could anyone be more specific in the way you might 
configure
> the server.xml file?
>
> Thanks for your help,
> -Dave
>
> -Original Message-
> From: John Turner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 2:07 PM
> To: Tomcat Users List
> Subject: Re: Setup Default Context to point to specific webapp
>
>
>
> If its causing a problem for you, skip the auto generation and modify
> httpd.conf by hand.  The auto generation only works for the simplest 
of
> configurations, anyway.
>
> John
>
> On Wed, 9 Jul 2003 14:04:18 -0500, David Nelson <[EMAIL PROTECTED]
> ind.com> wrote:
>
>> I realize this may seem terribly simple to a few of you but I have 
yet
>> to tweak my server.xml to generate a mod_jk.conf that will correctly
>> handle the www.mysight.com/ address.
>>
>> What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively
>> communicating at this point via mod_jk I think.
>>
>> On a side note, I did not configure my apache to support ssl when I
>> installed it initially.  Now I need SSL and having a bit of 
difficulty
>> deciphering the docs.  Once I install OpenSSL in a dir, what do i add
to
>> httpd.conf?
>>
>> Thanks,
>> Dave
>>
>> -Original Message-
>> From: Turansky, Mark [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 08, 2003 3:33 PM
>> To: Tomcat Users List; [EMAIL PROTECTED]
>> Subject: RE: How do I determine sessions within Tomcat?
>>
>>
>> ok, I see th session listener interface in the javadocs as well as 
the
>> session event class.  any advice regarding *how* I plug it into 
tomcat?
>> Is your method a standard J2EE solution or will this be Tomcat
specific?
>>
>> thanks for the quick reply,
>> mark
>>
>>
>> -Original Message-
>> From: Mark W. Webb [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 08, 2003 4:30 PM
>> To: Tomcat Users List
>> Subject: Re: How do I determine sessions within Tomcat?
>>
>>
>> you would probably want to write a SessionListener, and plug it into
>> tomcat.
>>
>> Turansky, Mark wrote:
>>
>>> I am required to track users and their sessions in my web 
application.
>>> Is there a way to access all the sessions currently held in server
>>> memory?
>>>
>>> My application is tracking users in a database table.  Upon login, I
>>> log the session id along with a timestamp and other pertinent
>>> information.  If the user specifically clicks the "log out" button, 
I
>>> can update my table with another timestamp, but I assume many will
>>> simply timeout.  How do I update my table with their logout 
timestamp
>>> in the event of timeout?  I was hoping to make a simple maintenance
>>> thread in the background that would check existing sessions against 
my
>>> database table for this purpose.
>>>
>>> Thanks in advance,
>>> Mark
>>>
>>> - 

>>> To 

Re: Setup Default Context to point to specific webapp

2003-07-09 Thread David Nelson
I have that set, still no luck. same error.

- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 2:38 PM
Subject: Re: Setup Default Context to point to specific webapp


>
> First thing I would try is:
>
> JkMount /* ajp13
>
> John
>
> On Wed, 9 Jul 2003 14:29:55 -0500, David Nelson <[EMAIL PROTECTED]
> ind.com> wrote:
>
> > Thanks for the quick reply John.
> >
> > I have commented out the listener so we have the auto-generation
> > straight, now I added a JkMount / ajp13
> > thinking that would map to my context in server.xml.  However, when I
try
> > www.mysight.com/ I receive a 404 The requested resource (/) is
> > unavailable.
> >
> > Additionally, I have the following in server.xml:
> >  > crossContext="true" override="true">
> >
> > This seems like a similar phenomenon to the email:
> > Subject: Re: setting up a root servlet / getting images to appear in
> > Tomcat 4.1.24
> >
> > I'm staring at a Tomcat manual right now and am missing the forest for
> > the trees.  Could anyone be more specific in the way you might configure
> > the server.xml file?
> >
> > Thanks for your help,
> > -Dave
> >
> > -Original Message-
> > From: John Turner [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 2:07 PM
> > To: Tomcat Users List
> > Subject: Re: Setup Default Context to point to specific webapp
> >
> >
> >
> > If its causing a problem for you, skip the auto generation and modify
> > httpd.conf by hand.  The auto generation only works for the simplest of
> > configurations, anyway.
> >
> > John
> >
> > On Wed, 9 Jul 2003 14:04:18 -0500, David Nelson <[EMAIL PROTECTED]
> > ind.com> wrote:
> >
> >> I realize this may seem terribly simple to a few of you but I have yet
> >> to tweak my server.xml to generate a mod_jk.conf that will correctly
> >> handle the www.mysight.com/ address.
> >>
> >> What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively
> >> communicating at this point via mod_jk I think.
> >>
> >> On a side note, I did not configure my apache to support ssl when I
> >> installed it initially.  Now I need SSL and having a bit of difficulty
> >> deciphering the docs.  Once I install OpenSSL in a dir, what do i add
to
> >> httpd.conf?
> >>
> >> Thanks,
> >> Dave
> >>
> >> -Original Message-
> >> From: Turansky, Mark [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, July 08, 2003 3:33 PM
> >> To: Tomcat Users List; [EMAIL PROTECTED]
> >> Subject: RE: How do I determine sessions within Tomcat?
> >>
> >>
> >> ok, I see th session listener interface in the javadocs as well as the
> >> session event class.  any advice regarding *how* I plug it into tomcat?
> >> Is your method a standard J2EE solution or will this be Tomcat
specific?
> >>
> >> thanks for the quick reply,
> >> mark
> >>
> >>
> >> -Original Message-
> >> From: Mark W. Webb [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, July 08, 2003 4:30 PM
> >> To: Tomcat Users List
> >> Subject: Re: How do I determine sessions within Tomcat?
> >>
> >>
> >> you would probably want to write a SessionListener, and plug it into
> >> tomcat.
> >>
> >> Turansky, Mark wrote:
> >>
> >>> I am required to track users and their sessions in my web application.
> >>> Is there a way to access all the sessions currently held in server
> >>> memory?
> >>>
> >>> My application is tracking users in a database table.  Upon login, I
> >>> log the session id along with a timestamp and other pertinent
> >>> information.  If the user specifically clicks the "log out" button, I
> >>> can update my table with another timestamp, but I assume many will
> >>> simply timeout.  How do I update my table with their logout timestamp
> >>> in the event of timeout?  I was hoping to make a simple maintenance
> >>> thread in the background that would check existing sessions against my
> >>> database table for this purpose.
> >>>
> >>> Thanks in advance,
> >>> Mark
> >>>
> >>> -
> >>> 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]
> >>
> >>
> >
> >
> >
>
>
>
> --
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional comman

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mark Biciunas
As I understand it, the servlet will receive all requests other than those
that have been re-routed through servlet-mappings.

Just out of curiosity, do you see a problem with this approach?

Mark Biciunas
Agorex Inc
(905) 274-6785
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:57 PM
Subject: Re: setting up a root servlet / getting images to appear in Tomcat
4.1.24


>
> So you have a servlet that is intercepting all requests, other than image
> requests?
>
> John
>
> On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
> wrote:
>
> > Actually, the point of the article is to explain how NOT to deliver the
> > images via the servlet and to allow Tomcat to serve images normally -
> > something that doesn't happen if you are using a root context.
> >
> > It is only when you configure server.xml  with a blank context path (ie:
> > ) that you run into this
> > problem.  If you specify a path (ie:  > docBase="myservlet" debug="0"/> then the problem doesn't appear.
> >
> > Hope this helps,
> >
> > Mark Biciunas
> > [EMAIL PROTECTED]
> > - Original Message -
> > From: "John Turner" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 09, 2003 3:19 PM
> > Subject: Re: setting up a root servlet / getting images to appear in
> > Tomcat
> > 4.1.24
> >
> >
> >>
> >> Just so I'm clearyou want to deliver the images via the servlet?
> >> I'm
> >> missing why you have to declare the MIME types of images at
all...Tomcat
> > is
> >> perfectly capable of serving them in a standard HTTP/1.1 manner without
> > any
> >> intervention from a servlet, and without any additional configuration.
> >>
> >> John
> >>
> >> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
> > <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >> > This email formally presents what I have learned over the past couple
> >> > days
> >> > about setting up a servlet to be accessed as root (ie:
> >> www.myservlet.com
> >> > instead of www.myservlet.com/somepath) without loosing access to
> >> images
> >> > and
> >> > other mime types.  It is based primarily on advice received from Bill
> >> > Barker
> >> > and Stefan Radzom as well as the hints and suggestions of many
others.
> >> > As
> >> > you are looking at this solution, please bear in mind that I am not
an
> >> > expert in Tomcat configuration and there is likely a lot of things I
> > have
> >> > missed.  I welcome any additional advice / corrections people have to
> >> > offer.
> >> >
> >> >
> >> > Setting up a servlet to be accessed without a path (ie:
> >> > www.myservlet.com)
> >> > is fairly easy if you pay attention to a couple of extra steps.
First
> >> > this
> >> > is to deploy your application in the webapps directory as usual (ie:
> >> > webapps/myservlet).  Next, update conf/servlet.xml so that you have a
> >> > root
> >> > context that looks like:
> >> >
> >> > 
> >> >
> >> > This will tell tomcat to serve ALL incoming requests to your servlet,
> >> > including requests for images, etc.  If your servlet is not set up to
> >> > handle
> >> > mime types, then your images, etc. will seem to disappear.  To make
> >> sure
> >> > the
> >> > images, etc. are handled correctly, you need to map them out in your
> >> > WEB-INF/web.xml as follows:
> >> >
> >> > 
> >> > myservlet
> >> > mypackage.MyServlet
> >> > 
> >> >
> >> > 
> >> > myservlet
> >> > /
> >> > 
> >> >
> >> > 
> >> > default
> >> > *.gif
> >> > 
> >> >
> >> > 
> >> > default
> >> > *.jpg
> >> > 
> >> >
> >> > What is happining here in the first two sections is that you have
> >> > identified
> >> > the servlet class and mapping for your servlet.  This is more or less
> > the
> >> > same as you would do for any servlet.  If you do nothing more than
> >> this,
> >> > your servlet will (should) work, but you will not see any images
since
> >> > picture.gif would match to a url-pattern of "/" and get sent to your
> >> > servlet
> >> > for processing.
> >> >
> >> > In the second two sections, we are telling Tomcat that anything that
> >> > matches
> >> > a pattern of *.gif or *.jpg should be sent to the default servlet.
> >> Now
> >> > any
> >> > requests that match *.gif or *.jpg will be handled correctly.  If you
> >> > need
> >> > to support more mime types, simply create more servlet mappings.
> >> >
> >> > Where did the default servlet come from?  It is already configured in
> >> > conf/web.xml.  Remember that conf/web.xml is automatically read
before
> >> > your
> >> > WEB-INF/web.xml  so it can do it's thing without you having to worry
> >> > about
> >> > it at all.  The trick is to use url-patterns to send requests back to
> > the
> >> > default servlet so that they don't end up in your servlet.
> >> >
> >> > The above solution will work great as long as you don't have to many
> > mime
> >> > types to deal with.  If you need to handle lots of diferent types of
> >

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread John Turner
So you have a servlet that is intercepting all requests, other than image 
requests?

John

On Wed, 9 Jul 2003 15:55:21 -0400, Mark Biciunas <[EMAIL PROTECTED]> 
wrote:

Actually, the point of the article is to explain how NOT to deliver the
images via the servlet and to allow Tomcat to serve images normally -
something that doesn't happen if you are using a root context.
It is only when you configure server.xml  with a blank context path (ie:
) that you run into this
problem.  If you specify a path (ie:  then the problem doesn't appear.
Hope this helps,

Mark Biciunas
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:19 PM
Subject: Re: setting up a root servlet / getting images to appear in 
Tomcat
4.1.24


Just so I'm clearyou want to deliver the images via the servlet?  
I'm
missing why you have to declare the MIME types of images at all...Tomcat
is
perfectly capable of serving them in a standard HTTP/1.1 manner without
any
intervention from a servlet, and without any additional configuration.

John

On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
wrote:

> This email formally presents what I have learned over the past couple
> days
> about setting up a servlet to be accessed as root (ie: 
www.myservlet.com
> instead of www.myservlet.com/somepath) without loosing access to 
images
> and
> other mime types.  It is based primarily on advice received from Bill
> Barker
> and Stefan Radzom as well as the hints and suggestions of many others.
> As
> you are looking at this solution, please bear in mind that I am not an
> expert in Tomcat configuration and there is likely a lot of things I
have
> missed.  I welcome any additional advice / corrections people have to
> offer.
>
>
> Setting up a servlet to be accessed without a path (ie:
> www.myservlet.com)
> is fairly easy if you pay attention to a couple of extra steps.  First
> this
> is to deploy your application in the webapps directory as usual (ie:
> webapps/myservlet).  Next, update conf/servlet.xml so that you have a
> root
> context that looks like:
>
> 
>
> This will tell tomcat to serve ALL incoming requests to your servlet,
> including requests for images, etc.  If your servlet is not set up to
> handle
> mime types, then your images, etc. will seem to disappear.  To make 
sure
> the
> images, etc. are handled correctly, you need to map them out in your
> WEB-INF/web.xml as follows:
>
> 
> myservlet
> mypackage.MyServlet
> 
>
> 
> myservlet
> /
> 
>
> 
> default
> *.gif
> 
>
> 
> default
> *.jpg
> 
>
> What is happining here in the first two sections is that you have
> identified
> the servlet class and mapping for your servlet.  This is more or less
the
> same as you would do for any servlet.  If you do nothing more than 
this,
> your servlet will (should) work, but you will not see any images since
> picture.gif would match to a url-pattern of "/" and get sent to your
> servlet
> for processing.
>
> In the second two sections, we are telling Tomcat that anything that
> matches
> a pattern of *.gif or *.jpg should be sent to the default servlet.  
Now
> any
> requests that match *.gif or *.jpg will be handled correctly.  If you
> need
> to support more mime types, simply create more servlet mappings.
>
> Where did the default servlet come from?  It is already configured in
> conf/web.xml.  Remember that conf/web.xml is automatically read before
> your
> WEB-INF/web.xml  so it can do it's thing without you having to worry
> about
> it at all.  The trick is to use url-patterns to send requests back to
the
> default servlet so that they don't end up in your servlet.
>
> The above solution will work great as long as you don't have to many
mime
> types to deal with.  If you need to handle lots of diferent types of
> requests, then Bill Barker presented the following alternate solution
> which
> involves changing your servlet code to redirect requests:
>
> URL file = getServletContext().getResource(request.getPathInfo());
> if( file != null ) { // physical resource exists
> RequestDispatcher rd =
> getServletContext().getNamedDispatcher("default");
> rd.forward(request, response);
> return;
> }
> // Your code here.
>
> I have not tried this solution so I do not know to much about it.  It
> seems
> staightforward enough though, so I would expect it to work great.
>
>
> Mark Biciunas
> [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTE

Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mark Biciunas
Actually, the point of the article is to explain how NOT to deliver the
images via the servlet and to allow Tomcat to serve images normally -
something that doesn't happen if you are using a root context.

It is only when you configure server.xml  with a blank context path (ie:
) that you run into this
problem.  If you specify a path (ie:  then the problem doesn't appear.

Hope this helps,

Mark Biciunas
[EMAIL PROTECTED]
- Original Message -
From: "John Turner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:19 PM
Subject: Re: setting up a root servlet / getting images to appear in Tomcat
4.1.24


>
> Just so I'm clearyou want to deliver the images via the servlet?  I'm
> missing why you have to declare the MIME types of images at all...Tomcat
is
> perfectly capable of serving them in a standard HTTP/1.1 manner without
any
> intervention from a servlet, and without any additional configuration.
>
> John
>
> On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas
<[EMAIL PROTECTED]>
> wrote:
>
> > This email formally presents what I have learned over the past couple
> > days
> > about setting up a servlet to be accessed as root (ie: www.myservlet.com
> > instead of www.myservlet.com/somepath) without loosing access to images
> > and
> > other mime types.  It is based primarily on advice received from Bill
> > Barker
> > and Stefan Radzom as well as the hints and suggestions of many others.
> > As
> > you are looking at this solution, please bear in mind that I am not an
> > expert in Tomcat configuration and there is likely a lot of things I
have
> > missed.  I welcome any additional advice / corrections people have to
> > offer.
> >
> >
> > Setting up a servlet to be accessed without a path (ie:
> > www.myservlet.com)
> > is fairly easy if you pay attention to a couple of extra steps.  First
> > this
> > is to deploy your application in the webapps directory as usual (ie:
> > webapps/myservlet).  Next, update conf/servlet.xml so that you have a
> > root
> > context that looks like:
> >
> > 
> >
> > This will tell tomcat to serve ALL incoming requests to your servlet,
> > including requests for images, etc.  If your servlet is not set up to
> > handle
> > mime types, then your images, etc. will seem to disappear.  To make sure
> > the
> > images, etc. are handled correctly, you need to map them out in your
> > WEB-INF/web.xml as follows:
> >
> > 
> > myservlet
> > mypackage.MyServlet
> > 
> >
> > 
> > myservlet
> > /
> > 
> >
> > 
> > default
> > *.gif
> > 
> >
> > 
> > default
> > *.jpg
> > 
> >
> > What is happining here in the first two sections is that you have
> > identified
> > the servlet class and mapping for your servlet.  This is more or less
the
> > same as you would do for any servlet.  If you do nothing more than this,
> > your servlet will (should) work, but you will not see any images since
> > picture.gif would match to a url-pattern of "/" and get sent to your
> > servlet
> > for processing.
> >
> > In the second two sections, we are telling Tomcat that anything that
> > matches
> > a pattern of *.gif or *.jpg should be sent to the default servlet.  Now
> > any
> > requests that match *.gif or *.jpg will be handled correctly.  If you
> > need
> > to support more mime types, simply create more servlet mappings.
> >
> > Where did the default servlet come from?  It is already configured in
> > conf/web.xml.  Remember that conf/web.xml is automatically read before
> > your
> > WEB-INF/web.xml  so it can do it's thing without you having to worry
> > about
> > it at all.  The trick is to use url-patterns to send requests back to
the
> > default servlet so that they don't end up in your servlet.
> >
> > The above solution will work great as long as you don't have to many
mime
> > types to deal with.  If you need to handle lots of diferent types of
> > requests, then Bill Barker presented the following alternate solution
> > which
> > involves changing your servlet code to redirect requests:
> >
> > URL file = getServletContext().getResource(request.getPathInfo());
> > if( file != null ) { // physical resource exists
> > RequestDispatcher rd =
> > getServletContext().getNamedDispatcher("default");
> > rd.forward(request, response);
> > return;
> > }
> > // Your code here.
> >
> > I have not tried this solution so I do not know to much about it.  It
> > seems
> > staightforward enough though, so I would expect it to work great.
> >
> >
> > Mark Biciunas
> > [EMAIL PROTECTED]
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


--

Re: Setup Default Context to point to specific webapp

2003-07-09 Thread John Turner
First thing I would try is:

JkMount /* ajp13

John

On Wed, 9 Jul 2003 14:29:55 -0500, David Nelson <[EMAIL PROTECTED] 
ind.com> wrote:

Thanks for the quick reply John.

I have commented out the listener so we have the auto-generation 
straight, now I added a JkMount / ajp13
thinking that would map to my context in server.xml.  However, when I try 
www.mysight.com/ I receive a 404 The requested resource (/) is 
unavailable.

Additionally, I have the following in server.xml:


This seems like a similar phenomenon to the email:
Subject: Re: setting up a root servlet / getting images to appear in 
Tomcat 4.1.24

I'm staring at a Tomcat manual right now and am missing the forest for 
the trees.  Could anyone be more specific in the way you might configure 
the server.xml file?

Thanks for your help,
-Dave
-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:07 PM
To: Tomcat Users List
Subject: Re: Setup Default Context to point to specific webapp


If its causing a problem for you, skip the auto generation and modify 
httpd.conf by hand.  The auto generation only works for the simplest of 
configurations, anyway.

John

On Wed, 9 Jul 2003 14:04:18 -0500, David Nelson <[EMAIL PROTECTED] 
ind.com> wrote:

I realize this may seem terribly simple to a few of you but I have yet 
to tweak my server.xml to generate a mod_jk.conf that will correctly 
handle the www.mysight.com/ address.

What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively 
communicating at this point via mod_jk I think.

On a side note, I did not configure my apache to support ssl when I 
installed it initially.  Now I need SSL and having a bit of difficulty 
deciphering the docs.  Once I install OpenSSL in a dir, what do i add to 
httpd.conf?

Thanks,
Dave
-Original Message-
From: Turansky, Mark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 3:33 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: How do I determine sessions within Tomcat?
ok, I see th session listener interface in the javadocs as well as the 
session event class.  any advice regarding *how* I plug it into tomcat?  
Is your method a standard J2EE solution or will this be Tomcat specific?

thanks for the quick reply,
mark
-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 4:30 PM
To: Tomcat Users List
Subject: Re: How do I determine sessions within Tomcat?
you would probably want to write a SessionListener, and plug it into 
tomcat.

Turansky, Mark wrote:

I am required to track users and their sessions in my web application.  
Is there a way to access all the sessions currently held in server 
memory?

My application is tracking users in a database table.  Upon login, I 
log the session id along with a timestamp and other pertinent 
information.  If the user specifically clicks the "log out" button, I 
can update my table with another timestamp, but I assume many will 
simply timeout.  How do I update my table with their logout timestamp 
in the event of timeout?  I was hoping to make a simple maintenance 
thread in the background that would check existing sessions against my 
database table for this purpose.

Thanks in advance,
Mark
-
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]






--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Setup Default Context to point to specific webapp

2003-07-09 Thread David Nelson
Thanks for the quick reply John.  

I have commented out the listener so we have the auto-generation straight, now I added 
a JkMount / ajp13
thinking that would map to my context in server.xml.  However, when I try 
www.mysight.com/ I receive a 404 
The requested resource (/) is unavailable. 

Additionally, I have the following in server.xml:


This seems like a similar phenomenon to the email:
Subject: Re: setting up a root servlet / getting images to appear in Tomcat 4.1.24

I'm staring at a Tomcat manual right now and am missing the forest for the trees.  
Could anyone be more specific in the way you might configure the server.xml file?

Thanks for your help,
-Dave

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:07 PM
To: Tomcat Users List
Subject: Re: Setup Default Context to point to specific webapp



If its causing a problem for you, skip the auto generation and modify 
httpd.conf by hand.  The auto generation only works for the simplest of 
configurations, anyway.

John

On Wed, 9 Jul 2003 14:04:18 -0500, David Nelson <[EMAIL PROTECTED] 
ind.com> wrote:

> I realize this may seem terribly simple to a few of you but I have yet to 
> tweak my server.xml to generate a mod_jk.conf that will correctly handle 
> the www.mysight.com/ address.
>
> What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively 
> communicating at this point via mod_jk I think.
>
> On a side note, I did not configure my apache to support ssl when I 
> installed it initially.  Now I need SSL and having a bit of difficulty 
> deciphering the docs.  Once I install OpenSSL in a dir, what do i add to 
> httpd.conf?
>
> Thanks,
> Dave
>
> -Original Message-
> From: Turansky, Mark [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 3:33 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: How do I determine sessions within Tomcat?
>
>
> ok, I see th session listener interface in the javadocs as well as the 
> session event class.  any advice regarding *how* I plug it into tomcat?  
> Is your method a standard J2EE solution or will this be Tomcat specific?
>
> thanks for the quick reply,
> mark
>
>
> -Original Message-
> From: Mark W. Webb [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 4:30 PM
> To: Tomcat Users List
> Subject: Re: How do I determine sessions within Tomcat?
>
>
> you would probably want to write a SessionListener, and plug it into 
> tomcat.
>
> Turansky, Mark wrote:
>
>> I am required to track users and their sessions in my web application.  
>> Is there a way to access all the sessions currently held in server 
>> memory?
>>
>> My application is tracking users in a database table.  Upon login, I log 
>> the session id along with a timestamp and other pertinent information.  
>> If the user specifically clicks the "log out" button, I can update my 
>> table with another timestamp, but I assume many will simply timeout.  
>> How do I update my table with their logout timestamp in the event of 
>> timeout?  I was hoping to make a simple maintenance thread in the 
>> background that would check existing sessions against my database table 
>> for this purpose.
>>
>> Thanks in advance,
>> Mark
>>
>> -
>> 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]
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

-
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: setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread John Turner
Just so I'm clearyou want to deliver the images via the servlet?  I'm 
missing why you have to declare the MIME types of images at all...Tomcat is 
perfectly capable of serving them in a standard HTTP/1.1 manner without any 
intervention from a servlet, and without any additional configuration.

John

On Wed, 9 Jul 2003 15:19:48 -0400, Mark Biciunas <[EMAIL PROTECTED]> 
wrote:

This email formally presents what I have learned over the past couple 
days
about setting up a servlet to be accessed as root (ie: www.myservlet.com
instead of www.myservlet.com/somepath) without loosing access to images 
and
other mime types.  It is based primarily on advice received from Bill 
Barker
and Stefan Radzom as well as the hints and suggestions of many others.  
As
you are looking at this solution, please bear in mind that I am not an
expert in Tomcat configuration and there is likely a lot of things I have
missed.  I welcome any additional advice / corrections people have to 
offer.

Setting up a servlet to be accessed without a path (ie: 
www.myservlet.com)
is fairly easy if you pay attention to a couple of extra steps.  First 
this
is to deploy your application in the webapps directory as usual (ie:
webapps/myservlet).  Next, update conf/servlet.xml so that you have a 
root
context that looks like:



This will tell tomcat to serve ALL incoming requests to your servlet,
including requests for images, etc.  If your servlet is not set up to 
handle
mime types, then your images, etc. will seem to disappear.  To make sure 
the
images, etc. are handled correctly, you need to map them out in your
WEB-INF/web.xml as follows:


myservlet
mypackage.MyServlet


myservlet
/


default
*.gif


default
*.jpg

What is happining here in the first two sections is that you have 
identified
the servlet class and mapping for your servlet.  This is more or less the
same as you would do for any servlet.  If you do nothing more than this,
your servlet will (should) work, but you will not see any images since
picture.gif would match to a url-pattern of "/" and get sent to your 
servlet
for processing.

In the second two sections, we are telling Tomcat that anything that 
matches
a pattern of *.gif or *.jpg should be sent to the default servlet.  Now 
any
requests that match *.gif or *.jpg will be handled correctly.  If you 
need
to support more mime types, simply create more servlet mappings.

Where did the default servlet come from?  It is already configured in
conf/web.xml.  Remember that conf/web.xml is automatically read before 
your
WEB-INF/web.xml  so it can do it's thing without you having to worry 
about
it at all.  The trick is to use url-patterns to send requests back to the
default servlet so that they don't end up in your servlet.

The above solution will work great as long as you don't have to many mime
types to deal with.  If you need to handle lots of diferent types of
requests, then Bill Barker presented the following alternate solution 
which
involves changing your servlet code to redirect requests:

URL file = getServletContext().getResource(request.getPathInfo());
if( file != null ) { // physical resource exists
RequestDispatcher rd =
getServletContext().getNamedDispatcher("default");
rd.forward(request, response);
return;
}
// Your code here.
I have not tried this solution so I do not know to much about it.  It 
seems
staightforward enough though, so I would expect it to work great.

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



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


setting up a root servlet / getting images to appear in Tomcat 4.1.24

2003-07-09 Thread Mark Biciunas
This email formally presents what I have learned over the past couple days
about setting up a servlet to be accessed as root (ie: www.myservlet.com
instead of www.myservlet.com/somepath) without loosing access to images and
other mime types.  It is based primarily on advice received from Bill Barker
and Stefan Radzom as well as the hints and suggestions of many others.  As
you are looking at this solution, please bear in mind that I am not an
expert in Tomcat configuration and there is likely a lot of things I have
missed.  I welcome any additional advice / corrections people have to offer.


Setting up a servlet to be accessed without a path (ie: www.myservlet.com)
is fairly easy if you pay attention to a couple of extra steps.  First this
is to deploy your application in the webapps directory as usual (ie:
webapps/myservlet).  Next, update conf/servlet.xml so that you have a root
context that looks like:



This will tell tomcat to serve ALL incoming requests to your servlet,
including requests for images, etc.  If your servlet is not set up to handle
mime types, then your images, etc. will seem to disappear.  To make sure the
images, etc. are handled correctly, you need to map them out in your
WEB-INF/web.xml as follows:


myservlet
mypackage.MyServlet



myservlet
/



default
*.gif



default
*.jpg


What is happining here in the first two sections is that you have identified
the servlet class and mapping for your servlet.  This is more or less the
same as you would do for any servlet.  If you do nothing more than this,
your servlet will (should) work, but you will not see any images since
picture.gif would match to a url-pattern of "/" and get sent to your servlet
for processing.

In the second two sections, we are telling Tomcat that anything that matches
a pattern of *.gif or *.jpg should be sent to the default servlet.  Now any
requests that match *.gif or *.jpg will be handled correctly.  If you need
to support more mime types, simply create more servlet mappings.

Where did the default servlet come from?  It is already configured in
conf/web.xml.  Remember that conf/web.xml is automatically read before your
WEB-INF/web.xml  so it can do it's thing without you having to worry about
it at all.  The trick is to use url-patterns to send requests back to the
default servlet so that they don't end up in your servlet.

The above solution will work great as long as you don't have to many mime
types to deal with.  If you need to handle lots of diferent types of
requests, then Bill Barker presented the following alternate solution which
involves changing your servlet code to redirect requests:

 URL file = getServletContext().getResource(request.getPathInfo());
 if( file != null ) { // physical resource exists
   RequestDispatcher rd =
getServletContext().getNamedDispatcher("default");
   rd.forward(request, response);
   return;
}
// Your code here.

I have not tried this solution so I do not know to much about it.  It seems
staightforward enough though, so I would expect it to work great.


Mark Biciunas
[EMAIL PROTECTED]


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



Re: Setup Default Context to point to specific webapp

2003-07-09 Thread John Turner
If its causing a problem for you, skip the auto generation and modify 
httpd.conf by hand.  The auto generation only works for the simplest of 
configurations, anyway.

John

On Wed, 9 Jul 2003 14:04:18 -0500, David Nelson <[EMAIL PROTECTED] 
ind.com> wrote:

I realize this may seem terribly simple to a few of you but I have yet to 
tweak my server.xml to generate a mod_jk.conf that will correctly handle 
the www.mysight.com/ address.

What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively 
communicating at this point via mod_jk I think.

On a side note, I did not configure my apache to support ssl when I 
installed it initially.  Now I need SSL and having a bit of difficulty 
deciphering the docs.  Once I install OpenSSL in a dir, what do i add to 
httpd.conf?

Thanks,
Dave
-Original Message-
From: Turansky, Mark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 3:33 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: How do I determine sessions within Tomcat?
ok, I see th session listener interface in the javadocs as well as the 
session event class.  any advice regarding *how* I plug it into tomcat?  
Is your method a standard J2EE solution or will this be Tomcat specific?

thanks for the quick reply,
mark
-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 4:30 PM
To: Tomcat Users List
Subject: Re: How do I determine sessions within Tomcat?
you would probably want to write a SessionListener, and plug it into 
tomcat.

Turansky, Mark wrote:

I am required to track users and their sessions in my web application.  
Is there a way to access all the sessions currently held in server 
memory?

My application is tracking users in a database table.  Upon login, I log 
the session id along with a timestamp and other pertinent information.  
If the user specifically clicks the "log out" button, I can update my 
table with another timestamp, but I assume many will simply timeout.  
How do I update my table with their logout timestamp in the event of 
timeout?  I was hoping to make a simple maintenance thread in the 
background that would check existing sessions against my database table 
for this purpose.

Thanks in advance,
Mark
-
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]



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat Virtual Directory

2003-07-09 Thread Jeremy Nix
In IIS it is possible to specify a "virtual directory" within a given
virtual server that maps a directory under the website to a specific
directory.  Well, I have a need to create this type of functionality for
a specific webapp only.  So that when you go to
Http://localhost/WEB_APP/DIR, then the docBase for that directory will
be, in my instance, outside of the webapp directory structure.  Anybody
ever come across this need?

_
Jeremy Nix
Senior Application Developer
Southwest Financial Ltd.
[EMAIL PROTECTED]
(513) 621-6699 ext 1158



Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
Mike,

Thanks for your time on this, you have been very helpful.

I will post the solution here, if I ever get it working.

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Setup Default Context to point to specific webapp

2003-07-09 Thread David Nelson
I realize this may seem terribly simple to a few of you but I have yet to tweak my 
server.xml to generate a mod_jk.conf that will correctly handle the www.mysight.com/ 
address.

What am I missing?  I do have tomcat 4.1.18 and Apache2 relatively communicating at 
this point via mod_jk I think.

On a side note, I did not configure my apache to support ssl when I installed it 
initially.  Now I need SSL and having a bit of difficulty deciphering the docs.  Once 
I install OpenSSL in a dir, what do i add to httpd.conf?

Thanks,
Dave

-Original Message-
From: Turansky, Mark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 3:33 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: How do I determine sessions within Tomcat?


ok, I see th session listener interface in the javadocs as well as the session event 
class.  any advice regarding *how* I plug it into tomcat?  Is your method a standard 
J2EE solution or will this be Tomcat specific?

thanks for the quick reply,
mark


-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 4:30 PM
To: Tomcat Users List
Subject: Re: How do I determine sessions within Tomcat?


you would probably want to write a SessionListener, and plug it into tomcat.

Turansky, Mark wrote:

>I am required to track users and their sessions in my web application.  Is there a 
>way to access all the sessions currently held in server memory?
>
>My application is tracking users in a database table.  Upon login, I log the session 
>id along with a timestamp and other pertinent information.  If the user specifically 
>clicks the "log out" button, I can update my table with another timestamp, but I 
>assume many will simply timeout.  How do I update my table with their logout 
>timestamp in the event of timeout?  I was hoping to make a simple maintenance thread 
>in the background that would check existing sessions against my database table for 
>this purpose.
>
>Thanks in advance,
>Mark
>
>-
>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]



RES: RES: [off-topic] - Where can i find Oreilly's package for uploadi ng fi les?

2003-07-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
thank you too.

-Mensagem original-
De: John Turner [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 9 de julho de 2003 15:54
Para: Tomcat Users List
Assunto: Re: RES: [off-topic] - Where can i find Oreilly's package for
uploadi ng fi les?



http://www.servlets.com/cos/index.html

John

On Wed, 9 Jul 2003 15:27:38 -0300, Jose Euclides da Silva Junior - 
DATAPREVRJ <[EMAIL PROTECTED]> wrote:

> I am not looking for examples, just the own package.
> Euclides.
>
> -Mensagem original-
> De: Rick Roberts [mailto:[EMAIL PROTECTED]
> Enviada em: quarta-feira, 9 de julho de 2003 15:33
> Para: Tomcat Users List
> Assunto: Re: [off-topic] - Where can i find Oreilly's package for
> uploading fi les?
>
>
> Not sure if this is what you are after but:
> There is a MultiPartRequest Class in the "Java Servlet Programming" Book.
>
> http://examples.oreilly.com/jservlet2/
>
> HTH,
>
> Rick
>
> Jose Euclides da Silva Junior - DATAPREVRJ wrote:
>> Hi, i have tried to search for , but i didnt find it. Can somebody help
> me?
>> Thanks in advance,
>> Euclides.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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



ROOT context fails to use mail/Session Resource param. defaults to localhost

2003-07-09 Thread Raimee Stevens

I am not able to use the JNDI mail Factory from the ROOT context. It works when

run from the examples context and other non-ROOT contexts as well. For some reason,

the ROOT context fails to correctly load the SMTP host variable defined by the JNDI

resource in the server.xml(below). It does however register in the Context log (below) 
with the correct value.

> Exception Log 

ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested 
exception is: javax.mail.MessagingException: Could not connect to SMTP host: 
localhost, port: 25; nested exception is: java.net.ConnectException: Connection 
refused: connect 

javax.mail.SendFailedException: Sending failed;  nested exception is:   
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;  
nested exception is:   java.net.ConnectException: Connection refused: connect  at 
javax.mail.Transport.send0(Transport.java:219)   at 
javax.mail.Transport.send(Transport.java:81) at 
SendMailServlet.doPost(SendMailServlet.java:75)  at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)  
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)  
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)  at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)  
  at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)  
  at
 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:376) at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)  at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:221)  
  at
 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)  at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)  at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)   
at java.lang.Thread.run(Thread.java:536)

> web.xml



ROOT Context





SendMailServlet

SendMailServlet





SendMailServlet

/SendMailServlet





mail/Session

javax.mail.Session

Container







>server.xml

 











mail.smtp.host









>Context FileLogger output shows that JNDI naming context was correctly initialized 
>with correct host name: ()

2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: Creating JNDI 
naming context
2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]:   Resource 
parameters for mail/Session = ResourceParams[name=mail/Session, 
parameters={mail.smtp

Re: RES: [off-topic] - Where can i find Oreilly's package for uploadi ng fi les?

2003-07-09 Thread John Turner
http://www.servlets.com/cos/index.html

John

On Wed, 9 Jul 2003 15:27:38 -0300, Jose Euclides da Silva Junior - 
DATAPREVRJ <[EMAIL PROTECTED]> wrote:

I am not looking for examples, just the own package.
Euclides.
-Mensagem original-
De: Rick Roberts [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 9 de julho de 2003 15:33
Para: Tomcat Users List
Assunto: Re: [off-topic] - Where can i find Oreilly's package for
uploading fi les?
Not sure if this is what you are after but:
There is a MultiPartRequest Class in the "Java Servlet Programming" Book.
http://examples.oreilly.com/jservlet2/

HTH,

Rick

Jose Euclides da Silva Junior - DATAPREVRJ wrote:
Hi, i have tried to search for , but i didnt find it. Can somebody help
me?
Thanks in advance,
Euclides.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Still need help with JDBCRealm

2003-07-09 Thread Mike Curwen
That's quite odd. 

http://forum.java.sun.com/thread.jsp?forum=427&thread=394938&message=171
3354#1713354

That thread talks about 'problems' with the Connector itself.  Perhaps
its worth investigating if the settings proposed there can help you..
 
http://www.javalobby.com/threadMode_printfriendly.jsp?forum=76&thread=63
52

That thread shows that a previous error was thrown, and then the
connector threw an error.  Is there anything "below" the one error?

Also.. just for the heck of it... could it be a problem with finding a
jdbc driver ?  If you only have classes12.jar in WEB-INF/lib, would the
connector be able to find it there?  You'd think it would throw a
ClassNotFound or other SQLException but who knows.
 
Have you tried removing the response.encodeURL and just using
j_security_check ?

Finally, I think one of the reasons I used BASIC AUTH was because 2
years ago I was also having troubles with FORM Based.  I seem to recall
some quirky behaviour with j_security_check, and I found a link
describing what I remember having trouble with.
http://www.jboss.org/thread.jsp?forum=49&thread=4235

The problem description is a ways down, posted by 'svaret'. 

Beyond those suggestions, I'm at a loss.  

> -Original Message-
> From: Rick Roberts [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 12:28 PM
> To: Tomcat Users List
> Subject: Re: Still need help with JDBCRealm
> 
> 
> Mike Curwen wrote:
> > Someone else on this list had a similar problem with NPE's being 
> > thrown by Coyote.  His developers insisted it wasn't their 
> code, and 
> > that it had to be coyote causing the trouble. I sympathize 
> with that 
> > position, because on that stack trace, and on yours, there is only 
> > org.apache classes throwing Exceptions.
> >  
> > Can you try running Tomcat on 8080, and not use Apache web 
> server as a 
> > front-end?  If that works, and adding Apache back in causes 
> a problem, 
> > then we'll be closer to confirming the cause of the NPE.
> 
> "http://localhost:8080/hd"; brings up the /hd app.
> The error message is the same.
> 
> However; it appears to progress a bit further in the browser.
> I am trying to use Form Based AUTH with my form as follows:
> 
> <[EMAIL PROTECTED] contentType="text/html"%>
> 
> 
> Login
> 
> 
>   cellspcacing="5">
>  
>  Username:
>  
>  
>  
>  Password:
>   name="j_passsword">
>  
>  
>  
>  
>  
> 
> 
> 
> 
> 
> The application correctly passes me to 
> "http://localhost:8080/hd/login.jsp";
> 
> If I type a bogus ID and any password the application 
> correctly passes me to "http://localhost:8080/hd/login_error.jsp";
> 
> However; If I type a valid ID and any password the 
> application passes me to 
> "http://localhost:8080/hd/j_security_check"; and generates the 
> following error message:
> 
> 2003-07-09 13:25:21 CoyoteAdapter An exception or error 
> occurred in the container during the request processing 
> java.lang.NullPointerException
>  at 
> org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
>  at 
> org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
>  at 
> org.apache.catalina.authenticator.FormAuthenticator.authentica
> te(Unknown Source)
>  at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unk
> nown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardContext.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
>  at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
>  at 
> org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>  at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:223)
>  at 
> org.apache.c

Re: determining version of mod_jk.so

2003-07-09 Thread John Turner
The "2.0.43" is an Apache version, it has nothing to do with the version of 
the actual connector source.

You can have a connector that is version 2.0.2, for example, that is 
compiled for Apache 2.0.40, .43, .44, and .46.  The convention when 
delivering the binaries, then, is to tag the .so file with the appropriate 
version of Apache needed to load it.  The Apache modules, especially pre- 
.44, are Apache version sensitive.  You can't use one .so file in place of 
another, so you need some way to differentiate between them.  Using the 
connector source version won't do it.

John

On Wed, 09 Jul 2003 13:41:18 -0400, Rick Roberts <[EMAIL PROTECTED]> 
wrote:

However; I did a 'strings mod_jk2-2.0.43.so'

and found:

mod_jk2/2.0.0

Check to see if your mod_jk2.so is a sym link.
Mine is linked to mod_jk2-2.0.43.so


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Where can I download latest mod_jk2.so?

2003-07-09 Thread Eric J. Pinnell
Hi,

It's the latest pre-built binary (Oct of 2002).  Which isn't very new.

You could compile 2.0.2.

-e

On Wed, 9 Jul 2003, Rick Roberts wrote:

> Thanks.
>
> It looks like mod_jk2-2.0.43.so is the latest for Linux.
> So, maybe I am current after all.
>
> --
> ***
> * Rick Roberts*
> * Advanced Information Technologies, Inc. *
> ***
>
>
> -
> 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]



RES: [off-topic] - Where can i find Oreilly's package for uploading files?

2003-07-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
thanks.

-Mensagem original-
De: Mike Curwen [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 9 de julho de 2003 15:39
Para: 'Tomcat Users List'
Assunto: RE: [off-topic] - Where can i find Oreilly's package for
uploading files?


www.servlets.com/cos


> -Original Message-
> From: Jose Euclides da Silva Junior - DATAPREVRJ 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 1:02 PM
> To: '[EMAIL PROTECTED]'
> Subject: [off-topic] - Where can i find Oreilly's package for 
> uploading files?
> 
> 
> Hi, i have tried to search for , but i didnt find it. Can 
> somebody help me? Thanks in advance, Euclides.
> 
> -
> 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: [off-topic] - Where can i find Oreilly's package for uploading files?

2003-07-09 Thread Mike Curwen
www.servlets.com/cos


> -Original Message-
> From: Jose Euclides da Silva Junior - DATAPREVRJ 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 1:02 PM
> To: '[EMAIL PROTECTED]'
> Subject: [off-topic] - Where can i find Oreilly's package for 
> uploading files?
> 
> 
> Hi, i have tried to search for , but i didnt find it. Can 
> somebody help me? Thanks in advance, Euclides.
> 
> -
> 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: Where can I download latest mod_jk2.so?

2003-07-09 Thread Rick Roberts
Thanks.

It looks like mod_jk2-2.0.43.so is the latest for Linux.
So, maybe I am current after all.
--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RES: [off-topic] - Where can i find Oreilly's package for uploading fi les?

2003-07-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
I am not looking for examples, just the own package.
Euclides.

-Mensagem original-
De: Rick Roberts [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 9 de julho de 2003 15:33
Para: Tomcat Users List
Assunto: Re: [off-topic] - Where can i find Oreilly's package for
uploading fi les?


Not sure if this is what you are after but:
There is a MultiPartRequest Class in the "Java Servlet Programming" Book.

http://examples.oreilly.com/jservlet2/

HTH,

Rick

Jose Euclides da Silva Junior - DATAPREVRJ wrote:
> Hi, i have tried to search for , but i didnt find it. Can somebody help
me?
> Thanks in advance,
> Euclides.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


-
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: [off-topic] - Where can i find Oreilly's package for uploadingfi les?

2003-07-09 Thread Rick Roberts
Not sure if this is what you are after but:
There is a MultiPartRequest Class in the "Java Servlet Programming" Book.
http://examples.oreilly.com/jservlet2/

HTH,

Rick

Jose Euclides da Silva Junior - DATAPREVRJ wrote:
Hi, i have tried to search for , but i didnt find it. Can somebody help me?
Thanks in advance,
Euclides.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: session replication using JavaGroups

2003-07-09 Thread YErkan

For the record :-)

It seems to be a hardware hub problem. The machines on the same hub can
communicate with each other but not with the other ones... Strange...

 -> Yagiz




|-+>
| |   [EMAIL PROTECTED]   |
| ||
| |   07/09/2003 07:01 |
| |   PM   |
| |   Please respond to|
| |   "Tomcat Users|
| |   List"|
| ||
|-+>
  
>--|
  |
  |
  |   To:   "Tomcat Users List" <[EMAIL PROTECTED]>
 |
  |   cc:  
  |
  |   Subject:  session replication using JavaGroups   
  |
  
>--|





We're having some problems in our session replication using Javagroups. It seems
that it works on our Win2000 Workstations however not on our Win2000 Servers. Do
you have any ideas why?

Cheers,

 -> Yagiz



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



AJP13 error: No processor available

2003-07-09 Thread Benjamin Cox
Hello,
 Tomcat 4.1.24, J2SDK 1.4.0, Apache 1.3.27, mod_jk 1.2.0.
 I am trying to determine the cause of the following errors:
Ajp13Connector[8009]: No processor available, rejecting this connection

 This seems to come up after a few days, causes the page to come back 
as an "Internal Server Error", and is not the only error in the log 
file.  The other error, which appears to be coming up in response to 
resp.sendRedirect(), is something I've seen on this list a few times, 
with no solution yet:

java.lang.IllegalStateException: Current state = FLUSHED, new state = 
CODING_END
   at 
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933)
   at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
   at 
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356) 

   at 
sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
   at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
   at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
   at java.io.PrintWriter.close(PrintWriter.java:137)
   at 
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:482)
   at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
   at 
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:190)
   at 
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:435)
   at 
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
   at java.lang.Thread.run(Thread.java:536)

 I am currently investigating browser configurations to see if I can 
determine precisely when this happens, but I thought in the meantime I'd 
see if anyone can convincingly connect the two errors?  Is the 
IllegalStateException something to be concerned about?  Does it 
eventually lead to the "No processor" problem.  Is there a workaround? 
Why does resp.sendRedirect() seem to be the cause?
 Lots of questions;  feel free to answer selectively :-)
 Thanks for the help,

   Ben

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


Re: images not appearing

2003-07-09 Thread Mark Biciunas
Hi,

Your solution is exactly what was needed and it is the direction I ended up
going in overnight with the tender assisstance Bill Barker.  There are a
couple of tricks to getting it working correctly so I am posting a seperate
email to the group outlining what I have learned (it is definately not
intuitive).

BTW, the problem you ran into in your solution probably has to do with the
first "/" on /images/*.  I haven't checked it
yet, but images/* might work better.

Thanks to everyone for their great help!

Mark Biciunas
[EMAIL PROTECTED]
- Original Message -
From: "Stefan Radzom" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 10:25 AM
Subject: RE: images not appearing


> >
> > I can now access the servlet successfully using the url
> > "http://192.168.1.3/test/hello";.  The problem is, I need to be able to
> > access it without supplying any path information (ie:
> > http://192.168.1.3).
> >
> > So the question now is, how can server.xml and web.xml be
> > configured to
> > allow access without any paths?  BTW, this does work in
> > earlier versions of
> > Tomcat so I would like the think it is still doable.
> >
>
> Ok, this has taken us a long way just to start from the beginning ;-)
>
> You might want to change your web.xml to something like
>
> 
> hello
> helloworld.Hello
> 
>
> 
> hello
> /
> 
>
> 
> default
> *.gif
> 
>
> 
> default
> *.jpg
> 
>
> My first thought was to apply a pattern like
> /images/* to map the entire image folder to
> default but that did not work. Maybe I am too dumb or I am completely
> missing something ;-? Somebody please give me a hint!
>
> However, another approach that has been suggested by another poster is to
> employ some filter for your request processing. Thus, you can take care of
> every incoming request and dispatch it as needed.
>
> -Stefan
>
>
>
> -
> 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]



[off-topic] - Where can i find Oreilly's package for uploading files?

2003-07-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Hi, i have tried to search for , but i didnt find it. Can somebody help me?
Thanks in advance,
Euclides.

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



Re: Where can I download latest mod_jk2.so?

2003-07-09 Thread Eric J. Pinnell
Hi,

That's mod_jk.  JK2 is on the same server, different directory

http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/

-e

On Wed, 9 Jul 2003, Maureen Barger wrote:

> http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/
>
> At 02:00 PM 7/9/2003 -0400, you wrote:
> >Just realized that I don't have latest version.
> >I can never remember where to find it.
>
> 
> Maureen Barger, CIT/ID, Cornell University
> Ithaca, NY 14850
> [EMAIL PROTECTED]
> http://mo.cit.cornell.edu/
>
> Experience is something you don't get until just after you need it.
>
>
> -
> 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: Where can I download latest mod_jk2.so?

2003-07-09 Thread Maureen Barger
oops I meant
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/
At 02:00 PM 7/9/2003 -0400, you wrote:
Just realized that I don't have latest version.
I can never remember where to find it.

Maureen Barger, CIT/ID, Cornell University
Ithaca, NY 14850
[EMAIL PROTECTED]
http://mo.cit.cornell.edu/
Experience is something you don't get until just after you need it.

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


session replication using JavaGroups

2003-07-09 Thread YErkan

We're having some problems in our session replication using Javagroups. It seems
that it works on our Win2000 Workstations however not on our Win2000 Servers. Do
you have any ideas why?

Cheers,

 -> Yagiz




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



Re: Where can I download latest mod_jk2.so?

2003-07-09 Thread Maureen Barger
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/

At 02:00 PM 7/9/2003 -0400, you wrote:
Just realized that I don't have latest version.
I can never remember where to find it.

Maureen Barger, CIT/ID, Cornell University
Ithaca, NY 14850
[EMAIL PROTECTED]
http://mo.cit.cornell.edu/
Experience is something you don't get until just after you need it.

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


Where can I download latest mod_jk2.so?

2003-07-09 Thread Rick Roberts
Just realized that I don't have latest version.
I can never remember where to find it.
Thanks,

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


installing new version of mod_jk.so

2003-07-09 Thread Maureen Barger
I am trying to download a previously compiled version of mod_jk.so for AIX 
from 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/aix/
However it seems I can't unpack it into my libexec directory and go - 
starting apache gives me errors that it cannot load this module.  Am I 
missing a step?

Maureen Barger, CIT/ID, Cornell University
Ithaca, NY 14850
[EMAIL PROTECTED]
http://mo.cit.cornell.edu/

Experience is something you don't get until just after you need it.

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


Re: determining version of mod_jk.so

2003-07-09 Thread Maureen Barger
You are correct -- you can do strings and scroll or start up apache in 
debug and it will appear in the error log file as it loads.

At 01:41 PM 7/9/2003 -0400, Rick Roberts wrote:
However; I did a 'strings mod_jk2-2.0.43.so'

and found:

mod_jk2/2.0.0

Check to see if your mod_jk2.so is a sym link.
Mine is linked to mod_jk2-2.0.43.so

Maureen Barger, CIT/ID, Cornell University
Ithaca, NY 14850
[EMAIL PROTECTED]
http://mo.cit.cornell.edu/
Experience is something you don't get until just after you need it.

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


Re: determining version of mod_jk.so

2003-07-09 Thread Eric J. Pinnell
Ya... that makes sense.  The latest release of JK2 is 2.0.2.   You could
possibly be running 2.0.0.  I don't know where it's getting 2.0.43 from...
sounds like an apache version.

-e

On Wed, 9 Jul 2003, Rick Roberts wrote:

> However; I did a 'strings mod_jk2-2.0.43.so'
>
> and found:
>
> mod_jk2/2.0.0
>
>
> Check to see if your mod_jk2.so is a sym link.
> Mine is linked to mod_jk2-2.0.43.so
>
> --
> ***
> * Rick Roberts*
> * Advanced Information Technologies, Inc. *
> ***
>
>
> -
> 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: determining version of mod_jk.so

2003-07-09 Thread Rick Roberts
However; I did a 'strings mod_jk2-2.0.43.so'

and found:

mod_jk2/2.0.0

Check to see if your mod_jk2.so is a sym link.
Mine is linked to mod_jk2-2.0.43.so
--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
Mike Curwen wrote:
Someone else on this list had a similar problem with NPE's being thrown
by Coyote.  His developers insisted it wasn't their code, and that it
had to be coyote causing the trouble. I sympathize with that position,
because on that stack trace, and on yours, there is only org.apache
classes throwing Exceptions.
 
Can you try running Tomcat on 8080, and not use Apache web server as a
front-end?  If that works, and adding Apache back in causes a problem,
then we'll be closer to confirming the cause of the NPE.
"http://localhost:8080/hd"; brings up the /hd app.
The error message is the same.
However; it appears to progress a bit further in the browser.
I am trying to use Form Based AUTH with my form as follows:
<[EMAIL PROTECTED] contentType="text/html"%>


Login





Username:



Password:









The application correctly passes me to "http://localhost:8080/hd/login.jsp";

If I type a bogus ID and any password the application correctly passes me
to "http://localhost:8080/hd/login_error.jsp";
However; If I type a valid ID and any password the application passes me to
"http://localhost:8080/hd/j_security_check"; and generates the following error message:
2003-07-09 13:25:21 CoyoteAdapter An exception or error occurred in the container 
during the request processing
java.lang.NullPointerException
at org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
at org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Unknown 
Source)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: sharing objects betweeen different contexts (Long)

2003-07-09 Thread Cox, Charlie
put your shared class in /common/lib and each webapp will be able to see it.

Charlie

> -Original Message-
> From: RANDAD,KAILASH (HP-PaloAlto,ex1) [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 3:17 PM
> To: 'Tomcat Users List'
> Subject: RE: sharing objects betweeen different contexts (Long)
> 
> 
> Hi
> Different web applications will get loaded from different 
> class loader, so
> you are getting this exception. 
> Regards
> KP
> 
> -Original Message-
> From: laurent marot [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 12:12 PM
> To: Tomcat Users List
> Subject: sharing objects betweeen different contexts (Long)
> 
> 
> Hi all,I'm trying to create an object in a Jsp page in an 
> application named
> AppA and get it back in another page in AppB.When i made a test with
> String="my data to share" everything works properly but when 
> i try to create
> a User Objets (simple java class in MyPackage package) i get a Cast
> Exception in the receiver page.any idea to solve this problemThanks a
> lot.Platform : tomcat 4.1.24 on windows2000 with JDK
> 1.4.1/AppA/contextAUser.jsp page :<%@ page 
> import="java.util.*, myPackage.*"
> %><%  out.println(session.getId());String sessionid = 
> session.getId();String
> datas="my datas to share";User user = new User("myName", "myRole");
> ServletContext context=session.getServletContext();Hashtable 
> shareddata =
> (Hashtable)context.getAttribute("user");if (shareddata==null) 
> shareddata =
> new Hashtable();//shareddata.put(sessionid, 
> datas);shareddata.put(sessionid,
> user);context.setAttribute("user", shareddata);%> href="/AppB/contextBUser.jsp?jsessionid=<%=session.getId()%>"
> target="blank">Got to B 
> appplication/AppB/contextBUesr.jsp page :<%@
> page import="java.util.*,myPackage.*"%><%  String
> ssosessionid=request.getParameter("jsessionid");out.println(se
> ssion.getId())
> ;ServletContext context=session.getServletContext();String
> SignonContext="/wisd";ServletContext ssocontext =
> context.getContext(SignonContext);if (ssocontext==null) 
> out.println("no
> context !");String userroles = null;User user = 
> null;Hashtable shareddata =
> null;shareddata = (Hashtable)ssocontext.getAttribute("user");if
> (shareddata!=null) { //userroles = 
> (String)shareddata.get(ssosessionid);
> user = (User)shareddata.get(ssosessionid);
> out.println(user.getUserId());}else out.println("no context
> !");%>org.apache.jasper.JasperException
>   at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:2
> 48)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:295)
>   at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
>   at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:260)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:191)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2415)
>   at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180
> )
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>   at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.
> java:170)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>   at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:172
> )
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>   at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:509)
>   at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>   at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>   at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:

Re: Error Msg "The requested resource (/ABT/servlet/ChangeModel)is not available"

2003-07-09 Thread Tim Funk
Probably: http://jakarta.apache.org/tomcat/faq/misc.html#invoker

[EMAIL PROTECTED] wrote:
Hello,

 

I am getting the following error message: "The requested resource
(/ABT/servlet/ChangeModel) is not available" when I try to run a servlet
from my web application.  I have my form's action property pointed to
http://server_name/ABT/servlet/ChangeModel.  My class file, ChangeModel,
exists in /webapps/ABT/WEB-INF/classes/.  I am running Tomcat 4.1.  I
have tried searching the web for this type of error, but nothing
successful has come back to me.
  


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


Error Msg "The requested resource (/ABT/servlet/ChangeModel) is not available"

2003-07-09 Thread TWesterman
Hello,

 

I am getting the following error message: "The requested resource
(/ABT/servlet/ChangeModel) is not available" when I try to run a servlet
from my web application.  I have my form's action property pointed to
http://server_name/ABT/servlet/ChangeModel.  My class file, ChangeModel,
exists in /webapps/ABT/WEB-INF/classes/.  I am running Tomcat 4.1.  I
have tried searching the web for this type of error, but nothing
successful has come back to me.

 

Any suggestions?

 

Thanks,

 

Todd Westerman



Re: determining version of mod_jk.so

2003-07-09 Thread Eric J. Pinnell
Hi,

I don't know if there is an "official" way but I did a

'strings mod_jk2.so'

and found:

mod_jk2/2.0.2

YMMV.

-e

On Wed, 9 Jul 2003, Maureen Barger wrote:

> can someone remind me how to do this under unix? 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: Still need help with JDBCRealm

2003-07-09 Thread Mike Curwen
Someone else on this list had a similar problem with NPE's being thrown
by Coyote.  His developers insisted it wasn't their code, and that it
had to be coyote causing the trouble. I sympathize with that position,
because on that stack trace, and on yours, there is only org.apache
classes throwing Exceptions.
 
Can you try running Tomcat on 8080, and not use Apache web server as a
front-end?  If that works, and adding Apache back in causes a problem,
then we'll be closer to confirming the cause of the NPE.

> -Original Message-
> From: Rick Roberts [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 12:02 PM
> To: Tomcat Users List
> Subject: Re: Still need help with JDBCRealm
> 
> 
> If there is a DUNCE of the Week Award, can I apply now!
> 
> Changing the Realm to  "No Realm has been configured to authenticate against"
> 
> But now I have progressed to this error:
> 
> [EMAIL PROTECTED] tomcat4]# tail -300 catalina_log.2003-07-09.txt 
> 2003-07-09 12:53:36 CoyoteAdapter An exception or error 
> occurred in the container during the request processing 
> java.lang.NullPointerException
>  at 
> org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
>  at 
> org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
>  at 
> org.apache.catalina.authenticator.FormAuthenticator.authentica
> te(Unknown Source)
>  at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unk
> nown Source)
>  at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown Source)
> etc..


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



determining version of mod_jk.so

2003-07-09 Thread Maureen Barger
can someone remind me how to do this under unix? thanks.

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


Re: Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
If there is a DUNCE of the Week Award, can I apply now!

Changing the Realm to 
But now I have progressed to this error:

[EMAIL PROTECTED] tomcat4]# tail -300 catalina_log.2003-07-09.txt
2003-07-09 12:53:36 CoyoteAdapter An exception or error occurred in the container 
during the request processing
java.lang.NullPointerException
at org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
at org.apache.catalina.realm.JDBCRealm.authenticate(Unknown Source)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Unknown 
Source)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)


Any suggestions?

Thanks,

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How can I deactivate the access logging

2003-07-09 Thread Simon Pabst
Look for a xml entry with org.apache.catalina.valves.AccessLogValve then 
comment it out.
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html)

At 15:37 09.07.2003 +0200, you wrote:
Hi,
i have noticed that tomcat logs all calls to the file localhost_access_log.
Is it possible to deactivate this feature ?
Best regards

anis


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


RE: Still need help with JDBCRealm

2003-07-09 Thread Mike Curwen
Also,  

> -Original Message-
> From: Rick Roberts [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 11:32 AM
> To: Tomcat Users List
> Subject: Still need help with JDBCRealm
> 
> 
> Of the several applications running on this server,
> I am only trying to apply a JDBCRealm to the /hd application 
> initially. Once I get it working on one application, then I 
> want to apply JDBCRealm to all of my apps.
> 

>From the Tomcat docs:

The  element can be nested inside one of three 
different elements, which has a direct impact on the "scope" 
of that Realm (i.e. which web applications will share the 
same authentication information): 

 * Inside an  element - This Realm will be shared 
   across ALL web applications on ALL virtual hosts, UNLESS 
   it is overridden by a Realm element nested inside a 
   subordinate  or  element. 
 * Inside a  element - This Realm will be shared across
   ALL web applications for THIS virtual host, UNLESS it is 
   overridden by a Realm element nested inside a subordinate 
element. 
 * Inside a  element - This Realm will be used ONLY 
   for THIS web application


So in your server.xml , your Realm is inside the engine, and *could* be
used for any of the contexts defined there. If only the /hd application
makes use of authentication, then this is fine.  But if you wanted
*only* the /hd application to be *able* to use this JDBC Realm, then
you'd need to define the Realm element inside the context for /hd.  I
think you understand that though, but I'm just making sure.

>  
> 
>
>prefix="catalina_log." suffix=".txt"
>timestamp="true"/>
>
>  
> 
>
> unpackWARs="true" autoDeploy="true">
> 
>directory="logs"  
>  prefix="localhost_log." 
>  suffix=".txt"
>timestamp="true"/>
> 
>  
> reloadable="true"
>   crossContext="true">
>prefix="nsfs_log." suffix=".txt" timestamp="true"/>
>  
> 
>  
>crossContext="true">
>prefix="hd_log." suffix=".txt" timestamp="true"/>
>   
>   connectionName="AI_DBA"
>   connectionPassword="SUKHOI"
>   connectionURL="jdbc:oracle:thin:@sukoi:1521:orcl"
>   driverName="oracle.jdbc.driver.OracleDriver"
>   userTable="REALM_USER"
>   userNameCol="LOGIN"
>   userCredCol="PASSWORD"
>   userRoleTable="REALM_ROLE"
>   roleNameCol="ROLE"
>/>
>  
> 
>  
> reloadable="true"
>   crossContext="true">
>prefix="sqledit_log." 
>  suffix=".txt" 
>timestamp="true"/>
>  
> 
>  
>crossContext="true">
>prefix="ai_log." suffix=".txt" timestamp="true"/>
>  
> 
>
> 
>  
> 


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



Re: I can no longer start TC from W2k Start Menu

2003-07-09 Thread ThePrahs
Sorry, it was a mistake from me :-)


RE: Still need help with JDBCRealm

2003-07-09 Thread Mike Curwen
I always thought it was just a cut error (typo), but you need a < at the
start of your Realm
 
Actually, if your file is *exactly* as shown, I'm surprised it doesn't
complain loudly.



> -Original Message-
> From: Rick Roberts [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 11:32 AM
> To: Tomcat Users List
> Subject: Still need help with JDBCRealm
> 
>Realm className="org.apache.catalina.realm.JDBCRealm"
>   connectionName="AI_DBA"
>   connectionPassword="SUKHOI"
>   connectionURL="jdbc:oracle:thin:@sukoi:1521:orcl"
>   driverName="oracle.jdbc.driver.OracleDriver"
>   userTable="REALM_USER"
>   userNameCol="LOGIN"
>   userCredCol="PASSWORD"
>   userRoleTable="REALM_ROLE"
>   roleNameCol="ROLE"
>/>
> 


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



RE: I can no longer start TC from W2k Start Menu

2003-07-09 Thread Mike Curwen
Is this an annoying aol thing?  Or is it a (still annoying) attempt at
soliciting more responses on this thread?
 
If it's that 2nd thing, posting the exact same message 3 times in as
many days is liable to get you the opposite of the response you want.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 11:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: I can no longer start TC from W2k Start Menu
> 
> 
> No, TC is not(or won't be) already running when I try to 
> start it from W2k 
> Start Menu. 
> 
> Might have to do with a package which either  not there or 
> conflicting the 
> TC's start-up process. What is missing or conflicting is what 
> I can not figure 
> out - the logs don't say say anything either.
> 
> Anyway suggestions will be much appreciated.
> 
> Thanks.
> 
> p.s:
> Like I mentioned earlier, I am able to start and stop TC within my IDE
> 
> 
> 


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



Re: how to create servlet?

2003-07-09 Thread Robert Wray
The SendMailServlet code should be located in 
tomcat_installation_directory\webapps\examples\WEB-INF\classes\SendMailServlet.java

The web.xml file in the WEB-INF directory should have a tags:

SendMailServlet
SendMailServlet

and

SendMailServlet
/SendMailServlet

which tell tomcat where to find the servlet when you request 
http://localhost:/examples/SendMailServlet

At 07:07 AM 09/07/2003 -0400, you wrote:
To create/use servlets, you just need to folow Sun's Servlet Specification.

http://java.sun.com/webservices/docs/1.1/tutorial/doc/
http://servlets.com/index.tea
http://moreservlets.com/
-Tim

kitty winslet wrote:
Hi..  I used the JSP example in my newly setup Tomcat server to send mail.
http://localhost:8080/examples/jsp/mail/sendmail.jsp
and after I type in info, the mail sent successfully and it go to the 
following page.
http://localhost:/examples/SendMailServlet
I took a look on the JSP (sendmail.jsp) content and found that it is the 
following statement make the mail works.  May I know what is 
SendMailServlet? and How to create it???





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Robert Wray, Engineer
Forestry Products, Alberta Research Council
Phone: (780) 450-5045
Fax: (780) 450-5397
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Still need help with JDBCRealm

2003-07-09 Thread Rick Roberts
I have been working on this for a couple of days now.
I think I am close, but still missing something basic.
If you know how to set up a JDBCRealm, please look over
my files and error logs and tell me where I have made my mistake.
Thanks in advance for your help.
___
I have several applications on this server and I want to start using JDBCRealm for authentication.

Of the several applications running on this server,
I am only trying to apply a JDBCRealm to the /hd application initially.
Once I get it working on one application, then I want to apply JDBCRealm
to all of my apps.
I think my problem is related to this error message:
"No Realm has been configured to authenticate against"
___
From hd_log.2003-07-09.txt:
___
2003-07-09 11:39:25 WebappLoader[/hd]: Deploying class repositories to work directory 
/var/tomcat4/work/Standalone/localhost/hd
2003-07-09 11:39:25 WebappLoader[/hd]: Deploy class files /WEB-INF/classes to 
/var/tomcat4/webapps/hd/WEB-INF/classes
2003-07-09 11:39:25 WebappLoader[/hd]: Reloading checks are enabled for this Context
2003-07-09 11:39:25 ContextConfig[/hd]: No Realm has been configured to authenticate 
against
2003-07-09 11:39:25 ContextConfig[/hd]: Marking this application unavailable due to 
previous error(s)
2003-07-09 11:39:25 StandardManager[/hd]: Seeding random number generator class 
java.security.SecureRandom
2003-07-09 11:39:25 StandardManager[/hd]: Seeding of random number generator has been 
completed
2003-07-09 11:39:25 StandardContext[/hd]: Context startup failed due to previous errors
__
From catalina.out:
__
Jul 9, 2003 11:39:20 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Jul 9, 2003 11:39:20 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Jul 9, 2003 11:39:21 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Jul 9, 2003 11:39:22 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1
Jul 9, 2003 11:39:26 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Jul 9, 2003 11:39:26 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /127.0.0.1:8009
Jul 9, 2003 11:39:26 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=6/120  config=/var/tomcat4/conf/jk2.properties
__
From localhost_log.2003-07-09.txt:
__
2003-07-09 11:39:13 StandardHost[localhost]: Removing web application at context path 
/sqledit
2003-07-09 11:39:13 StandardHost[localhost]: Removing web application at context path 
/ai
2003-07-09 11:39:13 StandardHost[localhost]: Removing web application at context path
2003-07-09 11:39:13 StandardHost[localhost]: Removing web application at context path 
/hd
2003-07-09 11:39:13 StandardHost[localhost]: ContainerBase.removeChild: stop:
LifecycleException:  Container StandardContext[/hd] has not been started
at org.apache.catalina.core.StandardContext.stop(Unknown Source)
at org.apache.catalina.core.ContainerBase.removeChild(Unknown Source)
at org.apache.catalina.core.StandardHostDeployer.remove(Unknown Source)
at org.apache.catalina.core.StandardHost.remove(Unknown Source)
at org.apache.catalina.startup.HostConfig.undeployApps(Unknown Source)
at org.apache.catalina.startup.HostConfig.stop(Unknown Source)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source)
at org.apache.catalina.core.ContainerBase.stop(Unknown Source)
at org.apache.catalina.core.ContainerBase.stop(Unknown Source)
at org.apache.catalina.core.StandardService.stop(Unknown Source)
at org.apache.catalina.core.StandardServer.stop(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
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(Unknown Source)
2003-07-09 11:39:13 StandardHost[localhost]: Removing web application at context path 
/nsfs
2003-07-09 11:39:25 HostConfig[localhost]: Deploying web application directory ROOT
2003-07-09 11:39:25 StandardHost[localhost]: Installing web application at context 
path  from URL file:/var/tomcat4/webapps/ROOT

Re: I can no longer start TC from W2k Start Menu

2003-07-09 Thread ThePrahs
No, TC is not(or won't be) already running when I try to start it from W2k 
Start Menu. 

Might have to do with a package which either  not there or conflicting the 
TC's start-up process. What is missing or conflicting is what I can not figure 
out - the logs don't say say anything either.

Anyway suggestions will be much appreciated.

Thanks.

p.s:
Like I mentioned earlier, I am able to start and stop TC within my IDE




Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread John Turner
Well, sounds like you have some re-education work to do.  The whole point 
is to be portable.  Putting things your web application requires onto a 
network share (I think you mentioned V:) that won't exist anywhere else is 
not the best practice for design, especially if you have to go in and munge 
around with the startup scripts to get it to work.

If you must, I believe you can pass the parameters directly on the command 
line, such as withthe endorsed-dirs property or others, as an alternative 
to messing with CLASSPATH.

John

On Wed, 9 Jul 2003 08:40:41 -0700 (PDT), Norris Shelton 
<[EMAIL PROTECTED]> wrote:

I wish I could.  This is the architecture that I am saddled
with.  I have to find a way to make TC5 work with what is given.
--- John Turner <[EMAIL PROTECTED]> wrote:
That was my point.  JAR up your class files, and put them
where Tomcat expects them to be.  Problem solved.  People typically use 
ant
to do this, so that it is fairly automatic when deploy time comes 
around.

John

On Wed, 9 Jul 2003 08:07:58 -0700 (PDT), Norris Shelton 
<[EMAIL PROTECTED]> wrote:

> Ah, ha.  Now you are getting somewhere. The "Class Loader
> Definitions" has the following under the "System" bullet:
>
> However, the standard Tomcat 4 startup scripts
> ($CATALINA_HOME/bin/catalina.sh or
> %CATALINA_HOME%\bin\catalina.bat) totally ignore the
contents of
> the CLASSPATH environment variable itself, and instead build
the
> System class loader from the following repositories:
>
>
> This is the problem I am trying to get around.  The
additional
> libraries are not contained in any of the normal catalina
> classpaths (hence the system environment variable).  I have
it
> recognizing the external classpath, but can't find the jsp
tag
> info (and possibly more).
>
> --- John Turner <[EMAIL PROTECTED]> wrote:
>>
>> See the ClassLoader HOWTO:
>>
>>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
>>
>> specifically:
>>
>> "Shared - This class loader is the place to put classes and
>> resources that you wish to share across ALL web
applications (unless >> Tomcat
>> internal classes also need access, in which case you should
put them in
>> the Common class loader instead). All unpacked classes and
resources in >> $CATALINA_HOME/shared/classes, as well as classes and
>> resources in JAR files under $CATALINA_HOME/lib, are made
visible >> through this
>> class loader."
>>
>> John
>>
>> On Wed, 9 Jul 2003 07:50:25 -0700 (PDT), Norris Shelton >> 
<[EMAIL PROTECTED]> wrote:
>>
>> > How do you get it access items that are not within the
>> tomcat
>> > install.  I have tomcat installed locally on c:.  There
is
>> an
>> > additional library located on v: (loose classes and
jars). We
>> > could not get Tomcat to access these classes.
>> >
>> >
>> > --- John Turner <[EMAIL PROTECTED]> wrote:
>> >>
>> >> H...lots of overlap here.
>> >>
>> >> First, you shouldn't need to do ANYTHING to CLASSPATH
for
>> >> Tomcat 4.1.x and higher, especially messing around with
>> servlet.jar.
>> >>
>> >> Second, as far as where to put your servlets, try the
>> >> Application Developer's Guide here:
>> >>
>>
>

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
>> >>
>> >> as well as the Tomcat FAQ: >> >> 
http://jakarta.apache.org/tomcat/faq/misc.html#invoker
>> >>
>> >> If you want to post a specific scenario, with a specific
>> error
>> >> message, we can help, but a generic "I've tried
everything
>> and nothing
>> >> ever works" doesn't give us much to go on.
>> >>
>> >> John
>> >>
>> >> On Tue, 08 Jul 2003 15:53:23 -0400,
>> >> <[EMAIL PROTECTED]> wrote:
>> >>
>> >> > Hi, I have searched instructions and websites with no
>> real
>> >> luck on this.
>> >> >
>> >> > I've used Tomcat in production since some 3.* version
but
>> >> I've been lost > since after 4.0 about where to put a
>> simple servlet >> class or
>> >> how to > include the servlet.jar so jdk1.4 can see it.
I've created
>> >> war files as > the admin page seems to want but this
>> doesn't seem to be
>> >> working either.
>> >> > Tried every class directory I could find and still
cant
>> pull
>> >> up the > servlet from the web. (I can get the
default.jsp
>> pages
>> >> though).  Tried > making my own servlet directory in the
>> config files, >> nope,
>> >> no luck.
>> >> >
>> >> > I want to take advantage of any NIO performance
>> enhancements
>> >> or other > benefits that 5.* has to offer, please help!
>> >> >
>> >> > Thanks!
>> >> > JW
>> >> >
>> >> >
>> >>
>> >
>>
>

__
>> >> > McAfee VirusScan Online from the Netscape Network.
>> >> > Comprehensive protection for your entire computer. Get
>> your
>> >> free trial > today!
>> >> >
>> >>
>> >
>>
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>> >> >
>> >> > Get AOL Instant Messenger 5.1 free of charge. Download
>> Now!
>> >> >
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>> >> >
>> >> >
>> >>

RE: outof memory error

2003-07-09 Thread Shanta B
I hope increase the heap size does not suffice our problem because it will
effect GC in java..but surprise thing is that these outofmemory occurs in
OMIP side(this is intelligent people code ..)))because one sent log files
..out of all the processes ,outofmemory occurs in mscore and locator...
still its better to set reloadable=false in server.xml under Context Tag ...
how ur judging that we are allocating 300Mb at startup?.

-Original Message-
From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 5:50 PM
To: 'Tomcat Users List'
Subject: RE: outof memory error


Hi Shanta

You get an OutOfMemoryError when the stack or heap space is exhausted. You
can increase the heap size by setting the -Xmx option in the startserver
script, but I think it already allocates 300Mb at startup. 300Mb should be
plenty of memory for these applications, so I suspect there is a serious
memory leak.

You can use a profiling tool, such as jmeter to examine your memory.
http://jakarta.apache.org/jmeter/
Its free, but I've never used it, so I don't know how useful it will be.

Andy

-Original Message-
From: Shanta B [mailto:[EMAIL PROTECTED] 
Sent: 09 July 2003 16:09
To: Tomcat Users List
Subject: outof memory error


Hi 
   Sorry for disturbing...i would like to whats the reason behind
java.lang.outofmemory...because currently at one site we are getting these
errors in mscore and locator...what may be the reason ..how should i debug
the processes memoryif u have any idea or links u pl forward to me...in
the mean time iwill search for net alsoi hope ur not envoy with these
mails...


Thanks
shanta.B

-
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: outof memory error

2003-07-09 Thread Bodycombe, Andrew
Hi Shanta

You get an OutOfMemoryError when the stack or heap space is exhausted. You
can increase the heap size by setting the -Xmx option in the startserver
script, but I think it already allocates 300Mb at startup. 300Mb should be
plenty of memory for these applications, so I suspect there is a serious
memory leak.

You can use a profiling tool, such as jmeter to examine your memory.
http://jakarta.apache.org/jmeter/
Its free, but I've never used it, so I don't know how useful it will be.

Andy

-Original Message-
From: Shanta B [mailto:[EMAIL PROTECTED] 
Sent: 09 July 2003 16:09
To: Tomcat Users List
Subject: outof memory error


Hi 
   Sorry for disturbing...i would like to whats the reason behind
java.lang.outofmemory...because currently at one site we are getting these
errors in mscore and locator...what may be the reason ..how should i debug
the processes memoryif u have any idea or links u pl forward to me...in
the mean time iwill search for net alsoi hope ur not envoy with these
mails...


Thanks
shanta.B

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

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



Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread Norris Shelton
I wish I could.  This is the architecture that I am saddled
with.  I have to find a way to make TC5 work with what is given.


--- John Turner <[EMAIL PROTECTED]> wrote:
> 
> That was my point.  JAR up your class files, and put them
> where Tomcat 
> expects them to be.  Problem solved.  People typically use ant
> to do this, 
> so that it is fairly automatic when deploy time comes around.
> 
> John
> 
> On Wed, 9 Jul 2003 08:07:58 -0700 (PDT), Norris Shelton 
> <[EMAIL PROTECTED]> wrote:
> 
> > Ah, ha.  Now you are getting somewhere. The "Class Loader
> > Definitions" has the following under the "System" bullet:
> >
> > However, the standard Tomcat 4 startup scripts
> > ($CATALINA_HOME/bin/catalina.sh or
> > %CATALINA_HOME%\bin\catalina.bat) totally ignore the
> contents of
> > the CLASSPATH environment variable itself, and instead build
> the
> > System class loader from the following repositories:
> >
> >
> > This is the problem I am trying to get around.  The
> additional
> > libraries are not contained in any of the normal catalina
> > classpaths (hence the system environment variable).  I have
> it
> > recognizing the external classpath, but can't find the jsp
> tag
> > info (and possibly more).
> >
> > --- John Turner <[EMAIL PROTECTED]> wrote:
> >>
> >> See the ClassLoader HOWTO:
> >>
> >>
> >
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
> >>
> >> specifically:
> >>
> >> "Shared - This class loader is the place to put classes and
> >> resources that you wish to share across ALL web
> applications (unless 
> >> Tomcat
> >> internal classes also need access, in which case you should
> put them in
> >> the Common class loader instead). All unpacked classes and
> resources in 
> >> $CATALINA_HOME/shared/classes, as well as classes and
> >> resources in JAR files under $CATALINA_HOME/lib, are made
> visible 
> >> through this
> >> class loader."
> >>
> >> John
> >>
> >> On Wed, 9 Jul 2003 07:50:25 -0700 (PDT), Norris Shelton 
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >> > How do you get it access items that are not within the
> >> tomcat
> >> > install.  I have tomcat installed locally on c:.  There
> is
> >> an
> >> > additional library located on v: (loose classes and
> jars). We
> >> > could not get Tomcat to access these classes.
> >> >
> >> >
> >> > --- John Turner <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> H...lots of overlap here.
> >> >>
> >> >> First, you shouldn't need to do ANYTHING to CLASSPATH
> for
> >> >> Tomcat 4.1.x and higher, especially messing around with
> >> servlet.jar.
> >> >>
> >> >> Second, as far as where to put your servlets, try the
> >> >> Application Developer's Guide here:
> >> >>
> >>
> >
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
> >> >>
> >> >> as well as the Tomcat FAQ: >> 
> >> http://jakarta.apache.org/tomcat/faq/misc.html#invoker
> >> >>
> >> >> If you want to post a specific scenario, with a specific
> >> error
> >> >> message, we can help, but a generic "I've tried
> everything
> >> and nothing
> >> >> ever works" doesn't give us much to go on.
> >> >>
> >> >> John
> >> >>
> >> >> On Tue, 08 Jul 2003 15:53:23 -0400,
> >> >> <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> > Hi, I have searched instructions and websites with no
> >> real
> >> >> luck on this.
> >> >> >
> >> >> > I've used Tomcat in production since some 3.* version
> but
> >> >> I've been lost > since after 4.0 about where to put a
> >> simple servlet >> class or
> >> >> how to > include the servlet.jar so jdk1.4 can see it.
> I've created
> >> >> war files as > the admin page seems to want but this
> >> doesn't seem to be
> >> >> working either.
> >> >> > Tried every class directory I could find and still
> cant
> >> pull
> >> >> up the > servlet from the web. (I can get the
> default.jsp
> >> pages
> >> >> though).  Tried > making my own servlet directory in the
> >> config files, >> nope,
> >> >> no luck.
> >> >> >
> >> >> > I want to take advantage of any NIO performance
> >> enhancements
> >> >> or other > benefits that 5.* has to offer, please help!
> >> >> >
> >> >> > Thanks!
> >> >> > JW
> >> >> >
> >> >> >
> >> >>
> >> >
> >>
> >
>
__
> >> >> > McAfee VirusScan Online from the Netscape Network.
> >> >> > Comprehensive protection for your entire computer. Get
> >> your
> >> >> free trial > today!
> >> >> >
> >> >>
> >> >
> >>
> >
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
> >> >> >
> >> >> > Get AOL Instant Messenger 5.1 free of charge. 
> Download
> >> Now!
> >> >> >
> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
> >> >> >
> >> >> >
> >> >>
> >> >
> >>
> >
>
-
> >> >> > To unsubscribe, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >> > For additional commands, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> -- Using M2, Opera's revolutiona

RE: [OFFTOPIC??] RE: dbcp connection and database restart

2003-07-09 Thread Andy Eastham
Angus,

You can call Conection.isClosed(), but the documentation suggests that this
is not a reliable method of telling that it is _definitely_ closed.
However, if it does return true, you know that you should reconnect before
attempting a call with the connection.

Andy

> -Original Message-
> From: Angus Mezick [mailto:[EMAIL PROTECTED]
> Sent: 09 July 2003 15:53
> To: Tomcat Users List
> Subject: [OFFTOPIC??] RE: dbcp connection and database restart
>
>
> Is there a better way of doing this?  Even if I 'select 1 from TABLE' I
> don't like the fact that there is an extra DB communication for every
> connection I get from the pool.  I don't know if there are alternatives
> to this in DBCP but are there any other ways to ask if a connection in a
> pool is still valid besides just running a query and seeing if it fails?
> (in general, NOT in dbcp)
> --Angus
>
> > -Original Message-
> > From: Raible, Matt [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 8:49 AM
> > To: 'Tomcat Users List'
> > Subject: RE: dbcp connection and database restart
> >
> >
> > Try adding a validation query, for example:
> >
> > 
> > validationQuery
> > SELECT * FROM USER_TABLE
> > 
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 6:46 AM
> > To: [EMAIL PROTECTED]
> > Subject: dbcp connection and database restart
> >
> >
> >
> > I've configured my jdbc datasource connection pool(using dbcp)  in
> > Tomcat
> > 4.1.18
> > server.xml file.
> >
> > here is an extract of it.
> >
> > 
> >  usernameXXX
> >  passwordXXX
> > driverClassName
> >
> > com.sybase.jdbc2.jdbc.SybDriver
> > url
> >
> > jdbc:sybase:Tds:s198000SGD1:5000/intranet_mail<
> > /parameter
> > >
> >
> >  
> >
> > Everything works fine. But
> > when our database server is restarted, I have to restart Tomcat too
> > in order to aquire connections from my defined pool.
> >
> > I wonder if there is a manner to avoid restarting Tomcat when
> > the database server is restarted.
> >
> > I have added the parameters below to my pool config.
> >
> > 
> >   removeAbandoned
> >   true
> > 
> > 
> >   removeAbandonedTimeout
> >   60
> > 
> >
> >  I recognize ,I've added that quite blindly.
> >  Can someone confirm me if this is a cure to my problem ?
> >
> >  any suggestion is greatly appreciated.
> >
> >
> >  Meissa
> >
> > L'integrite de ce message n'etant pas assuree sur internet, Natexis
> > Banques Populaires ne peut etre tenu responsable de
> > son contenu. Toute utilisation ou diffusion non autorisee est
> > interdite. Si vous n'etes pas destinataire de ce message, merci de le
> > detruire et d'avertir l'expediteur.
> >
> > The integrity of this message cannot be guaranteed
> > on the Internet. Natexis Banques Populaires can not therefore be
> > considered responsible for the contents.Any unauthorized use or
> > dissemination is prohibited.
> > If you are not the intended recipient of this message, then please
> > delete it and
> > notify the sender.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread John Turner
That was my point.  JAR up your class files, and put them where Tomcat 
expects them to be.  Problem solved.  People typically use ant to do this, 
so that it is fairly automatic when deploy time comes around.

John

On Wed, 9 Jul 2003 08:07:58 -0700 (PDT), Norris Shelton 
<[EMAIL PROTECTED]> wrote:

Ah, ha.  Now you are getting somewhere. The "Class Loader
Definitions" has the following under the "System" bullet:
However, the standard Tomcat 4 startup scripts
($CATALINA_HOME/bin/catalina.sh or
%CATALINA_HOME%\bin\catalina.bat) totally ignore the contents of
the CLASSPATH environment variable itself, and instead build the
System class loader from the following repositories:
This is the problem I am trying to get around.  The additional
libraries are not contained in any of the normal catalina
classpaths (hence the system environment variable).  I have it
recognizing the external classpath, but can't find the jsp tag
info (and possibly more).
--- John Turner <[EMAIL PROTECTED]> wrote:
See the ClassLoader HOWTO:


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

"Shared - This class loader is the place to put classes and
resources that you wish to share across ALL web applications (unless 
Tomcat
internal classes also need access, in which case you should put them in
the Common class loader instead). All unpacked classes and resources in 
$CATALINA_HOME/shared/classes, as well as classes and
resources in JAR files under $CATALINA_HOME/lib, are made visible 
through this
class loader."

John

On Wed, 9 Jul 2003 07:50:25 -0700 (PDT), Norris Shelton 
<[EMAIL PROTECTED]> wrote:

> How do you get it access items that are not within the
tomcat
> install.  I have tomcat installed locally on c:.  There is
an
> additional library located on v: (loose classes and jars). We
> could not get Tomcat to access these classes.
>
>
> --- John Turner <[EMAIL PROTECTED]> wrote:
>>
>> H...lots of overlap here.
>>
>> First, you shouldn't need to do ANYTHING to CLASSPATH for
>> Tomcat 4.1.x and higher, especially messing around with
servlet.jar.
>>
>> Second, as far as where to put your servlets, try the
>> Application Developer's Guide here:
>>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
>>
>> as well as the Tomcat FAQ: >> 
http://jakarta.apache.org/tomcat/faq/misc.html#invoker
>>
>> If you want to post a specific scenario, with a specific
error
>> message, we can help, but a generic "I've tried everything
and nothing
>> ever works" doesn't give us much to go on.
>>
>> John
>>
>> On Tue, 08 Jul 2003 15:53:23 -0400,
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Hi, I have searched instructions and websites with no
real
>> luck on this.
>> >
>> > I've used Tomcat in production since some 3.* version but
>> I've been lost > since after 4.0 about where to put a
simple servlet >> class or
>> how to > include the servlet.jar so jdk1.4 can see it. I've created
>> war files as > the admin page seems to want but this
doesn't seem to be
>> working either.
>> > Tried every class directory I could find and still cant
pull
>> up the > servlet from the web. (I can get the default.jsp
pages
>> though).  Tried > making my own servlet directory in the
config files, >> nope,
>> no luck.
>> >
>> > I want to take advantage of any NIO performance
enhancements
>> or other > benefits that 5.* has to offer, please help!
>> >
>> > Thanks!
>> > JW
>> >
>> >
>>
>

__
>> > McAfee VirusScan Online from the Netscape Network.
>> > Comprehensive protection for your entire computer. Get
your
>> free trial > today!
>> >
>>
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>> >
>> > Get AOL Instant Messenger 5.1 free of charge.  Download
Now!
>> > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>> >
>> >
>>
>
-
>> > To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> >
>> >
>>
>>
>>
>> -- Using M2, Opera's revolutionary e-mail client:
>> http://www.opera.com/m2/
>>
>>
>
-
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>
>
> =
>
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
>
>
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>
>


-- Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/

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

RE: Réf. : RE: dbcp connection and database restart

2003-07-09 Thread Raible, Matt
Yes.

http://www.mail-archive.com/[EMAIL PROTECTED]/msg91560.html

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 8:31 AM
To: Tomcat Users List
Cc: 'Tomcat Users List'
Subject: Réf. : RE: dbcp connection and database restart



Matt, do you think the validation query wille re initialize my
pool ?




"Raible, Matt" <[EMAIL PROTECTED]>
09/07/2003 14:49
Veuillez répondre à "Tomcat Users List"



Pour :  "'Tomcat Users List'" <[EMAIL PROTECTED]>
cc :

Objet : RE: dbcp connection and database restart


Try adding a validation query, for example:


validationQuery
SELECT * FROM USER_TABLE



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 6:46 AM
To: [EMAIL PROTECTED]
Subject: dbcp connection and database restart



I've configured my jdbc datasource connection pool(using dbcp)  in
Tomcat

4.1.18
server.xml file.

here is an extract of it.


 usernameXXX
 passwordXXX
driverClassName
  com.sybase.jdbc2.jdbc.SybDriver
url


jdbc:sybase:Tds:s198000SGD1:5000/intranet_mail



 

Everything works fine. But
when our database server is restarted, I have to restart Tomcat too
in order to aquire connections from my defined pool.

I wonder if there is a manner to avoid restarting Tomcat when
the database server is restarted.

I have added the parameters below to my pool config.


  removeAbandoned
  true


  removeAbandonedTimeout
  60



 I recognize ,I've added that quite blindly.

 Can someone confirm me if this is a cure to my problem ?


 any suggestion is greatly appreciated.




 Meissa


L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or
dissemination is prohibited.
If you are not the intended recipient of this message, then please
delete it and

notify the sender.

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





L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or
dissemination is prohibited.
If you are not the intended recipient of this message, then please
delete it and

notify the sender.

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



outof memory error

2003-07-09 Thread Shanta B
Hi 
   Sorry for disturbing...i would like to whats the reason behind
java.lang.outofmemory...because currently at one site we are getting these
errors in mscore and locator...what may be the reason ..how should i debug
the processes memoryif u have any idea or links u pl forward to me...in
the mean time iwill search for net alsoi hope ur not envoy with these
mails...


Thanks
shanta.B

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



Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread Norris Shelton
Ah, ha.  Now you are getting somewhere. The "Class Loader
Definitions" has the following under the "System" bullet:

However, the standard Tomcat 4 startup scripts
($CATALINA_HOME/bin/catalina.sh or
%CATALINA_HOME%\bin\catalina.bat) totally ignore the contents of
the CLASSPATH environment variable itself, and instead build the
System class loader from the following repositories:


This is the problem I am trying to get around.  The additional
libraries are not contained in any of the normal catalina
classpaths (hence the system environment variable).  I have it
recognizing the external classpath, but can't find the jsp tag
info (and possibly more).

--- John Turner <[EMAIL PROTECTED]> wrote:
> 
> See the ClassLoader HOWTO:
> 
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
> 
> specifically:
> 
> "Shared - This class loader is the place to put classes and
> resources that 
> you wish to share across ALL web applications (unless Tomcat
> internal 
> classes also need access, in which case you should put them in
> the Common 
> class loader instead). All unpacked classes and resources in 
> $CATALINA_HOME/shared/classes, as well as classes and
> resources in JAR 
> files under $CATALINA_HOME/lib, are made visible through this
> class 
> loader."
> 
> John
> 
> On Wed, 9 Jul 2003 07:50:25 -0700 (PDT), Norris Shelton 
> <[EMAIL PROTECTED]> wrote:
> 
> > How do you get it access items that are not within the
> tomcat
> > install.  I have tomcat installed locally on c:.  There is
> an
> > additional library located on v: (loose classes and jars). 
> We
> > could not get Tomcat to access these classes.
> >
> >
> > --- John Turner <[EMAIL PROTECTED]> wrote:
> >>
> >> H...lots of overlap here.
> >>
> >> First, you shouldn't need to do ANYTHING to CLASSPATH for
> >> Tomcat 4.1.x and higher, especially messing around with
> servlet.jar.
> >>
> >> Second, as far as where to put your servlets, try the
> >> Application Developer's Guide here:
> >>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
> >>
> >> as well as the Tomcat FAQ: 
> >> http://jakarta.apache.org/tomcat/faq/misc.html#invoker
> >>
> >> If you want to post a specific scenario, with a specific
> error
> >> message, we can help, but a generic "I've tried everything
> and nothing
> >> ever works" doesn't give us much to go on.
> >>
> >> John
> >>
> >> On Tue, 08 Jul 2003 15:53:23 -0400,
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >> > Hi, I have searched instructions and websites with no
> real
> >> luck on this.
> >> >
> >> > I've used Tomcat in production since some 3.* version but
> >> I've been lost > since after 4.0 about where to put a
> simple servlet 
> >> class or
> >> how to > include the servlet.jar so jdk1.4 can see it. 
> I've created
> >> war files as > the admin page seems to want but this
> doesn't seem to be
> >> working either.
> >> > Tried every class directory I could find and still cant
> pull
> >> up the > servlet from the web. (I can get the default.jsp
> pages
> >> though).  Tried > making my own servlet directory in the
> config files, 
> >> nope,
> >> no luck.
> >> >
> >> > I want to take advantage of any NIO performance
> enhancements
> >> or other > benefits that 5.* has to offer, please help!
> >> >
> >> > Thanks!
> >> > JW
> >> >
> >> >
> >>
> >
>
__
> >> > McAfee VirusScan Online from the Netscape Network.
> >> > Comprehensive protection for your entire computer. Get
> your
> >> free trial > today!
> >> >
> >>
> >
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
> >> >
> >> > Get AOL Instant Messenger 5.1 free of charge.  Download
> Now!
> >> > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
> >> >
> >> >
> >>
> >
>
-
> >> > To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> > For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >>
> >> -- Using M2, Opera's revolutionary e-mail client:
> >> http://www.opera.com/m2/
> >>
> >>
> >
>
-
> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >>
> >
> >
> > =
> >
> > Norris Shelton
> > Software Engineer
> > Sun Certified Java 1.1 Programmer
> > Appriss, Inc.
> > ICQ# 26487421
> > AIM NorrisEShelton
> > YIM norrisshelton
> >
> >
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> -- 
> Using M2, Opera's revolutionary e-mail client:
> http://www.opera.com/m2/
> 
>
-
> To unsubs

RE: Retrieving a blob object?

2003-07-09 Thread Jay Garala
Hi Euclides,

What blob type does a web form send?  Do you mean HTML Form Types?
Attachements?

Jay Garala
Senior Software Engineer
Conclusive Technology, Inc.

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 5:51 PM
To: '[EMAIL PROTECTED]'
Subject: Retrieving a blob object?


Hi friends,
I would like to know what is fastest way to retrieve a blob object sent by a
web form. Should i use Enumeration? Some examples would be welcome.
Thanks in advance,
Euclides.

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



JAVA_HOME for TOMCAT as an NT Service

2003-07-09 Thread nrapagnani
Hello.  I am trying to get TOMCAT 4.1 to run as an NT service.  When I have
the service running I get a 500 error for all jsp pages I've made a change
to.  

I've set JAVA_HOME to the correct path as a System Variable in windows 2000.
If I were to shut down the service and choose Start Tomcat from the program
folder, it compiles fine.   Any ideas of where I should look for the
problem?

When I look in stderr.log I see this message.  I know you don't need to see
all of it but.

Error running javac.exe compiler
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExtern
alCompile(DefaultCompilerAdapter.java:455)
at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.
java:81)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:840)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Unknown Source)

Nicholas Rapagnani
Phone: (484) 762-3105 

Confidentiality Notice:  This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.


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



Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread John Turner
See the ClassLoader HOWTO:

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

specifically:

"Shared - This class loader is the place to put classes and resources that 
you wish to share across ALL web applications (unless Tomcat internal 
classes also need access, in which case you should put them in the Common 
class loader instead). All unpacked classes and resources in 
$CATALINA_HOME/shared/classes, as well as classes and resources in JAR 
files under $CATALINA_HOME/lib, are made visible through this class 
loader."

John

On Wed, 9 Jul 2003 07:50:25 -0700 (PDT), Norris Shelton 
<[EMAIL PROTECTED]> wrote:

How do you get it access items that are not within the tomcat
install.  I have tomcat installed locally on c:.  There is an
additional library located on v: (loose classes and jars).  We
could not get Tomcat to access these classes.
--- John Turner <[EMAIL PROTECTED]> wrote:
H...lots of overlap here.

First, you shouldn't need to do ANYTHING to CLASSPATH for
Tomcat 4.1.x and higher, especially messing around with servlet.jar.
Second, as far as where to put your servlets, try the
Application Developer's Guide here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
as well as the Tomcat FAQ: 
http://jakarta.apache.org/tomcat/faq/misc.html#invoker

If you want to post a specific scenario, with a specific error
message, we can help, but a generic "I've tried everything and nothing
ever works" doesn't give us much to go on.
John

On Tue, 08 Jul 2003 15:53:23 -0400,
<[EMAIL PROTECTED]> wrote:
> Hi, I have searched instructions and websites with no real
luck on this.
>
> I've used Tomcat in production since some 3.* version but
I've been lost > since after 4.0 about where to put a simple servlet 
class or
how to > include the servlet.jar so jdk1.4 can see it.  I've created
war files as > the admin page seems to want but this doesn't seem to be
working either.
> Tried every class directory I could find and still cant pull
up the > servlet from the web. (I can get the default.jsp pages
though).  Tried > making my own servlet directory in the config files, 
nope,
no luck.
>
> I want to take advantage of any NIO performance enhancements
or other > benefits that 5.* has to offer, please help!
>
> Thanks!
> JW
>
>

__
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your
free trial > today!
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
> Get AOL Instant Messenger 5.1 free of charge.  Download Now!
> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>
>


-- Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/

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


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton
__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OFFTOPIC??] RE: dbcp connection and database restart

2003-07-09 Thread Angus Mezick
Is there a better way of doing this?  Even if I 'select 1 from TABLE' I
don't like the fact that there is an extra DB communication for every
connection I get from the pool.  I don't know if there are alternatives
to this in DBCP but are there any other ways to ask if a connection in a
pool is still valid besides just running a query and seeing if it fails?
(in general, NOT in dbcp)
--Angus

> -Original Message-
> From: Raible, Matt [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 09, 2003 8:49 AM
> To: 'Tomcat Users List'
> Subject: RE: dbcp connection and database restart
> 
> 
> Try adding a validation query, for example:
> 
> 
> validationQuery
> SELECT * FROM USER_TABLE
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 6:46 AM
> To: [EMAIL PROTECTED]
> Subject: dbcp connection and database restart
> 
> 
> 
> I've configured my jdbc datasource connection pool(using dbcp)  in
> Tomcat 
> 4.1.18
> server.xml file.
> 
> here is an extract of it.
> 
> 
>  usernameXXX
>  passwordXXX
> driverClassName
>   
> com.sybase.jdbc2.jdbc.SybDriver
> url
>  
> jdbc:sybase:Tds:s198000SGD1:5000/intranet_mail<
> /parameter
> > 
>  
>  
> 
> Everything works fine. But
> when our database server is restarted, I have to restart Tomcat too
> in order to aquire connections from my defined pool.
> 
> I wonder if there is a manner to avoid restarting Tomcat when
> the database server is restarted.
> 
> I have added the parameters below to my pool config.
> 
> 
>   removeAbandoned
>   true
> 
> 
>   removeAbandonedTimeout
>   60
> 
>  
>  I recognize ,I've added that quite blindly. 
>  Can someone confirm me if this is a cure to my problem ?
>  
>  any suggestion is greatly appreciated.
>  
>  
>  Meissa 
> 
> L'integrite de ce message n'etant pas assuree sur internet, Natexis
> Banques Populaires ne peut etre tenu responsable de
> son contenu. Toute utilisation ou diffusion non autorisee est
> interdite. Si vous n'etes pas destinataire de ce message, merci de le
> detruire et d'avertir l'expediteur.
> 
> The integrity of this message cannot be guaranteed
> on the Internet. Natexis Banques Populaires can not therefore be
> considered responsible for the contents.Any unauthorized use or
> dissemination is prohibited.
> If you are not the intended recipient of this message, then please
> delete it and 
> notify the sender.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: How do I setup Tomcat 5.* (need windows classpath)

2003-07-09 Thread Norris Shelton
How do you get it access items that are not within the tomcat
install.  I have tomcat installed locally on c:.  There is an
additional library located on v: (loose classes and jars).  We
could not get Tomcat to access these classes.


--- John Turner <[EMAIL PROTECTED]> wrote:
> 
> H...lots of overlap here.
> 
> First, you shouldn't need to do ANYTHING to CLASSPATH for
> Tomcat 4.1.x and 
> higher, especially messing around with servlet.jar.
> 
> Second, as far as where to put your servlets, try the
> Application 
> Developer's Guide here:
> http://jakarta.apache.org/tomcat/tomcat-4.1- 
> doc/appdev/index.html
> 
> as well as the Tomcat FAQ: 
> http://jakarta.apache.org/tomcat/faq/misc.html#invoker
> 
> If you want to post a specific scenario, with a specific error
> message, we 
> can help, but a generic "I've tried everything and nothing
> ever works" 
> doesn't give us much to go on.
> 
> John
> 
> On Tue, 08 Jul 2003 15:53:23 -0400,
> <[EMAIL PROTECTED]> wrote:
> 
> > Hi, I have searched instructions and websites with no real
> luck on this.
> >
> > I've used Tomcat in production since some 3.* version but
> I've been lost 
> > since after 4.0 about where to put a simple servlet class or
> how to 
> > include the servlet.jar so jdk1.4 can see it.  I've created
> war files as 
> > the admin page seems to want but this doesn't seem to be
> working either.
> > Tried every class directory I could find and still cant pull
> up the 
> > servlet from the web. (I can get the default.jsp pages
> though).  Tried 
> > making my own servlet directory in the config files, nope,
> no luck.
> >
> > I want to take advantage of any NIO performance enhancements
> or other 
> > benefits that 5.* has to offer, please help!
> >
> > Thanks!
> > JW
> >
> >
>
__
> > McAfee VirusScan Online from the Netscape Network.
> > Comprehensive protection for your entire computer. Get your
> free trial 
> > today!
> >
>
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
> >
> > Get AOL Instant Messenger 5.1 free of charge.  Download Now!
> > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> -- 
> Using M2, Opera's revolutionary e-mail client:
> http://www.opera.com/m2/
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



  1   2   >