Re: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread Yucca Nel
I am not too sure on this, but it could be because runtime exceptions are 
usually avoidable and perhaps therefore you need to deal with such errors 
beforehand(higher up in the stack) and throw custom exceptions. It doesn't 
sound like good coding standards(what you are doing anyway). If you are 
using JSF you can usefrom-outcome to control views for user error to 
redirect them to error page.


--
From: bryan jacobs bryancjac...@hotmail.com
Sent: Wednesday, May 12, 2010 12:56 AM
To: users@tomcat.apache.org
Subject: error-page exception-type subclasses of RuntimeException are not 
handled





Tomcat Version: apache-tomcat-6.0.26

JDK: jdk1.6.0_19

OS: Windows XP Service Pack 2

I am using the page-error element in my web.xml with the 
exception-type element which contains a subclass of RuntimeException.


When I subclass RuntimeException the location element which specifies my 
error-page to land on in the event that exception is raised is not 
displayed.



web.xml snippet:

   error-page

exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
   location/error.html/location
   /error-page

Where LuaSecurityException extends RuntimeException

When my JAX-RS method throws the LuaSecurityException the error.html is 
NOT displayed.


However, if I change the above configuration to:



   error-page


exception-typejava.lang.RuntimeException/exception-type

   location/error.html/location

   /error-page

and have my class throw a RuntimeException then the error.html page is 
displayed.


Finally if I change the web.xml to:

   error-page



exception-typejava.lang.Exception/exception-type


   location/error.html/location


   /error-page

and my jax-rs class throws a LuaSecurityException extends RuntimeException 
then my error.html is displayed.


What I would like to do is:
   error-page


exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type

   location/error.html/location

   /error-page

That way I can create various RuntimeException subclasses which are 
appropriate for my application and handle them with specific error pages.


Any help would be appreciated.

If you need more information please let me know.

Bryan

_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread Yucca Nel
I thought I would like to add to thepoint I am trying to make, I am 
using hibernate validation API and get big fat runtime exceptions if the 
validation API fails a check on a field that has certain validations like 
length etc. These excceptions are avoidable (some of them) from the point 
that the data is entered snd I can ask user for correct data  (or more 
reasonable data)


Lets say I have an email field in UserEntity as follows
@Email
   public String getUserEmail() {
   return userEmail;
   }

It is the job of the business layer to 1 decide on valid emails (like we 
only accept hotmail) if such logic applies)
and it is the job of the view to find incorrect emails as soon as possible 
to avoid an expensive rountrip for the sake of a user using the application.


--
From: Yucca Nel yucca...@live.co.za
Sent: Wednesday, May 12, 2010 9:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: error-page exception-type subclasses of RuntimeException are 
not handled


I am not too sure on this, but it could be because runtime exceptions are 
usually avoidable and perhaps therefore you need to deal with such errors 
beforehand(higher up in the stack) and throw custom exceptions. It doesn't 
sound like good coding standards(what you are doing anyway). If you are 
using JSF you can usefrom-outcome to control views for user error to 
redirect them to error page.


--
From: bryan jacobs bryancjac...@hotmail.com
Sent: Wednesday, May 12, 2010 12:56 AM
To: users@tomcat.apache.org
Subject: error-page exception-type subclasses of RuntimeException are not 
handled





Tomcat Version: apache-tomcat-6.0.26

JDK: jdk1.6.0_19

OS: Windows XP Service Pack 2

I am using the page-error element in my web.xml with the 
exception-type element which contains a subclass of RuntimeException.


When I subclass RuntimeException the location element which specifies 
my error-page to land on in the event that exception is raised is not 
displayed.



web.xml snippet:

   error-page

exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
   location/error.html/location
   /error-page

Where LuaSecurityException extends RuntimeException

When my JAX-RS method throws the LuaSecurityException the error.html is 
NOT displayed.


However, if I change the above configuration to:



   error-page


exception-typejava.lang.RuntimeException/exception-type

   location/error.html/location

   /error-page

and have my class throw a RuntimeException then the error.html page is 
displayed.


Finally if I change the web.xml to:

   error-page



exception-typejava.lang.Exception/exception-type


   location/error.html/location


   /error-page

and my jax-rs class throws a LuaSecurityException extends 
RuntimeException then my error.html is displayed.


What I would like to do is:
   error-page


exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type

   location/error.html/location

   /error-page

That way I can create various RuntimeException subclasses which are 
appropriate for my application and handle them with specific error pages.


Any help would be appreciated.

If you need more information please let me know.

Bryan

_
Hotmail is redefining busy with tools for the New Busy. Get more from 
your inbox.

http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



how to invalidate a user session properly?

2010-05-12 Thread Yucca Nel
Currently I need to fire my jsf command button twice to get the logic behind it 
to invalidate the session correctly as follows:
 public String logout(ActionEvent ae) throws IOException, ServletException {
HttpServletRequest req= (HttpServletRequest) 
FacesContext.getCurrentInstance().getExternalContext().getRequest();
req.getSession(false).invalidate();

return home;

the backing bean is request scope and I though that that may have been the 
issues. I would like to add that simply changing the mthod to one for a simple 
action and not actionListener makes no difference.

Here is where the button is called...

h:commandButton rendered=#{request.userPrincipal!=null} 
actionListener=#{logoutForm.logout} 
value=#{uOptMsg.logOut}/h:commandButton

tomcat 6 being used.

Re: Avoiding random JMX port on tomcat

2010-05-12 Thread emerson cargnin
Thanks Chuck

But I meant in changing this random port to a specific one without having to
change the server.xml to add a new listener and jars.

regards
Emerson

On 9 April 2010 02:12, Caldarale, Charles R chuck.caldar...@unisys.comwrote:

 On Apr 8, 2010, at 12:59, emerson cargnin
 echofloripa.y...@gmail.com wrote:

  I would be great if that could be configured directly in the
  properties

 I suspect that you can. Most attribute values in server.xml can be
 encoded as ant-style system property references:

 attr=${my.property}

  - Chuck

 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




adding transport gauruntee ti web.xml issues

2010-05-12 Thread Yucca Nel
In tomcat 6 I am bringing down the container when asking for  confidential 
RESOURCE. iS THERE A REASON FOR THIS? 

CONTAINER AND RESOURCE WORK FINE LIKE THIS...

security-constraint
web-resource-collection
web-resource-nameloggedInUser/web-resource-name
url-pattern/pages/user/secure/*/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
/web-resource-collection
auth-constraint
role-nameRegisteredUser/role-name
/auth-constraint

/security-constraint

But fail when configured like this...

/security-constraint
security-constraint
web-resource-collection
web-resource-nameAdminArea/web-resource-name
url-pattern/pages/admin/*/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
/web-resource-collection
auth-constraint
role-nameAdmin/role-name
/auth-constraint
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint

/security-constraint



Re: Avoiding random JMX port on tomcat

2010-05-12 Thread Paolo Santarsiero
I think the only possibility in order to fix RMI server port behind a
firewalled system is to use JMX Remote Lifecycle Listener  in server.xml and
add catalina-jmx-remote.jar  in lib folder.
I used it for remote jvm monitoring and now works fine.
You can read procedure here
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html
regards
On 12 May 2010 13:40, emerson cargnin echofloripa.y...@gmail.com wrote:

 Thanks Chuck

 But I meant in changing this random port to a specific one without having
 to
 change the server.xml to add a new listener and jars.

 regards
 Emerson

 On 9 April 2010 02:12, Caldarale, Charles R chuck.caldar...@unisys.com
 wrote:

  On Apr 8, 2010, at 12:59, emerson cargnin
  echofloripa.y...@gmail.com wrote:
 
   I would be great if that could be configured directly in the
   properties
 
  I suspect that you can. Most attribute values in server.xml can be
  encoded as ant-style system property references:
 
  attr=${my.property}
 
   - Chuck
 
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 



Re: Avoiding random JMX port on tomcat

2010-05-12 Thread André Warnier

Paolo Santarsiero wrote:

I think the only possibility in order to fix RMI server port behind a
firewalled system is to use JMX Remote Lifecycle Listener  in server.xml and
add catalina-jmx-remote.jar  in lib folder.
I used it for remote jvm monitoring and now works fine.
You can read procedure here
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html


and the basic JVM stuff related to this is really well-described here :
http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: adding transport gauruntee ti web.xml issues

2010-05-12 Thread Caldarale, Charles R
 From: Yucca Nel [mailto:yucca...@live.co.za]
 Subject: adding transport gauruntee ti web.xml issues
 
 In tomcat 6 I am bringing down the container when asking for
 confidential RESOURCE. iS THERE A REASON FOR THIS?

Hard to tell without real information.

What exact Tomcat version are you using?

What JVM are you using?

What platform are you running on?

What's in the logs?

What's in the stack trace?

 CONTAINER AND RESOURCE WORK FINE LIKE THIS...

You don't need to shout.

http://www.catb.org/~esr/faqs/smart-questions.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: how to invalidate a user session properly?

2010-05-12 Thread Hassan Schroeder
On Wed, May 12, 2010 at 12:24 AM, Yucca Nel yucca...@live.co.za wrote:
 Currently I need to fire my jsf command button twice

Bummer. But wouldn't it be better to find a JSF list to ask all these
JSF-specific questions on?

Because they apparently have nothing to do with Tomcat :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread o-rabbit


I have two load balanced instances of tomcat with apache 2.2.14 in front
using mod_jk 1.2.28.
The load balancing is working as expected.
I want to turn on session replication ... so I did the following :

1. I uncommented  Cluster
className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ in server.xml of
both tomcats 
2. Add distributable/ in web.xml
3. restarted the instances

On both instances I get the following message:
INFO: Manager [localhost#/mycontext]: skipping state transfer. No members
active in cluster group.

Is there something more I need to do?? Please reply urgently!!!
-- 
View this message in context: 
http://old.nabble.com/help-%3A-Tomcat-6.0.20-session-replication-not-working-tp28536224p28536224.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread Propes, Barry L
While not using a framework like Hibernate, I recall coding for an exception in 
the servlet itself. Then throwing an exception to get to the error page.
Not sure if that helps you or not. 

-Original Message-
From: Yucca Nel [mailto:yucca...@live.co.za] 
Sent: Wednesday, May 12, 2010 2:15 AM
To: Tomcat Users List
Subject: Re: error-page exception-type subclasses of RuntimeException are not 
handled

I thought I would like to add to thepoint I am trying to make, I am using 
hibernate validation API and get big fat runtime exceptions if the validation 
API fails a check on a field that has certain validations like length etc. 
These excceptions are avoidable (some of them) from the point that the data is 
entered snd I can ask user for correct data  (or more reasonable data)

Lets say I have an email field in UserEntity as follows
 @Email
public String getUserEmail() {
return userEmail;
}

It is the job of the business layer to 1 decide on valid emails (like we only 
accept hotmail) if such logic applies) and it is the job of the view to find 
incorrect emails as soon as possible to avoid an expensive rountrip for the 
sake of a user using the application.

--
From: Yucca Nel yucca...@live.co.za
Sent: Wednesday, May 12, 2010 9:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: error-page exception-type subclasses of RuntimeException are not 
handled

 I am not too sure on this, but it could be because runtime exceptions 
 are usually avoidable and perhaps therefore you need to deal with such 
 errors beforehand(higher up in the stack) and throw custom exceptions. 
 It doesn't sound like good coding standards(what you are doing 
 anyway). If you are using JSF you can usefrom-outcome to control 
 views for user error to redirect them to error page.

 --
 From: bryan jacobs bryancjac...@hotmail.com
 Sent: Wednesday, May 12, 2010 12:56 AM
 To: users@tomcat.apache.org
 Subject: error-page exception-type subclasses of RuntimeException are 
 not handled



 Tomcat Version: apache-tomcat-6.0.26

 JDK: jdk1.6.0_19

 OS: Windows XP Service Pack 2

 I am using the page-error element in my web.xml with the 
 exception-type element which contains a subclass of RuntimeException.

 When I subclass RuntimeException the location element which 
 specifies my error-page to land on in the event that exception is 
 raised is not displayed.


 web.xml snippet:

error-page

 exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
location/error.html/location
/error-page

 Where LuaSecurityException extends RuntimeException

 When my JAX-RS method throws the LuaSecurityException the error.html 
 is NOT displayed.

 However, if I change the above configuration to:



error-page


 exception-typejava.lang.RuntimeException/exception-type

location/error.html/location

/error-page

 and have my class throw a RuntimeException then the error.html page 
 is displayed.

 Finally if I change the web.xml to:

error-page



 exception-typejava.lang.Exception/exception-type


location/error.html/location


/error-page

 and my jax-rs class throws a LuaSecurityException extends 
 RuntimeException then my error.html is displayed.

 What I would like to do is:
error-page


 exception-typeorg.lds.lua.directory.exception.LuaSecurityException
 /exception-type

location/error.html/location

/error-page

 That way I can create various RuntimeException subclasses which are 
 appropriate for my application and handle them with specific error pages.

 Any help would be appreciated.

 If you need more information please let me know.

 Bryan

 _
 Hotmail is redefining busy with tools for the New Busy. Get more from 
 your inbox.
 http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTA
 GL:ON:WL:en-US:WM_HMP:042010_2


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Horizontal Cluster Session Persistence during Failover

2010-05-12 Thread o-rabbit

Hi,
  I have the same problem and I am using static membership, but I am getting
classnotfoundexception for all application level attribute values. Any ideas
why this is the case?
Thanks in advance.
-- 
View this message in context: 
http://old.nabble.com/Horizontal-Cluster-Session-Persistence-during-Failover-tp25437547p28536305.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Horizontal Cluster Session Persistence during Failover

2010-05-12 Thread Pid
On 12/05/2010 14:57, o-rabbit wrote:
 
 Hi,
   I have the same problem and I am using static membership, but I am getting
 classnotfoundexception for all application level attribute values. Any ideas
 why this is the case?
 Thanks in advance.

You just replied to a thread from September 2009, with a different
problem.  Start a completely new thread and provide detailed
information, including exact OS, JVM, Tomcat versions, log info or
stacktraces.


p



signature.asc
Description: OpenPGP digital signature


RE: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread bryan jacobs

I don't have any web framework.  I'm using JQuery with JAX-RS.  So jquery 
posts/gets from the JAX-RS layer.

The SecurityException is related to a person trying to hack the system.  Thus, 
when they perform their attempted hack the code simply throws a 
SecurityException, and takes them to a, we know what you are trying to do 
page.

To me it seems reasonable.  All other exceptions are handled in the code as one 
would expect.  Generally, a RuntimeException is used when recovery is not 
possible.  That is the case here, and why a RuntimeException has been thrown.

However, I will try creating a checked Exception subclass and see if that fixes 
the problem.


Thanks for the response.

Bryan



 From: yucca...@live.co.za
 To: users@tomcat.apache.org
 Subject: Re: error-page exception-type subclasses of RuntimeException are not 
 handled
 Date: Wed, 12 May 2010 09:03:30 +0200
 
 I am not too sure on this, but it could be because runtime exceptions are 
 usually avoidable and perhaps therefore you need to deal with such errors 
 beforehand(higher up in the stack) and throw custom exceptions. It doesn't 
 sound like good coding standards(what you are doing anyway). If you are 
 using JSF you can usefrom-outcome to control views for user error to 
 redirect them to error page.
 
 --
 From: bryan jacobs bryancjac...@hotmail.com
 Sent: Wednesday, May 12, 2010 12:56 AM
 To: users@tomcat.apache.org
 Subject: error-page exception-type subclasses of RuntimeException are not 
 handled
 
 
 
  Tomcat Version: apache-tomcat-6.0.26
 
  JDK: jdk1.6.0_19
 
  OS: Windows XP Service Pack 2
 
  I am using the page-error element in my web.xml with the 
  exception-type element which contains a subclass of RuntimeException.
 
  When I subclass RuntimeException the location element which specifies my 
  error-page to land on in the event that exception is raised is not 
  displayed.
 
 
  web.xml snippet:
 
 error-page
  
  exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
 location/error.html/location
 /error-page
 
  Where LuaSecurityException extends RuntimeException
 
  When my JAX-RS method throws the LuaSecurityException the error.html is 
  NOT displayed.
 
  However, if I change the above configuration to:
 
 
 
 error-page
 
 
  exception-typejava.lang.RuntimeException/exception-type
 
 location/error.html/location
 
 /error-page
 
  and have my class throw a RuntimeException then the error.html page is 
  displayed.
 
  Finally if I change the web.xml to:
 
 error-page
 
 
 
  exception-typejava.lang.Exception/exception-type
 
 
 location/error.html/location
 
 
 /error-page
 
  and my jax-rs class throws a LuaSecurityException extends RuntimeException 
  then my error.html is displayed.
 
  What I would like to do is:
 error-page
 
 
  exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
 
 location/error.html/location
 
 /error-page
 
  That way I can create various RuntimeException subclasses which are 
  appropriate for my application and handle them with specific error pages.
 
  Any help would be appreciated.
 
  If you need more information please let me know.
 
  Bryan
 
  _
  Hotmail is redefining busy with tools for the New Busy. Get more from your 
  inbox.
  http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
   
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Re: help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread André Warnier

o-rabbit wrote:
...


Is there something more I need to do?? Please reply urgently!!!


Hi.
For your information, the above is almost guaranteed to have the 
opposite effect of what you would like.
The people answering on forums such as this one, are volunteers who 
donate their time.
You are a user of a product that you get for free, and of a forum where 
you also get answers for free.
In such a case, it is generally considered in bad taste to ask people to 
hurry, and it generally has the effect of de-motivating people who might 
have answered.

For more details, please read
http://www.catb.org/~esr/faqs/smart-questions.html



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread Gregor Schneider
On Wed, May 12, 2010 at 3:51 PM, o-rabbit rju...@gmail.com wrote:

 Is there something more I need to do??


yes: read the clustering-how-to:
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

rgds

gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Any way to get Tomcat to complain if an EL var is undefined?

2010-05-12 Thread laredotornado

Hi,

I'm using Tomcat 6.0.26.  I wanted to know if there was any setting that
would cause the compiler to complain if an EL variable was never defined. 
For example if I have

p${resul}/p

the result will be p/p because I haven't defined resul in any
scope.  I was hoping an exception could be raised instead of a blank.

Thanks, - Dave

-- 
View this message in context: 
http://old.nabble.com/Any-way-to-get-Tomcat-to-complain-if-an-EL-var-is-undefined--tp28537533p28537533.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread Konstantin Kolinko
2010/5/12 bryan jacobs bryancjac...@hotmail.com:

    error-page
        
 exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
        location/error.html/location
    /error-page

 However, if I change the above configuration to:

    error-page
 exception-typejava.lang.RuntimeException/exception-type
        location/error.html/location
    /error-page

 and have my class throw a RuntimeException then the error.html page is 
 displayed.


Can you prepare a simple war file (including source code), that
reproduces this issue, and file a bug report?

The place where exception handling is implemented is
org.apache.catalina.core.StandardHostValve

The exception is processed by #throwable(..) method there and the
error page is found by #findErrorPage(context, throwable).

I do not see where that code can go wrong. It might be though that you
have a misprint in your exception class name in web.xml.  The code
does not check that the mentioned exception class exists. It just
compares strings: the name of the exception class and the name
configured in web.xml.


Also, on an error page you should be able to access the exception as
request.getAttribute(javax.servlet.error.exception)
see SRV.9.9.1
so you will be able to see what is actually caught by Tomcat.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: snort detecting ICMP traffic, tomcat?

2010-05-12 Thread Mark H. Wood
On Tue, May 11, 2010 at 09:33:36AM -0500, Caldarale, Charles R wrote:
  From: James R. Marcus [mailto:jmar...@edhance.com]
  Subject: snort detecting ICMP traffic, tomcat?
  
  Could Tomcat be generating ICMP traffic to an IP accessing the server?
 
 No.  Java is not capable of generating ICMP messages.

That's not what ICMP Unreachable means.  It's a response from the
target host to a connection attempt by the requesting host which could
or should not be accepted.  It should be sent by the host's network
stack, not anything in userspace, but it can be triggered by any
program which requests a connection that is refused.  Java certainly
can evoke one of these, even if it can't send them.

In this case (Host Administratively Prohibited), 121d59.pitzer.edu is
saying, I refuse to talk to you on any port.  I have no idea what is
requesting a connection to that host, or why.  It sounds like
someone's workstation (121d59) is configured to refuse traffic from
internal-only (10/8) addresses.

It might be helpful to start up a packet monitor and sample the
attempts, to see what port(s) are being requested.

I find it interesting that there are two PTR records in DNS for that
address, and the other one is to jk-dc96425b8e.  That's not the sort
of name you expect from DNS.  You might want to report that to someone
at Pitzer College.  A 'whois' query for pitzer.edu returns nothing, too.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Balance your desire for bells and whistles with the reality that only a 
little more than 2 percent of world population has broadband.
-- Ledford and Tyler, _Google Analytics 2.0_


pgpEM2NlwfWjQ.pgp
Description: PGP signature


Tomcat 6 does not evaluate certain EL expressions

2010-05-12 Thread Misch, Oliver / Kuehne + Nagel / Ham MI-AJ
Hi!

We are currently migrating a web app from 5.5.20 to 6.0.26 (with identical 
behaviors on different operating systems). On a few pages, we are experiencing 
a different behavior related to EL expressions.

In the example page below and with tomcat 5.5.20, the expression in the line 
html:link href=#${currentBlockName}
was correctly evaluated. With tomcat 6.0.26, it is not evaluated, resulting in 
links that directly contain the literals #${currentBlockName}.

I know that in EL 2.1, ${} (immediate evaluation) and #{} (deferred evaluaton) 
are two possible types of eval expressions, but why is the combination of #${ a 
problem if it occurs in a tag attribute?

Other expressions are evaluated without problems, so with have no general 
problem with them (no general deactivation of EL or something like that). It is 
always the combination of #${ in tag attributes.

Can somebody help?

Best regards,
Oliver
  

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html%
...
...
html:link href=#${currentBlockName}
onclick=javascript:deactivateAlert(); 
html:img src=static/images/knwebstd/delete16.gif border=0 
styleId=deactivateAlertIcon
alt=bean:message bundle='monvis' 
key='monitoringResults.deActivate.Tooltip' //
/html:link




Kuehne + Nagel (AG  Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), 
Dirk Blesius, Reiner Heiken, Bruno Mang, Alfred Manke, Christian Marnetté, Mark 
Reinhardt, Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, 
HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne  
Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: 
Klaus-Michael Kuehne





Re: help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread o-rabbit



On Wed, May 12, 2010 at 3:51 PM, o-rabbit rju...@gmail.com wrote:

 Is there something more I need to do??


yes: read the clustering-how-to:
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

fyi...People usually post in forums such as this after going through the
application website.
All the three configuration examples given there did not work for me. I have
followed all of the instructions ... but  replication on failover does not
work. All sessions on the node that crashed do not get replicated. I have
also tried static-membership, but it is throwing classnotfoundexception for
each of the attributes which are stored in the servletcontext (application
object).


-- 
View this message in context: 
http://old.nabble.com/help-%3A-Tomcat-6.0.20-session-replication-not-working-tp28536224p28538743.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread bryan jacobs

Thanks for that information.

I will do some research based on that.

Bryan

 Date: Wed, 12 May 2010 19:50:16 +0400
 Subject: Re: error-page exception-type subclasses of RuntimeException are not 
 handled
 From: knst.koli...@gmail.com
 To: users@tomcat.apache.org
 
 2010/5/12 bryan jacobs bryancjac...@hotmail.com:
 
 error-page
 
  exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
 location/error.html/location
 /error-page
 
  However, if I change the above configuration to:
 
 error-page
  exception-typejava.lang.RuntimeException/exception-type
 location/error.html/location
 /error-page
 
  and have my class throw a RuntimeException then the error.html page is 
  displayed.
 
 
 Can you prepare a simple war file (including source code), that
 reproduces this issue, and file a bug report?
 
 The place where exception handling is implemented is
 org.apache.catalina.core.StandardHostValve
 
 The exception is processed by #throwable(..) method there and the
 error page is found by #findErrorPage(context, throwable).
 
 I do not see where that code can go wrong. It might be though that you
 have a misprint in your exception class name in web.xml.  The code
 does not check that the mentioned exception class exists. It just
 compares strings: the name of the exception class and the name
 configured in web.xml.
 
 
 Also, on an error page you should be able to access the exception as
 request.getAttribute(javax.servlet.error.exception)
 see SRV.9.9.1
 so you will be able to see what is actually caught by Tomcat.
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

Re: help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread o-rabbit

I am glad everyone does not think like you do!

awarnier wrote:
 
 o-rabbit wrote:
 ...
 
 Is there something more I need to do?? Please reply urgently!!!
 
 Hi.
 For your information, the above is almost guaranteed to have the 
 opposite effect of what you would like.
 The people answering on forums such as this one, are volunteers who 
 donate their time.
 You are a user of a product that you get for free, and of a forum where 
 you also get answers for free.
 In such a case, it is generally considered in bad taste to ask people to 
 hurry, and it generally has the effect of de-motivating people who might 
 have answered.
 For more details, please read
 http://www.catb.org/~esr/faqs/smart-questions.html
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/help-%3A-Tomcat-6.0.20-session-replication-not-working-tp28536224p28538793.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



upgrading Tomcat v6.0.20

2010-05-12 Thread Althea Martin
Preparing to perform my first Tomcat upgrade. Current Tomcat v6.0.20 upgrading 
to v6.0.26. My OS is MS Windows Server 2003 SP2. Anything special I need to do 
or know aside from creating a backup?
 
-Althea


Re: Tomcat 6 does not evaluate certain EL expressions

2010-05-12 Thread Konstantin Kolinko
2010/5/12 Misch, Oliver / Kuehne + Nagel / Ham MI-AJ
oliver.mi...@kuehne-nagel.com:
 html:link href=#${currentBlockName}

If you will look at the Status file, as mentioned in
http://tomcat.apache.org/bugreport.html#Recently_fixed_issues

You will see
https://issues.apache.org/bugzilla/show_bug.cgi?id=49081
which looks like the problem that you are experiencing.

A patch for that issue is already proposed for TC6. but is waiting
for the 3rd vote from committers to be applied.

By the way, probably
href=${'#'}${currentBlockName}
will work for you.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: upgrading Tomcat v6.0.20

2010-05-12 Thread Caldarale, Charles R
 From: Althea Martin [mailto:althea.mar...@pl.netl.doe.gov]
 Subject: upgrading Tomcat v6.0.20
 
 Preparing to perform my first Tomcat upgrade. Current Tomcat v6.0.20
 upgrading to v6.0.26. My OS is MS Windows Server 2003 SP2. Anything
 special I need to do or know aside from creating a backup?

Skim through the changelog to see if anything affects you.

http://tomcat.apache.org/tomcat-6.0-doc/changelog.html

Pay attention to any new config tags (usually system properties) that might 
affect behavior.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: help : Tomcat 6.0.20 session replication not working

2010-05-12 Thread Gregor Schneider
On Wed, May 12, 2010 at 7:21 PM, o-rabbit rju...@gmail.com wrote:

 I am glad everyone does not think like you do!

FYI:

André is well know to this group as one of the persons trying their
very best to help anybody having problems regarding Tomcat.

If you didn't receive any answer helping you out of your misery yet,
it simply means that noone has any idea why you're facing the
problems.

Tomcat clustering incl. session replication is known to work very
well, and lb'ing with a fronted httpd using mod_jk is also a very
common scenario known to work very well.

It's pretty likely that some information to solve your issue is
missing in the information you gave us.

Since you spent only a few sentences describing your problem, for me
it was natural to first point you to the according docs.

And no, it's not as you stated that most ppl posting their questions
here read the docs *before* they are posting here - that's why I
pointed you to the docs hoping they might give you some clues.

Anyways, just move ahead with your behaviour, pissing ppl like André
off. I suggest you also insult Chuck, Mark and Pid, meaning that
you'll have those guys off your list of *volunteers* which might be
able to shed some light.

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any way to get Tomcat to complain if an EL var is undefined?

2010-05-12 Thread Pid
On 12/05/2010 16:31, laredotornado wrote:
 
 Hi,
 
 I'm using Tomcat 6.0.26.  I wanted to know if there was any setting that
 would cause the compiler to complain if an EL variable was never defined. 
 For example if I have
 
 p${resul}/p
 
 the result will be p/p because I haven't defined resul in any
 scope.  I was hoping an exception could be raised instead of a blank.

AFAIK you're out of luck there.

You might be able employ an ELResolver implementation, and assume that
anything that reaches it is MIA and therefore throw an exception, but
that would probably be a bit extreme and is, to be completely honest,
heading off into wild guess territory.

I'm not sure the gain outweighs the cost...


p



signature.asc
Description: OpenPGP digital signature


mod_jk file not found

2010-05-12 Thread Markus Mehrwald

Hi,

I installed mod_jk and it works perfect except of a little strange 
problem. I let handle tomcat everything except of static files which the 
following lines in the virtual host for port 80 and the same for port 443:


# Send servlet for context / jsp-examples to worker named worker1
JkMount /* worker1

# Static files in Tomcat webapp context directory are served by apache
JkAutoAlias /opt/tomcat/webapps/ROOT
JkUnMount /*.jpg  worker1
JkUnMount /*.gif  worker1
JkUnMount /*.png  worker1
JkUnMount /*.js   worker1
JkUnMount /*.css  worker1

This works great for port 80 but for port 443 the javascript for the 
myfaces popup component gets a http 404 
(/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12737082/popup.HtmlPopupRenderer/JSPopup.js). 
Every other javascript can be retrieved on port 80 as well as on port 443.


Can anyone explain how this can happen?

Thanks,
Markus

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: error-page exception-type subclasses of RuntimeException are not handled

2010-05-12 Thread bryan jacobs

In the process of putting together the simple war file without all our CXF and 
JAX-RS configuration the exception-type element was handling exceptions 
correctly.

This is NOT a bug in tomcat, but something that our CXF layer is doing.

Thanks for the help, and sorry for wasting your time.

Bryan

 Date: Wed, 12 May 2010 19:50:16 +0400
 Subject: Re: error-page exception-type subclasses of RuntimeException are not 
 handled
 From: knst.koli...@gmail.com
 To: users@tomcat.apache.org
 
 2010/5/12 bryan jacobs bryancjac...@hotmail.com:
 
 error-page
 
  exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type
 location/error.html/location
 /error-page
 
  However, if I change the above configuration to:
 
 error-page
  exception-typejava.lang.RuntimeException/exception-type
 location/error.html/location
 /error-page
 
  and have my class throw a RuntimeException then the error.html page is 
  displayed.
 
 
 Can you prepare a simple war file (including source code), that
 reproduces this issue, and file a bug report?
 
 The place where exception handling is implemented is
 org.apache.catalina.core.StandardHostValve
 
 The exception is processed by #throwable(..) method there and the
 error page is found by #findErrorPage(context, throwable).
 
 I do not see where that code can go wrong. It might be though that you
 have a misprint in your exception class name in web.xml.  The code
 does not check that the mentioned exception class exists. It just
 compares strings: the name of the exception class and the name
 configured in web.xml.
 
 
 Also, on an error page you should be able to access the exception as
 request.getAttribute(javax.servlet.error.exception)
 see SRV.9.9.1
 so you will be able to see what is actually caught by Tomcat.
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3