RE: JNDI comp namespace - Tomcat Developers Please Read

2003-12-12 Thread Tony Colson
As per my suspicion, multiple  seemed to cause the problem as I
had the JNDI resources defined in the second .  Removing the
first service temporarily seemed to "fix" it.

Is this a bug in Tomcat?  Or is there something else I need to specify?

I will do some more testing to see if I can't narrow it down further.

 
Tony

-Original Message-
From: Tony Colson [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 1:23 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: JNDI comp namespace

Hi,

Thanks for the tip.  Actually, this is how my server.xml was set up
originally.  I changed the resource name to java:comp/env/jdbc/NNT under
the notion that it might create the comp namespace if it saw it in the
xml file.

I am beginning to wonder if the problem is related to the fact that I
have different ports running web apps?

Thanks,
 
Tony Colson
 
-Original Message-
From: Altankov Peter [mailto:[EMAIL PROTECTED] 
 Howdy,Try this setup in your context definition:
   

.


After that in the source where u access it go for:
Context ictx = new InitialContext();
if (ictx == null) {
throw new Exception("Boom - No Context");
}
DtataSource ds = (DataSource) ictx.lookup("java:comp/env/jdbc/NNT");

I don't have the time to go into JNDI details, but im pretty sure that
wold work for you


-Original Message-
From: Tony Colson [mailto:[EMAIL PROTECTED] 
Sent: 12  2003 ?. 10:48
To: 'Tomcat Users List'
Subject: RE: JNDI comp namespace


As per a suggestion I am posting my server.xml file.

I have several applications on different ports.  I am trying to use JNDI
on the NNT application running on port 9000.  Do a search for "9000" and
you will be at the  tag.  Just scroll down to see the
 and  tags to look at my setup.  (Also note that I am
trying to use  as seen at the top of the file.)

Thanks
Tony
= START SERVER.XML ==









  
  
  
  

  
  








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






  

  

  
  




























 
 



  
  

  
  

  

  
  

  
  

  

  

  

  

  
  

















  
  

  



  
  
  
  
  
  
 
usernamesa
password
driverClassName
  org.hsql.jdbcDriver
url
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  
  




  


  



  

  

  


  










  

  

  
  

















  










  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
org.postgresql.Driver
  
  
url

jdbc:postgresql://horse:5432/NNT
  
  
username
user
  
  
password
passwd
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  



  
 removeAbandoned
 true
  



  
 logAbandoned
 true
  






  



  

  










  

  

  
  

















  

  



  


== END SERVER.XML ===




-Original Message-
Hi Tony,

I have - and it allways proved to be my fault in the end ;) I would
suggest that you post your server xml to have someone look it over.
Don't forget to change your connect data and password before though! Is
the resource bound in the appropriate context or globally?

Cheers, Jan

> -Ursprungliche Nachricht-
> Dear Tomcat Users,
> 
> I am using Tomcat 4 and trying to use JNDI to connect to a
> data source and environment variables.  I get the following 
> when trying to access the InitialContext via
> 
> DataSource ds = (DataSource)initialContext.lookup(
> "java:comp/env/jdbc/mydb" );
> 
> javax.naming.NameNotFoundException: Name comp is not bound in
> this Context
> 
> I have read all the documentation many times and cannot see
> what I am doing wrong.  The server.xml seems to be fine; I 
> can see the appropriate context entries in the tomcat manager 
> application.  But for some reason the comp namespace does 

Re: How to set the debug level and where does the output go?

2003-12-12 Thread Bill Barker
You can set the 'debug' attribute on the  tag, but that will
produce debug info for other sub-components of  as well.
Alternatively, you can configure the Authenticator explicitly (dangerous,
since Tomcat assumes that you know what you are doing in this case :):
   
   .
   
   

In any case, the output goes to the Context log if one is configured,
otherwise to the Host log if one is configured, and I could go on, but at
this point it will probably end up in 'catalina.out'.

"Daniel Germain" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I would like to see messages like
>
> if (debug >= 1)
> log("xxx")
>
> from this file org.apache.catalina.authenticator.FormAuthenticator.
>
> How do I set the debug level, and in which file will the output goes?
>
> I want to investigate on the following message:
> Invalid direct reference to form login page
> because I'm accessing a protected page that is not the form login page.
> It may be related with the complex super servlet from Enhydra.
> I had been able to make it works with jsp.
>
> Thanks.
> Daniel
>
> _
> Tired of spam? Get advanced junk mail protection with MSN 8.
>
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca




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



Re: Vedr.: service installer for TC5

2003-12-12 Thread Bill Barker
I'm not sure if it is in the docs, or if the installer sets up a link to it
(never used the installer :), but you can change most setting from the GUI
by running:
  tomcatw //ES//Tomcat5

"Remy Maucherat" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jacob Lund wrote:
> > OK thanks that was very helpful! I told you I might be stupid ;-)
> >
> > What parameters are valid? Tomcat /? Or /help does not give me any
pointers!
>
> Here's some (basic) doc on procrun (aka tomcat.exe):
> http://jakarta.apache.org/commons/daemon/procrun.html
>
> Next to it is the jsvc docs, which does stuff similar to procrun.
>
> The two aren't the same codebase, since the two OSes have a very
> different way to treat their daemons. I think both could use some
> polish. Contributors wanted :)
>
> -- 
> x
> Rémy Maucherat
> Senior Developer & Consultant
> JBoss Group (Europe) SàRL
> x




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



Re: Apache SSL variables -> Imposible!

2003-12-12 Thread Bill Barker
TC 5 does a lazy evaluation of the SSL Request attributes (for performance
reasons).  This means that the attributes are made available when they are
first asked for.  The following should work:
  String cipher =
(String)request.getAttribute("javax.servlet.request.cipher_suite");
  Integer keysize =
(Integer)request.getAttribute("javax.servlet.request.key_size");
  X509Certificate [] certs = (X509Certificate
[])request.getAttribute("javax.servlet.request.X509Certificate");
  // Tomcat extensions
  String sessionId =
(String)request.getAttribute("javax.servlet.request.ssl_session");
  X509Certificate [] certs = (X509Certificate
[])request.getAttribute("org.apache.coyote.request.X509Certificate");
  // This last one forces the client to send a cert

There is an argument to add the names to getAttributeNames (which seems so
have some other issues as well at the moment :).  Just because it doesn't
show up in getAttributeNames, doesn't mean that you can't get the value.

"Federico Fernandez Cruz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have connected Apache and Tomcat (5) using JK2. The communication is
> right, but I can't access any apache SSL variables!
> No matter what I do. It's impossible!
>
> I have read several docs and all I get is frustration! :-(
>
> Can someone tell me how to do it, pleease?
>
> Thanks!
>
>
>


smime.p7s
Description: S/MIME cryptographic signature


How to set the debug level and where does the output go?

2003-12-12 Thread Daniel Germain
I would like to see messages like

   if (debug >= 1)
   log("xxx")
from this file org.apache.catalina.authenticator.FormAuthenticator.

How do I set the debug level, and in which file will the output goes?

I want to investigate on the following message:
Invalid direct reference to form login page
because I'm accessing a protected page that is not the form login page.
It may be related with the complex super servlet from Enhydra.
I had been able to make it works with jsp.
Thanks.
Daniel
_
Tired of spam? Get advanced junk mail protection with MSN 8.  
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca

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


mod_jk2 failing inconsistently.

2003-12-12 Thread Charles Crain
Hi.  I'm a jk2 newbie.  I just build and installed Apache 2.0.48 and jk2 
2.0.2.  What I am seeing is very strange.  If I type in a URI I have 
forwarded from Apache to Tomcat, most of the time I get an Internal 
Server Error, and this appears in the Apache error log:

[Fri Dec 12 18:43:21 2003] [error] lb.getWorker() reenable 
ajp13:localhost:8009
[Fri Dec 12 18:43:21 2003] [error] workerEnv.init() create slot epStat.3 
failed
[Fri Dec 12 18:43:21 2003] [error] lb.service() worker failed 12 for 
ajp13:l
ocalhost:8009
[Fri Dec 12 18:43:21 2003] [error] lb.service() unrecoverable error...
[Fri Dec 12 18:43:21 2003] [error] mod_jk.handler() Error connecting to 
tomcat 1
2

But, if I hit refresh 5 or 6 times, the proper web page comes up!  Then 
I can play around for a while, but after a few requests it goes back to 
the "Internal Server Error" state until I do another machine-gun 
refresh.  I am using Slackware 9.1, Java 1.4.2_01, and the 2.4.22 kernel 
in case any of that matters.  Has anyone seen this before?

-Charles



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


Re: JK2 and NoClassDefFoundError of HttpMessages

2003-12-12 Thread [EMAIL PROTECTED]
I found the cause: around the end of my servlet, I had put

out.close();

(where out is PrintWriter object obtained from response)

I deleted out.close(), and now my servlet works with -security even if
I load the servlet first.
I did not have this problem with Tomcat 4.x. It was strange, but
sometimes occurs at upgrade of application servers.
Sam

[EMAIL PROTECTED] wrote:

Thank you for reply.
I found that Tomcat servlet examples work with -security option on 
Fedora.
So my web application should work with -security option.

After I load Tomcat servlet examples first, I can immediately see my 
web application from my browser.
But when I try to load my web application first, I cannot see it and 
get the error message.
There is something wrong for the configuration of my web application.

I hope I will find the problem.

Sam



Yansheng Lin wrote:

Hi,
You got it working yet? It seems you are having trouble using apache 
as the
server. You said when you use domainname:8080/something, you can see 
the pages,
but not domainname/something. That's because Tomcat is serving the pages
instead of Apache.

I need to go home to test this on Fedora, but in your 
conf/workers2.properties
file, you need to specify a connection between apache and tomcat, 
much like the
example from the other thread:


[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0

Hope this helps.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 
Friday, December 12, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: JK2 and NoClassDefFoundError of HttpMessages

Hi,

I am trying Tomcat 5.0.16 with mod_jk2v2.0.2, Apache 2.0.47 on Fodora
Linux Core1.
When I start Tomcat without -security, I have no problem.
When I start Tomcat with -security and I use
domain_name:8080/servlet/ListRoomsServlet, again I have no problem
(ListRoomsServlet is the servlet I am trying).
When I start Tomcat with -security and use
domain_name/servlet/ListRoomsServlet, I have the next error message:
exception

javax.servlet.ServletException: org/apache/tomcat/util/http/HttpMessages
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200) 



root cause

java.lang.NoClassDefFoundError: org/apache/tomcat/util/http/HttpMessages

org.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:350) 

org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:402)
org.apache.coyote.Response.action(Response.java:226)
org.apache.coyote.Response.sendHeaders(Response.java:418)
org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:240)
org.apache.coyote.Response.doWrite(Response.java:586)
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:405) 

org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:428)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:361)
org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:325)
org.apache.coyote.tomcat5.CoyoteWriter.close(CoyoteWriter.java:130)
ListRoomsServlet.doGet(ListRoomsServlet.java:714)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav 

a:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200) 

Is there something I might forget to add to classpath or to add
conf/catalina.policy?
Thank you in advance.
Sam



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


Need help to study thread dump

2003-12-12 Thread Vikas

Hi,

My app is running on bes 5.1

App sometime stops responsding and i have to restart my server. Below is some portion 
of thread dump which i got for the app

"VBJ ThreadPool Worker" daemon prio=5 tid=0x14f1148 nid=0xad70 waiting for monitor 
entry [e767d000..e767fc24]
 at com.vks.group.pkg.util.DBConnectionPool.getConnection(DBConnectionPool.java:166)
 - waiting to lock  (a com.vks.group.pkg.util.DBConnectionPool)
 at com.vks.group.pkg.util.DBConnectionPool.isDBPoolOK(DBConnectionPool.java:349)
 at 
com.vks.group.pkg.util.DBConnectionPoolManager.isDBPoolOK(DBConnectionPoolManager.java:219)
 at com.vks.group.pkg.util.DBUtil.isDBPoolOK(DBUtil.java:681)
 at com.vks.group.pkg.util.DBUtil.isDBPoolOK(DBUtil.java:677)
 at MyServResponse.processRequest(MyServResponse.java:39)

>From the dump all i could make out is there lock wait on one object to get database 
>connection. Is it problem with the java code or like problem with the database 
>unavailabilty.

We dont get this problem quiet frequently , this come only once in a month , ie we 
need to start our server once every month.  Has anybody come across such problem in 
past , pls help me how to go about solving it.

 



**
Viks
**
Yahoo! India Matrimony: Find your partner online.Post your profile.

broken pipe

2003-12-12 Thread Nicolas
hi

this is about the common broken pipe problem (when you press the stop 
button).

i get this mainly in my catalina.out but i was able to redirect a lot of 
it to context based logger(for each aborded request there are often 
duzends of lines).
if i use jk2 there are also errors in error_log of apache and much more 
errors in catalina.out etc..
is there any simple way to strip this down ?
i'm using
tomcat-4.1.29 and turbine 2.2
Apache/2.0.48 (Unix) mod_jk2/2.0.2

thx4any help

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


Re: JK2 and NoClassDefFoundError of HttpMessages

2003-12-12 Thread [EMAIL PROTECTED]
Thank you for reply.
I found that Tomcat servlet examples work with -security option on Fedora.
So my web application should work with -security option.
After I load Tomcat servlet examples first, I can immediately see my web 
application from my browser.
But when I try to load my web application first, I cannot see it and get 
the error message.
There is something wrong for the configuration of my web application.

I hope I will find the problem.

Sam



Yansheng Lin wrote:

Hi, 

You got it working yet?  It seems you are having trouble using apache as the
server.  You said when you use domainname:8080/something, you can see the pages,
but not domainname/something.  That's because  Tomcat is serving the pages
instead of Apache.
I need to go home to test this on Fedora, but in your conf/workers2.properties
file, you need to specify a connection between apache and tomcat, much like the
example from the other thread:

[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0

Hope this helps.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: JK2 and NoClassDefFoundError of HttpMessages

Hi,

I am trying Tomcat 5.0.16 with mod_jk2v2.0.2, Apache 2.0.47 on Fodora
Linux Core1.
When I start Tomcat without -security, I have no problem.
When I start Tomcat with -security and I use
domain_name:8080/servlet/ListRoomsServlet, again I have no problem
(ListRoomsServlet is the servlet I am trying).
When I start Tomcat with -security and use
domain_name/servlet/ListRoomsServlet, I have the next error message:
exception

javax.servlet.ServletException: org/apache/tomcat/util/http/HttpMessages
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)
root cause

java.lang.NoClassDefFoundError: org/apache/tomcat/util/http/HttpMessages

org.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:350)
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:402)
org.apache.coyote.Response.action(Response.java:226)
org.apache.coyote.Response.sendHeaders(Response.java:418)
org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:240)
org.apache.coyote.Response.doWrite(Response.java:586)

org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:428)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:361)
org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:325)
org.apache.coyote.tomcat5.CoyoteWriter.close(CoyoteWriter.java:130)
ListRoomsServlet.doGet(ListRoomsServlet.java:714)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)
Is there something I might forget to add to classpath or to add
conf/catalina.policy?
Thank you in advance.
Sam



-
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: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread Robert Hall
Ashwin,

Bravo! I missed the resolution details.  What was the solution?

Robert

Ashwin Kutty wrote:

This was NOT a sendmail issue if you followed the positive discussions I
had with some other members on this list.  If it were I would have taken
it to the sendmail list/forum.  I thank the members here for their
assistance and would like to happily announce that the problem has been
solved.
On Fri, 12 Dec 2003, George Sexton wrote:

 

Since this is clearly a Sendmail issue, I recommend you redirect your question
to a more appropriate forum.
Quoting Ashwin Kutty <[EMAIL PROTECTED]>:

   

Was wondering if someone could help me out here.  I am trying a product
out called DSPACE which gives the following error in catalina.out
2003-12-12 08:53:34,957 INFO  org.dspace.app.webui.servlet.RegisterServlet
@ anonymous:session_id=B3D285B12E90E6BCCAF3E4097712D59B:error_emai$
javax.mail.SendFailedException: Sending failed;
 nested exception is:
   javax.mail.SendFailedException: Invalid Addresses;
 nested exception is:
   javax.mail.SendFailedException: 550 5.7.1 <[EMAIL PROTECTED]>...
Relaying denied
   at javax.mail.Transport.send0(Transport.java:219)
   at javax.mail.Transport.send(Transport.java:81)
   at org.dspace.core.Email.send(Email.java:259)
   at
org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:291)
   at
org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:251)
   at
org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:96)
   at
org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail
 

(RegisterServlet.java:272)
   

   at
org.dspace.app.webui.servlet.RegisterServlet.doDSPost
 

(RegisterServlet.java:206)
   

   at
org.dspace.app.webui.servlet.DSpaceServlet.processRequest
 

(DSpaceServlet.java:153)
   

   at
org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:110)
   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.invokeNex
t(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.invokeNex
t(StandardPipeline.java:643)
   

   at
org.apache.catalina.valves.CertificatesValve.invoke
 

(CertificatesValve.java:246)
   

   at

 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.StandardContext.invoke(StandardContext.java:2416)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
   

   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke
 

(ErrorDispatcherValve.java:171)
   

  at

 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
   

   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
   at
 

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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.coyote.http11.Http11Processor.process(Http11Processor.java:601)
   at
 

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:392)
   

   at

Re: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread David Rees
On Fri, December 12, 2003 at 3:20 pm, Ashwin Kutty wrote:
>
> This was NOT a sendmail issue if you followed the positive discussions I
had with some other members on this list.  If it were I would have taken
it to the sendmail list/forum.  I thank the members here for their
assistance and would like to happily announce that the problem has been
solved.

Please run your test from the same machine as the application server, not
a different server as you indicated earlier.

There isn't any javamail configuration which would generate the relaying
denied message, and it certainly isn't a Tomcat issue, so your message is
off-topic and more appropriate for a Java-users list.

The javamail API isn't even included in the 5.x series of Tomcat anymore.

-Dave




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



RE: JK2 and NoClassDefFoundError of HttpMessages

2003-12-12 Thread Yansheng Lin
Hi, 

You got it working yet?  It seems you are having trouble using apache as the
server.  You said when you use domainname:8080/something, you can see the pages,
but not domainname/something.  That's because  Tomcat is serving the pages
instead of Apache.

I need to go home to test this on Fedora, but in your conf/workers2.properties
file, you need to specify a connection between apache and tomcat, much like the
example from the other thread:


[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0


Hope this helps.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: JK2 and NoClassDefFoundError of HttpMessages


Hi,

I am trying Tomcat 5.0.16 with mod_jk2v2.0.2, Apache 2.0.47 on Fodora
Linux Core1.

When I start Tomcat without -security, I have no problem.
When I start Tomcat with -security and I use
domain_name:8080/servlet/ListRoomsServlet, again I have no problem
(ListRoomsServlet is the servlet I am trying).

When I start Tomcat with -security and use
domain_name/servlet/ListRoomsServlet, I have the next error message:

exception

javax.servlet.ServletException: org/apache/tomcat/util/http/HttpMessages
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)


root cause

java.lang.NoClassDefFoundError: org/apache/tomcat/util/http/HttpMessages

org.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:350)
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:402)
org.apache.coyote.Response.action(Response.java:226)
org.apache.coyote.Response.sendHeaders(Response.java:418)
org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:240)
org.apache.coyote.Response.doWrite(Response.java:586)

org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:428)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:361)
org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:325)
org.apache.coyote.tomcat5.CoyoteWriter.close(CoyoteWriter.java:130)
ListRoomsServlet.doGet(ListRoomsServlet.java:714)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

Is there something I might forget to add to classpath or to add
conf/catalina.policy?
Thank you in advance.

Sam



-
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: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread Ashwin Kutty

This was NOT a sendmail issue if you followed the positive discussions I
had with some other members on this list.  If it were I would have taken
it to the sendmail list/forum.  I thank the members here for their
assistance and would like to happily announce that the problem has been
solved.

On Fri, 12 Dec 2003, George Sexton wrote:

> Since this is clearly a Sendmail issue, I recommend you redirect your question
> to a more appropriate forum.
>
> Quoting Ashwin Kutty <[EMAIL PROTECTED]>:
>
> > Was wondering if someone could help me out here.  I am trying a product
> > out called DSPACE which gives the following error in catalina.out
> >
> > 2003-12-12 08:53:34,957 INFO  org.dspace.app.webui.servlet.RegisterServlet
> > @ anonymous:session_id=B3D285B12E90E6BCCAF3E4097712D59B:error_emai$
> > javax.mail.SendFailedException: Sending failed;
> >   nested exception is:
> > javax.mail.SendFailedException: Invalid Addresses;
> >   nested exception is:
> > javax.mail.SendFailedException: 550 5.7.1 <[EMAIL PROTECTED]>...
> > Relaying denied
> >
> > at javax.mail.Transport.send0(Transport.java:219)
> > at javax.mail.Transport.send(Transport.java:81)
> > at org.dspace.core.Email.send(Email.java:259)
> > at
> > org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:291)
> > at
> > org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:251)
> > at
> > org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:96)
> > at
> > org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail
> (RegisterServlet.java:272)
> > at
> > org.dspace.app.webui.servlet.RegisterServlet.doDSPost
> (RegisterServlet.java:206)
> > at
> > org.dspace.app.webui.servlet.DSpaceServlet.processRequest
> (DSpaceServlet.java:153)
> > at
> > org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:110)
> > 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.invokeNex
> t(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.invokeNex
> t(StandardPipeline.java:643)
> > at
> > org.apache.catalina.valves.CertificatesValve.invoke
> (CertificatesValve.java:246)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t(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.StandardContext.invoke(StandardContext.java:2416)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t(StandardPipeline.java:643)
> > at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke
> (ErrorDispatcherValve.java:171)
> >at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t(StandardPipeline.java:641)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
> t(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.invokeNex
> t(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.coyote.http11.Http11Processor.process(Http11Processor.java:601)
> > at
> >

RE: Need help with connectors

2003-12-12 Thread Asif Chowdhary
YES the default port is 8009. It should be 8009 in server.xml file as well

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 6:02 PM
To: 'Tomcat Users List'
Subject: RE: Need help with connectors


Just one quick question(I am just playing with this right now).  Don't pay me
too much attention if the answer is RTFM.

Shouldn't the port for jk2 connector be 8009 instead of 8010?  


-Original Message-
From: Asif Chowdhary [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 3:56 PM
To: Tomcat Users List
Subject: RE: Need help with connectors


This should solve your problem

httpd.conf: just one single row like this:
LoadModule jk2_module modules/mod_jk2-2.0.43.dll

Then I added a worker2.properties in Apache/conf/ like this:

[logger]
level=DEBUG
file=c:/programme/apache group/apache2/logs/jk2.log

[config]
file=c:/programme/apache group/apache2/conf/workers2.properties
debug=0
debugEnv=0

# Shared memory handling. Needs to be set.
[shm]
file=c:/programme/apache group/apache2/logs/shm.file
size=1048576
debug=0
#disabled=0


# Example socket channel, explicitly set port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
tomcatId=localhost:8009
debug=0

[status:]
info=Status worker,displays run time informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0
# end of workers2.properties

Finally, I configured this Connector in the Tomcat server.xml:
---
 


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 5:33 PM
To: 'Tomcat Users List'
Subject: RE: Need help with connectors


I am assuming you downloaded apache, tomcat, and mod_jk_2.X.X.dll

Try:
1) rename mod_jk_2.X.X.dll to mod_jk2.dll, and place it under 
$APACHE_HOME/modules/
2) In apache httpd.conf
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk2_module modules/mod_jk2.dll

Does it work?

-Original Message-
From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:28 AM
To: Tomcat Users List
Subject: Need help with connectors


Hi,


I'm beginning to think that I need to be a system
administrator to connect Apache 2.0 with Tomcat 5.0!
I've already spent 2 full days trying to get it to
work. I remember that for Tomcat 3.4 it took me about
5 minutes.

(I can't even tell whether there is too much
documentation or not enough. Under
/tomcat-4.1-doc/jk2/jk2/configtcex.html there are many
links and I don't know whether I need some of them or
all of them. I don't know whether 4.1 instruction
apply to 5.0. It is not clear how to modify Unix
instruction for Windows intructions. Ordinarily I'm a
Unix guy (I helped write the Gimp), but this is a
Windows project. How am I supposed to interpret the
sentence "There is no need to use the jkjni logic to
use normal socket, so that just for Fun." What's just
for Fun? jkjni or normal socket? Also, on the menu,
the headers are instiguishable from live links so the
whole structure of the document is unclear.)

Anyway, I think you guys produce amazing products,
I've always used them and will stick by them in the
future. I'm just a little frustrated and a little bit
jealous of my time so I'm hoping that someone will
provide instructions for Apache2 + Tomcat5 + Win32.

Thanks.

Dola

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

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


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


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


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


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



Re: Tomcat Exception Handling =?= Web Tier Exception Handling

2003-12-12 Thread QM
: My question is, should I use tomcat exception handling mechanism, or should I
: come up with my own exception handling framework?

A lot of this depends on your app's setup and how thorough/robust you
expect your handling to be as it grows.

1/ Quick-And-Dirty: map a "something went wrong" page to
java.lang.Throwable in web.xml.  Come back and design something more
robust after your alpha's out the door.

2/ Slightly Better: same as above, but wrap system exceptions in custom
exceptions and pull a message from a known request-scope key to print to
the browser.  You can evaluate for yourself whether you'd want to build
on this general idea, e.g. special error pages for special errors and a
generic page for generic errors.  There are innumerable variations on
this theme but you get the gist.

3/ If you're using Struts: there's some handy exception-handling built
in.  It works quite well for me.  It may work for you.  I haven't used
other frameworks but chances are they'd have something similar.

I do #3 for my larger, Struts-based apps and something similar to #2 for
the quick demos.  

-QM

--

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


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



Re: Image Viewing

2003-12-12 Thread Jon Yeargers
Another method Ive seen is to use an applet to display the images. One
advantage to this is you can display any sort of graphic that you have the
code to work with. You also get around the issue of having a displayed
graphic end up in the cache for the user.

Disadvantage.. well... its an applet.. :^(

> How does an image get displayed in a page?
>
> 1. The browser receives an HTML page with an IMG tag in it. The IMG tag
> contains a src attr (an HTTP URL).
> 2. The browser makes another request, for the URL of the image.
> 3. The server returns the image, which is displayed.
>
> Clearly, if you want an image to be displayed within a web page, the
> image must be available on your server. There is no difference between
> the browser making a request for an URL and the user typing that URL
> into the address bar directly. Maybe you can look at the referer field,
> but of course that can be hoaxed so if you are really trying to keep
> this secure that is not a solution.
>
> If you really want to only provide content to specific users, you must
> provide some sort of access control mechanism. The same mechanism should
> apply to images you wish to protect.
>
> This is all related to the fundamental workings of HTTP.
>
> HTTP is an integral part of how the web works - anyone thinking of
> designing a website (especially using scripting languages, servlets, or
> anyone trying to provide any type of security) should understand at
> least the fundamentals of HTTP.
>
> -Erik
>
> Christopher Schultz wrote:
>
>> All,
>>
>>> It would be http://yourserver/yourservlet?param=paramValue";
>>> alt="something">
>>
>>
>> This still doesn't answer the "original" interpreted question. I don't
>> think it's possible to display an image on a page and prevent users
>> from browsing to it directly from their browser.
>>
>> The only thing I can think of is to check the REFERER header to see if
>> it came from the page on which you want to display it. That's also not
>> foolproof...
>>
>> -chris
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> --
> http://www.spectacle.ca/
> The Online Source for Live Music in Montreal
> .::514.286.1699::.
>
>
>


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



RE: Need help with connectors

2003-12-12 Thread Yansheng Lin
Just one quick question(I am just playing with this right now).  Don't pay me
too much attention if the answer is RTFM.

Shouldn't the port for jk2 connector be 8009 instead of 8010?  


-Original Message-
From: Asif Chowdhary [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 3:56 PM
To: Tomcat Users List
Subject: RE: Need help with connectors


This should solve your problem

httpd.conf: just one single row like this:
LoadModule jk2_module modules/mod_jk2-2.0.43.dll

Then I added a worker2.properties in Apache/conf/ like this:

[logger]
level=DEBUG
file=c:/programme/apache group/apache2/logs/jk2.log

[config]
file=c:/programme/apache group/apache2/conf/workers2.properties
debug=0
debugEnv=0

# Shared memory handling. Needs to be set.
[shm]
file=c:/programme/apache group/apache2/logs/shm.file
size=1048576
debug=0
#disabled=0


# Example socket channel, explicitly set port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
tomcatId=localhost:8009
debug=0

[status:]
info=Status worker,displays run time informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0
# end of workers2.properties

Finally, I configured this Connector in the Tomcat server.xml:
---
 


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 5:33 PM
To: 'Tomcat Users List'
Subject: RE: Need help with connectors


I am assuming you downloaded apache, tomcat, and mod_jk_2.X.X.dll

Try:
1) rename mod_jk_2.X.X.dll to mod_jk2.dll, and place it under 
$APACHE_HOME/modules/
2) In apache httpd.conf
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk2_module modules/mod_jk2.dll

Does it work?

-Original Message-
From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:28 AM
To: Tomcat Users List
Subject: Need help with connectors


Hi,


I'm beginning to think that I need to be a system
administrator to connect Apache 2.0 with Tomcat 5.0!
I've already spent 2 full days trying to get it to
work. I remember that for Tomcat 3.4 it took me about
5 minutes.

(I can't even tell whether there is too much
documentation or not enough. Under
/tomcat-4.1-doc/jk2/jk2/configtcex.html there are many
links and I don't know whether I need some of them or
all of them. I don't know whether 4.1 instruction
apply to 5.0. It is not clear how to modify Unix
instruction for Windows intructions. Ordinarily I'm a
Unix guy (I helped write the Gimp), but this is a
Windows project. How am I supposed to interpret the
sentence "There is no need to use the jkjni logic to
use normal socket, so that just for Fun." What's just
for Fun? jkjni or normal socket? Also, on the menu,
the headers are instiguishable from live links so the
whole structure of the document is unclear.)

Anyway, I think you guys produce amazing products,
I've always used them and will stick by them in the
future. I'm just a little frustrated and a little bit
jealous of my time so I'm hoping that someone will
provide instructions for Apache2 + Tomcat5 + Win32.

Thanks.

Dola

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

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


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


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


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



Re: Image Viewing

2003-12-12 Thread Jon Yeargers
Errr.. right.. to a point - you can store something in the HttpSession
that would indicate that a valid session was underway and to permit the
tag to work. (per YS) In the end _it is_ still just a URL but there are
'other forces at work.'


> How does an image get displayed in a page?
>
> 1. The browser receives an HTML page with an IMG tag in it. The IMG tag
> contains a src attr (an HTTP URL).
> 2. The browser makes another request, for the URL of the image.
> 3. The server returns the image, which is displayed.
>
> Clearly, if you want an image to be displayed within a web page, the
> image must be available on your server. There is no difference between
> the browser making a request for an URL and the user typing that URL
> into the address bar directly. Maybe you can look at the referer field,
> but of course that can be hoaxed so if you are really trying to keep
> this secure that is not a solution.
>
> If you really want to only provide content to specific users, you must
> provide some sort of access control mechanism. The same mechanism should
> apply to images you wish to protect.
>
> This is all related to the fundamental workings of HTTP.
>
> HTTP is an integral part of how the web works - anyone thinking of
> designing a website (especially using scripting languages, servlets, or
> anyone trying to provide any type of security) should understand at
> least the fundamentals of HTTP.
>
> -Erik
>
> Christopher Schultz wrote:
>
>> All,
>>
>>> It would be http://yourserver/yourservlet?param=paramValue";
>>> alt="something">
>>
>>
>> This still doesn't answer the "original" interpreted question. I don't
>> think it's possible to display an image on a page and prevent users
>> from browsing to it directly from their browser.
>>
>> The only thing I can think of is to check the REFERER header to see if
>> it came from the page on which you want to display it. That's also not
>> foolproof...
>>
>> -chris
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> --
> http://www.spectacle.ca/
> The Online Source for Live Music in Montreal
> .::514.286.1699::.
>
>
>


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



Re: Tomcat 4.1.29 war unpacking problems

2003-12-12 Thread Philipp Taprogge
Hi!

In tomcat 4 you have to either restart tomcat after you drop the war 
in it's webapps directory or manually install the webapp using the 
tomcat manager (the path to war file should be relative to the webapps 
dir, so if you drop the war there, you can just enter it's name and 
press install button).

	Phil

Joe Francis wrote:
Possible newbie question, but I have not found any faqs addressing this:

I just did a vanilla install of 4.1.29 on a linux box.  Connecting to 
localhost:8080 seems to work fine and I can run the example servlets, 
etc.  In netbeans I made a trivial servlet that just spits back some 
helloworld html.  It works within netbeans' built-in tomcat.  I export 
this as a .war file, and copy it into tomcat's webapps folder (the real 
tomcat, not the netbeans one).  Nothing happens, ie., I cannot access 
that servlet via tomcat, and examining the webapps/ directory reveals 
that the war file was not unpacked.  I stopped and restarted tomcat - 
still no love.

If I manually inflate the war file inside of webapps/ROOT, then I have a 
working servlet.
I've looked at conf/server.xml and verified that the unpackWARS and 
autodeploy settings are both lit.
Not sure what the next step is, so I thought I'd ask here.  The goal is 
to be able to simply copy a .war into the right place and have a running 
tomcat deploy the servlet corerctly.

cheers,
-joe
-
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: Need help with connectors

2003-12-12 Thread Asif Chowdhary
This should solve your problem

httpd.conf: just one single row like this:
LoadModule jk2_module modules/mod_jk2-2.0.43.dll

Then I added a worker2.properties in Apache/conf/ like this:

[logger]
level=DEBUG
file=c:/programme/apache group/apache2/logs/jk2.log

[config]
file=c:/programme/apache group/apache2/conf/workers2.properties
debug=0
debugEnv=0

# Shared memory handling. Needs to be set.
[shm]
file=c:/programme/apache group/apache2/logs/shm.file
size=1048576
debug=0
#disabled=0


# Example socket channel, explicitly set port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
tomcatId=localhost:8009
debug=0

[status:]
info=Status worker,displays run time informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/examples/*]
info=tomcat examples
context=/examples
worker=ajp13:localhost:8009
debug=0
# end of workers2.properties

Finally, I configured this Connector in the Tomcat server.xml:
---
 


-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 5:33 PM
To: 'Tomcat Users List'
Subject: RE: Need help with connectors


I am assuming you downloaded apache, tomcat, and mod_jk_2.X.X.dll

Try:
1) rename mod_jk_2.X.X.dll to mod_jk2.dll, and place it under 
$APACHE_HOME/modules/
2) In apache httpd.conf
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk2_module modules/mod_jk2.dll

Does it work?

-Original Message-
From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:28 AM
To: Tomcat Users List
Subject: Need help with connectors


Hi,


I'm beginning to think that I need to be a system
administrator to connect Apache 2.0 with Tomcat 5.0!
I've already spent 2 full days trying to get it to
work. I remember that for Tomcat 3.4 it took me about
5 minutes.

(I can't even tell whether there is too much
documentation or not enough. Under
/tomcat-4.1-doc/jk2/jk2/configtcex.html there are many
links and I don't know whether I need some of them or
all of them. I don't know whether 4.1 instruction
apply to 5.0. It is not clear how to modify Unix
instruction for Windows intructions. Ordinarily I'm a
Unix guy (I helped write the Gimp), but this is a
Windows project. How am I supposed to interpret the
sentence "There is no need to use the jkjni logic to
use normal socket, so that just for Fun." What's just
for Fun? jkjni or normal socket? Also, on the menu,
the headers are instiguishable from live links so the
whole structure of the document is unclear.)

Anyway, I think you guys produce amazing products,
I've always used them and will stick by them in the
future. I'm just a little frustrated and a little bit
jealous of my time so I'm hoping that someone will
provide instructions for Apache2 + Tomcat5 + Win32.

Thanks.

Dola

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

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


-
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: cgi script not launching in Tomcat 5.0

2003-12-12 Thread Jonathan Eric Miller
I'm having the same exact problem. I think it might be a bug in Tomcat 5 as
I have it working no problem in Tomcat 4. For some reason the file name has
two sets of "'s. Not sure if that might have something to do with it...

Jon

- Original Message - 
From: "Li, William" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 10:13 AM
Subject: cgi script not launching in Tomcat 5.0


> Hi,
>
> I did the config as per the documentation for CGI.  I have a script
> /local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi and it works fine
on
> command line.  But Tomcat doesn't like it:
>
> 2003-12-11 10:54:41 cgi: findCGI calc: name=printenv.cgi,
> path=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
> scriptname=/cgi-bin/printenv.cgi, cginame=/printenv.cgi
> 2003-12-11 10:54:41 cgi: runCGI(envp=[{CONTENT_TYPE=, SERVER_PORT=8080,
> REMOTE_ADDR=127.0.0.1, GATEWAY_INTERFACE=CGI/1.1, QUERY_STRING=,
>
X_TOMCAT_SCRIPT_PATH=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
> REMOTE_HOST=127.0.0.1, SERVER_SOFTWARE=TOMCAT, PATH_INFO=, AUTH_TYPE=,
> SERVER_PROTOCOL=, REQUEST_METHOD=GET, REMOTE_USER=, REMOTE_IDENT=,
> SERVER_NAME=localhost.localdomain, CONTENT_LENGTH=,
> SCRIPT_NAME=/cgi-bin/printenv.cgi}],
> command=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi)
> 2003-12-11 10:54:41 cgi: runCGI (stderr):Can't open perl script
> ""/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi"": No such file
or
> directory
> 2003-12-11 10:54:41 cgi: runCGI: 1 lines received on stderr
>
> Can anyone help?  Thanks!
>
>
> --

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


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



Tomcat 4.1.29 war unpacking problems

2003-12-12 Thread Joe Francis
Possible newbie question, but I have not found any faqs addressing this:

I just did a vanilla install of 4.1.29 on a linux box.  Connecting to 
localhost:8080 seems to work fine and I can run the example servlets, 
etc.  In netbeans I made a trivial servlet that just spits back some 
helloworld html.  It works within netbeans' built-in tomcat.  I export 
this as a .war file, and copy it into tomcat's webapps folder (the real 
tomcat, not the netbeans one).  Nothing happens, ie., I cannot access 
that servlet via tomcat, and examining the webapps/ directory reveals 
that the war file was not unpacked.  I stopped and restarted tomcat - 
still no love.

If I manually inflate the war file inside of webapps/ROOT, then I have a 
working servlet. 

I've looked at conf/server.xml and verified that the unpackWARS and 
autodeploy settings are both lit. 

Not sure what the next step is, so I thought I'd ask here.  The goal is 
to be able to simply copy a .war into the right place and have a running 
tomcat deploy the servlet corerctly.

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


RE: Need help with connectors

2003-12-12 Thread Yansheng Lin
I am assuming you downloaded apache, tomcat, and mod_jk_2.X.X.dll

Try:
1) rename mod_jk_2.X.X.dll to mod_jk2.dll, and place it under 
$APACHE_HOME/modules/
2) In apache httpd.conf
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk2_module modules/mod_jk2.dll

Does it work?

-Original Message-
From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:28 AM
To: Tomcat Users List
Subject: Need help with connectors


Hi,


I'm beginning to think that I need to be a system
administrator to connect Apache 2.0 with Tomcat 5.0!
I've already spent 2 full days trying to get it to
work. I remember that for Tomcat 3.4 it took me about
5 minutes.

(I can't even tell whether there is too much
documentation or not enough. Under
/tomcat-4.1-doc/jk2/jk2/configtcex.html there are many
links and I don't know whether I need some of them or
all of them. I don't know whether 4.1 instruction
apply to 5.0. It is not clear how to modify Unix
instruction for Windows intructions. Ordinarily I'm a
Unix guy (I helped write the Gimp), but this is a
Windows project. How am I supposed to interpret the
sentence "There is no need to use the jkjni logic to
use normal socket, so that just for Fun." What's just
for Fun? jkjni or normal socket? Also, on the menu,
the headers are instiguishable from live links so the
whole structure of the document is unclear.)

Anyway, I think you guys produce amazing products,
I've always used them and will stick by them in the
future. I'm just a little frustrated and a little bit
jealous of my time so I'm hoping that someone will
provide instructions for Apache2 + Tomcat5 + Win32.

Thanks.

Dola

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

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


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



RE: ServletException

2003-12-12 Thread Yansheng Lin
It seems that you don't have the tomcat path configured right.  From JavaDoc:
HttpJspBase.java is the super class of all JSP-generated servlets.
Your jsp page cannot find the right path right now.  

-Original Message-
From: Julien Martin [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 11:23 AM
To: Tomcat Users List
Subject: ServletException


Hello,

I am trying to run a plain jsp application under Jonas/Tomcat. Here is the
exception I get:

*
javax.servlet.ServletException:
org/apache/jasper/runtime/HttpJspBase
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
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.access$000(ApplicationFilter
Chain.java:98)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain
.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:172)
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:2416)
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.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)

cause mère

java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:213)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:497)
at
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
a:150)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:440)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
71)
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.access$000(ApplicationFilter
Chain.java:98)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain
.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:172)
at
org.apache.catalina.core.Sta

Tomcat Exception Handling =?= Web Tier Exception Handling

2003-12-12 Thread Yansheng Lin

Hi, I am having a bit of problem setting up my exception handling hierarchy. I
know you can use the error-page attribute in web.xml to handle system error.
But I read somewhere that one should always distance himself from system-level
exception handling when it comes to web applications.  


500
serverError.jsp



java.lang.NullPointerException
nullError.jsp


My question is, should I use tomcat exception handling mechanism, or should I
come up with my own exception handling framework?  Maybe I should use both, but
I am not very keen on spending time on exceptions right now(need to get the
alpha release out as soon as possible)
Any suggestions?

-Yan



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



RE: JNDI comp namespace

2003-12-12 Thread Tony Colson
Hi,

Thanks for the tip.  Actually, this is how my server.xml was set up
originally.  I changed the resource name to java:comp/env/jdbc/NNT under
the notion that it might create the comp namespace if it saw it in the
xml file.

I am beginning to wonder if the problem is related to the fact that I
have different ports running web apps?

Thanks,
 
Tony Colson
 
-Original Message-
From: Altankov Peter [mailto:[EMAIL PROTECTED] 
 Howdy,Try this setup in your context definition:
   

.


After that in the source where u access it go for:
Context ictx = new InitialContext();
if (ictx == null) {
throw new Exception("Boom - No Context");
}
DtataSource ds = (DataSource) ictx.lookup("java:comp/env/jdbc/NNT");

I don’t have the time to go into JNDI details, but im pretty sure that
wold work for you


-Original Message-
From: Tony Colson [mailto:[EMAIL PROTECTED] 
Sent: 12  2003 ?. 10:48
To: 'Tomcat Users List'
Subject: RE: JNDI comp namespace


As per a suggestion I am posting my server.xml file.

I have several applications on different ports.  I am trying to use JNDI
on the NNT application running on port 9000.  Do a search for "9000" and
you will be at the  tag.  Just scroll down to see the
 and  tags to look at my setup.  (Also note that I am
trying to use  as seen at the top of the file.)

Thanks
Tony
= START SERVER.XML ==









  
  
  
  

  
  








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






  

  

  
  




























 
 



  
  

  
  

  

  
  

  
  

  

  

  

  

  
  

















  
  

  



  
  
  
  
  
  
 
usernamesa
password
driverClassName
  org.hsql.jdbcDriver
url
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  
  




  


  



  

  

  


  










  

  

  
  

















  










  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
org.postgresql.Driver
  
  
url

jdbc:postgresql://horse:5432/NNT
  
  
username
user
  
  
password
passwd
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  



  
 removeAbandoned
 true
  



  
 logAbandoned
 true
  






  



  

  










  

  

  
  

















  

  



  


== END SERVER.XML ===




-Original Message-
Hi Tony,

I have - and it allways proved to be my fault in the end ;) I would
suggest that you post your server xml to have someone look it over.
Don't forget to change your connect data and password before though! Is
the resource bound in the appropriate context or globally?

Cheers, Jan

> -Ursprungliche Nachricht-
> Dear Tomcat Users,
> 
> I am using Tomcat 4 and trying to use JNDI to connect to a
> data source and environment variables.  I get the following 
> when trying to access the InitialContext via
> 
> DataSource ds = (DataSource)initialContext.lookup(
> "java:comp/env/jdbc/mydb" );
> 
> javax.naming.NameNotFoundException: Name comp is not bound in
> this Context
> 
> I have read all the documentation many times and cannot see
> what I am doing wrong.  The server.xml seems to be fine; I 
> can see the appropriate context entries in the tomcat manager 
> application.  But for some reason the comp namespace does not 
> seem to get set up; basically Tomcat doesn't do what the 
> documentation says it should.
> 
> Has anybody encountered this type of situation before and
> found a solution?
> Thanks
> 
> Tony



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


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

Re: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Ben Souther
I haven't seen any documentation for this yet (but I haven't read much 
lately).  Someone mentioned on this list a while back.

Good-Luck
-Ben


On Friday 12 December 2003 04:02 pm, Jonathan Eric Miller wrote:
> OK, yeah, I just noticed that when I removed the leading "/", it worked. Is
> this documented somewhere? I was going by what it says in the Servlet 2.4
> spec, and I didn't see that mentioned in there.
>
> Since I need to protect the resource using a security-constraint, so, I
> think I'm better off just using a redirect.
>
> Thanks, Jon
>
> - Original Message -
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Friday, December 12, 2003 3:01 PM
> Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?
>
> > The welcome file list actually has to point to a servlet mapping.
> > Here is mine.  It works.
> >
> >
> >2296
> >2297   
> >2298 HrpServlet
> >2299 /HRP
> >2300   
> >2301
> >2302
> >2303   
> >2304   HRP
> >2305
> >2306 
> >
> > On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote:
> > > Hmmm, I just tried it by adding the following to my web.xml file but
>
> it's
>
> > > still just printing out the directory listing.
> > >
> > > 
> > > /servlet/myservlet
> > > 
> > >
> > > I have it working with a index.jsp with a redirect, so, I guess I'll
>
> just
>
> > > stick with that...
> > >
> > > Thanks, Jon
> > >
> > > - Original Message -
> > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Friday, December 12, 2003 1:31 PM
> > > Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?
> > >
> > > > In version 5x you could also set a servlet to be your welcome file.
> > > >
> > > > On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote:
> > > > > Howdy,
> > > > > The / mapping is taken by default servlet in the default tomcat
> > > > > configuration.  If you map a servlet to /, you have to:
> > > > > 1. Remove the default servlet mapping from conf/web.xml.
> > > > > 2. Make sure you handle static content (this is what the default
> > > > > servlet handles, among other duties).
> > > > >
> > > > > As for directory listings, read the FAQ.
> > > > >
> > > > > Yoav Shapira
> > > > > Millennium ChemInformatics
> > > > >
> > > > > >-Original Message-
> > > > >
> > > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
> > > > >
> > > > > >Sent: Friday, December 12, 2003 1:23 PM
> > > > > >To: Tomcat User List
> > > > > >Subject: Default servlet mapping not working in Tomcat 5.0.16?
> > > > > >
> > > > > >I'm using Tomcat 5.0.16 and I'm trying to make it so that if a
> > > > > > user
> > > > >
> > > > > enters
> > > > >
> > > > > >a
> > > > > >path like, http://myserver/myapp it runs a default servlet for
> > > > > > that
> > > > >
> > > > > path.
> > > > >
> > > > > >According the the Servlet 2.4 spec, you can do this by mapping "/"
>
> to
>
> > > > > > a servlet. However, for me, it's just printing out a directory
> > > > > > listing of
> > > > >
> > > > > the
> > > > >
> > > > > >/myapp directory when I try it (on a side note, how do you
> > > > > > globally
> > > > >
> > > > > disable
> > > > >
> > > > > >directory browsing?).
> > > > > >
> > > > > >I'm using a web.xml similar to the following.
> > > > > >
> > > > > >
> > > > > >http://java.sun.com/xml/ns/j2ee";
> > > > > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > > > >xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>
> web-app_2_4.xsd"
>
> > > > > >version="2.4">
> > > > > >
> > > > > >myservlet
> > > > > >mypackage.MyServlet
> > > > > >
> > > > > >
> > > > > >myservlet
> > > > > >/
> > > > > >/servlet/myservlet
> > > > > >/servlet/myservlet/*
> > > > > >
> > > > > >
> > > > > >Also, I have something similar to the following in my server.xml.
> > > > > >
> > > > > > > > > > > reloadable="true">
> > > > > >
> > > > > >Any ideas?
> > > > > >
> > > > > >I can do what I want to do using an index.jsp with a redirect,
> > > > > > but,
>
> I
>
> > > > > would
> > > > >
> > > > > >like to avoid having it do a redirect if possible.
> > > > > >
> > > > > >Jon
> >
> >-
> >
> > > > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > >For additional commands, e-mail:
>
> [EMAIL PROTECTED]
>
> > > > > This e-mail, including any attachments, is a confidential business
> > > > > communication, and may contain information that is confidential,
> > > > > proprietary and/or privileged.  This e-mail is intended only for
> > > > > the individual(s) to whom it is addressed, and may not be saved,
> > > > > copied, printed, disclosed or used by anyone else.  If you are not
> > > > > the(an)
> > >
> > > intended
> > >
> > > > > recipient, please immediately delete this e-mail from your computer
> > >
> > > system
> > >
> > > > > and notify the sender.  Thank you.
>

Re: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Jonathan Eric Miller
OK, yeah, I just noticed that when I removed the leading "/", it worked. Is
this documented somewhere? I was going by what it says in the Servlet 2.4
spec, and I didn't see that mentioned in there.

Since I need to protect the resource using a security-constraint, so, I
think I'm better off just using a redirect.

Thanks, Jon

- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 3:01 PM
Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?


> The welcome file list actually has to point to a servlet mapping.
> Here is mine.  It works.
>
>
>2296
>2297   
>2298 HrpServlet
>2299 /HRP
>2300   
>2301
>2302
>2303   
>2304   HRP
>2305
>2306 
>
>
>
>
>
>
>
>
>
>
>
>
> On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote:
> > Hmmm, I just tried it by adding the following to my web.xml file but
it's
> > still just printing out the directory listing.
> >
> > 
> > /servlet/myservlet
> > 
> >
> > I have it working with a index.jsp with a redirect, so, I guess I'll
just
> > stick with that...
> >
> > Thanks, Jon
> >
> > - Original Message -
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Friday, December 12, 2003 1:31 PM
> > Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?
> >
> > > In version 5x you could also set a servlet to be your welcome file.
> > >
> > > On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote:
> > > > Howdy,
> > > > The / mapping is taken by default servlet in the default tomcat
> > > > configuration.  If you map a servlet to /, you have to:
> > > > 1. Remove the default servlet mapping from conf/web.xml.
> > > > 2. Make sure you handle static content (this is what the default
> > > > servlet handles, among other duties).
> > > >
> > > > As for directory listings, read the FAQ.
> > > >
> > > > Yoav Shapira
> > > > Millennium ChemInformatics
> > > >
> > > > >-Original Message-
> > > >
> > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
> > > >
> > > > >Sent: Friday, December 12, 2003 1:23 PM
> > > > >To: Tomcat User List
> > > > >Subject: Default servlet mapping not working in Tomcat 5.0.16?
> > > > >
> > > > >I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user
> > > >
> > > > enters
> > > >
> > > > >a
> > > > >path like, http://myserver/myapp it runs a default servlet for that
> > > >
> > > > path.
> > > >
> > > > >According the the Servlet 2.4 spec, you can do this by mapping "/"
to
> > > > > a servlet. However, for me, it's just printing out a directory
> > > > > listing of
> > > >
> > > > the
> > > >
> > > > >/myapp directory when I try it (on a side note, how do you globally
> > > >
> > > > disable
> > > >
> > > > >directory browsing?).
> > > > >
> > > > >I'm using a web.xml similar to the following.
> > > > >
> > > > >
> > > > >http://java.sun.com/xml/ns/j2ee";
> > > > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > > >xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
web-app_2_4.xsd"
> > > > >version="2.4">
> > > > >
> > > > >myservlet
> > > > >mypackage.MyServlet
> > > > >
> > > > >
> > > > >myservlet
> > > > >/
> > > > >/servlet/myservlet
> > > > >/servlet/myservlet/*
> > > > >
> > > > >
> > > > >Also, I have something similar to the following in my server.xml.
> > > > >
> > > > >
> > > > >
> > > > >Any ideas?
> > > > >
> > > > >I can do what I want to do using an index.jsp with a redirect, but,
I
> > > >
> > > > would
> > > >
> > > > >like to avoid having it do a redirect if possible.
> > > > >
> > > > >Jon
> > > > >
> > > > >
> > > >
>-
> > > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > >For additional commands, e-mail:
[EMAIL PROTECTED]
> > > >
> > > > This e-mail, including any attachments, is a confidential business
> > > > communication, and may contain information that is confidential,
> > > > proprietary and/or privileged.  This e-mail is intended only for the
> > > > individual(s) to whom it is addressed, and may not be saved, copied,
> > > > printed, disclosed or used by anyone else.  If you are not the(an)
> >
> > intended
> >
> > > > recipient, please immediately delete this e-mail from your computer
> >
> > system
> >
> > > > and notify the sender.  Thank you.
> > > >
> > > >
> > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > --
> > > Ben Souther
> > > F.W. Davison & Company, Inc.
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> 

can't get (Sybase ASE 12.5) database connection, maybe prob with tomcat config?

2003-12-12 Thread Alan Czajkowski
i'm having some trouble setting up a datasource on apache/tomcat that 
comes bundled with sun's solaris 9

i copied the jConnect5.5 jconn2.jar file to /usr/apache/tomcat/common/lib

i pasted the new context (for connecting to the database) into the server.xml file in 
/var/apache/tomcat/conf

the directory tree for the webapps looks like so:
/var/apache/tomcat/webapps/sybase/jsp/sybase.jsp
/var/apache/tomcat/webapps/sybase/WEB-INF/web.xml
/var/apache/tomcat/webapps/sybase/WEB-INF/jsp/

i then stopped and then re-started apache

when i call /var/apache/tomcat/webapps/sybase/jsp/sybase.jsp (it's a connection test 
file that Sybase provides) through http://hostname:port/sybase/jsp/sybase.jsp
i get this error:
Start of Test 
initCtx = new InitialContext() : successful 
[EMAIL PROTECTED] 
envCtx = initCtx.lookup(java:comp/env) : successful 
[EMAIL PROTECTED] 
Trying ds=(DataSource)envCtx.lookup(jdbc/a_sybase_datasource) 
Datasource lookup failed 
javax.naming.NamingException: Cannot create resource instance
DataSource null 
Inside catch(Exception e)
null java.lang.NullPointerException 
End of Test 

any ideas?

context in server.xml
--

 

 

 


 

factory
org.apache.commons.dbcp.BasicDataSourceFactory

 

maxActive
10

 

maxIdle
5

 

maxWait
1

 

driverClassName
com.sybase.jdbc2.jdbc.SybDriver

 

url
jdbc:sybase:Tds:10.34.34.34:4300/mydb?JCONNECT_VERSION=6

 

username
myuser

 

password
mypasswd

 


 

-


Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-

Re: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Ben Souther
The welcome file list actually has to point to a servlet mapping.
Here is mine.  It works.


   2296
   2297   
   2298 HrpServlet
   2299 /HRP
   2300   
   2301
   2302
   2303   
   2304   HRP
   2305
   2306 












On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote:
> Hmmm, I just tried it by adding the following to my web.xml file but it's
> still just printing out the directory listing.
>
> 
> /servlet/myservlet
> 
>
> I have it working with a index.jsp with a redirect, so, I guess I'll just
> stick with that...
>
> Thanks, Jon
>
> - Original Message -
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Friday, December 12, 2003 1:31 PM
> Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?
>
> > In version 5x you could also set a servlet to be your welcome file.
> >
> > On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote:
> > > Howdy,
> > > The / mapping is taken by default servlet in the default tomcat
> > > configuration.  If you map a servlet to /, you have to:
> > > 1. Remove the default servlet mapping from conf/web.xml.
> > > 2. Make sure you handle static content (this is what the default
> > > servlet handles, among other duties).
> > >
> > > As for directory listings, read the FAQ.
> > >
> > > Yoav Shapira
> > > Millennium ChemInformatics
> > >
> > > >-Original Message-
> > >
> > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
> > >
> > > >Sent: Friday, December 12, 2003 1:23 PM
> > > >To: Tomcat User List
> > > >Subject: Default servlet mapping not working in Tomcat 5.0.16?
> > > >
> > > >I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user
> > >
> > > enters
> > >
> > > >a
> > > >path like, http://myserver/myapp it runs a default servlet for that
> > >
> > > path.
> > >
> > > >According the the Servlet 2.4 spec, you can do this by mapping "/" to
> > > > a servlet. However, for me, it's just printing out a directory
> > > > listing of
> > >
> > > the
> > >
> > > >/myapp directory when I try it (on a side note, how do you globally
> > >
> > > disable
> > >
> > > >directory browsing?).
> > > >
> > > >I'm using a web.xml similar to the following.
> > > >
> > > >
> > > >http://java.sun.com/xml/ns/j2ee";
> > > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > >xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
> > > >version="2.4">
> > > >
> > > >myservlet
> > > >mypackage.MyServlet
> > > >
> > > >
> > > >myservlet
> > > >/
> > > >/servlet/myservlet
> > > >/servlet/myservlet/*
> > > >
> > > >
> > > >Also, I have something similar to the following in my server.xml.
> > > >
> > > >
> > > >
> > > >Any ideas?
> > > >
> > > >I can do what I want to do using an index.jsp with a redirect, but, I
> > >
> > > would
> > >
> > > >like to avoid having it do a redirect if possible.
> > > >
> > > >Jon
> > > >
> > > >
> > > >-
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > This e-mail, including any attachments, is a confidential business
> > > communication, and may contain information that is confidential,
> > > proprietary and/or privileged.  This e-mail is intended only for the
> > > individual(s) to whom it is addressed, and may not be saved, copied,
> > > printed, disclosed or used by anyone else.  If you are not the(an)
>
> intended
>
> > > recipient, please immediately delete this e-mail from your computer
>
> system
>
> > > and notify the sender.  Thank you.
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Ben Souther
> > F.W. Davison & Company, 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]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



Re: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Jonathan Eric Miller
Hmmm, I just tried it by adding the following to my web.xml file but it's
still just printing out the directory listing.


/servlet/myservlet


I have it working with a index.jsp with a redirect, so, I guess I'll just
stick with that...

Thanks, Jon

- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 1:31 PM
Subject: Re: Default servlet mapping not working in Tomcat 5.0.16?


> In version 5x you could also set a servlet to be your welcome file.
>
>
>
>
> On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote:
> > Howdy,
> > The / mapping is taken by default servlet in the default tomcat
> > configuration.  If you map a servlet to /, you have to:
> > 1. Remove the default servlet mapping from conf/web.xml.
> > 2. Make sure you handle static content (this is what the default servlet
> > handles, among other duties).
> >
> > As for directory listings, read the FAQ.
> >
> > Yoav Shapira
> > Millennium ChemInformatics
> >
> > >-Original Message-
> >
> > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
> >
> > >Sent: Friday, December 12, 2003 1:23 PM
> > >To: Tomcat User List
> > >Subject: Default servlet mapping not working in Tomcat 5.0.16?
> > >
> > >I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user
> >
> > enters
> >
> > >a
> > >path like, http://myserver/myapp it runs a default servlet for that
> >
> > path.
> >
> > >According the the Servlet 2.4 spec, you can do this by mapping "/" to a
> > >servlet. However, for me, it's just printing out a directory listing of
> >
> > the
> >
> > >/myapp directory when I try it (on a side note, how do you globally
> >
> > disable
> >
> > >directory browsing?).
> > >
> > >I'm using a web.xml similar to the following.
> > >
> > >
> > >http://java.sun.com/xml/ns/j2ee";
> > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
> > >version="2.4">
> > >
> > >myservlet
> > >mypackage.MyServlet
> > >
> > >
> > >myservlet
> > >/
> > >/servlet/myservlet
> > >/servlet/myservlet/*
> > >
> > >
> > >Also, I have something similar to the following in my server.xml.
> > >
> > >
> > >
> > >Any ideas?
> > >
> > >I can do what I want to do using an index.jsp with a redirect, but, I
> >
> > would
> >
> > >like to avoid having it do a redirect if possible.
> > >
> > >Jon
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > This e-mail, including any attachments, is a confidential business
> > communication, and may contain information that is confidential,
> > proprietary and/or privileged.  This e-mail is intended only for the
> > individual(s) to whom it is addressed, and may not be saved, copied,
> > printed, disclosed or used by anyone else.  If you are not the(an)
intended
> > recipient, please immediately delete this e-mail from your computer
system
> > and notify the sender.  Thank you.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -- 
> Ben Souther
> F.W. Davison & Company, 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: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread George Sexton
Since this is clearly a Sendmail issue, I recommend you redirect your question 
to a more appropriate forum.

Quoting Ashwin Kutty <[EMAIL PROTECTED]>:

> Was wondering if someone could help me out here.  I am trying a product
> out called DSPACE which gives the following error in catalina.out
> 
> 2003-12-12 08:53:34,957 INFO  org.dspace.app.webui.servlet.RegisterServlet
> @ anonymous:session_id=B3D285B12E90E6BCCAF3E4097712D59B:error_emai$
> javax.mail.SendFailedException: Sending failed;
>   nested exception is:
> javax.mail.SendFailedException: Invalid Addresses;
>   nested exception is:
> javax.mail.SendFailedException: 550 5.7.1 <[EMAIL PROTECTED]>...
> Relaying denied
> 
> at javax.mail.Transport.send0(Transport.java:219)
> at javax.mail.Transport.send(Transport.java:81)
> at org.dspace.core.Email.send(Email.java:259)
> at
> org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:291)
> at
> org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:251)
> at
> org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:96)
> at
> org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail
(RegisterServlet.java:272)
> at
> org.dspace.app.webui.servlet.RegisterServlet.doDSPost
(RegisterServlet.java:206)
> at
> org.dspace.app.webui.servlet.DSpaceServlet.processRequest
(DSpaceServlet.java:153)
> at
> org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:110)
> 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.invokeNex
t(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.invokeNex
t(StandardPipeline.java:643)
> at
> org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
> at
> 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.StandardContext.invoke(StandardContext.java:2416)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at
> 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
>at
> 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> at
> 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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.coyote.http11.Http11Processor.process(Http11Processor.java:601)
> at
> 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(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:534)
> 
> I have used valid domains and e-mail addresses, but the error still
> appears.  Tomcat has in its server.xml file the name of the server and the
> IP in the value tag under mail/Session Resource.  There 

Re: CSS in War file

2003-12-12 Thread Rhino
You haven't said much about your environment and you haven't included any
code so it's hard to be sure what the problem is. However, I have no
problems accessing a CSS in my War file in Tomcat.

Here is a fragment from my servlet, which runs fine in Tomcat 4.1.24 on a
Linux box:

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

response.setContentType(CONTENT_TYPE);

PrintWriter out = response.getWriter();

out.println("");

out.println("");

out.println("SDAC Event Input");

out.println("");

out.println("");


}

The CSS, event_form.css, is in my $CATALINA_HOME/webapps/SDACServlet
directory.

I hope this helps.

Rhino

- Original Message - 
From: "Duncan Smith" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 1:25 PM
Subject: Re: CSS in War file


> When I request a page which should have the styles applied, they are not.
>
> If I try to request the css file on it's own from a browser, I get the NPE
>
> (ie. www.pennymail.com/pennymail.css)
>
> -Duncan
> www.pennymail.com
>
> Wendy Smoak wrote:
>
> > > From: Duncan Smith [mailto:[EMAIL PROTECTED]
> >
> > > The stylesheet is added to the war file in the same location
> > > as before,
> >
> > Where in the .war file is the stylesheet?
> >
> > > but if I try to request the css file on it's own I get a
> > > java.lang.NullPointerException error.
> >
> > How are you requesting the CSS?  With a browser?  Where are you seeing
> > the NPE, browser window, or in a log file?
> >
> > --
> > Wendy Smoak
> > Application Systems Analyst, Sr.
> > ASU IA Information Resources Management
> >
> > -
> > 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]



AW: new JVM feature, just an idea

2003-12-12 Thread SH Solutions
Hi

If this is about Environment, you actually CAN extend it to 128K.
Classpaths greater than 128K are no good idea.
Classpaths containing the same jars twice aren't either.

If this is about Command line, you actually CAN get around this:
SET CLASSPATH=.
SET CLASSPATH=%CLASSPATH%;. 
SET CLASSPATH=%CLASSPATH%;.
SET CLASSPATH=%CLASSPATH%;.

Jut doing an duplicating test, I got up to >7500 chars on an windows 2003
server with NO tweaking.

cu
  Steffen


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



Re: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Ben Souther
In version 5x you could also set a servlet to be your welcome file.




On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote:
> Howdy,
> The / mapping is taken by default servlet in the default tomcat
> configuration.  If you map a servlet to /, you have to:
> 1. Remove the default servlet mapping from conf/web.xml.
> 2. Make sure you handle static content (this is what the default servlet
> handles, among other duties).
>
> As for directory listings, read the FAQ.
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-Original Message-
>
> From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
>
> >Sent: Friday, December 12, 2003 1:23 PM
> >To: Tomcat User List
> >Subject: Default servlet mapping not working in Tomcat 5.0.16?
> >
> >I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user
>
> enters
>
> >a
> >path like, http://myserver/myapp it runs a default servlet for that
>
> path.
>
> >According the the Servlet 2.4 spec, you can do this by mapping "/" to a
> >servlet. However, for me, it's just printing out a directory listing of
>
> the
>
> >/myapp directory when I try it (on a side note, how do you globally
>
> disable
>
> >directory browsing?).
> >
> >I'm using a web.xml similar to the following.
> >
> >
> >http://java.sun.com/xml/ns/j2ee";
> >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
> >version="2.4">
> >
> >myservlet
> >mypackage.MyServlet
> >
> >
> >myservlet
> >/
> >/servlet/myservlet
> >/servlet/myservlet/*
> >
> >
> >Also, I have something similar to the following in my server.xml.
> >
> >
> >
> >Any ideas?
> >
> >I can do what I want to do using an index.jsp with a redirect, but, I
>
> would
>
> >like to avoid having it do a redirect if possible.
> >
> >Jon
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail from your computer system
> and notify the sender.  Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



Re: Default context for web app

2003-12-12 Thread Adam Hardy
On 12/12/2003 12:15 AM Kent Boogaart wrote:
I am currently running against version 4.1.27 of Tomcat. I did not
alter the name of my deploy directory. Here is my  element
(with env entries removed):

   charsetMapperClass="org.apache.catalina.util.CharsetMapper" 
   cookies="true" crossContext="false" debug="0" displayName="eSM" 
   docBase="D:/tomcat41/bin/../webapps/eSM"
   mapperClass="org.apache.catalina.core.StandardContextMapper" 
>path=""
   privileged="false" reloadable="false" swallowOutput="false" 
   useNaming="true"
   wrapperClass="org.apache.catalina.core.StandardWrapper"> ... 


My WAR file is called eSM.war and, as you can see, my deploy
directory is $TOMCAT_HOME/webapps/eSM. Note, however, that Tomcat
uses $TOMCAT_HOME/work/Standalone/localhost/_ as the working
directory for the web app since the path is "".
When I do that, I get a context at "/" and a context at "eSM". In 
$TOMCAT_HOME/work/Standalone/localhost/ tomcat makes both "_" and "eSM".

I use exactly the same context config as you, except some I don't 
declare since the defaults are the same. The only one I don't recognise 
is 'displayName' - can't see it in the docs. What is it?

As I originally said, putting it in ROOT is the only way I have found to 
avoid this. But I guess it's not important.

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


Re: Tomcat 4.1.29 Clustering

2003-12-12 Thread Filip Hanik
http://cvs.apache.org/~fhanik/


- Original Message - 
From: "Pitre, Russell" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 1:18 PM
Subject: Tomcat 4.1.29 Clustering


Hello All,  

 

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

 

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

 




 

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

 

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

 

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

 

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

java.lang.NullPointerException

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

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

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

 

 

 

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

 

 

Any Ideas?

 

 

 



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



RE: Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Shapira, Yoav

Howdy,
The / mapping is taken by default servlet in the default tomcat
configuration.  If you map a servlet to /, you have to:
1. Remove the default servlet mapping from conf/web.xml.
2. Make sure you handle static content (this is what the default servlet
handles, among other duties).

As for directory listings, read the FAQ.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 1:23 PM
>To: Tomcat User List
>Subject: Default servlet mapping not working in Tomcat 5.0.16?
>
>I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user
enters
>a
>path like, http://myserver/myapp it runs a default servlet for that
path.
>
>According the the Servlet 2.4 spec, you can do this by mapping "/" to a
>servlet. However, for me, it's just printing out a directory listing of
the
>/myapp directory when I try it (on a side note, how do you globally
disable
>directory browsing?).
>
>I'm using a web.xml similar to the following.
>
>
>http://java.sun.com/xml/ns/j2ee";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
>version="2.4">
>
>myservlet
>mypackage.MyServlet
>
>
>myservlet
>/
>/servlet/myservlet
>/servlet/myservlet/*
>
>
>Also, I have something similar to the following in my server.xml.
>
>
>
>Any ideas?
>
>I can do what I want to do using an index.jsp with a redirect, but, I
would
>like to avoid having it do a redirect if possible.
>
>Jon
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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


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



JK2 and NoClassDefFoundError of HttpMessages

2003-12-12 Thread [EMAIL PROTECTED]
Hi,
(B
(BI am trying Tomcat 5.0.16 with mod_jk2v2.0.2, Apache 2.0.47 on Fodora
(BLinux Core1.
(B
(BWhen I start Tomcat without -security, I have no problem.
(BWhen I start Tomcat with -security and I use
(Bdomain_name:8080/servlet/ListRoomsServlet, again I have no problem
(B(ListRoomsServlet is the servlet I am trying).
(B
(BWhen I start Tomcat with -security and use
(Bdomain_name/servlet/ListRoomsServlet, I have the next error message:
(B
(Bexception
(B
(Bjavax.servlet.ServletException: org/apache/tomcat/util/http/HttpMessages
(Borg.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)
(Borg.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)
(B
(B
(Broot cause
(B
(Bjava.lang.NoClassDefFoundError: org/apache/tomcat/util/http/HttpMessages
(Borg.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:350)
(Borg.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:402)
(Borg.apache.coyote.Response.action(Response.java:226)
(Borg.apache.coyote.Response.sendHeaders(Response.java:418)
(Borg.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:240)
(Borg.apache.coyote.Response.doWrite(Response.java:586)
(Borg.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
(Borg.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:428)
(Borg.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:361)
(Borg.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:325)
(Borg.apache.coyote.tomcat5.CoyoteWriter.close(CoyoteWriter.java:130)
(BListRoomsServlet.doGet(ListRoomsServlet.java:714)
(Bjavax.servlet.http.HttpServlet.service(HttpServlet.java:743)
(Bjavax.servlet.http.HttpServlet.service(HttpServlet.java:856)
(Bsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(Bsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
(B
(Bsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
(Bjava.lang.reflect.Method.invoke(Method.java:324)
(Borg.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
(Bjava.security.AccessController.doPrivileged(Native Method)
(Bjavax.security.auth.Subject.doAsPrivileged(Subject.java:500)
(Borg.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
(Borg.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)
(B
(BIs there something I might forget to add to classpath or to add conf/catalina.policy?
(BThank you in advance.
(B
(BSam
(B
(B
(B
(B-
(BTo unsubscribe, e-mail: [EMAIL PROTECTED]
(BFor additional commands, e-mail: [EMAIL PROTECTED]

RE: MOD_JK2 workers2.properties socket_keepalive

2003-12-12 Thread Kip Iles
This seems to work ...

[channel.socket:app01]
port=8009
host=xx.xx.xx.xx
socket_keepalive=1
socket_timeout=300

At least jkstatus shows that the config now 

Kip

-Original Message-
From: Kip Iles [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 1:14 PM
To: [EMAIL PROTECTED]
Subject: MOD_JK2 workers2.properties socket_keepalive

How do I add socket_keepalive and connect_timeout to the workers2.properties
file on the web server. All the examples discuss doing this in the
workers.properties file which, to my understanding, does not apply to
mod_jk2.

The JK2 docs only discuss the format for adding properties to the
workers2.properties file but doesn't detail which properties accept which
parameters.

My client's firewall is shutting down the port 8009 connection from the
Apache 2.0.43/mod_jk2.so server on the DMZ and the Tomcat 4.1.29 application
server behind the DMZ's firewall after 60 minutes of inactivity. It takes
ten minutes or more for JK2 to recover.

I have searched the archives in depth to no avail. If this has already been
answered - my apologies.

Kipland Iles
Systems Consultant
http://kiplandiles.com



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



Need help with connectors

2003-12-12 Thread Dola Woolfe
Hi,


I'm beginning to think that I need to be a system
administrator to connect Apache 2.0 with Tomcat 5.0!
I've already spent 2 full days trying to get it to
work. I remember that for Tomcat 3.4 it took me about
5 minutes.

(I can't even tell whether there is too much
documentation or not enough. Under
/tomcat-4.1-doc/jk2/jk2/configtcex.html there are many
links and I don't know whether I need some of them or
all of them. I don't know whether 4.1 instruction
apply to 5.0. It is not clear how to modify Unix
instruction for Windows intructions. Ordinarily I'm a
Unix guy (I helped write the Gimp), but this is a
Windows project. How am I supposed to interpret the
sentence "There is no need to use the jkjni logic to
use normal socket, so that just for Fun." What's just
for Fun? jkjni or normal socket? Also, on the menu,
the headers are instiguishable from live links so the
whole structure of the document is unclear.)

Anyway, I think you guys produce amazing products,
I've always used them and will stick by them in the
future. I'm just a little frustrated and a little bit
jealous of my time so I'm hoping that someone will
provide instructions for Apache2 + Tomcat5 + Win32.

Thanks.

Dola

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

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



RE: new JVM feature, just an idea

2003-12-12 Thread Edson Alves Pereira
That´s right, but even using a GUI IDE like JBuilder or Netbeans
this problem can occours, because in a low level these tools make a command
like to compile, to build a webbapp or to create a jar file.

> --
> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 12 de dezembro de 2003 15:18
> Para: Tomcat Users List
> Assunto:  RE: new JVM feature, just an idea
> 
> 
> Howdy,
> 
> > And Yoav, you did say that in almost 10 years no one complains about
> >it, but as i know there are many people facing this issue all over
> internet
> >also. My neibour here has a windows 2000, he will make some tests with
> its
> >command line.
> 
> I misunderstood your problem when I said no one else has it.  What you
> describe is a common issue.  It used to be more common before people used
> Ant and IDEs, when they did more stuff on the command line.  I just
> haven't compiled anything in a DOS window for ages, so I forgot ;)
> 
> Yoav Shapira
> 
> >
> >> --
> >> De:Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> Responder: Tomcat Users List
> >> Enviada:   sexta-feira, 12 de dezembro de 2003 14:41
> >> Para:  Tomcat Users List
> >> Assunto:   RE: new JVM feature, just an idea
> >>
> >>
> >> Howdy,
> >> I see -- thanks for the example.
> >>
> >> You do realize Ant adds a lot of these jars for you automatically to
> the
> >> classpath, right?  You don't need to add anything in ANT_HOME/lib, as
> >> that's automatically included.  Furthermore, if you're using JDK 1.4 or
> >> later, you can remove a bunch of other jars from the path as they're
> >> included in the JDK, e.g. JAXP, Crimson, JDBC 2.0 extensions.  Finally,
> >> you have a number of duplicates, e.g. the XML APIs, repeated a number
> of
> >> times in the path.
> >>
> >> Yoav Shapira
> >> Millennium ChemInformatics
> >>
> >>
> >> >-Original Message-
> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >> >Sent: Friday, December 12, 2003 1:35 PM
> >> >To: 'Tomcat Users List'
> >> >Subject: RE: new JVM feature, just an idea
> >> >
> >> >  This mainly it happen with ant, here a snapshot of it:
> >> >
> >> >D:\home\edson>set
> >> >LOCALCLASSPATH=d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmlta
> >> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
> >> >apis.jar;d:\usr\local\j
> >> >akar
> >>
> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
> >> >1.5.4
> >> >\lib
> >> >\optional.jar;d:\usr\local\jakarta\apache-ant-
> >> >1.5.4\lib\ant.jar;d:\arquiv~1\
> >> >j2sd
> >> >k1.4.1_01\commapi\comm.jar;d:\usr\local\skinlf-
> >> >1.2.4\lib\skinregion.jar;d:\u
> >> >sr\l
> >> >ocal\skinlf-1.2.4\lib\skinlf.jar;d:\usr\local\ecs-1.4.1\lib\xerces-
> >> >1.2.2.jar
> >> >;d:\
> >> >usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;d:\usr\local\ecs-
> >1.4.1\ecs
> >> -
> >> >1.
> >> >4.1.
> >>
> >>jar;d:\usr\local\java_cup\java_cup.jar;d:\usr\local\hsqldb_v.1.61\lib\hs
> q
> >> ld
> >> >b
> >> >.jar
> >> >;d:\usr\local\junit3.7\junit.jar;d:\usr\local\jakarta\apache-ant-
> >> >1.5.4\lib\x
> >> >mlta
> >> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
> >> >apis.jar;d:\usr\local\j
> >> >akar
> >>
> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
> >> >1.5.4
> >> >\lib
> >> >\optional.jar;d:\usr\local\jakarta\apache-ant-
> >> >1.5.4\lib\ant.jar;d:\desenv\os
> >> >ctrl
> >>
> >>_lib\classes;d:\desenv\osctrl\classes;d:\desenv\pannet\src\servlets\ifin
> a
> >> nc
> >> >e
> >> >\cla
> >>
> >>sses;d:\desenv\pannet\src\servlets\intranet\classes;d:\desenv\pannet\src
> \
> >> se
> >> >r
> >> >vlet
> >>
> >>s\panfinance\classes;d:\desenv\pannet\src\servlets\base\classes;d:\desen
> v
> >> \p
> >> >a
> >> >nnet
> >> >\java-lib\jasper-runtime.jar;d:\desenv\pannet\java-lib\jasper-
> >> >compiler.jar;d
> >> >:\de
> >> >senv\pannet\java-lib\jdbc2_0-stdext.jar;d:\desenv\pannet\java-
> >> >lib\tinySQL.ja
> >> >r;d:
> >> >\desenv\pannet\java-lib\servlet.jar;d:\desenv\pannet\java-
> >> >lib\ojdbc14.jar;d:
> >> >\des
> >> >env\pannet\java-lib\shell_term.jar;d:\desenv\pannet\java-
> >> >lib\crimson.jar;d:\
> >> >dese
> >> >nv\pannet\java-lib\jconcept.zip;d:\desenv\pannet\java-
> >> >lib\com.zip;d:\desenv\
> >> >pann
> >> >et\java-lib\acme.zip;d:\desenv\pannet\java-
> >> >lib\xBaseJ.jar;d:\desenv\pannet\j
> >> >ava-
> >> >lib\oreilly.jar;d:\desenv\pannet\java-
> >lib\mail.jar;d:\desenv\pannet\java-
> >> >lib
> >> >\jst
> >> >yle.jar;d:\desenv\pannet\java-lib\jndi.jar;d:\desenv\pannet\java-
> >> >lib\jcServl
> >> >et.j
> >> >ar;d:\desenv\pannet\java-
> >> >lib\activation.jar;d:\jbuilder4\lib\jaxp.jar;d:\arq
> >> >uiv~
> >> >1\j2sdk1.4.1_01\lib\tools.jar;d:\arquiv~1\j2sdk1.4.1_01\lib\dt.jar;.;;
> >> >
> >> >  I couldn´t take correctly ant´s command line, but i think that it
> >> >gives some idea.
> >> >
> >> >> --
> >> >> De: Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> >> Responder:  Tomcat Users List
> >> >> Enviada:  

ServletException

2003-12-12 Thread Julien Martin
Hello,

I am trying to run a plain jsp application under Jonas/Tomcat. Here is the
exception I get:

*
javax.servlet.ServletException:
org/apache/jasper/runtime/HttpJspBase
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
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.access$000(ApplicationFilter
Chain.java:98)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain
.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:172)
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:2416)
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.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)

cause mère

java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:213)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:497)
at
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
a:150)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:440)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
71)
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.access$000(ApplicationFilter
Chain.java:98)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain
.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:172)
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.in

Re: CSS in War file

2003-12-12 Thread Duncan Smith
When I request a page which should have the styles applied, they are not.

If I try to request the css file on it's own from a browser, I get the NPE

(ie. www.pennymail.com/pennymail.css)

-Duncan
www.pennymail.com

Wendy Smoak wrote:

> > From: Duncan Smith [mailto:[EMAIL PROTECTED]
>
> > The stylesheet is added to the war file in the same location
> > as before,
>
> Where in the .war file is the stylesheet?
>
> > but if I try to request the css file on it's own I get a
> > java.lang.NullPointerException error.
>
> How are you requesting the CSS?  With a browser?  Where are you seeing
> the NPE, browser window, or in a log file?
>
> --
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management
>
> -
> 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: /devices/pseudo/mm@0:null

2003-12-12 Thread Hollerman Geralyn M
Ralph Einfeldt wrote:

Although my solaris days are long gone I would guess that 
this aren't 'real files' but memory mapped files.

Are you shure that there are several handles on the same file, 
or is the same handle just reuses several times ?
I agree, I think they're memory mapped files, but I don't see why there 
are all those entries. I did an "fuser -u /devices/pseudo/[EMAIL PROTECTED]:null" to 
see the processes associated with those "files", and got several PIDs, 
including my Tomcat process. "lsof" shows all the open files - and there 
are hundreds for Tomcat, and they all appear to be the same thing. Why 
are there so many, used over and over?

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


Default servlet mapping not working in Tomcat 5.0.16?

2003-12-12 Thread Jonathan Eric Miller
I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a
path like, http://myserver/myapp it runs a default servlet for that path.

According the the Servlet 2.4 spec, you can do this by mapping "/" to a
servlet. However, for me, it's just printing out a directory listing of the
/myapp directory when I try it (on a side note, how do you globally disable
directory browsing?).

I'm using a web.xml similar to the following.


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">

myservlet
mypackage.MyServlet


myservlet
/
/servlet/myservlet
/servlet/myservlet/*


Also, I have something similar to the following in my server.xml.



Any ideas?

I can do what I want to do using an index.jsp with a redirect, but, I would
like to avoid having it do a redirect if possible.

Jon


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



RE: new JVM feature, just an idea

2003-12-12 Thread Shapira, Yoav

Howdy,

>   And Yoav, you did say that in almost 10 years no one complains about
>it, but as i know there are many people facing this issue all over internet
>also. My neibour here has a windows 2000, he will make some tests with its
>command line.

I misunderstood your problem when I said no one else has it.  What you describe is a 
common issue.  It used to be more common before people used Ant and IDEs, when they 
did more stuff on the command line.  I just haven't compiled anything in a DOS window 
for ages, so I forgot ;)

Yoav Shapira

>
>> --
>> De:  Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> Responder:   Tomcat Users List
>> Enviada: sexta-feira, 12 de dezembro de 2003 14:41
>> Para:Tomcat Users List
>> Assunto: RE: new JVM feature, just an idea
>>
>>
>> Howdy,
>> I see -- thanks for the example.
>>
>> You do realize Ant adds a lot of these jars for you automatically to the
>> classpath, right?  You don't need to add anything in ANT_HOME/lib, as
>> that's automatically included.  Furthermore, if you're using JDK 1.4 or
>> later, you can remove a bunch of other jars from the path as they're
>> included in the JDK, e.g. JAXP, Crimson, JDBC 2.0 extensions.  Finally,
>> you have a number of duplicates, e.g. the XML APIs, repeated a number of
>> times in the path.
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>>
>> >-Original Message-
>> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >Sent: Friday, December 12, 2003 1:35 PM
>> >To: 'Tomcat Users List'
>> >Subject: RE: new JVM feature, just an idea
>> >
>> >This mainly it happen with ant, here a snapshot of it:
>> >
>> >D:\home\edson>set
>> >LOCALCLASSPATH=d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmlta
>> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
>> >apis.jar;d:\usr\local\j
>> >akar
>> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
>> >1.5.4
>> >\lib
>> >\optional.jar;d:\usr\local\jakarta\apache-ant-
>> >1.5.4\lib\ant.jar;d:\arquiv~1\
>> >j2sd
>> >k1.4.1_01\commapi\comm.jar;d:\usr\local\skinlf-
>> >1.2.4\lib\skinregion.jar;d:\u
>> >sr\l
>> >ocal\skinlf-1.2.4\lib\skinlf.jar;d:\usr\local\ecs-1.4.1\lib\xerces-
>> >1.2.2.jar
>> >;d:\
>> >usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;d:\usr\local\ecs-
>1.4.1\ecs
>> -
>> >1.
>> >4.1.
>>
>>jar;d:\usr\local\java_cup\java_cup.jar;d:\usr\local\hsqldb_v.1.61\lib\hsq
>> ld
>> >b
>> >.jar
>> >;d:\usr\local\junit3.7\junit.jar;d:\usr\local\jakarta\apache-ant-
>> >1.5.4\lib\x
>> >mlta
>> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
>> >apis.jar;d:\usr\local\j
>> >akar
>> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
>> >1.5.4
>> >\lib
>> >\optional.jar;d:\usr\local\jakarta\apache-ant-
>> >1.5.4\lib\ant.jar;d:\desenv\os
>> >ctrl
>>
>>_lib\classes;d:\desenv\osctrl\classes;d:\desenv\pannet\src\servlets\ifina
>> nc
>> >e
>> >\cla
>>
>>sses;d:\desenv\pannet\src\servlets\intranet\classes;d:\desenv\pannet\src\
>> se
>> >r
>> >vlet
>>
>>s\panfinance\classes;d:\desenv\pannet\src\servlets\base\classes;d:\desenv
>> \p
>> >a
>> >nnet
>> >\java-lib\jasper-runtime.jar;d:\desenv\pannet\java-lib\jasper-
>> >compiler.jar;d
>> >:\de
>> >senv\pannet\java-lib\jdbc2_0-stdext.jar;d:\desenv\pannet\java-
>> >lib\tinySQL.ja
>> >r;d:
>> >\desenv\pannet\java-lib\servlet.jar;d:\desenv\pannet\java-
>> >lib\ojdbc14.jar;d:
>> >\des
>> >env\pannet\java-lib\shell_term.jar;d:\desenv\pannet\java-
>> >lib\crimson.jar;d:\
>> >dese
>> >nv\pannet\java-lib\jconcept.zip;d:\desenv\pannet\java-
>> >lib\com.zip;d:\desenv\
>> >pann
>> >et\java-lib\acme.zip;d:\desenv\pannet\java-
>> >lib\xBaseJ.jar;d:\desenv\pannet\j
>> >ava-
>> >lib\oreilly.jar;d:\desenv\pannet\java-
>lib\mail.jar;d:\desenv\pannet\java-
>> >lib
>> >\jst
>> >yle.jar;d:\desenv\pannet\java-lib\jndi.jar;d:\desenv\pannet\java-
>> >lib\jcServl
>> >et.j
>> >ar;d:\desenv\pannet\java-
>> >lib\activation.jar;d:\jbuilder4\lib\jaxp.jar;d:\arq
>> >uiv~
>> >1\j2sdk1.4.1_01\lib\tools.jar;d:\arquiv~1\j2sdk1.4.1_01\lib\dt.jar;.;;
>> >
>> >I couldn´t take correctly ant´s command line, but i think that it
>> >gives some idea.
>> >
>> >> --
>> >> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> >> Responder:Tomcat Users List
>> >> Enviada:  sexta-feira, 12 de dezembro de 2003 14:07
>> >> Para: Tomcat Users List
>> >> Assunto:  RE: new JVM feature, just an idea
>> >>
>> >>
>> >> Howdy,
>> >> It's fascinating other people in the almost decade-long history of the
>> >> language haven't had this problem.  Don't you find that curious? ;)
>> Can
>> >> you post one such classpath example that's giving you problems?
>> >>
>> >> Yoav Shapira
>> >> Millennium ChemInformatics
>> >>
>> >>
>> >> >-Original Message-
>> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >> >Sent: Friday, December 12, 2003 1:03 PM
>> >> >To: 'Tomcat Users List'
>> >> >Subject: RE: new JVM feature, just an idea
>> >> >
>> >> > Exactly, that´s it! Even using environment variable in 

RE: CSS in War file

2003-12-12 Thread Wendy Smoak
> From: Duncan Smith [mailto:[EMAIL PROTECTED] 

> The stylesheet is added to the war file in the same location 
> as before,

Where in the .war file is the stylesheet?

> but if I try to request the css file on it's own I get a
> java.lang.NullPointerException error.

How are you requesting the CSS?  With a browser?  Where are you seeing
the NPE, browser window, or in a log file?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 




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



Re: jsvc and security - solved

2003-12-12 Thread Maxime Colas des Francs
think i've solved the problem

I add a '=' sign after the property
   -Djava.security.manager= \
for "bypass" jsvc command line verification
After for Tomcat 4.1.29, i had to add permissions for commons-daemon in my 
catalina.policy (take in tomcat 5 policy file)

// These permissions apply to the daemon code
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
permission java.security.AllPermission;
};
M

At 12:06 2003-12-12, you wrote:
Hello,

I attempt to use jsvc from commons-daemon project to launch my tomcat 
instance.
How can I specify the '-security' option (used with catalina.sh)?

If I write some system properties (like in catalina.sh):

$CATALINA_HOME/bin/jsvc
[...]
-Djava.security.manager \
-Djava.security.policy=$CATALINA_BASE/conf/catalina.policy \
[...]
jsvc return an error ("Parameter -D must contain one '=' character")

M







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


MOD_JK2 workers2.properties socket_keepalive

2003-12-12 Thread Kip Iles
How do I add socket_keepalive and connect_timeout to the workers2.properties
file on the web server. All the examples discuss doing this in the
workers.properties file which, to my understanding, does not apply to
mod_jk2.

The JK2 docs only discuss the format for adding properties to the
workers2.properties file but doesn't detail which properties accept which
parameters.

My client's firewall is shutting down the port 8009 connection from the
Apache 2.0.43/mod_jk2.so server on the DMZ and the Tomcat 4.1.29 application
server behind the DMZ's firewall after 60 minutes of inactivity. It takes
ten minutes or more for JK2 to recover.

I have searched the archives in depth to no avail. If this has already been
answered - my apologies.

Kipland Iles
Systems Consultant
http://kiplandiles.com



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



RE: new JVM feature, just an idea

2003-12-12 Thread Edson Alves Pereira
Because my projects really use XML-APIs and JDBC2 as well as many
others, i need put them in my real class path. Ant, as a good example repeat
some of course, what we have here is different applications or projects that
each one use there libraries and everybody shares the same environment
variable CLASSPATH. And i must keep a default CLASSPATH for my machine, by
the other hand, we can tomcat lookup for libraries in an interesting way, it
just use all libraries that came within and standard Java jars.

To solve that problem i´ve already cut out some jars from my default
CLASSPATH, but i believe in a future i will face the same problem, that´s
why a going to create a new ClassLoader for my machine.

And Yoav, you did say that in almost 10 years no one complains about
it, but as i know there are many people facing this issue all over internet
also. My neibour here has a windows 2000, he will make some tests with its
command line.

> --
> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 12 de dezembro de 2003 14:41
> Para: Tomcat Users List
> Assunto:  RE: new JVM feature, just an idea
> 
> 
> Howdy,
> I see -- thanks for the example.
> 
> You do realize Ant adds a lot of these jars for you automatically to the
> classpath, right?  You don't need to add anything in ANT_HOME/lib, as
> that's automatically included.  Furthermore, if you're using JDK 1.4 or
> later, you can remove a bunch of other jars from the path as they're
> included in the JDK, e.g. JAXP, Crimson, JDBC 2.0 extensions.  Finally,
> you have a number of duplicates, e.g. the XML APIs, repeated a number of
> times in the path.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >Sent: Friday, December 12, 2003 1:35 PM
> >To: 'Tomcat Users List'
> >Subject: RE: new JVM feature, just an idea
> >
> > This mainly it happen with ant, here a snapshot of it:
> >
> >D:\home\edson>set
> >LOCALCLASSPATH=d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmlta
> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
> >apis.jar;d:\usr\local\j
> >akar
> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
> >1.5.4
> >\lib
> >\optional.jar;d:\usr\local\jakarta\apache-ant-
> >1.5.4\lib\ant.jar;d:\arquiv~1\
> >j2sd
> >k1.4.1_01\commapi\comm.jar;d:\usr\local\skinlf-
> >1.2.4\lib\skinregion.jar;d:\u
> >sr\l
> >ocal\skinlf-1.2.4\lib\skinlf.jar;d:\usr\local\ecs-1.4.1\lib\xerces-
> >1.2.2.jar
> >;d:\
> >usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;d:\usr\local\ecs-1.4.1\ecs
> -
> >1.
> >4.1.
> >jar;d:\usr\local\java_cup\java_cup.jar;d:\usr\local\hsqldb_v.1.61\lib\hsq
> ld
> >b
> >.jar
> >;d:\usr\local\junit3.7\junit.jar;d:\usr\local\jakarta\apache-ant-
> >1.5.4\lib\x
> >mlta
> >sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
> >apis.jar;d:\usr\local\j
> >akar
> >ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
> >1.5.4
> >\lib
> >\optional.jar;d:\usr\local\jakarta\apache-ant-
> >1.5.4\lib\ant.jar;d:\desenv\os
> >ctrl
> >_lib\classes;d:\desenv\osctrl\classes;d:\desenv\pannet\src\servlets\ifina
> nc
> >e
> >\cla
> >sses;d:\desenv\pannet\src\servlets\intranet\classes;d:\desenv\pannet\src\
> se
> >r
> >vlet
> >s\panfinance\classes;d:\desenv\pannet\src\servlets\base\classes;d:\desenv
> \p
> >a
> >nnet
> >\java-lib\jasper-runtime.jar;d:\desenv\pannet\java-lib\jasper-
> >compiler.jar;d
> >:\de
> >senv\pannet\java-lib\jdbc2_0-stdext.jar;d:\desenv\pannet\java-
> >lib\tinySQL.ja
> >r;d:
> >\desenv\pannet\java-lib\servlet.jar;d:\desenv\pannet\java-
> >lib\ojdbc14.jar;d:
> >\des
> >env\pannet\java-lib\shell_term.jar;d:\desenv\pannet\java-
> >lib\crimson.jar;d:\
> >dese
> >nv\pannet\java-lib\jconcept.zip;d:\desenv\pannet\java-
> >lib\com.zip;d:\desenv\
> >pann
> >et\java-lib\acme.zip;d:\desenv\pannet\java-
> >lib\xBaseJ.jar;d:\desenv\pannet\j
> >ava-
> >lib\oreilly.jar;d:\desenv\pannet\java-lib\mail.jar;d:\desenv\pannet\java-
> >lib
> >\jst
> >yle.jar;d:\desenv\pannet\java-lib\jndi.jar;d:\desenv\pannet\java-
> >lib\jcServl
> >et.j
> >ar;d:\desenv\pannet\java-
> >lib\activation.jar;d:\jbuilder4\lib\jaxp.jar;d:\arq
> >uiv~
> >1\j2sdk1.4.1_01\lib\tools.jar;d:\arquiv~1\j2sdk1.4.1_01\lib\dt.jar;.;;
> >
> > I couldn´t take correctly ant´s command line, but i think that it
> >gives some idea.
> >
> >> --
> >> De:Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> Responder: Tomcat Users List
> >> Enviada:   sexta-feira, 12 de dezembro de 2003 14:07
> >> Para:  Tomcat Users List
> >> Assunto:   RE: new JVM feature, just an idea
> >>
> >>
> >> Howdy,
> >> It's fascinating other people in the almost decade-long history of the
> >> language haven't had this problem.  Don't you find that curious? ;)
> Can
> >> you post one such classpath example that's giving you problems?
> >>
> >> Yoav Shapira
> >> Millennium ChemInformatics
> >>
> >>

CSS in War file

2003-12-12 Thread Duncan Smith
I've just started deploying a web app as a war file instead of uploading
individual files. Everything works except my styles don't load.

The stylesheet is added to the war file in the same location as before,
but if I try to request the css file on it's own I get a
java.lang.NullPointerException
error.

Any suggestions anyone?

- Duncan
www.pennymail.com


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



RE: How to bind to multiple IP addresses?

2003-12-12 Thread Ralph Einfeldt

IIS bind per default to all interfaces.

http://support.microsoft.com:/support/kb/articles/Q238/1/31.ASP

> -Original Message-
> From: Ryan Golhar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 4:02 AM
> To: 'Tomcat Users List'
> Subject: RE: How to bind to multiple IP addresses?
> 
> 
> I managed to get Tomcat to listen on 2 (out of 3) IP address.  
> 
> When I try to start IIS on the third IP address, it says its 
> already in use, but I don't think it is. 
> Has anyone ever run into this?  
> 
> I have one web app developed using Tomcat for JSP pages and 
> recently am
> forced to put another web site on the same machine using IIS.  I'm
> wondering if it would be better to use a connector for my 
> Tomcat webapp and run both sites under IIS.  Any thoughts?
> 
> Ryan
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 10, 2003 12:21 PM
> To: Tomcat Users List
> Subject: Re: How to bind to multiple IP addresses?
> 
> 
> You *should* (not that i've tried) be able to use multiple connectors.
> For 
> example, binding to 3 different rfc1918 addresses:
> 
>   port="8080" minProcessors="5" maxProcessors="75"
> enableLookups="true" redirectPort="8443"
> acceptCount="100" debug="0" connectionTimeout="2"
>  address='192.168.0.1'
> useURIValidationHack="false" 
> disableUploadTimeout="true"
> />
>   port="8080" minProcessors="5" maxProcessors="75"
> enableLookups="true" redirectPort="8443"
> acceptCount="100" debug="0" connectionTimeout="2"
>  address='10.0.2.2'
> useURIValidationHack="false" 
> disableUploadTimeout="true"
> />
> 
>   port="8080" minProcessors="5" maxProcessors="75"
> enableLookups="true" redirectPort="8443"
> acceptCount="100" debug="0" connectionTimeout="2"
>  address='172.16.24.22'
> useURIValidationHack="false" 
> disableUploadTimeout="true"
> />
> 
> 
> -Tim
> 
> Ryan Golhar wrote:
> 
> > If been searching around for this and can't seem to find 
> the answer.  
> > I know the Coyote connecter can bind to a particular 
> address, but if I
> 
> > need it to bind to more than one IP address (but not all), 
> how can I 
> > specify multiple IP addresses?  I tried adding multiple connectors, 
> > but that didn't work.  I also tried adding multiple IP addresses in 
> > address=".." and that didn't work either, or I'm formatting it 
> > incorrectly.  Does anyone have any ideas?  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]
> 
> 
> 

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



RE: new JVM feature, just an idea

2003-12-12 Thread Shapira, Yoav

Howdy,
I see -- thanks for the example.

You do realize Ant adds a lot of these jars for you automatically to the classpath, 
right?  You don't need to add anything in ANT_HOME/lib, as that's automatically 
included.  Furthermore, if you're using JDK 1.4 or later, you can remove a bunch of 
other jars from the path as they're included in the JDK, e.g. JAXP, Crimson, JDBC 2.0 
extensions.  Finally, you have a number of duplicates, e.g. the XML APIs, repeated a 
number of times in the path.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 1:35 PM
>To: 'Tomcat Users List'
>Subject: RE: new JVM feature, just an idea
>
>   This mainly it happen with ant, here a snapshot of it:
>
>D:\home\edson>set
>LOCALCLASSPATH=d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmlta
>sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
>apis.jar;d:\usr\local\j
>akar
>ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
>1.5.4
>\lib
>\optional.jar;d:\usr\local\jakarta\apache-ant-
>1.5.4\lib\ant.jar;d:\arquiv~1\
>j2sd
>k1.4.1_01\commapi\comm.jar;d:\usr\local\skinlf-
>1.2.4\lib\skinregion.jar;d:\u
>sr\l
>ocal\skinlf-1.2.4\lib\skinlf.jar;d:\usr\local\ecs-1.4.1\lib\xerces-
>1.2.2.jar
>;d:\
>usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;d:\usr\local\ecs-1.4.1\ecs-
>1.
>4.1.
>jar;d:\usr\local\java_cup\java_cup.jar;d:\usr\local\hsqldb_v.1.61\lib\hsqld
>b
>.jar
>;d:\usr\local\junit3.7\junit.jar;d:\usr\local\jakarta\apache-ant-
>1.5.4\lib\x
>mlta
>sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-
>apis.jar;d:\usr\local\j
>akar
>ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-
>1.5.4
>\lib
>\optional.jar;d:\usr\local\jakarta\apache-ant-
>1.5.4\lib\ant.jar;d:\desenv\os
>ctrl
>_lib\classes;d:\desenv\osctrl\classes;d:\desenv\pannet\src\servlets\ifinanc
>e
>\cla
>sses;d:\desenv\pannet\src\servlets\intranet\classes;d:\desenv\pannet\src\se
>r
>vlet
>s\panfinance\classes;d:\desenv\pannet\src\servlets\base\classes;d:\desenv\p
>a
>nnet
>\java-lib\jasper-runtime.jar;d:\desenv\pannet\java-lib\jasper-
>compiler.jar;d
>:\de
>senv\pannet\java-lib\jdbc2_0-stdext.jar;d:\desenv\pannet\java-
>lib\tinySQL.ja
>r;d:
>\desenv\pannet\java-lib\servlet.jar;d:\desenv\pannet\java-
>lib\ojdbc14.jar;d:
>\des
>env\pannet\java-lib\shell_term.jar;d:\desenv\pannet\java-
>lib\crimson.jar;d:\
>dese
>nv\pannet\java-lib\jconcept.zip;d:\desenv\pannet\java-
>lib\com.zip;d:\desenv\
>pann
>et\java-lib\acme.zip;d:\desenv\pannet\java-
>lib\xBaseJ.jar;d:\desenv\pannet\j
>ava-
>lib\oreilly.jar;d:\desenv\pannet\java-lib\mail.jar;d:\desenv\pannet\java-
>lib
>\jst
>yle.jar;d:\desenv\pannet\java-lib\jndi.jar;d:\desenv\pannet\java-
>lib\jcServl
>et.j
>ar;d:\desenv\pannet\java-
>lib\activation.jar;d:\jbuilder4\lib\jaxp.jar;d:\arq
>uiv~
>1\j2sdk1.4.1_01\lib\tools.jar;d:\arquiv~1\j2sdk1.4.1_01\lib\dt.jar;.;;
>
>   I couldn´t take correctly ant´s command line, but i think that it
>gives some idea.
>
>> --
>> De:  Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> Responder:   Tomcat Users List
>> Enviada: sexta-feira, 12 de dezembro de 2003 14:07
>> Para:Tomcat Users List
>> Assunto: RE: new JVM feature, just an idea
>>
>>
>> Howdy,
>> It's fascinating other people in the almost decade-long history of the
>> language haven't had this problem.  Don't you find that curious? ;)  Can
>> you post one such classpath example that's giving you problems?
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>>
>> >-Original Message-
>> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >Sent: Friday, December 12, 2003 1:03 PM
>> >To: 'Tomcat Users List'
>> >Subject: RE: new JVM feature, just an idea
>> >
>> >Exactly, that´s it! Even using environment variable in a MSDOS shell
>> >you can reach the line limit.
>> >
>> >> --
>> >> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> >> Responder:Tomcat Users List
>> >> Enviada:  sexta-feira, 12 de dezembro de 2003 13:57
>> >> Para: Tomcat Users List
>> >> Assunto:  RE: new JVM feature, just an idea
>> >>
>> >>
>> >> Howdy,
>> >> So you really have a classpath environment variable that's bigger than
>> >> 128KB?  (If that's really the limit, as you say in your original
>> >message).
>> >>
>> >> Yoav Shapira
>> >> Millennium ChemInformatics
>> >>
>> >>
>> >> >-Original Message-
>> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >> >Sent: Friday, December 12, 2003 12:51 PM
>> >> >To: 'Tomcat Users List'
>> >> >Subject: RE: new JVM feature, just an idea
>> >> >
>> >> > The point here is that my classpath is very big and even using
>> >> >environment variables winnt complain about it.
>> >> >
>> >> >> --
>> >> >> De:Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> >> >> Responder: Tomcat Users List
>> >> >> Enviada:   sexta-feira, 12 de dezembro de 2003 10:47
>> >> >> Para:  Tomcat Users List
>> >> >> Assunto:   RE: new JVM

RE: :Re: /devices/pseudo/mm@0:null

2003-12-12 Thread Ralph Einfeldt
Although my solaris days are long gone I would guess that 
this aren't 'real files' but memory mapped files.

Are you shure that there are several handles on the same file, 
or is the same handle just reuses several times ?

> -Original Message-
> From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 6:26 PM
> To: Tomcat Users List
> Subject: :Re: /devices/pseudo/[EMAIL PROTECTED]:null
> 
> 
> Antonio Fiol Bonnín wrote:
> 
> > Not that I have used Tomcat on Solaris a lot, but I have never seen 
> > that file.
> >
> > A general advice is to check that you close everything you open.
> 
> That's just it - I never open /devices/pseudo/[EMAIL PROTECTED]:null! Something 
> obviously IS opening it - but how do I find out what and close it?
> 
> -- 
> Lynn Hollerman.
> 
> 
> 
> -
> 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: new JVM feature, just an idea

2003-12-12 Thread Edson Alves Pereira
This mainly it happen with ant, here a snapshot of it:

D:\home\edson>set
LOCALCLASSPATH=d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmlta
sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;d:\usr\local\j
akar
ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-1.5.4
\lib
\optional.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;d:\arquiv~1\
j2sd
k1.4.1_01\commapi\comm.jar;d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;d:\u
sr\l
ocal\skinlf-1.2.4\lib\skinlf.jar;d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar
;d:\
usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;d:\usr\local\ecs-1.4.1\ecs-1.
4.1.
jar;d:\usr\local\java_cup\java_cup.jar;d:\usr\local\hsqldb_v.1.61\lib\hsqldb
.jar
;d:\usr\local\junit3.7\junit.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\x
mlta
sk.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;d:\usr\local\j
akar
ta\apache-ant-1.5.4\lib\xercesImpl.jar;d:\usr\local\jakarta\apache-ant-1.5.4
\lib
\optional.jar;d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;d:\desenv\os
ctrl
_lib\classes;d:\desenv\osctrl\classes;d:\desenv\pannet\src\servlets\ifinance
\cla
sses;d:\desenv\pannet\src\servlets\intranet\classes;d:\desenv\pannet\src\ser
vlet
s\panfinance\classes;d:\desenv\pannet\src\servlets\base\classes;d:\desenv\pa
nnet
\java-lib\jasper-runtime.jar;d:\desenv\pannet\java-lib\jasper-compiler.jar;d
:\de
senv\pannet\java-lib\jdbc2_0-stdext.jar;d:\desenv\pannet\java-lib\tinySQL.ja
r;d:
\desenv\pannet\java-lib\servlet.jar;d:\desenv\pannet\java-lib\ojdbc14.jar;d:
\des
env\pannet\java-lib\shell_term.jar;d:\desenv\pannet\java-lib\crimson.jar;d:\
dese
nv\pannet\java-lib\jconcept.zip;d:\desenv\pannet\java-lib\com.zip;d:\desenv\
pann
et\java-lib\acme.zip;d:\desenv\pannet\java-lib\xBaseJ.jar;d:\desenv\pannet\j
ava-
lib\oreilly.jar;d:\desenv\pannet\java-lib\mail.jar;d:\desenv\pannet\java-lib
\jst
yle.jar;d:\desenv\pannet\java-lib\jndi.jar;d:\desenv\pannet\java-lib\jcServl
et.j
ar;d:\desenv\pannet\java-lib\activation.jar;d:\jbuilder4\lib\jaxp.jar;d:\arq
uiv~
1\j2sdk1.4.1_01\lib\tools.jar;d:\arquiv~1\j2sdk1.4.1_01\lib\dt.jar;.;;

I couldn´t take correctly ant´s command line, but i think that it
gives some idea.

> --
> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 12 de dezembro de 2003 14:07
> Para: Tomcat Users List
> Assunto:  RE: new JVM feature, just an idea
> 
> 
> Howdy,
> It's fascinating other people in the almost decade-long history of the
> language haven't had this problem.  Don't you find that curious? ;)  Can
> you post one such classpath example that's giving you problems?
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >Sent: Friday, December 12, 2003 1:03 PM
> >To: 'Tomcat Users List'
> >Subject: RE: new JVM feature, just an idea
> >
> > Exactly, that´s it! Even using environment variable in a MSDOS shell
> >you can reach the line limit.
> >
> >> --
> >> De:Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> Responder: Tomcat Users List
> >> Enviada:   sexta-feira, 12 de dezembro de 2003 13:57
> >> Para:  Tomcat Users List
> >> Assunto:   RE: new JVM feature, just an idea
> >>
> >>
> >> Howdy,
> >> So you really have a classpath environment variable that's bigger than
> >> 128KB?  (If that's really the limit, as you say in your original
> >message).
> >>
> >> Yoav Shapira
> >> Millennium ChemInformatics
> >>
> >>
> >> >-Original Message-
> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >> >Sent: Friday, December 12, 2003 12:51 PM
> >> >To: 'Tomcat Users List'
> >> >Subject: RE: new JVM feature, just an idea
> >> >
> >> >  The point here is that my classpath is very big and even using
> >> >environment variables winnt complain about it.
> >> >
> >> >> --
> >> >> De: Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> >> Responder:  Tomcat Users List
> >> >> Enviada:sexta-feira, 12 de dezembro de 2003 10:47
> >> >> Para:   Tomcat Users List
> >> >> Assunto:RE: new JVM feature, just an idea
> >> >>
> >> >>
> >> >> Howdy,
> >> >> You can use the environment variables on windows as well.  And FYI,
> >> >though
> >> >> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been
> >> working
> >> >> with them a bit without stability problems.
> >> >>
> >> >> Yoav Shapira
> >> >> Millennium ChemInformatics
> >> >>
> >> >>
> >> >> >-Original Message-
> >> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >> >> >Sent: Friday, December 12, 2003 9:16 AM
> >> >> >To: 'Tomcat-User List'
> >> >> >Subject: new JVM feature, just an idea
> >> >> >
> >> >> >   Hello folks, as you know windows has a limit for
> command-line (
> >> >> >something like 128kb ), i´m not a windows fan, but here for a while
> i
> >> >> still
> >> >> >using this OS.
> >> >> >
> >> >> >   Then as we cannot change this behaviour ( 

Re: Do I need a "Custom Resource Factory" for this?

2003-12-12 Thread Mark R. Diggory
I wonder if this would work? Are ResourceParams actually the envronment 
configured in the JNDI ObjectFactory?





  java.naming.factory.initial
  com.sun.jndi.ldap.LdapCtxFactory


  ...
  ...


-M.

Mark R. Diggory wrote:

I have a JNDI DirContext I use for accessing and LDAP server within my 
webapplication. I'd like to configure/instatiate it from my server.xml 
and store it in the provided InitialContext provided to the webapp (as 
opposed to allowing the webapp to configure it).

My question is: Do I need to write a "Custom Resource Factory" for this? 
Or is there a JNDIResourceFactory somewhere I can use?

thanks,
Mark
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


: Re: /devices/pseudo/mm@0:null

2003-12-12 Thread Hollerman Geralyn M
Antonio Fiol Bonnín wrote:

Not that I have used Tomcat on Solaris a lot, but I have never seen 
that file.

A general advice is to check that you close everything you open.
That's just it - I never open /devices/pseudo/[EMAIL PROTECTED]:null! Something 
obviously IS opening it - but how do I find out what and close it?

--
Lynn Hollerman.


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


Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Mark R. Diggory
If I understand correctly chain.doFilter(request, wrapper); is basically
managing the forwarding behavior your looking to accomplish during the
decision making process (IE to execute the servlet, jsp, or return
static content via the default servlet.
In otherwords, if the request matches a specific pattern, then pass it
onto the next filter, eventually this will hit the default or jsp
servlets for you without your needing to resolve the servlet that will
be at the end.
In instances where you recognize in the regexp that you don't want this
behavior your going to need logic to determine what the alternate
behavior would be.
In terms of aquiring the default servlet:

Speculation: the RequestDispatcher may be doing "mapping" internally
too, so you may need to be doing something like the following in your
web.xml to actually aquire a request dispatcher directly to the servlet.

default
blaa

RequestDispatcher defaultDispatcher =
getServletContext().getNamedDispatcher("blaa");
defaultDispatcher.forward(request, response);
But this is just speculation.

-Mark

Albert Moliner wrote:
Touché.
I don't know why I had not thought of filters for this...
Oh, yes, now I know:
My initial intention was to return the JSP file contents as if it were a .txt
file, and though ServletContext.getResourceAsStream could be used, it involved
having to implement the same behaviour as the default servlet does (last
modified checks, etc.). So after all I wanted the default servlet to serve the
request, and the filter would have needed the same behaviour as the forwarding
servlet I had implemented.
Therefore, my question now becomes: If I needed the default servlet (or the jsp
servlet, as it seems to have the same problems) to serve all requests inside a
subdirectory, or perhaps just some files with a pattern under a subdir, how
should I proceed?
In other words: What's wrong with doing (don't consider code quality, it's just
to show the procedure)

RequestDispatcher defaultDispatcher =
getServletContext().getNamedDispatcher("default");
defaultDispatcher.forward(request, response);

? Why doesn't it work (and "jsp" doesn't, either), while any other servlet name
just seems to work fine?
Or, otherwise, in the app's web.xml,



default
/foo/bar/*


? Amazingly,



default
/foo/bar/file.jsp


does seem to work, while not the "/foo/bar/*" mapping (and this mapping works
with any other servlet name defined in the same web.xml file).
Is it that today it's a Friday? Am I misunderstanding something very basic? Is
this a common behaviour, or just happens in Tomcat (4.1.something)?
Thanks,
Albert.
- Original Message -
From: "Mark R. Diggory" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 4:24 PM
Subject: Re: Disabling JSP execution under certain dirs


Yes, Unfortunately, I bounced off this as well, it would have behooved
the Servlet API developers to allow URL Rewrites to be a little more
powerful from a REGEXP standpoint. Look at the j2sdk1.4 api, we now have
regexp's available there default. One would suspect that the Servlet API
could easily start allowing more complex regexp into these entries.
I would recommend writing a Filter that gets run prior to all jsp's and
applying your own regexp/forwarding to the jsp's when you deem it
appropriate. This requires j2sdk 1.4 and is pseudo code.
public final class BlockJspFilter implements Filter {

   String regexp = "*.(/foo/bar.jsp|/bim/bam.jsp).*";

   public void doFilter(ServletRequest request,
  ServletResponse response, FilterChain chain)
  throws IOException, ServletException {
  if(request.getRequestURL().matches(regexp)){
  /*send an error response*/
  else{
chain.doFilter(request, wrapper);
  }
  ...
   }
}
   
  BlockJspFilter
  BlockJspFilter
   
   
  BlockJspFilter
  *.jsp
   
One could even go as far as to use the FilterConfig to pass in the
regexps which could then be dynamically adjusted in the web.xml
http://java.sun.com/products/servlet/Filters.html

-Mark Diggory





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu


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


Do I need a "Custom Resource Factory" for this?

2003-12-12 Thread Mark R. Diggory
I have a JNDI DirContext I use for accessing and LDAP server within my 
webapplication. I'd like to configure/instatiate it from my server.xml 
and store it in the provided InitialContext provided to the webapp (as 
opposed to allowing the webapp to configure it).

My question is: Do I need to write a "Custom Resource Factory" for this? 
Or is there a JNDIResourceFactory somewhere I can use?

thanks,
Mark
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Image Viewing

2003-12-12 Thread Ben Souther
>
> If you really want to only provide content to specific users, you must
> provide some sort of access control mechanism. The same mechanism should
> apply to images you wish to protect.
>
Which was the point of this thread.  ;-)



On Friday 12 December 2003 11:52 am, Erik Wright wrote:
> How does an image get displayed in a page?
>
> 1. The browser receives an HTML page with an IMG tag in it. The IMG tag
> contains a src attr (an HTTP URL).
> 2. The browser makes another request, for the URL of the image.
> 3. The server returns the image, which is displayed.
>
> Clearly, if you want an image to be displayed within a web page, the
> image must be available on your server. There is no difference between
> the browser making a request for an URL and the user typing that URL
> into the address bar directly. Maybe you can look at the referer field,
> but of course that can be hoaxed so if you are really trying to keep
> this secure that is not a solution.
>
> If you really want to only provide content to specific users, you must
> provide some sort of access control mechanism. The same mechanism should
> apply to images you wish to protect.
>
> This is all related to the fundamental workings of HTTP.
>
> HTTP is an integral part of how the web works - anyone thinking of
> designing a website (especially using scripting languages, servlets, or
> anyone trying to provide any type of security) should understand at
> least the fundamentals of HTTP.
>
> -Erik
>
> Christopher Schultz wrote:
> > All,
> >
> >> It would be http://yourserver/yourservlet?param=paramValue";
> >> alt="something">
> >
> > This still doesn't answer the "original" interpreted question. I don't
> > think it's possible to display an image on a page and prevent users
> > from browsing to it directly from their browser.
> >
> > The only thing I can think of is to check the REFERER header to see if
> > it came from the page on which you want to display it. That's also not
> > foolproof...
> >
> > -chris
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



RE: new JVM feature, just an idea

2003-12-12 Thread Shapira, Yoav

Howdy,
It's fascinating other people in the almost decade-long history of the language 
haven't had this problem.  Don't you find that curious? ;)  Can you post one such 
classpath example that's giving you problems?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 1:03 PM
>To: 'Tomcat Users List'
>Subject: RE: new JVM feature, just an idea
>
>   Exactly, that´s it! Even using environment variable in a MSDOS shell
>you can reach the line limit.
>
>> --
>> De:  Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> Responder:   Tomcat Users List
>> Enviada: sexta-feira, 12 de dezembro de 2003 13:57
>> Para:Tomcat Users List
>> Assunto: RE: new JVM feature, just an idea
>>
>>
>> Howdy,
>> So you really have a classpath environment variable that's bigger than
>> 128KB?  (If that's really the limit, as you say in your original
>message).
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>>
>> >-Original Message-
>> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >Sent: Friday, December 12, 2003 12:51 PM
>> >To: 'Tomcat Users List'
>> >Subject: RE: new JVM feature, just an idea
>> >
>> >The point here is that my classpath is very big and even using
>> >environment variables winnt complain about it.
>> >
>> >> --
>> >> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> >> Responder:Tomcat Users List
>> >> Enviada:  sexta-feira, 12 de dezembro de 2003 10:47
>> >> Para: Tomcat Users List
>> >> Assunto:  RE: new JVM feature, just an idea
>> >>
>> >>
>> >> Howdy,
>> >> You can use the environment variables on windows as well.  And FYI,
>> >though
>> >> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been
>> working
>> >> with them a bit without stability problems.
>> >>
>> >> Yoav Shapira
>> >> Millennium ChemInformatics
>> >>
>> >>
>> >> >-Original Message-
>> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >> >Sent: Friday, December 12, 2003 9:16 AM
>> >> >To: 'Tomcat-User List'
>> >> >Subject: new JVM feature, just an idea
>> >> >
>> >> > Hello folks, as you know windows has a limit for command-line (
>> >> >something like 128kb ), i´m not a windows fan, but here for a while i
>> >> still
>> >> >using this OS.
>> >> >
>> >> > Then as we cannot change this behaviour ( in win95, win98 and
>winnt,
>> >> >others i don´t known and i hope never use them ), would be a good
>idea
>> >> make
>> >> >JVM read classpath form a file named .javarc like .bash_profile and
>> >there
>> >> >create  a entrypoint like:
>> >> >
>> >> >###
>> >> >#/home/edson/.javarc
>> >> >
>> >> >classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
>> >> >d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
>> >> >d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
>> >> >d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
>> >> >d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
>> >> >d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
>> >> >d:\usr\local\java_cup\java_cup.jar;\
>> >> >d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
>> >> >d:\usr\local\junit3.7\junit.jar;\
>> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
>> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
>> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
>> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
>> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
>> >> >###
>> >> >
>> >> >  Here i give up to find a solution for my winnt, because there isn´t
>> >> >solution. Then i´ll create a new ClassLoader for my winnt machine to
>> >find
>> >> >my
>> >> >classpath in this file also. What do you think about it? Does it
>could
>> >be
>> >> a
>> >> >good implementation for JVM for windows or all JVMs?
>> >> >
>> >> >  Regards,
>> >> >  Edson
>> >>
>> >>
>> >>
>> >> This e-mail, including any attachments, is a confidential business
>> >> communication, and may contain information that is confidential,
>> >> proprietary and/or privileged.  This e-mail is intended only for the
>> >> individual(s) to whom it is addressed, and may not be saved, copied,
>> >> printed, disclosed or used by anyone else.  If you are not the(an)
>> >> intended recipient, please immediately delete this e-mail from your
>> >> computer system and notify the sender.  Thank you.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>>
>>
>>
>> This e-mail, including any attachments, is a confidential business
>> communication, and may contain information that is confidential,
>> proprietary and/or privileged.  This e-mail is intended only for the
>> individual(s) to whom it is addressed, and may not be saved, copied,
>> printed, disclosed or used by an

Re: new JVM feature, just an idea

2003-12-12 Thread Ben Souther
I used to get around this by having seperate batch scripts that set my 
classpath for each project I was working on.



On Friday 12 December 2003 01:03 pm, Edson Alves Pereira wrote:
>   Exactly, that´s it! Even using environment variable in a MSDOS shell
> you can reach the line limit.
>
> > --
> > De: Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> > Responder:  Tomcat Users List
> > Enviada:sexta-feira, 12 de dezembro de 2003 13:57
> > Para:   Tomcat Users List
> > Assunto:RE: new JVM feature, just an idea
> >
> >
> > Howdy,
> > So you really have a classpath environment variable that's bigger than
> > 128KB?  (If that's really the limit, as you say in your original
> > message).
> >
> > Yoav Shapira
> > Millennium ChemInformatics
> >
> > >-Original Message-
> > >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> > >Sent: Friday, December 12, 2003 12:51 PM
> > >To: 'Tomcat Users List'
> > >Subject: RE: new JVM feature, just an idea
> > >
> > >   The point here is that my classpath is very big and even using
> > >environment variables winnt complain about it.
> > >
> > >> --
> > >> De:  Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> > >> Responder:   Tomcat Users List
> > >> Enviada: sexta-feira, 12 de dezembro de 2003 10:47
> > >> Para:Tomcat Users List
> > >> Assunto: RE: new JVM feature, just an idea
> > >>
> > >>
> > >> Howdy,
> > >> You can use the environment variables on windows as well.  And FYI,
> > >
> > >though
> > >
> > >> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been
> >
> > working
> >
> > >> with them a bit without stability problems.
> > >>
> > >> Yoav Shapira
> > >> Millennium ChemInformatics
> > >>
> > >> >-Original Message-
> > >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> > >> >Sent: Friday, December 12, 2003 9:16 AM
> > >> >To: 'Tomcat-User List'
> > >> >Subject: new JVM feature, just an idea
> > >> >
> > >> >Hello folks, as you know windows has a limit for command-line (
> > >> >something like 128kb ), i´m not a windows fan, but here for a while i
> > >>
> > >> still
> > >>
> > >> >using this OS.
> > >> >
> > >> >Then as we cannot change this behaviour ( in win95, win98 and winnt,
> > >> >others i don´t known and i hope never use them ), would be a good
> > >> > idea
> > >>
> > >> make
> > >>
> > >> >JVM read classpath form a file named .javarc like .bash_profile and
> > >
> > >there
> > >
> > >> >create  a entrypoint like:
> > >> >
> > >> >###
> > >> >#/home/edson/.javarc
> > >> >
> > >> >classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
> > >> >d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
> > >> >d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
> > >> >d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
> > >> >d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
> > >> >d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
> > >> >d:\usr\local\java_cup\java_cup.jar;\
> > >> >d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
> > >> >d:\usr\local\junit3.7\junit.jar;\
> > >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
> > >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
> > >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
> > >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
> > >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
> > >> >###
> > >> >
> > >> >  Here i give up to find a solution for my winnt, because there isn´t
> > >> >solution. Then i´ll create a new ClassLoader for my winnt machine to
> > >
> > >find
> > >
> > >> >my
> > >> >classpath in this file also. What do you think about it? Does it
> > >> > could
> > >
> > >be
> > >
> > >> a
> > >>
> > >> >good implementation for JVM for windows or all JVMs?
> > >> >
> > >> >  Regards,
> > >> >  Edson
> > >>
> > >> This e-mail, including any attachments, is a confidential business
> > >> communication, and may contain information that is confidential,
> > >> proprietary and/or privileged.  This e-mail is intended only for the
> > >> individual(s) to whom it is addressed, and may not be saved, copied,
> > >> printed, disclosed or used by anyone else.  If you are not the(an)
> > >> intended recipient, please immediately delete this e-mail from your
> > >> computer system and notify the sender.  Thank you.
> > >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > This e-mail, including any attachments, is a confidential business
> > communication, and may contain information that is confidential,
> > proprietary and/or privileged.  This e-mail is intended only for the
> > individual(s) to whom it is addressed, and may not be saved, copied,
> > printed, disclosed or used by anyone else.  If you are not the(an)
> > intended recipient

jsvc and security

2003-12-12 Thread Maxime Colas des Francs
Hello,

I attempt to use jsvc from commons-daemon project to launch my tomcat instance.
How can I specify the '-security' option (used with catalina.sh)?
If I write some system properties (like in catalina.sh):

$CATALINA_HOME/bin/jsvc
[...]
-Djava.security.manager \
-Djava.security.policy=$CATALINA_BASE/conf/catalina.policy \
[...]
jsvc return an error ("Parameter -D must contain one '=' character")

M







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


RE: new JVM feature, just an idea

2003-12-12 Thread Edson Alves Pereira
Exactly, that´s it! Even using environment variable in a MSDOS shell
you can reach the line limit.

> --
> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 12 de dezembro de 2003 13:57
> Para: Tomcat Users List
> Assunto:  RE: new JVM feature, just an idea
> 
> 
> Howdy,
> So you really have a classpath environment variable that's bigger than
> 128KB?  (If that's really the limit, as you say in your original message).
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >Sent: Friday, December 12, 2003 12:51 PM
> >To: 'Tomcat Users List'
> >Subject: RE: new JVM feature, just an idea
> >
> > The point here is that my classpath is very big and even using
> >environment variables winnt complain about it.
> >
> >> --
> >> De:Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> >> Responder: Tomcat Users List
> >> Enviada:   sexta-feira, 12 de dezembro de 2003 10:47
> >> Para:  Tomcat Users List
> >> Assunto:   RE: new JVM feature, just an idea
> >>
> >>
> >> Howdy,
> >> You can use the environment variables on windows as well.  And FYI,
> >though
> >> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been
> working
> >> with them a bit without stability problems.
> >>
> >> Yoav Shapira
> >> Millennium ChemInformatics
> >>
> >>
> >> >-Original Message-
> >> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >> >Sent: Friday, December 12, 2003 9:16 AM
> >> >To: 'Tomcat-User List'
> >> >Subject: new JVM feature, just an idea
> >> >
> >> >  Hello folks, as you know windows has a limit for command-line (
> >> >something like 128kb ), i´m not a windows fan, but here for a while i
> >> still
> >> >using this OS.
> >> >
> >> >  Then as we cannot change this behaviour ( in win95, win98 and winnt,
> >> >others i don´t known and i hope never use them ), would be a good idea
> >> make
> >> >JVM read classpath form a file named .javarc like .bash_profile and
> >there
> >> >create  a entrypoint like:
> >> >
> >> >###
> >> >#/home/edson/.javarc
> >> >
> >> >classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
> >> >d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
> >> >d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
> >> >d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
> >> >d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
> >> >d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
> >> >d:\usr\local\java_cup\java_cup.jar;\
> >> >d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
> >> >d:\usr\local\junit3.7\junit.jar;\
> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
> >> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
> >> >###
> >> >
> >> >  Here i give up to find a solution for my winnt, because there isn´t
> >> >solution. Then i´ll create a new ClassLoader for my winnt machine to
> >find
> >> >my
> >> >classpath in this file also. What do you think about it? Does it could
> >be
> >> a
> >> >good implementation for JVM for windows or all JVMs?
> >> >
> >> >  Regards,
> >> >  Edson
> >>
> >>
> >>
> >> This e-mail, including any attachments, is a confidential business
> >> communication, and may contain information that is confidential,
> >> proprietary and/or privileged.  This e-mail is intended only for the
> >> individual(s) to whom it is addressed, and may not be saved, copied,
> >> printed, disclosed or used by anyone else.  If you are not the(an)
> >> intended recipient, please immediately delete this e-mail from your
> >> computer system and notify the sender.  Thank you.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> 
> 
> 
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: new JVM feature, just an idea

2003-12-12 Thread Shapira, Yoav

Howdy,
So you really have a classpath environment variable that's bigger than 128KB?  (If 
that's really the limit, as you say in your original message).

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 12:51 PM
>To: 'Tomcat Users List'
>Subject: RE: new JVM feature, just an idea
>
>   The point here is that my classpath is very big and even using
>environment variables winnt complain about it.
>
>> --
>> De:  Shapira, Yoav[SMTP:[EMAIL PROTECTED]
>> Responder:   Tomcat Users List
>> Enviada: sexta-feira, 12 de dezembro de 2003 10:47
>> Para:Tomcat Users List
>> Assunto: RE: new JVM feature, just an idea
>>
>>
>> Howdy,
>> You can use the environment variables on windows as well.  And FYI,
>though
>> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been working
>> with them a bit without stability problems.
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>>
>> >-Original Message-
>> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>> >Sent: Friday, December 12, 2003 9:16 AM
>> >To: 'Tomcat-User List'
>> >Subject: new JVM feature, just an idea
>> >
>> >Hello folks, as you know windows has a limit for command-line (
>> >something like 128kb ), i´m not a windows fan, but here for a while i
>> still
>> >using this OS.
>> >
>> >Then as we cannot change this behaviour ( in win95, win98 and winnt,
>> >others i don´t known and i hope never use them ), would be a good idea
>> make
>> >JVM read classpath form a file named .javarc like .bash_profile and
>there
>> >create  a entrypoint like:
>> >
>> >###
>> >#/home/edson/.javarc
>> >
>> >classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
>> >d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
>> >d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
>> >d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
>> >d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
>> >d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
>> >d:\usr\local\java_cup\java_cup.jar;\
>> >d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
>> >d:\usr\local\junit3.7\junit.jar;\
>> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
>> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
>> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
>> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
>> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
>> >###
>> >
>> >  Here i give up to find a solution for my winnt, because there isn´t
>> >solution. Then i´ll create a new ClassLoader for my winnt machine to
>find
>> >my
>> >classpath in this file also. What do you think about it? Does it could
>be
>> a
>> >good implementation for JVM for windows or all JVMs?
>> >
>> >  Regards,
>> >  Edson
>>
>>
>>
>> This e-mail, including any attachments, is a confidential business
>> communication, and may contain information that is confidential,
>> proprietary and/or privileged.  This e-mail is intended only for the
>> individual(s) to whom it is addressed, and may not be saved, copied,
>> printed, disclosed or used by anyone else.  If you are not the(an)
>> intended recipient, please immediately delete this e-mail from your
>> computer system and notify the sender.  Thank you.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>



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


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



Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Mark R. Diggory
If I understand correctly chain.doFilter(request, wrapper); is basically 
managing the forwarding behavior your looking to accomplish during the 
decision making process (IE to execute the servlet, jsp, or return 
static content via the default servlet.

In otherwords, if the request matches a specific pattern, then pass it 
onto the next filter, eventually this will hit the default or jsp 
servlets for you without your needing to resolve the servlet that will 
be at the end.

In instances where you recognize in the regexp that you don't want this 
behavior your going to need logic to determine what the alternate 
behavior would be.

In terms of aquiring the default servlet:

Speculation: the RequestDispatcher may be doing "mapping" internally 
too, so you may need to be doing something like the following in your 
web.xml to actually aquire a request dispatcher directly to the servlet.


default
blaa

RequestDispatcher defaultDispatcher =
getServletContext().getNamedDispatcher("blaa");
defaultDispatcher.forward(request, response);
But this is just speculation.

-Mark

Albert Moliner wrote:
Touché.
I don't know why I had not thought of filters for this...
Oh, yes, now I know:
My initial intention was to return the JSP file contents as if it were a .txt
file, and though ServletContext.getResourceAsStream could be used, it involved
having to implement the same behaviour as the default servlet does (last
modified checks, etc.). So after all I wanted the default servlet to serve the
request, and the filter would have needed the same behaviour as the forwarding
servlet I had implemented.
Therefore, my question now becomes: If I needed the default servlet (or the jsp
servlet, as it seems to have the same problems) to serve all requests inside a
subdirectory, or perhaps just some files with a pattern under a subdir, how
should I proceed?
In other words: What's wrong with doing (don't consider code quality, it's just
to show the procedure)

RequestDispatcher defaultDispatcher =
getServletContext().getNamedDispatcher("default");
defaultDispatcher.forward(request, response);

? Why doesn't it work (and "jsp" doesn't, either), while any other servlet name
just seems to work fine?
Or, otherwise, in the app's web.xml,



default
/foo/bar/*


? Amazingly,



default
/foo/bar/file.jsp


does seem to work, while not the "/foo/bar/*" mapping (and this mapping works
with any other servlet name defined in the same web.xml file).
Is it that today it's a Friday? Am I misunderstanding something very basic? Is
this a common behaviour, or just happens in Tomcat (4.1.something)?
Thanks,
Albert.
- Original Message -
From: "Mark R. Diggory" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 4:24 PM
Subject: Re: Disabling JSP execution under certain dirs


Yes, Unfortunately, I bounced off this as well, it would have behooved
the Servlet API developers to allow URL Rewrites to be a little more
powerful from a REGEXP standpoint. Look at the j2sdk1.4 api, we now have
regexp's available there default. One would suspect that the Servlet API
could easily start allowing more complex regexp into these entries.
I would recommend writing a Filter that gets run prior to all jsp's and
applying your own regexp/forwarding to the jsp's when you deem it
appropriate. This requires j2sdk 1.4 and is pseudo code.
public final class BlockJspFilter implements Filter {

   String regexp = "*.(/foo/bar.jsp|/bim/bam.jsp).*";

   public void doFilter(ServletRequest request,
  ServletResponse response, FilterChain chain)
  throws IOException, ServletException {
  if(request.getRequestURL().matches(regexp)){
  /*send an error response*/
  else{
chain.doFilter(request, wrapper);
  }
  ...
   }
}
   
  BlockJspFilter
  BlockJspFilter
   
   
  BlockJspFilter
  *.jsp
   
One could even go as far as to use the FilterConfig to pass in the
regexps which could then be dynamically adjusted in the web.xml
http://java.sun.com/products/servlet/Filters.html

-Mark Diggory





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: new JVM feature, just an idea

2003-12-12 Thread Edson Alves Pereira
The point here is that my classpath is very big and even using
environment variables winnt complain about it.

> --
> De:   Shapira, Yoav[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 12 de dezembro de 2003 10:47
> Para: Tomcat Users List
> Assunto:  RE: new JVM feature, just an idea
> 
> 
> Howdy,
> You can use the environment variables on windows as well.  And FYI, though
> I'm not a big M$ fan, Windows XP and 2003 are not bad, I've been working
> with them a bit without stability problems.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
> >Sent: Friday, December 12, 2003 9:16 AM
> >To: 'Tomcat-User List'
> >Subject: new JVM feature, just an idea
> >
> > Hello folks, as you know windows has a limit for command-line (
> >something like 128kb ), i´m not a windows fan, but here for a while i
> still
> >using this OS.
> >
> > Then as we cannot change this behaviour ( in win95, win98 and winnt,
> >others i don´t known and i hope never use them ), would be a good idea
> make
> >JVM read classpath form a file named .javarc like .bash_profile and there
> >create  a entrypoint like:
> >
> >###
> >#/home/edson/.javarc
> >
> >classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
> >d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
> >d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
> >d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
> >d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
> >d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
> >d:\usr\local\java_cup\java_cup.jar;\
> >d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
> >d:\usr\local\junit3.7\junit.jar;\
> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
> >d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
> >###
> >
> >  Here i give up to find a solution for my winnt, because there isn´t
> >solution. Then i´ll create a new ClassLoader for my winnt machine to find
> >my
> >classpath in this file also. What do you think about it? Does it could be
> a
> >good implementation for JVM for windows or all JVMs?
> >
> >  Regards,
> >  Edson
> 
> 
> 
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: /devices/pseudo/mm@0:null

2003-12-12 Thread Antonio Fiol Bonnín
Hello,

Not that I have used Tomcat on Solaris a lot, but I have never seen that 
file.

A general advice is to check that you close everything you open.

Antonio Fiol

Hollerman Geralyn M wrote:

While using Tomcat, I have often encountered a problem (a 
java.net.SocketException) with "Too many open files". I understand 
that to combat this, I need to up the limit on file descriptors in my 
Solaris 8 system (ulimit command). The system went from 256 -> 1024 
descriptors, but I still get the error, and in listing the open files, 
I will see "/devices/pseudo/[EMAIL PROTECTED]:null" as being used by my Tomcat 
process - over and over and over. I take it the Tomcat process is 
writing to "null"? Is it supposed to do that - or so much of it? Or 
does this indicate a problem somewhere?

Thanks!



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


Re: Image Viewing

2003-12-12 Thread Erik Wright
How does an image get displayed in a page?

1. The browser receives an HTML page with an IMG tag in it. The IMG tag 
contains a src attr (an HTTP URL).
2. The browser makes another request, for the URL of the image.
3. The server returns the image, which is displayed.

Clearly, if you want an image to be displayed within a web page, the 
image must be available on your server. There is no difference between 
the browser making a request for an URL and the user typing that URL 
into the address bar directly. Maybe you can look at the referer field, 
but of course that can be hoaxed so if you are really trying to keep 
this secure that is not a solution.

If you really want to only provide content to specific users, you must 
provide some sort of access control mechanism. The same mechanism should 
apply to images you wish to protect.

This is all related to the fundamental workings of HTTP.

HTTP is an integral part of how the web works - anyone thinking of 
designing a website (especially using scripting languages, servlets, or 
anyone trying to provide any type of security) should understand at 
least the fundamentals of HTTP.

-Erik

Christopher Schultz wrote:

All,

It would be http://yourserver/yourservlet?param=paramValue";
alt="something">


This still doesn't answer the "original" interpreted question. I don't 
think it's possible to display an image on a page and prevent users 
from browsing to it directly from their browser.

The only thing I can think of is to check the REFERER header to see if 
it came from the page on which you want to display it. That's also not 
foolproof...

-chris

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




--
http://www.spectacle.ca/
The Online Source for Live Music in Montreal
.::514.286.1699::.


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


Re: Image Viewing

2003-12-12 Thread Ben Souther
If you're using a servlet to serve up images by name, you have plenty of ways 
to filter non-allowed users.

You can reference thier sessionID to determine who they are, you can (as you 
said) check the referer to make sure that the request comes from the correct 
page, you can map the real filenames to an arbitrary string that changes with 
each request etc.. etc..





On Friday 12 December 2003 11:37 am, Christopher Schultz wrote:
> All,
>
> > It would be http://yourserver/yourservlet?param=paramValue";
> > alt="something">
>
> This still doesn't answer the "original" interpreted question. I don't
> think it's possible to display an image on a page and prevent users from
> browsing to it directly from their browser.
>
> The only thing I can think of is to check the REFERER header to see if
> it came from the page on which you want to display it. That's also not
> foolproof...
>
> -chris
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



Re: Image Viewing

2003-12-12 Thread Christopher Schultz
All,

It would be http://yourserver/yourservlet?param=paramValue";
alt="something">
This still doesn't answer the "original" interpreted question. I don't 
think it's possible to display an image on a page and prevent users from 
browsing to it directly from their browser.

The only thing I can think of is to check the REFERER header to see if 
it came from the page on which you want to display it. That's also not 
foolproof...

-chris

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


RE: Image Viewing

2003-12-12 Thread Shapira, Yoav

Howdy,
It would be http://yourserver/yourservlet?param=paramValue";
alt="something">

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Jon Yeargers [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 11:30 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Image Viewing
>
>So your tag would be  ?
>
>If you do this do the images get cached by the browser?
>
>
>> It sounds like what you're asking is:
>> How can you allow users to view images via the app without allowing
them
>> to
>> look at them directly with a browser?
>>
>> If that's what you want to do, it can be accomplished by writing a
>servlet
>> that streams images and use it as the "src" attribute to your image
tags.
>> This should get you started:
>>
>> package img;
>> import java.io.*;
>> import javax.servlet.*;
>> import javax.servlet.http.*;
>> import javax.servlet.ServletException;
>>
>> public class ImageServlet extends HttpServlet{
>>
>> public void doGet(HttpServletRequest request,
>>   HttpServletResponse response)
>>   throws ServletException{
>> try{
>> response.setContentType("image/jpg");
>> OutputStream o = response.getOutputStream();
>>
>> BufferedInputStream in = new BufferedInputStream(
>> getServletContext()
>>.getResourceAsStream(
>>  "/WEB-INF/forbidden_images/axis.jpg"));
>>
>> byte[] buf = new byte[32 * 1024]; // 32k buffer
>> int nRead = 0;
>> while( (nRead = in.read(buf)) != -1 ) {
>> o.write(buf, 0, nRead);
>> }
>> o.flush();
>> o.close();
>> return;
>> }catch(Exception e){
>> // do something..
>> }
>> }
>> }
>> ~
>> ~
>> I'm not a streaming guru. It works but
>> someone else might be able to show you a more
>> elegant way to do it or how to do it from a JSP.
>> You'll probably want to pass the image's file name in the
querystring.
>>
>> Good Luck
>> -Ben
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thursday 11 December 2003 01:29 pm, you wrote:
>>> Howdy,
>>> You asked how to block the user from seeing the images by putting
the
>>> address in the browser.  I told you one possible way, e.g. by
putting
>>> them under WEB-INF.  You can still access them from your servlets
and
>>> JSPs from this location, but users can't.  What part is unclear?
>>>
>>> Yoav Shapira
>>> Millennium ChemInformatics
>>>
>>> >-Original Message-
>>>
>>> From: Kiran Patel [mailto:[EMAIL PROTECTED]
>>>
>>> >Sent: Thursday, December 11, 2003 1:28 PM
>>> >To: [EMAIL PROTECTED]
>>> >Subject: Image Viewing
>>> >
>>> >Thank you for the replay and your help.  If I move the images under
>>>
>>> WEB-INF
>>>
>>> >folder, I can't access the images from the application through the
>>> >internet.  The images can only be viewed if you login and start the
>>> >application not by typing the url.  For security purpose.  Please
help
>>>
>>> me
>>>
>>> >if anybody know how to do that.  Thank you.
>>> >
>>> >Kiran Patel
>>> >
>>> >Howdy,
>>> >Put the images directory under the WEB-INF directory and change
your
>>> >servlet accordingly.
>>> >
>>> >Yoav Shapira
>>> >Millennium ChemInformatics
>>> >
>>> >>-Original Message-
>>> >>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>>> >>Sent: Thursday, December 11, 2003 9:53 AM
>>> >>To: [EMAIL PROTECTED]
>>> >>Subject: Image Viewing
>>> >>
>>> >>I am using jsp and tomcat 4.1 for my web application.  My
application=
>>> >
>>> >is
>>> >
>>> >>viewing image which is in the webapps/image folder.  This image
can
>>> >
>>> >also be
>>> >
>>> >>viewed from the internet by just typing the url.  I want to block
thi=
>>> >
>>> >s
>>> >
>>> >>since these are the confidential images.  Does anybody know how to
do=
>>> >
>>> >that.
>>> >
>>> >>Thanks in advance.
>>> >>
>>> >>Kiran Patel
>>>
>>> This e-mail, including any attachments, is a confidential business
>>> communication, and may contain information that is confidential,
>>> proprietary and/or privileged.  This e-mail is intended only for the
>>> individual(s) to whom it is addressed, and may not be saved, copied,
>>> printed, disclosed or used by anyone else.  If you are not the(an)
>>> intended
>>> recipient, please immediately delete this e-mail from your computer
>>> system
>>> and notify the sender.  Thank you.
>>>
>>>
>>>
-
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual

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

2003-12-12 Thread Anthony Presley
Thanks for your help everyone . after some number of hours of work
yesterday, I managed to get everything changed over, and I'm NOT using
the SingleThreadModel.  I inherited part of the code, and wrote most of
the rest  a couple of perl scripts was able to help significantly.

Long and the short, was we were trying to get away with an OOP design,
in which all of our servlets derived from a single class (which in turn,
implements HttpServlet), so that our forward(), logging, and erroring
methods could be easily implemented.  In doing so, you were all correct,
we were over-writing our own variables.

On Wednesday I upgraded to the latest DBCP and Commons Pool, as well as
the latest JDBC driver for our vendor, reducing the number of those
errors from an enormous 760 to 220.  Today, thus far, we've had a total
of 10 errors, only two of which were related to that same problem, and
probably are from me missing something in the code.

Thanks for your help in this mess 

--Anthony


On Thu, 2003-12-11 at 15:00, Antonio Fiol Bonnín wrote:
> >So . what your telling me, is that it's a concurrency problem
> >created by having "object attributes"?  That if they were, in fact being
> >called more like:
> >
> > doProcess2 ();
> >
> >than like:
> >
> > doProcess1 ();
> >
> >I wouldn't have these problems?  Very interesting.
> >  
> >
> 
> Not quite. I don't really understand your structue, but it seems it 
> needs some refactoring.
> 
> >Please write back and ensure that's what you mean . because I'm
> >pretty sure it is.  Oh, fun.  Here I go to change  some 100K lines
> >of code :-)
> >
> >  
> >
> 
> As a rule of thumb, do not let your "req" and "res" leave local scope 
> (do not "store" them anywhere [attribute, static attribute, other 
> object, ...]).
> 
> If you need help with the refactoring and I can access your code, I 
> might help on saturday. (Which timezone do you live on?)
> 
> Yours,
> 
> Antonio Fiol

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



Re: Image Viewing

2003-12-12 Thread Jon Yeargers
So your tag would be  ?

If you do this do the images get cached by the browser?


> It sounds like what you're asking is:
> How can you allow users to view images via the app without allowing them
> to
> look at them directly with a browser?
>
> If that's what you want to do, it can be accomplished by writing a servlet
> that streams images and use it as the "src" attribute to your image tags.
> This should get you started:
>
> package img;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import javax.servlet.ServletException;
>
> public class ImageServlet extends HttpServlet{
>
> public void doGet(HttpServletRequest request,
>   HttpServletResponse response)
>   throws ServletException{
> try{
> response.setContentType("image/jpg");
> OutputStream o = response.getOutputStream();
>
> BufferedInputStream in = new BufferedInputStream(
> getServletContext()
>.getResourceAsStream(
>   "/WEB-INF/forbidden_images/axis.jpg"));
>
> byte[] buf = new byte[32 * 1024]; // 32k buffer
> int nRead = 0;
> while( (nRead = in.read(buf)) != -1 ) {
> o.write(buf, 0, nRead);
> }
> o.flush();
> o.close();
> return;
> }catch(Exception e){
> // do something..
> }
> }
> }
> ~
> ~
> I'm not a streaming guru. It works but
> someone else might be able to show you a more
> elegant way to do it or how to do it from a JSP.
> You'll probably want to pass the image's file name in the querystring.
>
> Good Luck
> -Ben
>
>
>
>
>
>
>
>
> On Thursday 11 December 2003 01:29 pm, you wrote:
>> Howdy,
>> You asked how to block the user from seeing the images by putting the
>> address in the browser.  I told you one possible way, e.g. by putting
>> them under WEB-INF.  You can still access them from your servlets and
>> JSPs from this location, but users can't.  What part is unclear?
>>
>> Yoav Shapira
>> Millennium ChemInformatics
>>
>> >-Original Message-
>>
>> From: Kiran Patel [mailto:[EMAIL PROTECTED]
>>
>> >Sent: Thursday, December 11, 2003 1:28 PM
>> >To: [EMAIL PROTECTED]
>> >Subject: Image Viewing
>> >
>> >Thank you for the replay and your help.  If I move the images under
>>
>> WEB-INF
>>
>> >folder, I can't access the images from the application through the
>> >internet.  The images can only be viewed if you login and start the
>> >application not by typing the url.  For security purpose.  Please help
>>
>> me
>>
>> >if anybody know how to do that.  Thank you.
>> >
>> >Kiran Patel
>> >
>> >Howdy,
>> >Put the images directory under the WEB-INF directory and change your
>> >servlet accordingly.
>> >
>> >Yoav Shapira
>> >Millennium ChemInformatics
>> >
>> >>-Original Message-
>> >>From: Kiran Patel [mailto:[EMAIL PROTECTED]
>> >>Sent: Thursday, December 11, 2003 9:53 AM
>> >>To: [EMAIL PROTECTED]
>> >>Subject: Image Viewing
>> >>
>> >>I am using jsp and tomcat 4.1 for my web application.  My application=
>> >
>> >is
>> >
>> >>viewing image which is in the webapps/image folder.  This image can
>> >
>> >also be
>> >
>> >>viewed from the internet by just typing the url.  I want to block thi=
>> >
>> >s
>> >
>> >>since these are the confidential images.  Does anybody know how to do=
>> >
>> >that.
>> >
>> >>Thanks in advance.
>> >>
>> >>Kiran Patel
>>
>> This e-mail, including any attachments, is a confidential business
>> communication, and may contain information that is confidential,
>> proprietary and/or privileged.  This e-mail is intended only for the
>> individual(s) to whom it is addressed, and may not be saved, copied,
>> printed, disclosed or used by anyone else.  If you are not the(an)
>> intended
>> recipient, please immediately delete this e-mail from your computer
>> system
>> and notify the sender.  Thank you.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Question about mcastAddr for clustering

2003-12-12 Thread daniel
Does the ip address need to be a internal ip address on my network or should i just 
use the defaul ip address?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.550 / Virus Database: 342 - Release Date: 12/10/2003

Re: deploy-task with directory-structure

2003-12-12 Thread Remy Maucherat
Franz-Josef Herpers wrote:
Hi,

i used to work with the ant install task during development. Now i 
migrated to Tomcat 5.0.16 and from the docs and this mailing list I 
know, that the install task is deprecated in favour of the deploy task.

So i changed my install target:





  
But know I get the error message:
[deploy] BUILD FAILED: file:E:/CVS_PROJEKTE/iuclid-x/build.xml:242: 
java.net.UnknownHostException: E

The target is run from the same server that Tomcat is running on.

Any suggestions what I'm doing wrong?
Is it possible to deploy from a directory structure (not a war-file) 
like with the install task?
Read the docs :)
The war attribute should be a file path to a compressed WAR.
--
x
Rémy Maucherat
Senior Developer & Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Ben Souther
Hmm... 
Should have tested the theory before suggesting it. 
I knew you could use wildcards in the mappings.
I assumed it was more robust
Sorry.


On Friday 12 December 2003 10:24 am, Mark R. Diggory wrote:
> Yes, Unfortunately, I bounced off this as well, it would have behooved
> the Servlet API developers to allow URL Rewrites to be a little more
> powerful from a REGEXP standpoint. Look at the j2sdk1.4 api, we now have
> regexp's available there default. One would suspect that the Servlet API
> could easily start allowing more complex regexp into these entries.
>
> I would recommend writing a Filter that gets run prior to all jsp's and
> applying your own regexp/forwarding to the jsp's when you deem it
> appropriate. This requires j2sdk 1.4 and is pseudo code.
>
>
> public final class BlockJspFilter implements Filter {
>
> String regexp = "*.(/foo/bar.jsp|/bim/bam.jsp).*";
>
> public void doFilter(ServletRequest request,
>ServletResponse response, FilterChain chain)
>throws IOException, ServletException {
>
>if(request.getRequestURL().matches(regexp)){
>   /*send an error response*/
>else{
>   chain.doFilter(request, wrapper);
>}
>...
> }
> }
>
> 
>BlockJspFilter
>BlockJspFilter
> 
> 
>BlockJspFilter
>*.jsp
> 
>
> One could even go as far as to use the FilterConfig to pass in the
> regexps which could then be dynamically adjusted in the web.xml
>
> http://java.sun.com/products/servlet/Filters.html
>
> -Mark Diggory
>
> Albert Moliner wrote:
> > Finally I'll add the restriction on publication, but anyway it would nice
> > to know whether there's a solution to prevent the JSP from being served
> > (yes, retrieving an error message or just returning the JSP contents
> > without executing the class would be alright), at least for the sake of
> > knowing.
> >
> > The only problem with your alternative is that the mapping is not valid:
> > Perhaps Tomcat accepts it (I don't think so, as manymonths ago I tried
> > similar mappings and did not succeed), but anyway the servlet specs only
> > regard four types of mapping:
> > - exact path,
> > - directory ("/foo/bar/*"),
> > - extension ("*.jsp"),
> > - default("/").
> > I don't know why (performance?), but there's no place for things like
> > "/whatever/*.ext".
> >
> > About Tim's answer, there are some things that I don't see clear,
> > basically dealing with the default servlet. The default servlet is after
> > all a servlet, so it ought to be "forwardable" (something to do with
> > having it defined in the general web.xml and the forwarder servlet in the
> > app's?). Anyway, the security constraint seems the best approach. I'll
> > look up the security documentation.
> >
> > Thank you very much (though alternatives are still welcome, as I said
> > before).
> >
> > Albert.
> >
> >
> > - Original Message -
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Friday, December 12, 2003 3:36 PM
> > Subject: Re: Disabling JSP execution under certain dirs
> >
> >
> > It sounds like Albert wants certain (static) files to be viewable.
> > He just doesn't want anyone to be able to execute JSPs from this
> > directory.
> >
> > One thing you could try is a servlet mapping that sends all requests
> > ending in that directory that end with .jsp to a servlet that sends back
> > a message ("FORBIDDEN FILE").
> >
> >   
> > ForbiddenFileServlet
> > /DIRECTORY_NAME/*.jsp
> >   
> >
> > -Ben
> >
> > On Friday 12 December 2003 09:10 am, Tim Funk wrote:
> >>Ideally, files you don't want to be seen should be placed in WEB-INF.
> >>
> >>An alternative is to use a security constraint on the directory that has
> >>all of the content. This can be done in apache too via the 
> >>directive.
> >>
> >>Another way is to place all those JSP's with a different extension and
> >> then add the mapping to web.xml. Then add the security contraint for
> >> that file extension. (Or let apache disallow that file extension)
> >>
> >>Forwarding to the default servelt WILL provide a 404 because it is a 404.
> >>The default servlet gets any request not assigned to any other servlet.
> >> So if the default servlet find the resource, it returns a 404.
> >>
> >>-Tim
> >>
> >>Albert Moliner wrote:
> >>>Hello.
> >>>
> >>>I've searched the archives on this subject, but the nearest I've reached
> >>>has been some posts about not serving static content. It's a bit of a
> >>>surprise that no one has asked this before, so sorry if it is a
> >>> recurrent question.
> >>>
> >>>I want Tomcat (4) to execute JSPs as usual, but prevent it from running
> >>>the files that are under a certain directory for security reasons. These
> >>>files can be published by external people and are supposed to be static,
> >>>but if some mischievous publisher posts a JSP and it is executed then
> >>>there can be havoc.
> >>>
> >>>Apart from prev

Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Albert Moliner

Touché.
I don't know why I had not thought of filters for this...

Oh, yes, now I know:
My initial intention was to return the JSP file contents as if it were a .txt
file, and though ServletContext.getResourceAsStream could be used, it involved
having to implement the same behaviour as the default servlet does (last
modified checks, etc.). So after all I wanted the default servlet to serve the
request, and the filter would have needed the same behaviour as the forwarding
servlet I had implemented.

Therefore, my question now becomes: If I needed the default servlet (or the jsp
servlet, as it seems to have the same problems) to serve all requests inside a
subdirectory, or perhaps just some files with a pattern under a subdir, how
should I proceed?

In other words: What's wrong with doing (don't consider code quality, it's just
to show the procedure)


RequestDispatcher defaultDispatcher =
getServletContext().getNamedDispatcher("default");
defaultDispatcher.forward(request, response);


? Why doesn't it work (and "jsp" doesn't, either), while any other servlet name
just seems to work fine?

Or, otherwise, in the app's web.xml,



default
/foo/bar/*



? Amazingly,



default
/foo/bar/file.jsp



does seem to work, while not the "/foo/bar/*" mapping (and this mapping works
with any other servlet name defined in the same web.xml file).

Is it that today it's a Friday? Am I misunderstanding something very basic? Is
this a common behaviour, or just happens in Tomcat (4.1.something)?

Thanks,
Albert.


- Original Message -
From: "Mark R. Diggory" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 4:24 PM
Subject: Re: Disabling JSP execution under certain dirs


> Yes, Unfortunately, I bounced off this as well, it would have behooved
> the Servlet API developers to allow URL Rewrites to be a little more
> powerful from a REGEXP standpoint. Look at the j2sdk1.4 api, we now have
> regexp's available there default. One would suspect that the Servlet API
> could easily start allowing more complex regexp into these entries.
>
> I would recommend writing a Filter that gets run prior to all jsp's and
> applying your own regexp/forwarding to the jsp's when you deem it
> appropriate. This requires j2sdk 1.4 and is pseudo code.
>
>
> public final class BlockJspFilter implements Filter {
>
> String regexp = "*.(/foo/bar.jsp|/bim/bam.jsp).*";
>
> public void doFilter(ServletRequest request,
>ServletResponse response, FilterChain chain)
>throws IOException, ServletException {
>
>if(request.getRequestURL().matches(regexp)){
>/*send an error response*/
>else{
> chain.doFilter(request, wrapper);
>}
>...
> }
> }
>
> 
>BlockJspFilter
>BlockJspFilter
> 
> 
>BlockJspFilter
>*.jsp
> 
>
> One could even go as far as to use the FilterConfig to pass in the
> regexps which could then be dynamically adjusted in the web.xml
>
> http://java.sun.com/products/servlet/Filters.html
>
> -Mark Diggory
>



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



Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Tim Funk
Yup - the spec sucks with respect to combining path prefix and extension 
mapping. :( The ideal solution is still to put the jsps inside WEB-INF or to 
use apache and disallow via a deny directive.

As for the default servlet, you can add a init parameter to it for debugging, 
if you set it to 99, it may provide some insight as to what the default 
servlet is trying to do with respect to the way it is being called.

-Tim

Albert Moliner wrote:

Finally I'll add the restriction on publication, but anyway it would nice to
know whether there's a solution to prevent the JSP from being served (yes,
retrieving an error message or just returning the JSP contents without executing
the class would be alright), at least for the sake of knowing.
The only problem with your alternative is that the mapping is not valid: Perhaps
Tomcat accepts it (I don't think so, as manymonths ago I tried similar mappings
and did not succeed), but anyway the servlet specs only regard four types of
mapping:
- exact path,
- directory ("/foo/bar/*"),
- extension ("*.jsp"),
- default("/").
I don't know why (performance?), but there's no place for things like
"/whatever/*.ext".
About Tim's answer, there are some things that I don't see clear, basically
dealing with the default servlet. The default servlet is after all a servlet, so
it ought to be "forwardable" (something to do with having it defined in the
general web.xml and the forwarder servlet in the app's?). Anyway, the security
constraint seems the best approach. I'll look up the security documentation.
Thank you very much (though alternatives are still welcome, as I said before).

Albert.

- Original Message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 3:36 PM
Subject: Re: Disabling JSP execution under certain dirs
It sounds like Albert wants certain (static) files to be viewable.
He just doesn't want anyone to be able to execute JSPs from this directory.
One thing you could try is a servlet mapping that sends all requests ending in
that directory that end with .jsp to a servlet that sends back a message
("FORBIDDEN FILE").
  
ForbiddenFileServlet
/DIRECTORY_NAME/*.jsp
  
-Ben

On Friday 12 December 2003 09:10 am, Tim Funk wrote:

Ideally, files you don't want to be seen should be placed in WEB-INF.

An alternative is to use a security constraint on the directory that has
all of the content. This can be done in apache too via the 
directive.
Another way is to place all those JSP's with a different extension and then
add the mapping to web.xml. Then add the security contraint for that file
extension. (Or let apache disallow that file extension)
Forwarding to the default servelt WILL provide a 404 because it is a 404.
The default servlet gets any request not assigned to any other servlet. So
if the default servlet find the resource, it returns a 404.
-Tim

Albert Moliner wrote:

Hello.

I've searched the archives on this subject, but the nearest I've reached
has been some posts about not serving static content. It's a bit of a
surprise that no one has asked this before, so sorry if it is a recurrent
question.
I want Tomcat (4) to execute JSPs as usual, but prevent it from running
the files that are under a certain directory for security reasons. These
files can be published by external people and are supposed to be static,
but if some mischievous publisher posts a JSP and it is executed then
there can be havoc.
Apart from preventing the publishing of files with that extension, is
there a possible configuration that can be set up?
I've tried mapping requests to that dir to the default servlet in
web.xml, but 404 errors are returned (why??), and some other wierd things
like using an intermediate servlet that forwards to the default servlet
through its named request dispatcher (the forward method does not seem to
do anything when using the dault servlet, while any other seems to work)
or setting up a separate context for that dir and forward requests to the
context, which maps *.jsp to the default context (I'll skip the details),
but I can't find the solution...
What astonishes me more is that forwarding or mapping to the default
servlet does not work, but anyway I must be doing something wrong...



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


deploy-task with directory-structure

2003-12-12 Thread Franz-Josef Herpers
Hi,

i used to work with the ant install task during development. Now i 
migrated to Tomcat 5.0.16 and from the docs and this mailing list I 
know, that the install task is deprecated in favour of the deploy task.

So i changed my install target:





  
But know I get the error message:
[deploy] BUILD FAILED: file:E:/CVS_PROJEKTE/iuclid-x/build.xml:242: 
java.net.UnknownHostException: E

The target is run from the same server that Tomcat is running on.

Any suggestions what I'm doing wrong?
Is it possible to deploy from a directory structure (not a war-file) 
like with the install task?

Regards
Franz


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


Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Mark R. Diggory
Yes, Unfortunately, I bounced off this as well, it would have behooved 
the Servlet API developers to allow URL Rewrites to be a little more 
powerful from a REGEXP standpoint. Look at the j2sdk1.4 api, we now have 
regexp's available there default. One would suspect that the Servlet API 
could easily start allowing more complex regexp into these entries.

I would recommend writing a Filter that gets run prior to all jsp's and 
applying your own regexp/forwarding to the jsp's when you deem it 
appropriate. This requires j2sdk 1.4 and is pseudo code.

public final class BlockJspFilter implements Filter {

   String regexp = "*.(/foo/bar.jsp|/bim/bam.jsp).*";

   public void doFilter(ServletRequest request,
  ServletResponse response, FilterChain chain)
  throws IOException, ServletException {
  if(request.getRequestURL().matches(regexp)){
/*send an error response*/
  else{
chain.doFilter(request, wrapper);
  }
  ...
   }
}
   
  BlockJspFilter
  BlockJspFilter
   
   
  BlockJspFilter
  *.jsp
   
One could even go as far as to use the FilterConfig to pass in the 
regexps which could then be dynamically adjusted in the web.xml

http://java.sun.com/products/servlet/Filters.html

-Mark Diggory

Albert Moliner wrote:
Finally I'll add the restriction on publication, but anyway it would nice to
know whether there's a solution to prevent the JSP from being served (yes,
retrieving an error message or just returning the JSP contents without executing
the class would be alright), at least for the sake of knowing.
The only problem with your alternative is that the mapping is not valid: Perhaps
Tomcat accepts it (I don't think so, as manymonths ago I tried similar mappings
and did not succeed), but anyway the servlet specs only regard four types of
mapping:
- exact path,
- directory ("/foo/bar/*"),
- extension ("*.jsp"),
- default("/").
I don't know why (performance?), but there's no place for things like
"/whatever/*.ext".
About Tim's answer, there are some things that I don't see clear, basically
dealing with the default servlet. The default servlet is after all a servlet, so
it ought to be "forwardable" (something to do with having it defined in the
general web.xml and the forwarder servlet in the app's?). Anyway, the security
constraint seems the best approach. I'll look up the security documentation.
Thank you very much (though alternatives are still welcome, as I said before).

Albert.

- Original Message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 3:36 PM
Subject: Re: Disabling JSP execution under certain dirs
It sounds like Albert wants certain (static) files to be viewable.
He just doesn't want anyone to be able to execute JSPs from this directory.
One thing you could try is a servlet mapping that sends all requests ending in
that directory that end with .jsp to a servlet that sends back a message
("FORBIDDEN FILE").
  
ForbiddenFileServlet
/DIRECTORY_NAME/*.jsp
  
-Ben

On Friday 12 December 2003 09:10 am, Tim Funk wrote:

Ideally, files you don't want to be seen should be placed in WEB-INF.

An alternative is to use a security constraint on the directory that has
all of the content. This can be done in apache too via the 
directive.
Another way is to place all those JSP's with a different extension and then
add the mapping to web.xml. Then add the security contraint for that file
extension. (Or let apache disallow that file extension)
Forwarding to the default servelt WILL provide a 404 because it is a 404.
The default servlet gets any request not assigned to any other servlet. So
if the default servlet find the resource, it returns a 404.
-Tim

Albert Moliner wrote:

Hello.

I've searched the archives on this subject, but the nearest I've reached
has been some posts about not serving static content. It's a bit of a
surprise that no one has asked this before, so sorry if it is a recurrent
question.
I want Tomcat (4) to execute JSPs as usual, but prevent it from running
the files that are under a certain directory for security reasons. These
files can be published by external people and are supposed to be static,
but if some mischievous publisher posts a JSP and it is executed then
there can be havoc.
Apart from preventing the publishing of files with that extension, is
there a possible configuration that can be set up?
I've tried mapping requests to that dir to the default servlet in
web.xml, but 404 errors are returned (why??), and some other wierd things
like using an intermediate servlet that forwards to the default servlet
through its named request dispatcher (the forward method does not seem to
do anything when using the dault servlet, while any other seems to work)
or setting up a separate context for that dir and forward requests to the
context, which maps *.jsp to the default context (I'll skip the details),
but I can't find the solution...
What astonishes 

/devices/pseudo/mm@0:null

2003-12-12 Thread Hollerman Geralyn M
While using Tomcat, I have often encountered a problem (a 
java.net.SocketException) with "Too many open files". I understand that 
to combat this, I need to up the limit on file descriptors in my Solaris 
8 system (ulimit command). The system went from 256 -> 1024 descriptors, 
but I still get the error, and in listing the open files, I will see 
"/devices/pseudo/[EMAIL PROTECTED]:null" as being used by my Tomcat process - over 
and over and over. I take it the Tomcat process is writing to "null"? Is 
it supposed to do that - or so much of it? Or does this indicate a 
problem somewhere?

Thanks!

--
Lynn Hollerman.


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


Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Albert Moliner

Finally I'll add the restriction on publication, but anyway it would nice to
know whether there's a solution to prevent the JSP from being served (yes,
retrieving an error message or just returning the JSP contents without executing
the class would be alright), at least for the sake of knowing.

The only problem with your alternative is that the mapping is not valid: Perhaps
Tomcat accepts it (I don't think so, as manymonths ago I tried similar mappings
and did not succeed), but anyway the servlet specs only regard four types of
mapping:
- exact path,
- directory ("/foo/bar/*"),
- extension ("*.jsp"),
- default("/").
I don't know why (performance?), but there's no place for things like
"/whatever/*.ext".

About Tim's answer, there are some things that I don't see clear, basically
dealing with the default servlet. The default servlet is after all a servlet, so
it ought to be "forwardable" (something to do with having it defined in the
general web.xml and the forwarder servlet in the app's?). Anyway, the security
constraint seems the best approach. I'll look up the security documentation.

Thank you very much (though alternatives are still welcome, as I said before).

Albert.


- Original Message -
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 3:36 PM
Subject: Re: Disabling JSP execution under certain dirs


It sounds like Albert wants certain (static) files to be viewable.
He just doesn't want anyone to be able to execute JSPs from this directory.

One thing you could try is a servlet mapping that sends all requests ending in
that directory that end with .jsp to a servlet that sends back a message
("FORBIDDEN FILE").

  
ForbiddenFileServlet
/DIRECTORY_NAME/*.jsp
  

-Ben

On Friday 12 December 2003 09:10 am, Tim Funk wrote:
> Ideally, files you don't want to be seen should be placed in WEB-INF.
>
> An alternative is to use a security constraint on the directory that has
> all of the content. This can be done in apache too via the 
> directive.
>
> Another way is to place all those JSP's with a different extension and then
> add the mapping to web.xml. Then add the security contraint for that file
> extension. (Or let apache disallow that file extension)
>
> Forwarding to the default servelt WILL provide a 404 because it is a 404.
> The default servlet gets any request not assigned to any other servlet. So
> if the default servlet find the resource, it returns a 404.
>
> -Tim
>
> Albert Moliner wrote:
> > Hello.
> >
> > I've searched the archives on this subject, but the nearest I've reached
> > has been some posts about not serving static content. It's a bit of a
> > surprise that no one has asked this before, so sorry if it is a recurrent
> > question.
> >
> > I want Tomcat (4) to execute JSPs as usual, but prevent it from running
> > the files that are under a certain directory for security reasons. These
> > files can be published by external people and are supposed to be static,
> > but if some mischievous publisher posts a JSP and it is executed then
> > there can be havoc.
> >
> > Apart from preventing the publishing of files with that extension, is
> > there a possible configuration that can be set up?
> >
> > I've tried mapping requests to that dir to the default servlet in
> > web.xml, but 404 errors are returned (why??), and some other wierd things
> > like using an intermediate servlet that forwards to the default servlet
> > through its named request dispatcher (the forward method does not seem to
> > do anything when using the dault servlet, while any other seems to work)
> > or setting up a separate context for that dir and forward requests to the
> > context, which maps *.jsp to the default context (I'll skip the details),
> > but I can't find the solution...
> >
> > What astonishes me more is that forwarding or mapping to the default
> > servlet does not work, but anyway I must be doing something wrong...
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
Ben Souther
F.W. Davison & Company, 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]



Vedr.: RE: Vedr.: RE: Vedr.: service installer for TC5

2003-12-12 Thread Thomas Nybro Bolding
I have found the location but what ever I put in the Java string value 
Tomcat refuses to start :-(

I will look at your batch script and see whether that might work out.

/Thomas





"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 15:40
Besvar venligst til "Tomcat Users List"

 
Til:"'Tomcat Users List'" <[EMAIL PROTECTED]>
cc: 
Vedr.:  RE: Vedr.: RE: Vedr.: service installer for TC5

Have a look in registry at location:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat Service
Manager

I am pretty sure that you will have to do the service installation 
yourself
or change the one installed by tomcat! Try to put the batch program I made
into a .bat file at execute it in your tomcat directory and copy the jre 
to
the tomcat directory too! It is close but not there yet! :-)

/Jacob

-Original Message-
From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
Sent: 12. december 2003 15:14
To: Tomcat Users List
Subject: Vedr.: RE: Vedr.: service installer for TC5

Hi Jacob,
I guess not really as I simply installed Tomcat out-of-the box thus 
letting the Tomcat installation take care of the windows service.
Afterwards I tried without succes to change to server jvm whereby I 
learned it used my public JRE. So far I havent been able to find any 
documentation of the windows registry settings which have changed quite a 
bit since 4.1.27 :-(

As I also have struggled somewhat with JK2 under NT I have ordered a clean 

Windows 2000 installation hoping this might ease things a bit. I will give 

my old NT box a last shot and will post any findings if succesfull. Based 
on my previous track record I wouldt hope to much though...

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 13:43
Besvar venligst til "Tomcat Users List"

 
Til:"'Tomcat Users List'" <[EMAIL PROTECTED]>
cc: 
Vedr.:  RE: Vedr.: service installer for TC5

Hi Thomas!

OK, now I am getting closer! I am using windows and I also need to use a 
JRE
in a specific location! In this case I have the JRE placed in the tomcat
directory!

I have made following .bat file in the tomcat directory:

set RUNTIME_MODULE=%CD%\jre
set ServerPath=%CD%

bin\tomcat.exe //IS//Serv  --Description "Slide Server" --ImagePath
%ServerPath%\bin\bootstrap.jar --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass
org.apache.catalina.startup.Bootstrap;main;stop --Java
%RUNTIME_MODULE%\bin\server\jvm.dll --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --Install
%ServerPath%\bin\tomcat.exe --StdOutputFile %ServerPath%\logs\stdout.txt
--StdErrorFile %ServerPath%\logs\stderr.txt --JavaOptions -Xrs 
--WorkingPath
%ServerPath%

This works fine when I run "tomcat //TS//Serv", but the service fails and
there does not seem to bee any log information available!

Is this the same problem that you have?

/Jacob

-Original Message-
From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
Sent: 12. december 2003 11:25
To: Tomcat Users List
Subject: Vedr.: service installer for TC5

Having been through the installation process for 5.0.16 a few times by now 


I can assure it is pretty self explanatory.
Ensure you have j2sdk installed and a JAVA_HOME variable set.

Im still strugling trying to get Tomcat not to use the public JRE though 
but this may be NT specific???
I have had some problems with JK2 and NT and therefore recommend 
Windows2000 if you as I must use M$.

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 11:16
Besvar venligst til "Tomcat Users List"

 
Til:<[EMAIL PROTECTED]>
cc: 
Vedr.:  service installer for TC5

I am sorry if this is a stupid question - but I cannot find any
documentation on how to use the tomcat.exe service installer included in
tomcat 5.0.16.

Thanks
/Jacob


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





___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig 
information.
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder 
vi
dig slette e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er
fri for virus og andre fejl, som kan paavirke computeren eller 
it-systemet,
hvori den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi
paatager os ikke noget ansvar for tab og skade, som er opstaaet i
forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you
have received this message by mistake, please inform the sender of the
mistake by sending a reply, then delete the message from your system 
without
making, distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from

Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Ben Souther
> One thing you could try is a servlet mapping that sends all requests ending
> in that directory that end with .jsp

...all requests FROM that directory that end with ".jsp". 

Haven't had my coffee yet.. ;-)


On Friday 12 December 2003 09:36 am, Ben Souther wrote:
> It sounds like Albert wants certain (static) files to be viewable.
> He just doesn't want anyone to be able to execute JSPs from this directory.
>
> One thing you could try is a servlet mapping that sends all requests ending
> in that directory that end with .jsp to a servlet that sends back a message
> ("FORBIDDEN FILE").
>
>   
> ForbiddenFileServlet
> /DIRECTORY_NAME/*.jsp
>   
>
> -Ben
>
> On Friday 12 December 2003 09:10 am, Tim Funk wrote:
> > Ideally, files you don't want to be seen should be placed in WEB-INF.
> >
> > An alternative is to use a security constraint on the directory that has
> > all of the content. This can be done in apache too via the 
> > directive.
> >
> > Another way is to place all those JSP's with a different extension and
> > then add the mapping to web.xml. Then add the security contraint for that
> > file extension. (Or let apache disallow that file extension)
> >
> > Forwarding to the default servelt WILL provide a 404 because it is a 404.
> > The default servlet gets any request not assigned to any other servlet.
> > So if the default servlet find the resource, it returns a 404.
> >
> > -Tim
> >
> > Albert Moliner wrote:
> > > Hello.
> > >
> > > I've searched the archives on this subject, but the nearest I've
> > > reached has been some posts about not serving static content. It's a
> > > bit of a surprise that no one has asked this before, so sorry if it is
> > > a recurrent question.
> > >
> > > I want Tomcat (4) to execute JSPs as usual, but prevent it from running
> > > the files that are under a certain directory for security reasons.
> > > These files can be published by external people and are supposed to be
> > > static, but if some mischievous publisher posts a JSP and it is
> > > executed then there can be havoc.
> > >
> > > Apart from preventing the publishing of files with that extension, is
> > > there a possible configuration that can be set up?
> > >
> > > I've tried mapping requests to that dir to the default servlet in
> > > web.xml, but 404 errors are returned (why??), and some other wierd
> > > things like using an intermediate servlet that forwards to the default
> > > servlet through its named request dispatcher (the forward method does
> > > not seem to do anything when using the dault servlet, while any other
> > > seems to work) or setting up a separate context for that dir and
> > > forward requests to the context, which maps *.jsp to the default
> > > context (I'll skip the details), but I can't find the solution...
> > >
> > > What astonishes me more is that forwarding or mapping to the default
> > > servlet does not work, but anyway I must be doing something wrong...
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



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

2003-12-12 Thread Jacob Kjome
At 02:22 PM 12/12/2003 +0100, you wrote:
Hi!

Jacob Kjome wrote:
You can also use a repository selector.  BTW, do you have log4j.jar *and* 
commons-logging.jar (not commons-logging-api.jar) in WEB-INF/lib?
Yes, I do, but I have tried several scenarios with and without either of 
them in my WEB-INF/lib.
Also I tried putting/removing them in common/lib and server/lib.
The result was always negative.

Hmm... repository selector... never heared of that. Could you kindly point 
me to some resource about this? Sounds exactly like what I am looking for.
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging

But I have no idea how this will integrate with commons-logging, so unless 
you are using Log4j exclusively, I cannot guarantee this will work.  BTW, 
ContextJNDISelector has been moved to log4j proper (out of the sandbox) and 
will be in Log4j-1.3 when it comes out.  Get it from CVS if you want to use it.

Jake


Thanks in advance

Phil

--
And on the seventh day, He exited from append mode.
(Book of create(2), line 255)
-
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: Vedr.: RE: Vedr.: service installer for TC5

2003-12-12 Thread Jacob Lund
Have a look in registry at location:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat Service
Manager

I am pretty sure that you will have to do the service installation yourself
or change the one installed by tomcat! Try to put the batch program I made
into a .bat file at execute it in your tomcat directory and copy the jre to
the tomcat directory too! It is close but not there yet! :-)

/Jacob

-Original Message-
From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
Sent: 12. december 2003 15:14
To: Tomcat Users List
Subject: Vedr.: RE: Vedr.: service installer for TC5

Hi Jacob,
I guess not really as I simply installed Tomcat out-of-the box thus 
letting the Tomcat installation take care of the windows service.
Afterwards I tried without succes to change to server jvm whereby I 
learned it used my public JRE. So far I havent been able to find any 
documentation of the windows registry settings which have changed quite a 
bit since 4.1.27 :-(

As I also have struggled somewhat with JK2 under NT I have ordered a clean 
Windows 2000 installation hoping this might ease things a bit. I will give 
my old NT box a last shot and will post any findings if succesfull. Based 
on my previous track record I wouldt hope to much though...

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 13:43
Besvar venligst til "Tomcat Users List"

 
Til:"'Tomcat Users List'" <[EMAIL PROTECTED]>
cc: 
Vedr.:  RE: Vedr.: service installer for TC5

Hi Thomas!

OK, now I am getting closer! I am using windows and I also need to use a 
JRE
in a specific location! In this case I have the JRE placed in the tomcat
directory!

I have made following .bat file in the tomcat directory:

set RUNTIME_MODULE=%CD%\jre
set ServerPath=%CD%

bin\tomcat.exe //IS//Serv  --Description "Slide Server" --ImagePath
%ServerPath%\bin\bootstrap.jar --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass
org.apache.catalina.startup.Bootstrap;main;stop --Java
%RUNTIME_MODULE%\bin\server\jvm.dll --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --Install
%ServerPath%\bin\tomcat.exe --StdOutputFile %ServerPath%\logs\stdout.txt
--StdErrorFile %ServerPath%\logs\stderr.txt --JavaOptions -Xrs 
--WorkingPath
%ServerPath%

This works fine when I run "tomcat //TS//Serv", but the service fails and
there does not seem to bee any log information available!

Is this the same problem that you have?

/Jacob

-Original Message-
From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
Sent: 12. december 2003 11:25
To: Tomcat Users List
Subject: Vedr.: service installer for TC5

Having been through the installation process for 5.0.16 a few times by now 

I can assure it is pretty self explanatory.
Ensure you have j2sdk installed and a JAVA_HOME variable set.

Im still strugling trying to get Tomcat not to use the public JRE though 
but this may be NT specific???
I have had some problems with JK2 and NT and therefore recommend 
Windows2000 if you as I must use M$.

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 11:16
Besvar venligst til "Tomcat Users List"

 
Til:<[EMAIL PROTECTED]>
cc: 
Vedr.:  service installer for TC5

I am sorry if this is a stupid question - but I cannot find any
documentation on how to use the tomcat.exe service installer included in
tomcat 5.0.16.

Thanks
/Jacob


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





___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig 
information.
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder 
vi
dig slette e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er
fri for virus og andre fejl, som kan paavirke computeren eller 
it-systemet,
hvori den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi
paatager os ikke noget ansvar for tab og skade, som er opstaaet i
forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you
have received this message by mistake, please inform the sender of the
mistake by sending a reply, then delete the message from your system 
without
making, distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from
viruses and other errors that might affect the computer or IT system where
it is received and read, the recipient opens the message at his or her own
risk. We assume no responsibility for any loss or damage arising from the
receipt or use of this message.




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

Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Ben Souther
It sounds like Albert wants certain (static) files to be viewable.
He just doesn't want anyone to be able to execute JSPs from this directory.

One thing you could try is a servlet mapping that sends all requests ending in 
that directory that end with .jsp to a servlet that sends back a message 
("FORBIDDEN FILE").

  
ForbiddenFileServlet
/DIRECTORY_NAME/*.jsp
  

-Ben

On Friday 12 December 2003 09:10 am, Tim Funk wrote:
> Ideally, files you don't want to be seen should be placed in WEB-INF.
>
> An alternative is to use a security constraint on the directory that has
> all of the content. This can be done in apache too via the 
> directive.
>
> Another way is to place all those JSP's with a different extension and then
> add the mapping to web.xml. Then add the security contraint for that file
> extension. (Or let apache disallow that file extension)
>
> Forwarding to the default servelt WILL provide a 404 because it is a 404.
> The default servlet gets any request not assigned to any other servlet. So
> if the default servlet find the resource, it returns a 404.
>
> -Tim
>
> Albert Moliner wrote:
> > Hello.
> >
> > I've searched the archives on this subject, but the nearest I've reached
> > has been some posts about not serving static content. It's a bit of a
> > surprise that no one has asked this before, so sorry if it is a recurrent
> > question.
> >
> > I want Tomcat (4) to execute JSPs as usual, but prevent it from running
> > the files that are under a certain directory for security reasons. These
> > files can be published by external people and are supposed to be static,
> > but if some mischievous publisher posts a JSP and it is executed then
> > there can be havoc.
> >
> > Apart from preventing the publishing of files with that extension, is
> > there a possible configuration that can be set up?
> >
> > I've tried mapping requests to that dir to the default servlet in
> > web.xml, but 404 errors are returned (why??), and some other wierd things
> > like using an intermediate servlet that forwards to the default servlet
> > through its named request dispatcher (the forward method does not seem to
> > do anything when using the dault servlet, while any other seems to work)
> > or setting up a separate context for that dir and forward requests to the
> > context, which maps *.jsp to the default context (I'll skip the details),
> > but I can't find the solution...
> >
> > What astonishes me more is that forwarding or mapping to the default
> > servlet does not work, but anyway I must be doing something wrong...
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



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



Vedr.: RE: Vedr.: service installer for TC5

2003-12-12 Thread Thomas Nybro Bolding
Hi Jacob,
I guess not really as I simply installed Tomcat out-of-the box thus 
letting the Tomcat installation take care of the windows service.
Afterwards I tried without succes to change to server jvm whereby I 
learned it used my public JRE. So far I havent been able to find any 
documentation of the windows registry settings which have changed quite a 
bit since 4.1.27 :-(

As I also have struggled somewhat with JK2 under NT I have ordered a clean 
Windows 2000 installation hoping this might ease things a bit. I will give 
my old NT box a last shot and will post any findings if succesfull. Based 
on my previous track record I wouldt hope to much though...

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 13:43
Besvar venligst til "Tomcat Users List"

 
Til:"'Tomcat Users List'" <[EMAIL PROTECTED]>
cc: 
Vedr.:  RE: Vedr.: service installer for TC5

Hi Thomas!

OK, now I am getting closer! I am using windows and I also need to use a 
JRE
in a specific location! In this case I have the JRE placed in the tomcat
directory!

I have made following .bat file in the tomcat directory:

set RUNTIME_MODULE=%CD%\jre
set ServerPath=%CD%

bin\tomcat.exe //IS//Serv  --Description "Slide Server" --ImagePath
%ServerPath%\bin\bootstrap.jar --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass
org.apache.catalina.startup.Bootstrap;main;stop --Java
%RUNTIME_MODULE%\bin\server\jvm.dll --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --Install
%ServerPath%\bin\tomcat.exe --StdOutputFile %ServerPath%\logs\stdout.txt
--StdErrorFile %ServerPath%\logs\stderr.txt --JavaOptions -Xrs 
--WorkingPath
%ServerPath%

This works fine when I run "tomcat //TS//Serv", but the service fails and
there does not seem to bee any log information available!

Is this the same problem that you have?

/Jacob

-Original Message-
From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] 
Sent: 12. december 2003 11:25
To: Tomcat Users List
Subject: Vedr.: service installer for TC5

Having been through the installation process for 5.0.16 a few times by now 

I can assure it is pretty self explanatory.
Ensure you have j2sdk installed and a JAVA_HOME variable set.

Im still strugling trying to get Tomcat not to use the public JRE though 
but this may be NT specific???
I have had some problems with JK2 and NT and therefore recommend 
Windows2000 if you as I must use M$.

/Thomas




"Jacob Lund" <[EMAIL PROTECTED]>
12-12-03 11:16
Besvar venligst til "Tomcat Users List"

 
Til:<[EMAIL PROTECTED]>
cc: 
Vedr.:  service installer for TC5

I am sorry if this is a stupid question - but I cannot find any
documentation on how to use the tomcat.exe service installer included in
tomcat 5.0.16.

Thanks
/Jacob


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





___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig 
information.
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder 
vi
dig slette e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er
fri for virus og andre fejl, som kan paavirke computeren eller 
it-systemet,
hvori den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi
paatager os ikke noget ansvar for tab og skade, som er opstaaet i
forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you
have received this message by mistake, please inform the sender of the
mistake by sending a reply, then delete the message from your system 
without
making, distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from
viruses and other errors that might affect the computer or IT system where
it is received and read, the recipient opens the message at his or her own
risk. We assume no responsibility for any loss or damage arising from the
receipt or use of this message.




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





Re: Disabling JSP execution under certain dirs

2003-12-12 Thread Tim Funk
Ideally, files you don't want to be seen should be placed in WEB-INF.

An alternative is to use a security constraint on the directory that has all 
of the content. This can be done in apache too via the  directive.

Another way is to place all those JSP's with a different extension and then 
add the mapping to web.xml. Then add the security contraint for that file 
extension. (Or let apache disallow that file extension)

Forwarding to the default servelt WILL provide a 404 because it is a 404. The 
default servlet gets any request not assigned to any other servlet. So if the 
default servlet find the resource, it returns a 404.

-Tim

Albert Moliner wrote:

Hello.

I've searched the archives on this subject, but the nearest I've reached has
been some posts about not serving static content. It's a bit of a surprise that
no one has asked this before, so sorry if it is a recurrent question.
I want Tomcat (4) to execute JSPs as usual, but prevent it from running the
files that are under a certain directory for security reasons. These files can
be published by external people and are supposed to be static, but if some
mischievous publisher posts a JSP and it is executed then there can be havoc.
Apart from preventing the publishing of files with that extension, is there a
possible configuration that can be set up?
I've tried mapping requests to that dir to the default servlet in web.xml, but
404 errors are returned (why??), and some other wierd things like using an
intermediate servlet that forwards to the default servlet through its named
request dispatcher (the forward method does not seem to do anything when using
the dault servlet, while any other seems to work) or setting up a separate
context for that dir and forward requests to the context, which maps *.jsp to
the default context (I'll skip the details), but I can't find the solution...
What astonishes me more is that forwarding or mapping to the default servlet
does not work, but anyway I must be doing something wrong...


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


Re: Tomcat 5 Newbie

2003-12-12 Thread Tim Funk
Buffering is essential for speedy response time and overall system performace 
in a concurrent environment. Sending every byte to the client by itself is 
horrible for performance. A buffer minimum should be the TCP packet size. But 
even that is *real* small. For some pages, a smaller buffer than the spec 
default (8kb) is desired, for others, a larger buffer is much better because 
of the nature of the data being pulled from its datastore.

In a nutshell, don't change the buffer size unless you have a reason. 
(Personally, I've never had a reason to alter the buffer size in the last 2+ 
years)

-Tim

Dola Woolfe wrote:

Great Tim, Thank you.

A couple words on why you would want to buffer?

--- Tim Funk <[EMAIL PROTECTED]> wrote:

You need it to be in kb, not k:
<%@ page import="html.*" buffer="16kb" %>


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


RE: admin interface: jdbcrealm usage

2003-12-12 Thread Ostad, James
thank you.

James

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 8:59 AM
To: Tomcat Users List
Subject: Re: admin interface: jdbcrealm usage


Not a bug, a feature gap ;)

-Tim

Ostad, James wrote:

> Are you saying that there is a patch for this issue, or did I just
come
> across a bug?
> 
> James
> 
> -Original Message-
> From: Bill Barker [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 2:48 AM
> To: [EMAIL PROTECTED]
> Subject: Re: admin interface: jdbcrealm usage
> 
> 
> Patches are always welcome ;-).
> 
> "Ostad, James" <[EMAIL PROTECTED]> wrote in message
>
news:[EMAIL PROTECTED]
> ..
> I have implemented the jdbcrealm user authentication.
> Now when I go to the tomcat admin site, there is no sign of our users
> and roles.
> 
> Am I supposed to assume that once I moved to jdbcrealm, I should
forget
> about the admin site for user control?
> 
> any comment?
> 
> thanks,
> 
> James Ostad
> Application Developer/Analyst
> TMS Department
> Ex. 4457
> E-mail: [EMAIL PROTECTED]
> 
> 
> Out---> (3)
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> <---In (14)
> 
> 
> 
> 
> Out---> (3)
> 
> 
> 
> -
> 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]



<---In (14)




Out---> (3)



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



Re: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread Ashwin Kutty

I am testing DSPACE available at http://www.dspace.org.. Their mailing
list indicates that in the same environment people have this running with
no problems.  Thats the reason I thought it could be something I am doing
wrong in the configs.

On Fri, 12 Dec 2003, Duncan Smith wrote:

> OK. Are you able to publis the source for the file thats generating the error?
>
> -Duncan
> www.pennymail.com
>
> Ashwin Kutty wrote:
>
> > Tested and it worked fine.  I telnetted in from another box that was added
> > in the relay list and sent a message with no problems.  I also set my smtp
> > server add in my mail client as this server and it sent the message out
> > with no errors.
> >
> > On Fri, 12 Dec 2003, Duncan Smith wrote:
> >
> > > Still may be worth trying to send a mail from a differant application on the same
> > > machine, such as trying to send create a mail message through telnet.
> > >
> > > That way you can be sure whether it is your app or the mail setup.
> > >
> > > -Duncan
> > > www.pennymail.com
> > >
> > > Ashwin Kutty wrote:
> > >
> > > > The SMTP host is the same machine as the page being served are at.
> > > > Sendmail is configured to allow relaying from the localhost.
> > > >
> > > > On Fri, 12 Dec 2003, Ben Souther wrote:
> > > >
> > > > > Looks like you were trying to send to a SMTP host that doesn't allow 
> > > > > relaying.
> > > > >
> > > > >
> > > > >
> > > > > On Friday 12 December 2003 08:16 am, Ashwin Kutty wrote:
> > > > > > Was wondering if someone could help me out here.  I am trying a product
> > > > > > out called DSPACE which gives the following error in catalina.out
> > > > > >
> > > > > > 2003-12-12 08:53:34,957 INFO  org.dspace.app.webui.servlet.RegisterServlet
> > > > > > @ anonymous:session_id=B3D285B12E90E6BCCAF3E4097712D59B:error_emai$
> > > > > > javax.mail.SendFailedException: Sending failed;
> > > > > >   nested exception is:
> > > > > > javax.mail.SendFailedException: Invalid Addresses;
> > > > > >   nested exception is:
> > > > > > javax.mail.SendFailedException: 550 5.7.1 <[EMAIL PROTECTED]>...
> > > > > > Relaying denied
> > > > > >
> > > > > > at javax.mail.Transport.send0(Transport.java:219)
> > > > > > at javax.mail.Transport.send(Transport.java:81)
> > > > > > at org.dspace.core.Email.send(Email.java:259)
> > > > > > at
> > > > > > org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:291)
> > > > > > at
> > > > > > org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:251)
> > > > > > at
> > > > > > org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:
> > > > > >96) at
> > > > > > org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail(RegisterServ
> > > > > >let.java:272) at
> > > > > > org.dspace.app.webui.servlet.RegisterServlet.doDSPost(RegisterServlet.java:
> > > > > >206) at
> > > > > > org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.jav
> > > > > >a:153) at
> > > > > > org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:110)
> > > > > > 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(Applicatio
> > > > > >nFilterChain.java:247) at
> > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> > > > > >hain.java:193) at
> > > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> > > > > >ava:256) at
> > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
> > > > > >keNext(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.j
> > > > > >ava:191) at
> > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
> > > > > >keNext(StandardPipeline.java:643) at
> > > > > > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> > > > > >246) at
> > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
> > > > > >keNext(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.StandardContext.invoke(StandardContext.java:2416)
> > > > > > at
> > > > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:18
> > > > > >0) at
> > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
> > > > 

Re: admin interface: jdbcrealm usage

2003-12-12 Thread Tim Funk
Not a bug, a feature gap ;)

-Tim

Ostad, James wrote:

Are you saying that there is a patch for this issue, or did I just come
across a bug?
James

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 2:48 AM
To: [EMAIL PROTECTED]
Subject: Re: admin interface: jdbcrealm usage
Patches are always welcome ;-).

"Ostad, James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
..
I have implemented the jdbcrealm user authentication.
Now when I go to the tomcat admin site, there is no sign of our users
and roles.
Am I supposed to assume that once I moved to jdbcrealm, I should forget
about the admin site for user control?
any comment?

thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: [EMAIL PROTECTED]
Out---> (3)



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


<---In (14)



Out---> (3)



-
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: Detecting HTTP connection state in Tomcat 4.x

2003-12-12 Thread Tim Funk
DO NOT rely on connection state. This might actually cause a DOS attack on 
you. Use some ID to identify the transaction - then use a cookie (or session) 
with a META refresh to a page which can use that ID to see how the 
transacation is progressing. Upon finishing, the status page can send you to 
the confirmation (or whatever) page.

-Tim

Trott, David wrote:

Hi

I have a batch transaction that takes a significant amount of time (more
than an hour).
However I have a requirement that the user needs to be able to kick of the
transaction from a web interface and be notified when it completes.
I know this isn't the best way to solve the problem, but I was wondering if
it would be possible to detect the HTTP connection state from tomcat 4.x.
I.e.: I kick off the batch transaction from a Servlet and wait for either:
- The transaction to complete at which point I notify the user.
- The http connection is closed (The browser gets closed), at which point I
cancel the batch transaction.
NOTE: The reason I am canceling the transaction is because it is expensive
to calculate.
I suspect that it not possible to detect the connection state because Tomcat
4.x only requires JDK 1.2, hence it cannot be using NIO.
As a result there are no methods to "reliably" detect whether the connection
is still open without reading or writing the connection.
However if someone could confirm my assumption (that it is not possible to
detect the state) it would be much appreciated.
Thanks,
David
-
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: admin interface: jdbcrealm usage

2003-12-12 Thread Ostad, James
Are you saying that there is a patch for this issue, or did I just come
across a bug?

James

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 2:48 AM
To: [EMAIL PROTECTED]
Subject: Re: admin interface: jdbcrealm usage


Patches are always welcome ;-).

"Ostad, James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
..
I have implemented the jdbcrealm user authentication.
Now when I go to the tomcat admin site, there is no sign of our users
and roles.

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

any comment?

thanks,

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


Out---> (3)




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



<---In (14)




Out---> (3)



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



Re: SQL Injection and Tomcat

2003-12-12 Thread Tim Funk
Filter bad characters only get your so far in the request is only a stop gap 
solution. Only using bind variables for JDBC and not using string 
concatenation (from input parameters) to create SQL statements is the safest 
path.

If you need string concatentation, either use a servlet or filter (or 
mod_rewrite?) to first check for bad characters and send a 4XX or 5XX 
response if any bad characters are detected.

-Tim

Curley, Thomas wrote:

Thanks Andrey and Tim for replies - appreciate it

Has thought of setting rewrite rules in Apache and only allow valid chars in - would the value be better/worse

Thomas

-Original Message-
From: Andrey Rogov [mailto:[EMAIL PROTECTED]
Sent: 12 December 2003 12:00
To: Tomcat Users List
Subject: Re: SQL Injection and Tomcat
Hi,

U can configure the Valve param in your server.xml file
   
   
   
   
U Can Also buy wonderfull book TOMCAT The definitive Guide
by Ian E.Darwin & Jason Brittain


CT> Hi,

CT> I have an app using MySql and TC4 on linux o JSP app

CT> Does Tomcat have any inbuild features to filter out certain characters like ', ;, 
etc from request URI's.  Would a filters or values impl help with this or is it necessary 
to parse all input (may
CT> affect performance)
CT> any experience 

CT> thanks

CT> Thomas

CT> *
CT> This email and any attachments are confidential and intended for the sole use of the intended recipient(s).If you receive this email in error please notify [EMAIL PROTECTED] and delete it
CT> from your system. Any unauthorized dissemination, retransmission, or copying of this email and any attachments is prohibited. Euroconex does not accept any responsibility for any breach of
CT> confidence, which may arise from the use of email. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the
CT> Company. This message has been scanned for known computer viruses. 
CT> *

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




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


RE: new JVM feature, just an idea

2003-12-12 Thread Shapira, Yoav

Howdy,
You can use the environment variables on windows as well.  And FYI, though I'm not a 
big M$ fan, Windows XP and 2003 are not bad, I've been working with them a bit without 
stability problems.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 12, 2003 9:16 AM
>To: 'Tomcat-User List'
>Subject: new JVM feature, just an idea
>
>   Hello folks, as you know windows has a limit for command-line (
>something like 128kb ), i´m not a windows fan, but here for a while i still
>using this OS.
>
>   Then as we cannot change this behaviour ( in win95, win98 and winnt,
>others i don´t known and i hope never use them ), would be a good idea make
>JVM read classpath form a file named .javarc like .bash_profile and there
>create  a entrypoint like:
>
>###
>#/home/edson/.javarc
>
>classpath=d:\arquiv~1\j2sdk1.4.1_01\commapi\comm.jar;\
>d:\usr\local\skinlf-1.2.4\lib\skinregion.jar;\
>d:\usr\local\skinlf-1.2.4\lib\skinlf.jar;\
>d:\usr\local\ecs-1.4.1\lib\xerces-1.2.2.jar;\
>d:\usr\local\ecs-1.4.1\lib\jakarta-regexp-1.2.jar;\
>d:\usr\local\ecs-1.4.1\ecs-1.4.1.jar;\
>d:\usr\local\java_cup\java_cup.jar;\
>d:\usr\local\hsqldb_v.1.61\lib\hsqldb.jar;\
>d:\usr\local\junit3.7\junit.jar;\
>d:\usr\local\jakarta\apache-ant-1.5.4\lib\xmltask.jar;\
>d:\usr\local\jakarta\apache-ant-1.5.4\lib\xml-apis.jar;\
>d:\usr\local\jakarta\apache-ant-1.5.4\lib\xercesImpl.jar;\
>d:\usr\local\jakarta\apache-ant-1.5.4\lib\optional.jar;\
>d:\usr\local\jakarta\apache-ant-1.5.4\lib\ant.jar;
>###
>
>  Here i give up to find a solution for my winnt, because there isn´t
>solution. Then i´ll create a new ClassLoader for my winnt machine to find
>my
>classpath in this file also. What do you think about it? Does it could be a
>good implementation for JVM for windows or all JVMs?
>
>  Regards,
>  Edson



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


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



  1   2   >