allowLinking tomcat 5.5.17

2006-05-09 Thread Manos Moschous

Hi,

i am trying to enable tomcat to follow symbolic links
Unfortunately, i wasnt able to make it work for my web application which 
is called mv and is located

to the $(catalina.home)/webapps/mv directory.

I tried the options below:

1) touch file to $(catalina.home)/conf/Catalina/localhost/mv.xml

Context docBase=mv debug=5 crossContext=true reloadable=true
  Resources className=org.apache.naming.resources.FileDirContext 
allowLinking=true  /
/Context

2)touch file to $(catalina.home)/webapps/mv/META-INF/context.xml

Context reloadable=true crossContext=true path=/mv
  Resources className=org.apache.naming.resources.FileDirContext 
allowLinking=true /
/Context

3)Changed server.xml configuration file

add inside Host ... /Host tags:

Context path=/mv docBase=mv debug=0 reloadable=true 
crossContext=true
  Resources className=org.apache.naming.resources.FileDirContext 
allowLinking=true /
 /Context

or
  DefaultContext allowLinking=true /


What am i doing wrong...?







--
Manos Moschous
M.Sc. in Computer Science
Institute of Computer Science,FORTH

Tel: +30 (2810) 391945
Fax: +30 (2810) 391937
Mob: +30 693 6656123

PO BOX 1385, Vasilika Vouton
GR71110  Heraklion  Crete
Greece


--
Manos Moschous
M.Sc. in Computer Science
Institute of Computer Science,FORTH

Tel: +30 (2810) 391945
Fax: +30 (2810) 391937
Mob: +30 693 6656123

PO BOX 1385, Vasilika Vouton
GR71110  Heraklion  Crete
Greece


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



Is anyone here using ha-jdbc with dsitributable database clusters?

2006-05-09 Thread David Goodenough
I am trying to set up ha-jdbc, and tried asking quesions on their mailing list
but it seems to be a dead list, no traffic for 24 hours apart from my
questions.

I have it talking from one tomcat to multiple DBs, but I need to set it up 
using the distributable tag to have these same DBs access from across
a Tomcat Cluster.

My problem comes when I bring up the second tomcat and it complains
that the resource (the cluster) already exists, which of course it does on
the first tomcat, but as the cluster is distibutable it should join the
existing set rather than trying to create a new one.

Regards

David

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



Re: allowLinking tomcat 5.5.17

2006-05-09 Thread Manos Moschous

ok,

i changed to $(catalina.home)/conf/context.xml
and it changed for all web applications running on tomcat.

BTW, i am not sure what is the procedure to make it for individual 
applications


thank you very much

Manos

Markus Schönhaber wrote:

Manos Moschous wrote:
  

i am trying to enable tomcat to follow symbolic links
Unfortunately, i wasnt able to make it work for my web application which
is called mv and is located
to the $(catalina.home)/webapps/mv directory.

I tried the options below:

1) touch file to $(catalina.home)/conf/Catalina/localhost/mv.xml

Context docBase=mv debug=5 crossContext=true reloadable=true
   Resources className=org.apache.naming.resources.FileDirContext
allowLinking=true  / /Context

2)touch file to $(catalina.home)/webapps/mv/META-INF/context.xml

Context reloadable=true crossContext=true path=/mv
   Resources className=org.apache.naming.resources.FileDirContext
allowLinking=true / /Context

3)Changed server.xml configuration file

add inside Host ... /Host tags:

 Context path=/mv docBase=mv debug=0 reloadable=true
crossContext=true Resources
className=org.apache.naming.resources.FileDirContext allowLinking=true
/ /Context

or
   DefaultContext allowLinking=true /


What am i doing wrong...?



You set the allowLinking-Attribute on Resources where it is useless and 
ignored. Set it on Context:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
BTW: variant 3) above (modifying server.xml for Context definitions) isn't 
recommended.


Regards
  mks


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


--
Manos Moschous
M.Sc. in Computer Science
Institute of Computer Science,FORTH

Tel: +30 (2810) 391945
Fax: +30 (2810) 391937
Mob: +30 693 6656123

PO BOX 1385, Vasilika Vouton
GR71110  Heraklion  Crete
Greece


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



回复: Re: allowLinking tomcat 5.5.17

2006-05-09 Thread Kyle Wu
well, I think u should put your own context.xml in the
META-INF/ directory under your webapp directory. 

--- Manos Moschous [EMAIL PROTECTED]写道:

 ok,
 
 i changed to $(catalina.home)/conf/context.xml
 and it changed for all web applications running on
 tomcat.
 
 BTW, i am not sure what is the procedure to make it
 for individual 
 applications
 
 thank you very much
 
 Manos
 
 Markus Sch�nhaber wrote:
  Manos Moschous wrote:

  i am trying to enable tomcat to follow symbolic
 links
  Unfortunately, i wasnt able to make it work for
 my web application which
  is called mv and is located
  to the $(catalina.home)/webapps/mv directory.
 
  I tried the options below:
 
  1) touch file to
 $(catalina.home)/conf/Catalina/localhost/mv.xml
 
  Context docBase=mv debug=5
 crossContext=true reloadable=true
 Resources

className=org.apache.naming.resources.FileDirContext
  allowLinking=true  / /Context
 
  2)touch file to
 $(catalina.home)/webapps/mv/META-INF/context.xml
 
  Context reloadable=true crossContext=true
 path=/mv
 Resources

className=org.apache.naming.resources.FileDirContext
  allowLinking=true / /Context
 
  3)Changed server.xml configuration file
 
  add inside Host ... /Host tags:
 
   Context path=/mv docBase=mv debug=0
 reloadable=true
  crossContext=true Resources
 

className=org.apache.naming.resources.FileDirContext
 allowLinking=true
  / /Context
 
  or
 DefaultContext allowLinking=true /
 
 
  What am i doing wrong...?
  
 
  You set the allowLinking-Attribute on Resources
 where it is useless and 
  ignored. Set it on Context:
 

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
  BTW: variant 3) above (modifying server.xml for
 Context definitions) isn't 
  recommended.
 
  Regards
mks
 
 
 

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

 
 -- 
 Manos Moschous
 M.Sc. in Computer Science
 Institute of Computer Science,FORTH
 
 Tel: +30 (2810) 391945
 Fax: +30 (2810) 391937
 Mob: +30 693 6656123
 
 PO BOX 1385, Vasilika Vouton
 GR71110  Heraklion  Crete
 Greece
 
 

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


__
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

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



Re: allowLinking tomcat 5.5.17

2006-05-09 Thread Markus Schönhaber
Manos Moschous wrote:
 i changed to $(catalina.home)/conf/context.xml
 and it changed for all web applications running on tomcat.

 BTW, i am not sure what is the procedure to make it for individual
 applications

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Regards
  mks

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



Adding servlets during startup

2006-05-09 Thread Martyn Hiemstra

Hi All

I am currently using Struts 1.2.9  in combination with tomcat 5.0.28. I 
want to constructed my website so that its possible to import modules. 
Each module is a seperate package, meaning servlets are placed over 
multiple packages. The problem with this is that the web.xml cant 
contain servlet mappings because it doesnt know which modules are 
installed. To solve this I want to create one servlet that dynamically 
adds the servlets and their mappings during the startup of Tomcat.


I found a function addServletMapping in The servletContext class but the 
problem is there is no function to add a servlet. If I understand 
correctly you first need to install a servlet and then its mapping.


In short I need to move the servlet + servlet-mapping section from the 
web.xml into a single servlet that at startup adds the servlets to the 
list of known servlets.


Thanks in advance,
Martyn Hiemstra



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



Re: Listener in tld files - bug ?

2006-05-09 Thread Tim Funk
Yes. You can turn on XML validation of the XML file before using it - but 
many people believe that should be a build time exercise and not a run/deploy 
time exercise.


-Tim

MiSt wrote:

Tim Funk:


Listeners are allowed in TLD files.


Thanks for answer

You are right. Element listener is allowed in tld from version 1.2 
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

but not in 1.1
http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd

My tld file

!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd;

taglib
tlibversion1.2/tlibversion
jspversion1.1/jspversion
(...)

it is ok that tomcat doesnt ignore illegal element?




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



Re: Does Tomcat reuse parameterMap?

2006-05-09 Thread Tim Funk
It can be reused - but it is only used in by a single request at a time. A 
single request is bound to a thread. So it is thread safe.


Now if you have listeners that is assigning the value of the map or the 
servlet request to something else. And that something else lives longer than 
the life of a request - then bad things will probably happen.


-Tim

Nikita Tovstoles wrote:

In Tomcat, do multiple HttpServletRequest objects share same 
parameterMap instance? If so, and access to that instance is not 
synchronized, doesn't that mean that one request can get another 
requests parameters?


see http://sourceforge.net/mailarchive/message.php?msg_id=12468534



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



RE: Default servlet

2006-05-09 Thread Tim Lucia
Mark is right (of course)... my bad.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 08, 2006 10:14 PM
To: Tomcat Users List
Subject: Re: Default servlet

Tim Lucia wrote:
 Look in conf/web.xml -- it is commented out by default. 
Not it isn't. The default servlet is enabled by default.

 It is widely
 considered evil to use the default servlet.  At a minimum, it poses
security
 risks.
Again, no. The default servlet is not considered evil. You are thinking
of the invoker servlet.

Mark

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


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



JAASRealm programmatic call

2006-05-09 Thread Chapoor Chapoor

Hi,

can someone provide me code for calling JAASRealm programmaticaly ?

I do something like this, but it fails:
   org.apache.catalina.realm.JAASRealm realm = new
org.apache.catalina.realm.JAASRealm();
   realm .setAppName(MyApp);
   realm.authenticate(john, smith);

I know you can specify the JAASRealm in server.xml and let the container
call it, by adding auth-login in web.xml
But now I want to do everything programmaticly, call the
ContainerAuthenticator for user authentication on the fly.


Thank you.


System.setProperty failed during Tomcat5 startup

2006-05-09 Thread lee hwaying
Tomcat startup fail with below error log when Springframework tried to call 
System.setProperty.

Can some one help me?
I ran the code succesyfully at windows pc but not on unix server

thanks
hy

java.security.AccessControlException: access denied
(java.util.PropertyPermission webApp.root write)
@4000445f114f374f04fc at
java.security.AccessControlContext.checkPermission
java.security.AccessController.checkPermission(AccessController.java:427)
@4000445f114f374f149c at java.lang.SecurityManager.checkPermission
(SecurityManager.java:532)
@4000445f114f374fa524 at java.lang.System.setProperty
(System.java:698)
@4000445f114f374facf4 at
org.springframework.web.util.WebUtils.setWebAppRootSystemProperty
(WebUtils.java:104)
@4000445f114f374fb4c4 at
org.springframework.web.util.Log4jWebConfigurer.initLogging



From: Tim Lucia [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: 'Tomcat Users List' users@tomcat.apache.org
Subject: RE: Default servlet
Date: Tue, 9 May 2006 07:15:47 -0400

Mark is right (of course)... my bad.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 10:14 PM
To: Tomcat Users List
Subject: Re: Default servlet

Tim Lucia wrote:
 Look in conf/web.xml -- it is commented out by default.
Not it isn't. The default servlet is enabled by default.

 It is widely
 considered evil to use the default servlet.  At a minimum, it poses
security
 risks.
Again, no. The default servlet is not considered evil. You are thinking
of the invoker servlet.

Mark

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


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



_
Get an advanced look at the new version of MSN Messenger. 
http://messenger.msn.com.my/Beta/Default.aspx



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



error during tomcat startup when starting springframework

2006-05-09 Thread lee hwaying

can some one help please



@4000445f116006a73194
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in ServletContext resource [/WEB-
INF/applicationContext-hibernate.xml]: Initialization of bean failed; nested
exception is java.lang.NoClassDefFoundError: null
@4000445f116006a74134 java.lang.NoClassDefFoundError
@4000445f116006a7451c at
net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
@4000445f116006a7d5a4 at
net.sf.cglib.core.DefaultGeneratorStrategy.generate
(DefaultGeneratorStrategy.java:25)
@4000445f116006a7dd74 at
net.sf.cglib.core.AbstractClassGenerator.create
(AbstractClassGenerator.java:215)
@4000445f116006a7e544 at
net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
@4000445f116006a7ed14 at net.sf.cglib.core.KeyFactory.create
(KeyFactory.java:117)
@4000445f116006a80c54 at net.sf.cglib.core.KeyFactory.create
(KeyFactory.java:108)
@4000445f116006a8103c at net.sf.cglib.core.KeyFactory.create
(KeyFactory.java:104)
@4000445f116006a8180c at
org.hibernate.impl.SessionFactoryImpl.clinit(SessionFactoryImpl.java:321)
@4000445f116006a81fdc at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
@4000445f116006a852a4 at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:777)
@4000445f116006a85a74 at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet
(LocalSessionFactoryBean.java:703)
@4000445f116006a8662c at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.in
vokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
@4000445f116006a8856c at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr
eateBean(AbstractAutowireCapableBeanFactory.java:363)
@4000445f116006a89124 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:226)
@4000445f116006a898f4 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:147)
@4000445f116006a8b44c at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstant
iateSingletons(DefaultListableBeanFactory.java:269)
@4000445f116006a8c004 at
org.springframework.context.support.AbstractApplicationContext.refresh
(AbstractApplicationContext.java:318)
@4000445f116006a8c7d4 at
org.springframework.web.context.support.AbstractRefreshableWebApplicationContex

_
Find just what you are after with the more precise, more powerful new MSN 
Search. http://search.msn.com.my/ Try it now.



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



Re: System.setProperty failed during Tomcat5 startup

2006-05-09 Thread Tim Funk

1) Don't hijack threads - start a new one
2) Your running tomcat in with the security manager turned on. When the 
security manager is enabled - methods System.setProperty() and System.exit() 
are not allowed to be called.


-Tim

lee hwaying wrote:

Tomcat startup fail with below error log when Springframework tried to 
call System.setProperty.

Can some one help me?
I ran the code succesyfully at windows pc but not on unix server

thanks
hy

java.security.AccessControlException: access denied
(java.util.PropertyPermission webApp.root write)
@4000445f114f374f04fc at
java.security.AccessControlContext.checkPermission
java.security.AccessController.checkPermission(AccessController.java:427)
@4000445f114f374f149c at java.lang.SecurityManager.checkPermission
(SecurityManager.java:532)
@4000445f114f374fa524 at java.lang.System.setProperty
(System.java:698)
@4000445f114f374facf4 at
org.springframework.web.util.WebUtils.setWebAppRootSystemProperty
(WebUtils.java:104)
@4000445f114f374fb4c4 at
org.springframework.web.util.Log4jWebConfigurer.initLogging



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



Re: This page contains secure and non secure elements (was mod_jk : connection aborted or network problems, but apache and tomcat are on the same machine??)

2006-05-09 Thread Jim Jagielski


On May 8, 2006, at 3:44 PM, Francis Galiegue wrote:


OK, I have some more information...

The whole webapp is served through mod_ssl, as such (in the webapp
specific config file):



Not sure if this was already mentioned, but check to make
sure that all resources are either relative or else
use the https: scheme. If the returned content has even
one img src or css link that points to a http: link, then
the error will occur.

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



Tomcat 5 File Access

2006-05-09 Thread johnny
I have a servlet that writes a file to a local path outside the 
application path.  It works perfectly fine with Tomcat 4.  I'm trying to 
get it to work on Tomcat 5, but Tomcat 5 doesn't allow it to write to any 
path outside the application path.

I've read the Security Manager Howto, but can't figure out how to get it 
to work.

Can someone please clue me in?

Thanks,
Johnny

JDBCRealms

2006-05-09 Thread Sean O'Reilly
Hi all,

Am setting up authentication through a jdbcrealm and all appears to
work fine. The only problem i am having is with setting parameters like
maxActive, maxIdle and maxWait. Can these be set for a JDBCRealm in
tomcat 5.5 and if so how and where.

Have been trawling the Internet for ages trying to solve this one

Many Thanks

-- 
Sean O'Reilly
Systems Administrator
SECPay Ltd

http://www.secpay.com

[EMAIL PROTECTED]

Mobile 07917 463906

DDI 01732 300212

This email contains information which is confidential. It is for the
exclusive use of the addressee(s). If you are not the addressee, please
note that any distribution, dissemination, copying or use of this
communication or the information in it is prohibited. If you have
received this email in error, please telephone me immediately.

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



Native Connector Question

2006-05-09 Thread Fenlason, Josh
What do I have to do to configure Tomcat to use the native connector on
Unix?  I've tried adding
-Djava.library.path=path_to_ssl_apr_native_libraries, but it isn't
loading them.  It works for me on Windows, so I'm not sure what I'm
doing wrong on Unix.  Any suggestions?  Thanks.
,
Josh.


Re: Native Connector Question

2006-05-09 Thread Markus Schönhaber
Fenlason, Josh wrote:
 What do I have to do to configure Tomcat to use the native connector on
 Unix?  I've tried adding

Where?

 -Djava.library.path=path_to_ssl_apr_native_libraries, but it isn't
 loading them.  It works for me on Windows, so I'm not sure what I'm
 doing wrong on Unix.  Any suggestions?  Thanks.

Creating a file named setenv.sh in Tomcat's bin folder that contains either
export LD_LIBRARY_PATH=path to native lib
or
CATALINA_OPTS=-Djava.library.path=path to native lib
works fine for me.

To make sure the source of the problem isn't your self-compiled native lib (if 
you use one) you could download and try a pre-compiled one:
http://www.apache.org/dist/tomcat/tomcat-connectors/native/

Regards
  mks

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



URL with WWW problem

2006-05-09 Thread Scott Purcell
Hello,

 

Tomcat 5.5 standalone.

 

Yesterday I had a thread stating that sometimes users, and google may
refer to my site something like http://mysite.com http://mysite.com/
omitting the www portion of the URL.  As I stated yesterday, my site
needs the www.mysite.com http://www.mysite.com/  because of a
certificate I am using.

 

The site was built using the struts framework, so I asked some users on
that list about the problem. And they said that this should be
configurable within the container, or within Tomcat.

 

So my question to this list, is there a way to have Tomcat accept the
http://mysite.com http://mysite.com/  and then call for
http://www.mysite.com http://www.mysite.com/  through some type of
configuration setting?

 

I know someone yesterday mentioned filters, but I could not find any
examples of this type via a heavy google search. I know some simple
solutions would be to use redirects, etc. but doing so will screw up my
indexing via bots. I woiuld like to handle this situation cleanly and
not mess with code to do so?

 

 

Thanks,

Scott

 

 

 



RE: Native Connector Question

2006-05-09 Thread Fenlason, Josh
My native lib binary is fine because setting LD_LIBRARY_PATH works fine.  
I've tried adding -Djava.library.path to JAVA_OPTS and CATALINA_OPTS in my 
Tomcat startup script, but it isn't loading the native connector.  Any thoughts 
on why the second method isn't working?  Thanks in advance.
,
Josh.

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 09, 2006 10:22 AM
 To: Tomcat Users List
 Subject: Re: Native Connector Question
 
 Fenlason, Josh wrote:
  What do I have to do to configure Tomcat to use the native 
 connector 
  on Unix?  I've tried adding
 
 Where?
 
  -Djava.library.path=path_to_ssl_apr_native_libraries, but 
 it isn't 
  loading them.  It works for me on Windows, so I'm not sure what I'm 
  doing wrong on Unix.  Any suggestions?  Thanks.
 
 Creating a file named setenv.sh in Tomcat's bin folder that 
 contains either export LD_LIBRARY_PATH=path to native lib 
 or CATALINA_OPTS=-Djava.library.path=path to native lib
 works fine for me.
 
 To make sure the source of the problem isn't your 
 self-compiled native lib (if you use one) you could download 
 and try a pre-compiled one:
 http://www.apache.org/dist/tomcat/tomcat-connectors/native/
 
 Regards
   mks
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: error during tomcat startup when starting springframework

2006-05-09 Thread Asegid Debebe

Dear All,

Can you please tell me where I can download the JDBC driver for Microsoft
Access 2002/3 databases? I have write a sample Servlet that reads data from
Microsost Access databases, very quickly.

Thanks,

AD


Re: URL with WWW problem

2006-05-09 Thread Marc Farrow

Filters are your best bet or using another server in front and using URL
rewriting.



On 5/9/06, Scott Purcell [EMAIL PROTECTED] wrote:


Hello,



Tomcat 5.5 standalone.



Yesterday I had a thread stating that sometimes users, and google may
refer to my site something like http://mysite.com http://mysite.com/
omitting the www portion of the URL.  As I stated yesterday, my site
needs the www.mysite.com http://www.mysite.com/  because of a
certificate I am using.



The site was built using the struts framework, so I asked some users on
that list about the problem. And they said that this should be
configurable within the container, or within Tomcat.



So my question to this list, is there a way to have Tomcat accept the
http://mysite.com http://mysite.com/  and then call for
http://www.mysite.com http://www.mysite.com/  through some type of
configuration setting?



I know someone yesterday mentioned filters, but I could not find any
examples of this type via a heavy google search. I know some simple
solutions would be to use redirects, etc. but doing so will screw up my
indexing via bots. I woiuld like to handle this situation cleanly and
not mess with code to do so?





Thanks,

Scott












--
Marc Farrow


Re: Native Connector Question

2006-05-09 Thread Markus Schönhaber
Fenlason, Josh wrote:
 My native lib binary is fine because setting LD_LIBRARY_PATH works fine.
 I've tried adding -Djava.library.path to JAVA_OPTS and CATALINA_OPTS in my
 Tomcat startup script, but it isn't loading the native connector.  Any
 thoughts on why the second method isn't working?  Thanks in advance. ,
 Josh.

No. At least not without knowing what exactly you are doing.

Regards
  mks

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



Re: error during tomcat startup when starting springframework

2006-05-09 Thread Konstantin Ignatyev

I used to do it with JDBC-ODBC bridge driver few years ago
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html

Asegid Debebe wrote:

Dear All,

Can you please tell me where I can download the JDBC driver for Microsoft
Access 2002/3 databases? I have write a sample Servlet that reads data from
Microsost Access databases, very quickly.

Thanks,

AD



--
Thanks,

Konstantin

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



[OT] Hijack (WAS: Re: System.setProperty failed during Tomcat5 startup)

2006-05-09 Thread Antonio Petrelli

Tim Funk ha scritto:

1) Don't hijack threads - start a new one

The last famous words... some people will never learn ;-)
Ciao
Antonio

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



Intercepting Context exceptions

2006-05-09 Thread Edoardo Causarano

Hello list,

I'm managing some legacy web apps, some jsp and other servlet based, that
lack good Exception handling (or at least Logging and reporting). Rather
than a plain blank page I'd like to return some infomative message within
sone nice html message. Most importantly I'd like to log these exceptions in
a more suitable way than the present.

How can I implement and install an Exception trap handler to perform at
least the said logging?

Thank you very much,
e

--
Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele
e veleno.
Perdi se pensi di essere più forte.
Vinci se pensi che non c'è nessuna battaglia.
- Hans Kammerlander


RE: Native Connector Question

2006-05-09 Thread Fenlason, Josh
I tried each of these in tomcat_home/bin/setenv.sh
#JAVA_OPTS=$JAVA_OPTS 
-Djava.library.path=/home/snow/jfenlason/solaris/install/tomcat/bin
CATALINA_OPTS=$CATALINA_OPTS 
-Djava.library.path=/home/snow/jfenlason/solaris/install/tomcat/bin 

At the moment, I have all the native libraries in tomcat_home/bin.  I'm 
starting Tomcat by executing startup.sh.
Any other info that would be helpful?  Thanks.
,
Josh.

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 09, 2006 10:45 AM
 To: Tomcat Users List
 Subject: Re: Native Connector Question
 
 Fenlason, Josh wrote:
  My native lib binary is fine because setting 
 LD_LIBRARY_PATH works fine.
  I've tried adding -Djava.library.path to JAVA_OPTS and 
 CATALINA_OPTS 
  in my Tomcat startup script, but it isn't loading the native 
  connector.  Any thoughts on why the second method isn't working?  
  Thanks in advance. , Josh.
 
 No. At least not without knowing what exactly you are doing.
 
 Regards
   mks
 
 -
 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: Native Connector Question

2006-05-09 Thread Mladen Turk

Fenlason, Josh wrote:
My native lib binary is fine because setting LD_LIBRARY_PATH works fine.  
I've tried adding -Djava.library.path to JAVA_OPTS and CATALINA_OPTS in my Tomcat startup script, but it isn't loading the native connector.  Any thoughts on why the second method isn't working?  Thanks in advance.


See:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4280189

java.library.path is read-only (regarding the system), so
you will need LD_LIBRARY_PATH set up for natives.
The major problem is that it is wrongly documented by Sun.

Regards,
Mladen.

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



Context fails to load with Filter

2006-05-09 Thread Jason Beck

Hello list,

I have written my first filter and think that I have it right, but when I
try to start Tomcat 5.5.9 after applying the necessary configuration changes
to web.xml, the Context that the Filter is in fails to start.   Perhaps
someone can tell me what I may have done wrong.

-- web.xml --
  filter
 filter-nameAuthenticateFilter/filter-name
 filter-classcom.affinity.tasc.filters.AuthenticateFilter
/filter-class
  /filter
  filter-mapping
 filter-nameAuthenticateFilter/filter-name
 servlet-nameIndex/servlet-name
  /filter-mapping

  servlet
 servlet-nameIndex/servlet-name
 servlet-classcom.affinity.tasc.core.Index/servlet-class
  /servlet
  servlet-mapping
 servlet-nameIndex/servlet-name
 url-pattern/Index/url-pattern
  /servlet-mapping

-- end web.xml --

-- Filter code --

package com.affinity.tasc.filters;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.affinity.tasc.beans.SiteUserBean;

public abstract class AuthenticateFilter implements Filter {

   private FilterConfig fc;

   public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain)
   throws IOException, ServletException {

   /* Make sure we are dealing with HTTP */
   if (req instanceof HttpServletRequest) {
   HttpServletRequest request =
(HttpServletRequest)req;
   HttpServletResponse response =
(HttpServletResponse)res;

   HttpSession session = request.getSession(false);

   if (request.getParameter(Authenticate).equals(1))
{

   try {
   SiteUserBean user = new
SiteUserBean();
   user.setUsername(
request.getParameter(username));
   user.setPassword(
request.getParameter(password));

   int authed = user.getUserAuthed();

   /* Successful authentication */
   if (authed  0) {
   session.setAttribute(user,
user);
   }

   session.setAttribute(authed,
authed);

   } catch (NullPointerException nx) {
   nx.printStackTrace();
   } catch (Exception ex) {
   ex.printStackTrace();
   }
   }
   }

   /* Continue filtering */
   chain.doFilter(req, res);
   }

   public void init(FilterConfig filterConfig) throws ServletException
{
   this.fc = filterConfig;
   }

   public void destroy() {
   this.fc = null;
   }
}

-- end filter code --

Here is the output from catalina.out when I try to start tomcat with this
filter installed...

May 9, 2006 11:46:31 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 9, 2006 11:46:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1270 ms
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter AuthenticateFilter
java.lang.InstantiationException
   at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(
InstantiationExceptionConstructorAccessorImpl.java:30)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
   at java.lang.Class.newInstance0(Class.java:350)
   at java.lang.Class.newInstance(Class.java:303)
   at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:212)
   at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
ApplicationFilterConfig.java:308)
   at org.apache.catalina.core.ApplicationFilterConfig.init(
ApplicationFilterConfig.java:79)
   at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:3540)
   at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4110)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1012)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java
:718)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1012)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:442)
   at org.apache.catalina.core.StandardService.start(
StandardService.java:450)
   

RE: Native Connector Question

2006-05-09 Thread Fenlason, Josh
That sucks.  Thanks for the pointer though.  How come it works on
Windows?  Thanks.
,
Josh. 

 -Original Message-
 From: Mladen Turk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 09, 2006 11:00 AM
 To: Tomcat Users List
 Subject: Re: Native Connector Question
 
 Fenlason, Josh wrote:
  My native lib binary is fine because setting 
 LD_LIBRARY_PATH works fine.  
  I've tried adding -Djava.library.path to JAVA_OPTS and 
 CATALINA_OPTS in my Tomcat startup script, but it isn't 
 loading the native connector.  Any thoughts on why the second 
 method isn't working?  Thanks in advance.
 
 See:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4280189
 
 java.library.path is read-only (regarding the system), so you 
 will need LD_LIBRARY_PATH set up for natives.
 The major problem is that it is wrongly documented by Sun.
 
 Regards,
 Mladen.
 
 -
 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: Context fails to load with Filter

2006-05-09 Thread Mike Sabroff
If this is truly what your web.xml looks like, you are missing the end 
tag '' in the following line

filter-classcom.affinity.tasc.filters.AuthenticateFilter

Jason Beck wrote:


Hello list,

I have written my first filter and think that I have it right, but when I
try to start Tomcat 5.5.9 after applying the necessary configuration 
changes

to web.xml, the Context that the Filter is in fails to start.   Perhaps
someone can tell me what I may have done wrong.

-- web.xml --
   filter
  filter-nameAuthenticateFilter/filter-name
  filter-classcom.affinity.tasc.filters.AuthenticateFilter
/filter-class
   /filter
   filter-mapping
  filter-nameAuthenticateFilter/filter-name
  servlet-nameIndex/servlet-name
   /filter-mapping

   servlet
  servlet-nameIndex/servlet-name
  servlet-classcom.affinity.tasc.core.Index/servlet-class
   /servlet
   servlet-mapping
  servlet-nameIndex/servlet-name
  url-pattern/Index/url-pattern
   /servlet-mapping

-- end web.xml --

-- Filter code --

package com.affinity.tasc.filters;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.affinity.tasc.beans.SiteUserBean;

public abstract class AuthenticateFilter implements Filter {

private FilterConfig fc;

public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain)
throws IOException, ServletException {

/* Make sure we are dealing with HTTP */
if (req instanceof HttpServletRequest) {
HttpServletRequest request =
(HttpServletRequest)req;
HttpServletResponse response =
(HttpServletResponse)res;

HttpSession session = request.getSession(false);

if 
(request.getParameter(Authenticate).equals(1))

{

try {
SiteUserBean user = new
SiteUserBean();
user.setUsername(
request.getParameter(username));
user.setPassword(
request.getParameter(password));

int authed = user.getUserAuthed();

/* Successful authentication */
if (authed  0) {

session.setAttribute(user,

user);
}

session.setAttribute(authed,
authed);

} catch (NullPointerException nx) {
nx.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

/* Continue filtering */
chain.doFilter(req, res);
}

public void init(FilterConfig filterConfig) throws 
ServletException

{
this.fc = filterConfig;
}

public void destroy() {
this.fc = null;
}
}

-- end filter code --

Here is the output from catalina.out when I try to start tomcat with this
filter installed...

May 9, 2006 11:46:31 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 9, 2006 11:46:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1270 ms
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardContext 
filterStart

SEVERE: Exception starting filter AuthenticateFilter
java.lang.InstantiationException
at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(
InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:212)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
ApplicationFilterConfig.java:308)
at org.apache.catalina.core.ApplicationFilterConfig.init(
ApplicationFilterConfig.java:79)
at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:3540)
at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4110)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java

Re: Native Connector Question

2006-05-09 Thread Markus Schönhaber
Mladen Turk wrote:
 Fenlason, Josh wrote:
  My native lib binary is fine because setting LD_LIBRARY_PATH works fine.
  I've tried adding -Djava.library.path to JAVA_OPTS and CATALINA_OPTS in
  my Tomcat startup script, but it isn't loading the native connector.  Any
  thoughts on why the second method isn't working?  Thanks in advance.

 See:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4280189

 java.library.path is read-only (regarding the system), so
 you will need LD_LIBRARY_PATH set up for natives.
 The major problem is that it is wrongly documented by Sun.

Could you explain a bit more why this bug is of relevance here?
As I understand ist, java.library.path cannot be changed programatically but 
that's not the case here. And as I said in my first answer, setting 
java.library.path in setenv.sh works fine for me.

Regards
  mks

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



Re: Native Connector Question

2006-05-09 Thread Mladen Turk

Fenlason, Josh wrote:

That sucks.  Thanks for the pointer though.  How come it works on
Windows?  Thanks.


It won't work if the library you load depends on other library
that is not in the PATH, so it's basically the same.
For Windows we build tcnative statically linked to OpenSSL and
APR, so if you wish to make libtcnatve (uses OpenSSL and APR
as dll, then the java.library.path will not work, but you will
need to adjust the PATH). If the .dlls are in the same path
from which you start the application then the LoadLibrary WIN API
will use the working directory as a dll search path, so that's why
it seems to work. Try to put the tcnative-1.dll outside bin, and
you'll see the difference.

Regards,
Mladen.

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



RE: Native Connector Question

2006-05-09 Thread Fenlason, Josh
Thanks for the explanation.
,
Josh. 

 -Original Message-
 From: Mladen Turk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 09, 2006 11:19 AM
 To: Tomcat Users List
 Subject: Re: Native Connector Question
 
 Fenlason, Josh wrote:
  That sucks.  Thanks for the pointer though.  How come it works on 
  Windows?  Thanks.
 
 It won't work if the library you load depends on other 
 library that is not in the PATH, so it's basically the same.
 For Windows we build tcnative statically linked to OpenSSL 
 and APR, so if you wish to make libtcnatve (uses OpenSSL and 
 APR as dll, then the java.library.path will not work, but you 
 will need to adjust the PATH). If the .dlls are in the same 
 path from which you start the application then the 
 LoadLibrary WIN API will use the working directory as a dll 
 search path, so that's why it seems to work. Try to put the 
 tcnative-1.dll outside bin, and you'll see the difference.
 
 Regards,
 Mladen.
 
 -
 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: URL with WWW problem

2006-05-09 Thread Hassan Schroeder

On 5/9/06, Scott Purcell [EMAIL PROTECTED] wrote:


I know someone yesterday mentioned filters, but I could not find any
examples of this type via a heavy google search.


http://tuckey.org/urlrewrite/

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Context fails to load with Filter

2006-05-09 Thread Mike Sabroff

Disreguard my previous statement as I am obviously brain deadsorry

Mike Sabroff wrote:
If this is truly what your web.xml looks like, you are missing the end 
tag '' in the following line

filter-classcom.affinity.tasc.filters.AuthenticateFilter

Jason Beck wrote:


Hello list,

I have written my first filter and think that I have it right, but 
when I
try to start Tomcat 5.5.9 after applying the necessary configuration 
changes

to web.xml, the Context that the Filter is in fails to start.   Perhaps
someone can tell me what I may have done wrong.

-- web.xml --
   filter
  filter-nameAuthenticateFilter/filter-name
  filter-classcom.affinity.tasc.filters.AuthenticateFilter
/filter-class
   /filter
   filter-mapping
  filter-nameAuthenticateFilter/filter-name
  servlet-nameIndex/servlet-name
   /filter-mapping

   servlet
  servlet-nameIndex/servlet-name
  servlet-classcom.affinity.tasc.core.Index/servlet-class
   /servlet
   servlet-mapping
  servlet-nameIndex/servlet-name
  url-pattern/Index/url-pattern
   /servlet-mapping

-- end web.xml --

-- Filter code --

package com.affinity.tasc.filters;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.affinity.tasc.beans.SiteUserBean;

public abstract class AuthenticateFilter implements Filter {

private FilterConfig fc;

public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain)
throws IOException, ServletException {

/* Make sure we are dealing with HTTP */
if (req instanceof HttpServletRequest) {
HttpServletRequest request =
(HttpServletRequest)req;
HttpServletResponse response =
(HttpServletResponse)res;

HttpSession session = request.getSession(false);

if 
(request.getParameter(Authenticate).equals(1))

{

try {
SiteUserBean user = new
SiteUserBean();
user.setUsername(
request.getParameter(username));
user.setPassword(
request.getParameter(password));

int authed = 
user.getUserAuthed();


/* Successful authentication */
if (authed  0) {

session.setAttribute(user,

user);
}

session.setAttribute(authed,
authed);

} catch (NullPointerException nx) {
nx.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

/* Continue filtering */
chain.doFilter(req, res);
}

public void init(FilterConfig filterConfig) throws 
ServletException

{
this.fc = filterConfig;
}

public void destroy() {
this.fc = null;
}
}

-- end filter code --

Here is the output from catalina.out when I try to start tomcat with 
this

filter installed...

May 9, 2006 11:46:31 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 9, 2006 11:46:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1270 ms
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardContext 
filterStart

SEVERE: Exception starting filter AuthenticateFilter
java.lang.InstantiationException
at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(
InstantiationExceptionConstructorAccessorImpl.java:30)
at 
java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:212)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(

ApplicationFilterConfig.java:308)
at org.apache.catalina.core.ApplicationFilterConfig.init(
ApplicationFilterConfig.java:79)
at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:3540)
at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4110)
at 

Re: System.setProperty failed during Tomcat5 startup

2006-05-09 Thread lee hwaying


sorry for that.

THanks for the reply

is there any way round it without having to touch the security manager as I 
am running it from a web hosting package


many thanks


From: Tim Funk [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: System.setProperty failed during Tomcat5 startup
Date: Tue, 09 May 2006 09:02:07 -0400

1) Don't hijack threads - start a new one
2) Your running tomcat in with the security manager turned on. When the 
security manager is enabled - methods System.setProperty() and 
System.exit() are not allowed to be called.


-Tim

lee hwaying wrote:

Tomcat startup fail with below error log when Springframework tried to 
call System.setProperty.

Can some one help me?
I ran the code succesyfully at windows pc but not on unix server

thanks
hy

java.security.AccessControlException: access denied
(java.util.PropertyPermission webApp.root write)
@4000445f114f374f04fc at
java.security.AccessControlContext.checkPermission
java.security.AccessController.checkPermission(AccessController.java:427)
@4000445f114f374f149c at java.lang.SecurityManager.checkPermission
(SecurityManager.java:532)
@4000445f114f374fa524 at java.lang.System.setProperty
(System.java:698)
@4000445f114f374facf4 at
org.springframework.web.util.WebUtils.setWebAppRootSystemProperty
(WebUtils.java:104)
@4000445f114f374fb4c4 at
org.springframework.web.util.Log4jWebConfigurer.initLogging



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



_
Find love online with MSN Personals. 
http://match.msn.com.my/match/mt.cfm?pg=channel



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



Re: System.setProperty failed during Tomcat5 startup

2006-05-09 Thread Tim Funk

Don't know - you'll need to ask a spring related user list.

-Tim

lee hwaying wrote:



sorry for that.

THanks for the reply

is there any way round it without having to touch the security manager 
as I am running it from a web hosting package


many thanks


From: Tim Funk [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: System.setProperty failed during Tomcat5 startup
Date: Tue, 09 May 2006 09:02:07 -0400

1) Don't hijack threads - start a new one
2) Your running tomcat in with the security manager turned on. When 
the security manager is enabled - methods System.setProperty() and 
System.exit() are not allowed to be called.


-Tim

lee hwaying wrote:

Tomcat startup fail with below error log when Springframework tried 
to call System.setProperty.

Can some one help me?
I ran the code succesyfully at windows pc but not on unix server

thanks
hy

java.security.AccessControlException: access denied
(java.util.PropertyPermission webApp.root write)
@4000445f114f374f04fc at
java.security.AccessControlContext.checkPermission
java.security.AccessController.checkPermission(AccessController.java:427) 


@4000445f114f374f149c at java.lang.SecurityManager.checkPermission
(SecurityManager.java:532)
@4000445f114f374fa524 at java.lang.System.setProperty
(System.java:698)
@4000445f114f374facf4 at
org.springframework.web.util.WebUtils.setWebAppRootSystemProperty
(WebUtils.java:104)
@4000445f114f374fb4c4 at
org.springframework.web.util.Log4jWebConfigurer.initLogging


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



Re: Context fails to load with Filter

2006-05-09 Thread Jason Beck

Well, I feel silly now, but 10 seconds after I sent the email to the list, I
looked back at my Class and noticed that I had declared it Abstract.  Once I
removed the abstract declaration and recompiled it all works as expected.
Thanks for your time.

-Jason

On 5/9/06, Mike Sabroff [EMAIL PROTECTED] wrote:


Disreguard my previous statement as I am obviously brain deadsorry

Mike Sabroff wrote:
 If this is truly what your web.xml looks like, you are missing the end
 tag '' in the following line
 filter-classcom.affinity.tasc.filters.AuthenticateFilter

 Jason Beck wrote:

 Hello list,

 I have written my first filter and think that I have it right, but
 when I
 try to start Tomcat 5.5.9 after applying the necessary configuration
 changes
 to web.xml, the Context that the Filter is in fails to start.   Perhaps
 someone can tell me what I may have done wrong.

 -- web.xml --
filter
   filter-nameAuthenticateFilter/filter-name
   filter-classcom.affinity.tasc.filters.AuthenticateFilter
 /filter-class
/filter
filter-mapping
   filter-nameAuthenticateFilter/filter-name
   servlet-nameIndex/servlet-name
/filter-mapping

servlet
   servlet-nameIndex/servlet-name
   servlet-classcom.affinity.tasc.core.Index/servlet-class
/servlet
servlet-mapping
   servlet-nameIndex/servlet-name
   url-pattern/Index/url-pattern
/servlet-mapping

 -- end web.xml --

 -- Filter code --

 package com.affinity.tasc.filters;

 import java.io.IOException;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import com.affinity.tasc.beans.SiteUserBean;

 public abstract class AuthenticateFilter implements Filter {

 private FilterConfig fc;

 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain chain)
 throws IOException, ServletException {

 /* Make sure we are dealing with HTTP */
 if (req instanceof HttpServletRequest) {
 HttpServletRequest request =
 (HttpServletRequest)req;
 HttpServletResponse response =
 (HttpServletResponse)res;

 HttpSession session = request.getSession
(false);

 if
 (request.getParameter(Authenticate).equals(1))
 {

 try {
 SiteUserBean user = new
 SiteUserBean();
 user.setUsername(
 request.getParameter(username));
 user.setPassword(
 request.getParameter(password));

 int authed =
 user.getUserAuthed();

 /* Successful authentication */
 if (authed  0) {

 session.setAttribute(user,
 user);
 }

 session.setAttribute(authed,
 authed);

 } catch (NullPointerException nx) {
 nx.printStackTrace();
 } catch (Exception ex) {
 ex.printStackTrace();
 }
 }
 }

 /* Continue filtering */
 chain.doFilter(req, res);
 }

 public void init(FilterConfig filterConfig) throws
 ServletException
 {
 this.fc = filterConfig;
 }

 public void destroy() {
 this.fc = null;
 }
 }

 -- end filter code --

 Here is the output from catalina.out when I try to start tomcat with
 this
 filter installed...

 May 9, 2006 11:46:31 AM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 May 9, 2006 11:46:31 AM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1270 ms
 May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
 May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardHost start
 INFO: XML validation disabled
 May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardContext
 filterStart
 SEVERE: Exception starting filter AuthenticateFilter
 java.lang.InstantiationException
 at
 sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(
 InstantiationExceptionConstructorAccessorImpl.java:30)
 at
 java.lang.reflect.Constructor.newInstance(Constructor.java:494)
 at java.lang.Class.newInstance0(Class.java:350)
 at java.lang.Class.newInstance(Class.java:303)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
 ApplicationFilterConfig.java:212)
 at
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
 

update jar file does not work immediately

2006-05-09 Thread Tony Smith
Hi, 

I am using Tomcat 5.5.9 on Windows. I use Eclipse to
write my server code. Every time I change my code, I
export the jar directly to the myapp/WEB-INF/lib
directory and restart Tomcat. I found that the new
code is not immediately used by Tomcat, I have to
re-export, re-start Tomcat a couple times to make
Tomcat pickup my new code.

Anyone know why?

Thanks,

qq


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: classloader problem

2006-05-09 Thread Filip Hanik - Dev Lists

Hi A Srivani,
I this is not a problem with tomcat, instead it is a problem with your 
deployment.
You are putting commons-discovery.jar, and this JAR file is storing a 
reference to the webapp classloader.
When the app is reloaded, the old webapp classloader gets invalidated, 
and a new one is created.
but since you put the the JAR in shared/lib that instance doesn't get 
reloaded, and is now holding a reference to the wrong classloader.


This is simple a deployment problem, the correct way to deploy it is to 
have it in WEB-INF/lib or fix the commons-discovery code.


Filip


A srivani wrote:

Hi Maarten,

Thanks for your reply. I tried by keeping axis.jar in common/lib 
directory

of tomcat, but it didn't work for me. BTW, in my jdk library there is no
axis.jar. Could you please suggest me any other way of solving the 
problem.


Thanks,
A Srivani.


On 5/2/06, MW Janssen [EMAIL PROTECTED] wrote:


he,

i had the same problem...what i did was removing axis.jar from my jdk
libary
directory and put it just in common/lib directory of tomcat (not in
WE-INF-lib). SO in fact its there once on my server, and then it works
great.

Maarten



-Oorspronkelijk bericht-
Van: A srivani [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 2 mei 2006 8:54
Aan: users@tomcat.apache.org
Onderwerp: Fwd: classloader problem

-- Forwarded message --
From: A srivani [EMAIL PROTECTED]
Date: May 2, 2006 12:16 PM
Subject: Re: classloader problem
To: [EMAIL PROTECTED]

Hi there,

http://www.mail-archive.com/users@tomcat.apache.org/msg07773.html

I am facing similar problem as in above link.

In my webapplication axis is used to connect webservices. If the 
axis.jaris

in WEB-INF/lib I can reload my app and everything is fine.
But when I moved axis.jar to CATALINA_HOME/shared/lib to shrink the size
of
my war file I get a NullPointerException (stack trace follows) when the
application has been reloaded and I try to connect to a service. The
application runs fine until I try to connect to a webservice. What could
be
the reason for this?

I surfed the forums related to the problem and found that some are
suggesting to make reloadable=true in server.xml.But it is not possible
for
me.



Thanks in advance.
A Srivani.



*java.lang.NullPointerException
   at
org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLo
ader.java:956)
*at java.lang.ClassLoader.getResources(ClassLoader.java :1015)
   at
org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java
:150)
   at
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResourc
es(DiscoverResources.java :153)
   at
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResourc
e(DiscoverResources.java:129)
   at
org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(Discov
erResources.java:116)
   at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNex
tClassNames(DiscoverNamesInFile.java:
186)
   at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNex
tClassName(DiscoverNamesInFile.java:1
70)
   at
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNex
t(DiscoverNamesInFile.java:157)
   at
org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIte
rator(NameDiscoverers.java:143)
   at
org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(Na
meDiscoverers.java:126)
   at
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$
1.getNextResource(ResourceClassDiscov
erImpl.java:159)
   at
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$
1.hasNext(ResourceClassDiscoverImpl.j
ava:147)
   at
org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(Eng
ineConfigurationFactoryFinder.java:12
0)
   at java.security.AccessController.doPrivileged(Native Method)
   at
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactor
y(EngineConfigurationFactoryFinder.ja
va:113)
   at
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactor
y(EngineConfigurationFactoryFinder.ja
va:160)
   at
org.apache.axis.client.Service.getEngineConfiguration (Service.java:812)
   at
org.apache.axis.client.Service.getAxisClient(Service.java:103)
   at org.apache.axis.client.Service.init(Service.java:112)
   at

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 1-5-2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 1-5-2006



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







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

Unable to get tomcat default page

2006-05-09 Thread Java Newbee

When i am not connected to internet, i get the default Apache
Tomcat homepage after succesfully starting the Tomcat server.
However, once i get my internet connections enabled, I am
unable to get the default Apache Tomcat home page.

I tried to change the port 8080 just incase it was being used
by some other application when i get connected to net. But it
doesnt solve my problem. Can anyone please help me. I am
new at java and tomcat and hence would request a detailed
solution to the problem.

Thanks in advance


stylesheets giving 404 after a long response time

2006-05-09 Thread Vivek Mohan

Hi People,

I've an application running on tomcat 4.1. In one particular request,
I could find that the server response takes a long time, say around 20
minutes, and when the page comes back all the stylesheets and header
jsps are missing from the page. If I check my access logs, I see a 404
response for all the inclusions into the main jsp.

Can anyone tell me how to solve this issue, or how to go about investigating it?

--
Vivek.

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



Re: stylesheets giving 404 after a long response time

2006-05-09 Thread Frank W. Zammetti
A 20 minute response time?  Before I worried about why the stylesheet 
gets a 404, I'd solve that :)  Trying to hold an HTTP connection open 
that long is a recipe for all sorts of problem (proxy timeouts, browser 
timeouts, etc).


Is Tomcat serving the stylesheet, i.e., no web server in front of it? 
I'm wondering if session timeout isn't playing role somehow (not sure 
how it would, but with a request time that long, not very much would 
surprise me).


Frank

Vivek Mohan wrote:

Hi People,

I've an application running on tomcat 4.1. In one particular request,
I could find that the server response takes a long time, say around 20
minutes, and when the page comes back all the stylesheets and header
jsps are missing from the page. If I check my access logs, I see a 404
response for all the inclusions into the main jsp.

Can anyone tell me how to solve this issue, or how to go about 
investigating it?


--
Vivek.

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: stylesheets giving 404 after a long response time

2006-05-09 Thread Vivek Mohan

Yes, its Tomcat which is serving the resources. And I've made the
timeouts to be infinity for my application so I don't think timeouts
would be occurring. But in any case how does a timeout affect the
fishing out of stylesheets?

--
Vivek.

On 5/10/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

A 20 minute response time?  Before I worried about why the stylesheet
gets a 404, I'd solve that :)  Trying to hold an HTTP connection open
that long is a recipe for all sorts of problem (proxy timeouts, browser
timeouts, etc).

Is Tomcat serving the stylesheet, i.e., no web server in front of it?
I'm wondering if session timeout isn't playing role somehow (not sure
how it would, but with a request time that long, not very much would
surprise me).

Frank

Vivek Mohan wrote:
 Hi People,

 I've an application running on tomcat 4.1. In one particular request,
 I could find that the server response takes a long time, say around 20
 minutes, and when the page comes back all the stylesheets and header
 jsps are missing from the page. If I check my access logs, I see a 404
 response for all the inclusions into the main jsp.

 Can anyone tell me how to solve this issue, or how to go about
 investigating it?

 --
 Vivek.

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





--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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





--
I told the doctor I broke my leg in two places. He told me to quit
going to those places.

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



Re: stylesheets giving 404 after a long response time

2006-05-09 Thread Frank W. Zammetti
I'm not sure, it's just one of those things that seems fishy to me... I 
would *logically* think it has nothing to do with it, or at least if it 
did, I definitely would not expect a 404... but I also know that logic 
frequently has nothing to do with solving problems like this :)


If the timeouts are far longer than 20 minutes though (Infinite?  Didn't 
know you could do that actually), then it wouldn't think that's the 
problem.  Even still, 20 minutes for a request, I'd *still* be inclined 
to think that's the root cause of the problem somehow.


Frank

Vivek Mohan wrote:

Yes, its Tomcat which is serving the resources. And I've made the
timeouts to be infinity for my application so I don't think timeouts
would be occurring. But in any case how does a timeout affect the
fishing out of stylesheets?

--
Vivek.

On 5/10/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

A 20 minute response time?  Before I worried about why the stylesheet
gets a 404, I'd solve that :)  Trying to hold an HTTP connection open
that long is a recipe for all sorts of problem (proxy timeouts, browser
timeouts, etc).

Is Tomcat serving the stylesheet, i.e., no web server in front of it?
I'm wondering if session timeout isn't playing role somehow (not sure
how it would, but with a request time that long, not very much would
surprise me).

Frank

Vivek Mohan wrote:
 Hi People,

 I've an application running on tomcat 4.1. In one particular request,
 I could find that the server response takes a long time, say around 20
 minutes, and when the page comes back all the stylesheets and header
 jsps are missing from the page. If I check my access logs, I see a 404
 response for all the inclusions into the main jsp.

 Can anyone tell me how to solve this issue, or how to go about
 investigating it?

 --
 Vivek.

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





--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: Virtual Hosts + Tomcat 5 + Windows

2006-05-09 Thread Marc Farrow

The HTTPD.CONF file is an Apache file, not a Tomcat file.  You are mixing
two different products.

On 5/9/06, Jorge Isaac Martínez Hatch [EMAIL PROTECTED] wrote:


Hi,

I found information of how to create a virtual host adding some code to
the
httpd.conf file, but I'm running Windows not Linux. I don't have a
httpd.conf file.

Should I put this code somewhere else? maybe in the server.xml?

VirtualHost 192.168.1.200
   ServerName www.somedomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]
/VirtualHost

VirtualHost 192.168.1.201
   ServerName www.otherdomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]
/VirtualHost

Thank you,
Isaac Martinez


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





--
Marc Farrow


Re: Virtual Hosts + Tomcat 5 + Windows

2006-05-09 Thread Jorge Isaac Martínez Hatch

Thank you Marc,

Other question: Can I have IP-Based Virtual Hosting using just Tomcat, or I 
need Apache running and then Tomcat?


Any help is welcome...
Isaac Martinez


- Original Message - 
From: Marc Farrow [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, May 09, 2006 2:41 PM
Subject: Re: Virtual Hosts + Tomcat 5 + Windows



The HTTPD.CONF file is an Apache file, not a Tomcat file.  You are mixing
two different products.

On 5/9/06, Jorge Isaac Martínez Hatch [EMAIL PROTECTED] wrote:


Hi,

I found information of how to create a virtual host adding some code to
the
httpd.conf file, but I'm running Windows not Linux. I don't have a
httpd.conf file.

Should I put this code somewhere else? maybe in the server.xml?

VirtualHost 192.168.1.200
   ServerName www.somedomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]
/VirtualHost

VirtualHost 192.168.1.201
   ServerName www.otherdomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]
/VirtualHost

Thank you,
Isaac Martinez


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





--
Marc Farrow




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



clusters and admin app

2006-05-09 Thread Tim Lucia
All,

I have a question concerning the admin app in a cluster environment.  If I
deploy a war file manually across multiple servers, and then look at the
admin, I see:

+ Tomcat Server
  + Service (Catalina)
+ Host (localhost)
  + Context (/mywebapp)

However, if I deploy using the farm deployer, I do not see my application
under the Host node.  I'm fairly certain I have previously seen an exception
while expanding this node [Context (/mywebapp)], and I am going back to try
and reproduce it in order to report it.  However, it seems not to cause an
exception any more.  Rather, the application simply does not appear.

This is on RHEL V.4, Tomcat 5.5.12, in a three-way cluster.  Same
environment (QA) without farm deployment shows the app just fine.

Anyone else have this problem?  Thoughts?

Thanks,
Tim



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



Re: Unable to get tomcat default page

2006-05-09 Thread Hadraba Petr

Hmm,

you are running Windows, don't you? Windows XP!

It looks like a firewall issue... Try to enable the port 8080 for
localhost---sorry, I'm not Windows Firewall expert...

Have a nice night

PETR


On 5/9/06, Java Newbee [EMAIL PROTECTED] wrote:

When i am not connected to internet, i get the default Apache
Tomcat homepage after succesfully starting the Tomcat server.
However, once i get my internet connections enabled, I am
unable to get the default Apache Tomcat home page.

I tried to change the port 8080 just incase it was being used
by some other application when i get connected to net. But it
doesnt solve my problem. Can anyone please help me. I am
new at java and tomcat and hence would request a detailed
solution to the problem.

Thanks in advance





--
Petr Hadraba
graphic artist and software designer
http://people.hadraba-soft.com/~petr
hadrabap AT bluetone DOT cz


RE: clusters and admin app

2006-05-09 Thread Tim Lucia
Here's the original post I made with the 'bug' while expanding:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200604.mbox/%3C00b501c
[EMAIL PROTECTED]

This problem is no longer present, but neither is the webapp ;-)

Tim


-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 09, 2006 4:04 PM
To: 'Tomcat Users List'
Subject: clusters and admin app

All,

I have a question concerning the admin app in a cluster environment.  If I
deploy a war file manually across multiple servers, and then look at the
admin, I see:

+ Tomcat Server
  + Service (Catalina)
+ Host (localhost)
  + Context (/mywebapp)

However, if I deploy using the farm deployer, I do not see my application
under the Host node.  I'm fairly certain I have previously seen an exception
while expanding this node [Context (/mywebapp)], and I am going back to try
and reproduce it in order to report it.  However, it seems not to cause an
exception any more.  Rather, the application simply does not appear.

This is on RHEL V.4, Tomcat 5.5.12, in a three-way cluster.  Same
environment (QA) without farm deployment shows the app just fine.

Anyone else have this problem?  Thoughts?

Thanks,
Tim



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



Deployment problems

2006-05-09 Thread Jon Strayer

I have this probem from time to time and was wondering if anyone else has
seen it.  Using the Tomcat Manager to deploy a war file remotely works most
of the time, but sometime it doesn't.  When it doesn't work you can't
undeploy the app.  There is no error message, but the app doesn't go away.

It also doesn't run.  It seems you can start it fine, but when you try to
connect to it you get an error page with this on it:
*The requested resource* (your app here) *is not available.

*I've seen this with Tomcat 5.0.18 on a Unix box and 5.5.16 on Windows XP
and 2K.

Does anyone know what to do about it?


--
Esse quam videri
(to be rather than to seem)


Tomcat and VirtualHosts

2006-05-09 Thread Jorge Isaac Martínez Hatch

Can I have IP-Based Virtual Hosting using just Tomcat?

or I need Apache running and then Tomcat over it?

Thank you very much,
Isaac Martinez

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



(Very O/T!) Oracle JDev configuration topic

2006-05-09 Thread Martin Gainty
Good Evening Fellow Coders-

Since most of my development has used Oracle I have been using JDeveloper but 
encountered some problems when I downloaded latest 10G development distro
for whatever reason the xalan libraries that come with the distro are not the 
right version..to correct I would
download xalan-j_2_7 jars from http://www.apache.org/dyn/closer.cgi/xml/xalan-j
copy serializer.jar to reachable location ...I put mine in $JDEV_HOME/lib 
vi C:\JDeveloper\jdev\bin\jdev.conf and add the following entries
AddJavaLibFile ../../lib/serializer.jar
SetUpdateClassPath 
./../../classes:../lib/jdev.jar:../../ide/lib/ide.jar:../../ide/lib/javatools.jar:../../lib/xmlparserv2.jar:../../jlib/jewt4.jar:../../jlib/sharejar:../../lib/serializer.jar

Personally I like JDeveloper as as it provides a close assimilation to Oracle 
AppServer and more importantly easy assimilation of Oracle Type2/3/4 Drivers
Happy Coding,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.




Re: Tomcat and VirtualHosts

2006-05-09 Thread Bill Barker

Jorge Isaac Martínez Hatch [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Can I have IP-Based Virtual Hosting using just Tomcat?


Assuming that your Tomcat version is recent enough, look at the 
'useIPVHosts' option at 
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html.

 or I need Apache running and then Tomcat over it?

 Thank you very much,
 Isaac Martinez 




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



Re: ClassCastException when forwarding wrapped HttpServletRequest

2006-05-09 Thread Bill Barker

Yuri de Wit [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am not sure I should have posted this question to the dev mailing list,
let me know if that should be the case.

I am using Tomcat 5.5.16.

I have a series of chained HttpServlets in my web app. The first servlet is
registered with the web.xml and the following ones are dispatched manually.
Before delegating the HTTP request to the next internal servlet, I am
wrapping the HttpServletRequest overriding getPathInfo() and
getServletPath(). If the pathInfo was /a/b and servletPath was /x, after
wrapping the request getPathInfo returns /b and the servletPath returns
/x/a. The reason I am doing this is that I would like forward and includes
to work relative to my internal pathInfo and servletPath (/b and /x/a)
instead of the web container one (/a/b and /x).


I assume that 'dispatched manually' means you are using getNamedDispatcher?

The first problem I encountered was that if I implemented the wrapper by
subclassing HttpServletRequestWrapper Tomcat implementation unwraps it
before forwarding and the final url contains the original path info 
appended
and my custom path info.


Not strictly true.  Tomcat injects it's wrapper below yours.

It's an edge case, but it definitely a bug.  Tomcat shouldn't be trusting 
the wrapper to give it back the correct values.  Feel free to open up a BZ 
report (and, even better if it includes a simple example to reproduce :).

So I then changed my implementation and now I am wrapping the request using
my own subclass of HttpServletRequest instead. Now the problem is that I 
get
a ClassCast exception @ org.apache.catalina.core.ApplicationDispatcher line
814 (current = ((ServletRequestWrapper) current).getRequest();).

Shouldnt that casting be conditional?


Nope.  Passing anything other than a ServletRequestWrapper or the orginal 
Request object is specifically forbidden by the Servlet spec.

Is there a safer way of implementing the functionlity I described above?

thanks.
- yuri
 




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