Re: URL Rewrite

2010-09-03 Thread michel


- Original Message - 
From: "Pid" 

To: "Tomcat Users List" 
Sent: Friday, September 03, 2010 6:29 AM
Subject: Re: URL Rewrite


On 03/09/2010 11:02, michel wrote:
I have been using the tuckey urlrewrite with some results, in that if I 
want to have an incoming URL coming in as


gallery/pic20 gets changed to gallery.jsp?pic=20

But the tool bar URL gets displayed as   gallery.jsp?pic=20

and I want to display  gallery/pic20

I tried the '', but that didn't have any effect. I also did 
some reading, and there was some talk about internal and external rewrite, 
but I have no real clue on how and what to do with that either.


I usually solve this problem by writing a Servlet Filter to parse the
URL and supply the id via a request attribute, to the JSP.

String pathToJsp = "WEB-INF/jsp/item_page.jsp";
String id = parseId(request.getRequestURL());

request.setAttribute("id", id);
request.getRequestDispatcher(pathToJsp).forward(request, response);


Map the url-pattern for the Filter to /gallery/* and you're set.




Thanks, and I will give that a try next. I first opted for the Tuckey URL 
rewrite since I had first started working with that, but it seems buggy to 
me.



Michel




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



Re: URL Rewrite

2010-09-03 Thread michel
- Original Message - 
From: "Ognjen Blagojevic" 

To: "Tomcat Users List" 
Sent: Friday, September 03, 2010 6:42 AM
Subject: Re: URL Rewrite



On 3.9.2010 12:02, michel wrote:
I have been using the tuckey urlrewrite with some results, in that if I 
want to have an incoming URL coming in as

gallery/pic20 gets changed to gallery.jsp?pic=20
But the tool bar URL gets displayed as   gallery.jsp?pic=20
and I want to display  gallery/pic20


Just use rule, not outbond-rule:


  /gallery/pic([0-9]+)
  /gallery.jsp?pic=$1



Thanks, and I have it working at times (worked all day on this) but it seems 
unreliable. I am expecting that the very same code would work if I had 
'forward' or 'redirect', but it doesn't.




Michel 



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



RE: Tomcat 6.0.20 ssl

2010-09-03 Thread Johnson, Rob E
thanks 


Rob Johnson MBA/IT
IT Specialist
BOEMRE
303-231-3963
303-589-9278 (Cell)


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, September 03, 2010 2:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 6.0.20 ssl

> From: Johnson, Rob E [mailto:rob.john...@boemre.gov]
> Subject: Tomcat 6.0.20 ssl

>  port="443" minSpareThreads="5" maxSpareThreads="75"
> enableLookups="true" disableUploadTimeout="true" 
> acceptCount="100"  maxThreads="200"
> scheme="https" secure="true" SSLEnabled="true"
> keystoreFile="C:\Program Files\Java\jre6\bin\documentum.keystore"
keystorePass="changeit"
> clientAuth="false" sslProtocol="TLS"/>

If you have APR installed (tcnative-1.dll in Tomcat's bin directory),
the SSL configuration is completely different.  If that is the
situation, the easiest thing to do is disable APR by renaming or
deleting the above DLL file.  If you decide you do want to use APR (it's
faster for HTTPS traffic), read the doc:

http://tomcat.apache.org/tomcat-6.0-doc/apr.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


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



RE: Tomcat 6.0.20 ssl

2010-09-03 Thread Caldarale, Charles R
> From: Johnson, Rob E [mailto:rob.john...@boemre.gov] 
> Subject: Tomcat 6.0.20 ssl

>  port="443" minSpareThreads="5" maxSpareThreads="75"
> enableLookups="true" disableUploadTimeout="true" 
> acceptCount="100"  maxThreads="200"
> scheme="https" secure="true" SSLEnabled="true"
> keystoreFile="C:\Program Files\Java\jre6\bin\documentum.keystore" 
> keystorePass="changeit"
> clientAuth="false" sslProtocol="TLS"/>

If you have APR installed (tcnative-1.dll in Tomcat's bin directory), the SSL 
configuration is completely different.  If that is the situation, the easiest 
thing to do is disable APR by renaming or deleting the above DLL file.  If you 
decide you do want to use APR (it's faster for HTTPS traffic), read the doc:

http://tomcat.apache.org/tomcat-6.0-doc/apr.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



Tomcat 6.0.20 ssl

2010-09-03 Thread Johnson, Rob E
Hi,

I've purchased an apache certificate (x509) from VeriSign and imported
the certificate okay and changed the server.xml file:



Restart the apached service

http://documentum still works

But

https://documentum does not work, simply get page cannot be displayed.

Thanks,

Rob

Rob Johnson MBA/IT
IT Specialist
BOEMRE
303-231-3963
303-589-9278 (Cell)




Re: multiple Context elements in conf/context.xml file

2010-09-03 Thread Pid
On 03/09/2010 18:47, Tom H wrote:
> 
> my existing conf/context.xml file has already a  element;
> 
>WEB-INF/web.xml
> 
> 
> 
> I would like to add another to allow access to the /manager/status
> location to my monitoring, however adding a new Context element like so;
> 
> conf/context.xml
> 
> 
>WEB-INF/web.xml
> 
>  docBase="/usr/share/tomcat6/webapps/manager">
> allow="127\.0\.0\.1"/>
> 
> 
> 
> 
> breaks the xml, as I presume that file needs a single root element to
> lint/parse ok
> SEVERE: Parse Fatal Error at line 6 column 2: The markup in the document
> following the root element must be well-formed.
> org.xml.sax.SAXParseException: The markup in the document following the
> root element must be well-formed.
>at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)


conf/context.xml is the *default* configuration, which provides a
baseline for other context definitions.  You can't put multiple
definitions in there.

The others are individually placed like so:

 conf/Catalina/localhost/ROOT.xml
 conf/Catalina/localhost/mycontext.xml
 conf/Catalina/localhost/manager.xml
 conf/Catalina/localhost/example-app.xml


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


multiple Context elements in conf/context.xml file

2010-09-03 Thread Tom H


my existing conf/context.xml file has already a  element;

   WEB-INF/web.xml



I would like to add another to allow access to the /manager/status 
location to my monitoring, however adding a new Context element like so;


conf/context.xml


   WEB-INF/web.xml







breaks the xml, as I presume that file needs a single root element to 
lint/parse ok
SEVERE: Parse Fatal Error at line 6 column 2: The markup in the document 
following the root element must be well-formed.
org.xml.sax.SAXParseException: The markup in the document following the 
root element must be well-formed.
   at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)


Any suggestions on how to add that?

Thanks,
Tom



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



RE: Host Manager.

2010-09-03 Thread Jeffrey Janner
> -Original Message-
> From: Pid [mailto:p...@pidster.com]
> Sent: Thursday, September 02, 2010 7:57 PM
> To: Tomcat Users List
> Subject: Re: Host Manager.
> 
> On 02/09/2010 21:06, Caldarale, Charles R wrote:
> >> From: Wesley Acheson [mailto:wesley.ache...@gmail.com]
> >> Subject: Host Manager.
> >
> >> Is there is no documentation for the host-manager?
> >
> > Very little that I've found.  You can learn a bit about it by
looking
> at its WEB-INF/web.xml file.
> >
> >> If I remember correctly from this list it doesn't persist its
> >> settings is that correct?
> >
> > Correct.
> >
> >> How many people would be interested in it persisting its settings,
> by
> >> editing the appropriate files.
> >
> > I would be interested.  Note that there's only one file to edit:
> conf/server.xml.
> >
> >> Is that in theory possible?
> >
> > It's all software...
> >
> >> to add the folder structure and the appropiate context.xml files.
> >
> > That's not necessary - the conf/Catalina/[host]/... files are
already
> created automatically as webapps are deployed under the new .
> Only conf/server.xml needs to be updated.
> >
> >> Would it interfere too badly with tomcat while it was running?
> >
> > No, Tomcat only reads server.xml during startup.  Whatever update
> mechanism is used must insure that the file is never in an unparsable
> state (e.g., don't update in place, instead create a new file and then
> rename it).
> 
> May I gently steer you in the direction of the JMX API and the
> Catalina:type=Server.Operations.storeConfig() command?
> 
> Not sure it works very well at the moment, but if it did...
> 
> p
> 

Well, it certainly meets my requirement that it writes it out sans
comments.
I added two hosts, smith & wesson, to an out-of-the-box 5.5.29 setup on
Windows. For smith, I just proved a name and appbase. For wesson, I also
unchecked AutoDeploy and DeployXML. I used jconsole to run the
storeConfig(), and it renamed the old file to server.xml.timestamp and
then wrote out a new server.xml sans comments.  It appears that it
doesn't write out anything that might be default settings.  It didn't
write out a port or shutdown value for  and left out some
parameters for the  for port 8080.  It actually added a
connectionTimout="-1" to the AJP connector.  You can see the results
below.
All in all, it's not a great or perfect solution, but it is workable.



  
  
  
  
  


  
  





  
  
  
  
  
  
  

  

__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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



Re: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread André Warnier

Caldarale, Charles R wrote:
From: Michele Mase' [mailto:michele.m...@gmail.com] 
Subject: Re: Anyone? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux



For Chuck
Is Java really cross-platform?


Definitely - once the JRE is ported to the platform of interest.  But down in 
the guts of the JRE, there is a fair amount of platform-specific code, some 
written in C++, some C, and some in Java.  This is unfortunately necessary due 
to the differing APIs and functional semantics of the various platforms; 
consequently, different platforms may have different bugs.  (Or problems on 
just different CPU chips, such as the recent errors seen in certain String 
methods when run on Intel CPUs with SSE 4.2 instructions enabled.)


let me re-explain this in ASCII graphics :

MachineMachineMachine
type A type B type C

JVM 1.6.x  JVM 1.6.x  JVM 1.6.x
for type A for type B for type C

 \  |/

Java application code (*)

The Java application code (*) is perfectly cross-platform, in the sense that it should run 
on any of the machines.  That is because all the above JVM's will (or should) run the same 
Java code in the same way.
In other words : the java application code does not "see" the real machine; it sees only 
the "Java virtual machine" (JVM).


But the JVMs themselves are different, because they need to be specific to each 
machine type.

That is the ideal goal of Java.
In the practice, it is 99.9% that way, but there can be small differences due to the 
underlying platform (or to a bug in a JVM), that could make some Java code run a little 
bit differently on each platform.



(*) of which the Tomcat code is one example, and your webapp is another example.
Tomcat just starts your webapp and gives it a certain environment.  But it is the JVM 
which "runs" your webapp.



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



Re: Unexpected errors after opening port 80

2010-09-03 Thread Pid
On 03/09/2010 16:01, Caldarale, Charles R wrote:
>> From: Pid [mailto:p...@pidster.com] 
>> Subject: Re: Unexpected errors after opening port 80
> 
>> How does this have any bearing on a firewall port being 
>> opening and some database errors?
> 
> It's possible that opening port 80 has enabled a much larger set of attacks 
> to get through the firewall now, and make it to the back end.  If the webapps 
> under Tomcat should be accessible only via HTTPS, they should have a 
>  setting of CONFIDENTIAL in their WEB-INF/web.xml files; 
> this will stop all regular HTTP requests dead in their tracks.  (Or you could 
> just remove the port 80 .)  If you want to keep port 80 open for 
> in-house use, you can add a valve to insure that only known IP addresses come 
> through that door.

Fair point.


p

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



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread Caldarale, Charles R
> From: Michele Mase' [mailto:michele.m...@gmail.com] 
> Subject: Re: Anyone? intermittent javax.net.ssl.SSLException: Invalid 
> padding tomcat6.x axis 1.4 jdk 1.5 linux

> For Chuck
> Is Java really cross-platform?

Definitely - once the JRE is ported to the platform of interest.  But down in 
the guts of the JRE, there is a fair amount of platform-specific code, some 
written in C++, some C, and some in Java.  This is unfortunately necessary due 
to the differing APIs and functional semantics of the various platforms; 
consequently, different platforms may have different bugs.  (Or problems on 
just different CPU chips, such as the recent errors seen in certain String 
methods when run on Intel CPUs with SSE 4.2 instructions enabled.)

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



RE: Unexpected errors after opening port 80

2010-09-03 Thread Caldarale, Charles R
> From: Pid [mailto:p...@pidster.com] 
> Subject: Re: Unexpected errors after opening port 80

> How does this have any bearing on a firewall port being 
> opening and some database errors?

It's possible that opening port 80 has enabled a much larger set of attacks to 
get through the firewall now, and make it to the back end.  If the webapps 
under Tomcat should be accessible only via HTTPS, they should have a 
 setting of CONFIDENTIAL in their WEB-INF/web.xml files; 
this will stop all regular HTTP requests dead in their tracks.  (Or you could 
just remove the port 80 .)  If you want to keep port 80 open for 
in-house use, you can add a valve to insure that only known IP addresses come 
through that door.

 - 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: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread Michele Mase'
For Andrè
If you read in a better way my mail, you find the attachment
*wsloader.txt *that
is the code of the bad webapp :D
For Chuck
Is Java really cross-platform?
For all:
I forgot to tell you that we are using the Strong Cryptography Library "
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy
Files 5.0" and the webservices that are on the other side run unde IBM
websphere.
For linux:
I don't want to migrate the application on windowz (my boss choice)
For all:
Be patient for (if/any) my english mistakes

Michele

On Fri, Sep 3, 2010 at 3:11 PM, André Warnier  wrote:

> Michele,
>
> I just want to clarify my previous answers :
>
> I am not saying that the problem that you encounter is *necessarily* a bug
> in one or the other JVM.
> You have not shown the code of your webapp, so we cannot tell you that the
> problem is there either.
> One thing we can tell you, is that the problem, as you show it, is *not* in
> the Tomcat code, because in this case Tomcat does not participate in what
> your webapp is doing.  It is your webapp, and your webapp alone, which sets
> up this SSL connection with another server.  The Tomcat code is not involved
> in this.
> Without a very detailed examination of your webapp code, it is not possible
> to say if the problem is there, and I doubt that anyone here really has the
> time or inclination to study your webapp code in detail.
> But on the surface, I would say that the chances are at least 10:1 that it
> is your webapp code that generates the problem.  It may be doing something
> unsafe, which for some reason to do with the different platforms, or
> differences in the JVMs between those platforms, or differences between the
> loads on these platforms, shows up under Linux and not under Windows.
> So the recommendation to try a more recent JVM is not because I am sure
> that it is 100% of the solution to your problem.  But it is the "cheapest"
> way to find out if by changing the environment a little bit, the problem
> still appears in the same way, or not.
>
> Under both Windows and Linux, you should be able to install a 1.6 JVM next
> to the 1.5 JVM, and then just set the JAVA_HOME environment variable of your
> Tomcat, to run under the one or the other.
>
> Maybe if you upgrade both the Windows and the Linux JVM to 1.6.21, then the
> problem will start appearing on both platforms.  That would be a clearer
> sign that the problem is in the webapp.
> And if the problem then still appears only under Linux, then it is worth
> looking deeper.
> If the problem does not appear at all anymore, then there are 2
> possibilities :
> - the problem was due to a bug in the Linux 1.5 JVM or one of the
> underlying native libraries
> OR
> - the problem is still in the webapp, but it does not show up so easily
> anymore under the 1.6 JVM (that would be the worse outcome, because then you
> are not sure anymore when it will hit you again)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> André Warnier wrote:
>
>> Michele Mase' wrote:
>>
>>> Both windoz and linux use the same java :(
>>>
>>
>> Well no, they are NOT the same, even if they have the same version.
>> The "Windows java JVM" is a Windows executable program (java.exe).  The
>> Linux java JVM is a Linux executable program.  Each is compiled from
>> presumably much the same code, but there are significant differences between
>> them, such as for example the fact that they are linked to different native
>> libraries (DLLs under Windows, .so libraries under Unix/Linux).
>>
>> So a bug can exist in one, and not in the other.
>> And code that has to do with TCP/IP and SSL is likely quite different
>> under each platform.
>>
>> Anyway, java 1.5.0 is quite old.
>>  From the java website :
>>
>> J2SE 5.0 End of Service Life Notice
>> J2SE 5.0 reached its End of Service Life (EOSL) on November 3, 2009, which
>> is the date of the final publicly available update of version 5.0 (J2SE 5.0
>> Update 22).
>>
>> You should try a recent 1.6 release (1.6.21 ?), and see if the problem
>> still exists.
>> Or you can continue posting the same question on this forum every couple
>> of months, but it is unlikely that anyone would be very interested in
>> investigating much further, until you try it and report that the issue
>> appears in a recent JVM too.
>>
>>
>>
>>> On Fri, Sep 3, 2010 at 12:01 PM, André Warnier  wrote:
>>>
>>>  Hi.

 From what I can see below (and what you explain yourself), this problem
 has
 nothing to do with Tomcat.  It is the (your) webapp which uses an SSL
 connection to some other server, and which receives this exception.
  Tomcat
 does not even know that this is happening.
 Tomcat in this case is just the engine which runs your webapp.

 What may have something to do with the error, is the java JVM which is
 used
 to run both Tomcat and your webapp.  Have you tried updating the JVM to
 a
 more recent version (like 1.6) ? You can run the same Tomcat (and your

Re: Unexpected errors after opening port 80

2010-09-03 Thread Pid
On 03/09/2010 15:33, Faro Stephen (NHS Connecting for Health) wrote:
> I am running a Tomcat server on Windows Server 2003 RC2 over HTTPS (443). The 
> server has been running smoothly for many months with 100s of thousands of 
> daily transactions.

Excellent.

> Yesterday my networks team modified the firewall rules to permit traffic on 
> port 80, it could be a coincidence but after this we had 8 errors calling 
> Oracle Procedures on a separate Unix based Oracle DB server and 2 errors 
> connecting to a remote API. These errors were unspecific and we believe they 
> were due to network timeouts / dropped packets, as a last resort we restarted 
> the Tomcat server and have not seen any errors since. The only reference to 
> port 80 in the Tomcat config is (server.xml)...

So the server was internal only before?

>  port="80" protocol="HTTP/1.1"
> connectionTimeout="2"
> redirectPort="443" />
> 
> I am not a Tomcat expert and don't fully understand Tomcats Thread Pooling 
> but could this be in any way related to our errors observed before the 
> restart?


The errors you describe are pretty vague, it's hard to know what we're
responding to.

If you have an Executor configured, and referenced in the Connector, the
latter uses the associated thread pool, which has some advantages.

How does this have any bearing on a firewall port being opening and some
database errors?


p

> Thanks for your help in advance.
> 
> Steve
> 
> Stephen Faro
> Analyst Programmer
> 
> 
> 
> 
> 
> This message may contain confidential information. If you are not the 
> intended recipient please inform the
> sender that you have received the message in error before deleting it.
> Please do not disclose, copy or distribute information in this e-mail or take 
> any action in reliance on its contents:
> to do so is strictly prohibited and may be unlawful.
> 
> Thank you for your co-operation.
> 
> NHSmail is the secure email and directory service available for all NHS staff 
> in England and Scotland
> NHSmail is approved for exchanging patient data and other sensitive 
> information with NHSmail and GSI recipients
> NHSmail provides an email address for your career in the NHS and can be 
> accessed anywhere
> For more information and to find out how you can switch, visit 
> www.connectingforhealth.nhs.uk/nhsmail
> 
> 
> 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Unexpected errors after opening port 80

2010-09-03 Thread Faro Stephen (NHS Connecting for Health)
I am running a Tomcat server on Windows Server 2003 RC2 over HTTPS (443). The 
server has been running smoothly for many months with 100s of thousands of 
daily transactions.

Yesterday my networks team modified the firewall rules to permit traffic on 
port 80, it could be a coincidence but after this we had 8 errors calling 
Oracle Procedures on a separate Unix based Oracle DB server and 2 errors 
connecting to a remote API. These errors were unspecific and we believe they 
were due to network timeouts / dropped packets, as a last resort we restarted 
the Tomcat server and have not seen any errors since. The only reference to 
port 80 in the Tomcat config is (server.xml)...



I am not a Tomcat expert and don't fully understand Tomcats Thread Pooling but 
could this be in any way related to our errors observed before the restart?

Thanks for your help in advance.

Steve

Stephen Faro
Analyst Programmer





This message may contain confidential information. If you are not the intended 
recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take 
any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff 
in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information 
with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be 
accessed anywhere
For more information and to find out how you can switch, visit 
www.connectingforhealth.nhs.uk/nhsmail




Re: [email] Dynamic attachments in mailer taglib 2 using JavaBean

2010-09-03 Thread Pid
On 03/09/2010 14:36, Wesley Acheson wrote:
> No Ferindo. What he's saying is you are calling the class not an instance of
> the class.
> 
> You can only call a class if the method is stactic.
> http://download.oracle.com/javase/tutorial/java/javaOO/classvars.html



http://java.sun.com/products/jsp/tags/11/syntaxref11.fm14.html

You've defined 'getFilePath' as the instance name, so that's what you
need to refer to, rather than the Class name, as Wesley explained.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [email] Dynamic attachments in mailer taglib 2 using JavaBean

2010-09-03 Thread Wesley Acheson
No Ferindo. What he's saying is you are calling the class not an instance of
the class.

You can only call a class if the method is stactic.
http://download.oracle.com/javase/tutorial/java/javaOO/classvars.html



On Fri, Sep 3, 2010 at 3:32 PM, Ferindo Middleton <
ferindo.middle...@gmail.com> wrote:

> That's what I can't understand. Should my call to the bean be a valid
> non-static code to get that value? I am new to java & javabeans. The
> statement you wrote is exactly my statement in the JSP:
>
> > .getTempFilePath()
> Is the same as:
>
> > RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath()
>
>
> How else do I make this statement in a non-static way?
>
> Ferindo
>
> On Sep 3, 2010, at 7:13 AM, Pid  wrote:
>
> > On 03/09/2010 04:49, Ferindo Middleton wrote:
> >> I've written a javabean that connects to a database, downloads a file,
> >> and one of the getter methods returns the complete file path to the
> >> file.
> >>
> >> The problem I have is: when the JSP runs and gets to the part where it
> >> gets the file path to pass to the taglib, I get an error message that
> >> is typical of a reference to a nonstatic variable. This concerns me as
> >> I thout getter methods in javabeans would inherently returns values
> >> that are valid instance variables in a JSP.
> >>
> >> I will paste my getter method below, the JSP call to that method and
> >> the error message below: any guidance is welcome. Thank you:
> >>
> >> Getter method in jsvabean (javabean compiles fine):
> >>
> >>public String getTempFilePath() {
> >>this.downloadedfilename=
> >> tempFilePath;
> >>return this.downloadedfilename;
> >>
> >>  }
> >>
> >> JSP call to getter method above:
> >>
> >> >>class="hall.RadTicketsFileDownloadForEmailAttachmentBean">
> >>>>  property="fileId"
> >>  value="${all_attachments_for_this_ticket_row.id}" />
> >>
> >>>>  property="originalFileName"
> >>  value="${all_attachments_for_this_ticket_row.attachment_name}" />
> >>
> >> >> var="all_attachments_for_this_ticket_row">
> >>
> >>
> >>
> >><%-- /RadTicketsFileDownloadForEmailAttachment?attachmentId=${
> >> all_attachments_for_this_ticket_row.id
> }&fileName=${all_attachments_for_this_ticket_row.attachment_name}
> >> --%>
> >> >>name="${all_attachments_for_this_ticket_row.attachment_name}"
> >>filename="<%=
> >> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> ... And the error message:
> >>
> >> org.apache.jasper.JasperException: Unable to compile class for JSP:
> >>
> >> An error occurred at line: 97 in the jsp file:
> >>
> /web/radtickets/ticket_email_response/ticket_email_response_dispatcher_page.jsp
> >> Cannot make a static reference to the non-static method
> >> getTempFilePath() from the type
> >> RadTicketsFileDownloadForEmailAttachmentBean
> >> 94:
> >> 95:
> >> 96:<%--
> /RadTicketsFileDownloadForEmailAttachment?attachmentId=${
> all_attachments_for_this_ticket_row.id
> }&fileName=${all_attachments_for_this_ticket_row.attachment_name}
> >> --%>
> >> 97: >> 98:name="${all_attachments_for_this_ticket_row.attachment_name}"
> >
> >> 99:filename="<%=
> >> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
> >> 100:
> >
> > So don't make a static reference to the bean:
> >
> > RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath()
> >
> > .getTempFilePath()
> >
> >
> > p
> > <0x62590808.asc>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: [email] Dynamic attachments in mailer taglib 2 using JavaBean

2010-09-03 Thread Ferindo Middleton
That's what I can't understand. Should my call to the bean be a valid
non-static code to get that value? I am new to java & javabeans. The
statement you wrote is exactly my statement in the JSP:

> .getTempFilePath()
Is the same as:

> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath()


How else do I make this statement in a non-static way?

Ferindo

On Sep 3, 2010, at 7:13 AM, Pid  wrote:

> On 03/09/2010 04:49, Ferindo Middleton wrote:
>> I've written a javabean that connects to a database, downloads a file,
>> and one of the getter methods returns the complete file path to the
>> file.
>>
>> The problem I have is: when the JSP runs and gets to the part where it
>> gets the file path to pass to the taglib, I get an error message that
>> is typical of a reference to a nonstatic variable. This concerns me as
>> I thout getter methods in javabeans would inherently returns values
>> that are valid instance variables in a JSP.
>>
>> I will paste my getter method below, the JSP call to that method and
>> the error message below: any guidance is welcome. Thank you:
>>
>> Getter method in jsvabean (javabean compiles fine):
>>
>>public String getTempFilePath() {
>>this.downloadedfilename=
>> tempFilePath;
>>return this.downloadedfilename;
>>
>>  }
>>
>> JSP call to getter method above:
>>
>>>class="hall.RadTicketsFileDownloadForEmailAttachmentBean">
>>   >  property="fileId"
>>  value="${all_attachments_for_this_ticket_row.id}" />
>>
>>   >  property="originalFileName"
>>  value="${all_attachments_for_this_ticket_row.attachment_name}" />
>>
>>> var="all_attachments_for_this_ticket_row">
>>
>>
>>
>><%-- /RadTicketsFileDownloadForEmailAttachment?attachmentId=${
>> all_attachments_for_this_ticket_row.id}&fileName=${all_attachments_for_this_ticket_row.attachment_name}
>> --%>
>>>name="${all_attachments_for_this_ticket_row.attachment_name}"
>>filename="<%=
>> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
>>
>>
>>
>>
>>
>>
>>
>> ... And the error message:
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP:
>>
>> An error occurred at line: 97 in the jsp file:
>> /web/radtickets/ticket_email_response/ticket_email_response_dispatcher_page.jsp
>> Cannot make a static reference to the non-static method
>> getTempFilePath() from the type
>> RadTicketsFileDownloadForEmailAttachmentBean
>> 94:
>> 95:
>> 96:<%-- 
>> /RadTicketsFileDownloadForEmailAttachment?attachmentId=${all_attachments_for_this_ticket_row.id}&fileName=${all_attachments_for_this_ticket_row.attachment_name}
>> --%>
>> 97:> 98:name="${all_attachments_for_this_ticket_row.attachment_name}"
>
>> 99:filename="<%=
>> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
>> 100:
>
> So don't make a static reference to the bean:
>
> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath()
>
> .getTempFilePath()
>
>
> p
> <0x62590808.asc>

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



RE: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] 
> Subject: Re: Anyone? intermittent javax.net.ssl.SSLException: Invalid 
> padding tomcat6.x axis 1.4 jdk 1.5 linux

> > Both windoz and linux use the same java :(

That is a myth.  Besides the points André brings up, even the .class files of 
the JRE are different.  The rt.jar file for Linux is *not* the same as the one 
for Windows.

 - 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: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread André Warnier

Michele,

I just want to clarify my previous answers :

I am not saying that the problem that you encounter is *necessarily* a bug in one or the 
other JVM.
You have not shown the code of your webapp, so we cannot tell you that the problem is 
there either.
One thing we can tell you, is that the problem, as you show it, is *not* in the Tomcat 
code, because in this case Tomcat does not participate in what your webapp is doing.  It 
is your webapp, and your webapp alone, which sets up this SSL connection with another 
server.  The Tomcat code is not involved in this.
Without a very detailed examination of your webapp code, it is not possible to say if the 
problem is there, and I doubt that anyone here really has the time or inclination to study 
your webapp code in detail.
But on the surface, I would say that the chances are at least 10:1 that it is your webapp 
code that generates the problem.  It may be doing something unsafe, which for some reason 
to do with the different platforms, or differences in the JVMs between those platforms, or 
differences between the loads on these platforms, shows up under Linux and not under Windows.
So the recommendation to try a more recent JVM is not because I am sure that it is 100% of 
the solution to your problem.  But it is the "cheapest" way to find out if by changing the 
environment a little bit, the problem still appears in the same way, or not.


Under both Windows and Linux, you should be able to install a 1.6 JVM next to the 1.5 JVM, 
and then just set the JAVA_HOME environment variable of your Tomcat, to run under the one 
or the other.


Maybe if you upgrade both the Windows and the Linux JVM to 1.6.21, then the problem will 
start appearing on both platforms.  That would be a clearer sign that the problem is in 
the webapp.

And if the problem then still appears only under Linux, then it is worth 
looking deeper.
If the problem does not appear at all anymore, then there are 2 possibilities :
- the problem was due to a bug in the Linux 1.5 JVM or one of the underlying 
native libraries
OR
- the problem is still in the webapp, but it does not show up so easily anymore under the 
1.6 JVM (that would be the worse outcome, because then you are not sure anymore when it 
will hit you again)


















André Warnier wrote:

Michele Mase' wrote:

Both windoz and linux use the same java :(


Well no, they are NOT the same, even if they have the same version.
The "Windows java JVM" is a Windows executable program (java.exe).  The 
Linux java JVM is a Linux executable program.  Each is compiled from 
presumably much the same code, but there are significant differences 
between them, such as for example the fact that they are linked to 
different native libraries (DLLs under Windows, .so libraries under 
Unix/Linux).


So a bug can exist in one, and not in the other.
And code that has to do with TCP/IP and SSL is likely quite different 
under each platform.


Anyway, java 1.5.0 is quite old.
 From the java website :

J2SE 5.0 End of Service Life Notice
J2SE 5.0 reached its End of Service Life (EOSL) on November 3, 2009, 
which is the date of the final publicly available update of version 5.0 
(J2SE 5.0 Update 22).


You should try a recent 1.6 release (1.6.21 ?), and see if the problem 
still exists.
Or you can continue posting the same question on this forum every couple 
of months, but it is unlikely that anyone would be very interested in 
investigating much further, until you try it and report that the issue 
appears in a recent JVM too.





On Fri, Sep 3, 2010 at 12:01 PM, André Warnier  wrote:


Hi.

From what I can see below (and what you explain yourself), this 
problem has

nothing to do with Tomcat.  It is the (your) webapp which uses an SSL
connection to some other server, and which receives this exception.  
Tomcat

does not even know that this is happening.
Tomcat in this case is just the engine which runs your webapp.

What may have something to do with the error, is the java JVM which 
is used
to run both Tomcat and your webapp.  Have you tried updating the JVM 
to a

more recent version (like 1.6) ? You can run the same Tomcat (and your
webapp) under the newer JVM without any change.

The reason why it happens under Linux and not under Windows, is most
probably because the JVM is different.


Michele Mase' wrote:


On Sun, Jul 25, 2010 at 9:06 PM, Michele Mase' 
wrote:

 Hi folks!
I've a strange problem, please help me to find a solution (not 
telling me

to make a script in order restart tomcat in case of the exception)
Under linux environment,
RedHat EL5.5
Jdk 1.5.0_22
Tomcat6.0.26
axis1.4
our webapps takes strange intermittent "javax.net.ssl.SSLException:
Invalid
padding" errors.
The same webapp under a windows system never catches the exception
The webapps uses tomcat like a client with the axis library (1.4 
version

only, it is non axis <1.4 capable) in order to connect to an external
webservice with https.
You catch the exception after 1

Re: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread André Warnier

Michele Mase' wrote:

Both windoz and linux use the same java :(


Well no, they are NOT the same, even if they have the same version.
The "Windows java JVM" is a Windows executable program (java.exe).  The Linux java JVM is 
a Linux executable program.  Each is compiled from presumably much the same code, but 
there are significant differences between them, such as for example the fact that they are 
linked to different native libraries (DLLs under Windows, .so libraries under Unix/Linux).


So a bug can exist in one, and not in the other.
And code that has to do with TCP/IP and SSL is likely quite different under 
each platform.

Anyway, java 1.5.0 is quite old.
From the java website :

J2SE 5.0 End of Service Life Notice
J2SE 5.0 reached its End of Service Life (EOSL) on November 3, 2009, which is the date of 
the final publicly available update of version 5.0 (J2SE 5.0 Update 22).


You should try a recent 1.6 release (1.6.21 ?), and see if the problem still 
exists.
Or you can continue posting the same question on this forum every couple of months, but it 
is unlikely that anyone would be very interested in investigating much further, until you 
try it and report that the issue appears in a recent JVM too.





On Fri, Sep 3, 2010 at 12:01 PM, André Warnier  wrote:


Hi.

From what I can see below (and what you explain yourself), this problem has
nothing to do with Tomcat.  It is the (your) webapp which uses an SSL
connection to some other server, and which receives this exception.  Tomcat
does not even know that this is happening.
Tomcat in this case is just the engine which runs your webapp.

What may have something to do with the error, is the java JVM which is used
to run both Tomcat and your webapp.  Have you tried updating the JVM to a
more recent version (like 1.6) ? You can run the same Tomcat (and your
webapp) under the newer JVM without any change.

The reason why it happens under Linux and not under Windows, is most
probably because the JVM is different.


Michele Mase' wrote:


On Sun, Jul 25, 2010 at 9:06 PM, Michele Mase' 
wrote:

 Hi folks!

I've a strange problem, please help me to find a solution (not telling me
to make a script in order restart tomcat in case of the exception)
Under linux environment,
RedHat EL5.5
Jdk 1.5.0_22
Tomcat6.0.26
axis1.4
our webapps takes strange intermittent "javax.net.ssl.SSLException:
Invalid
padding" errors.
The same webapp under a windows system never catches the exception
The webapps uses tomcat like a client with the axis library (1.4 version
only, it is non axis <1.4 capable) in order to connect to an external
webservice with https.
You catch the exception after 1 hour of work, 5, 7 hours and more than 24
hours of work.
Once the exception is catched, the only solution to make the webapp can
work again, is to restart the tomcat.
Under the windows machine we never caught the exception.

Attachments:
wsloader.txt is the code for the invocation of webservices.
I also attach the wireshark compatible files of both situations:
interop91ko.enc when it doesn't work; you can take a look at the pattern
294.  http://www.ietf.org/rfc/rfc2246.txt?number=2246

bad_record_mac
  This alert is returned if a record is received with an incorrect
  MAC. This message is always fatal.

interop91ok.enc when it work

The attachment logs-ko.txt is the application log when it doesn't work
The attachment logs-ok.txt is the application log when it works.

pls, Help me! My boss wants to use the webapp under windows (migrating it
from linux) since in windoz test environment we have never seen the
exception

Regards Michele Masè







-
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: [email] Dynamic attachments in mailer taglib 2 using JavaBean

2010-09-03 Thread Pid
On 03/09/2010 04:49, Ferindo Middleton wrote:
> I've written a javabean that connects to a database, downloads a file,
> and one of the getter methods returns the complete file path to the
> file.
> 
> The problem I have is: when the JSP runs and gets to the part where it
> gets the file path to pass to the taglib, I get an error message that
> is typical of a reference to a nonstatic variable. This concerns me as
> I thout getter methods in javabeans would inherently returns values
> that are valid instance variables in a JSP.
> 
> I will paste my getter method below, the JSP call to that method and
> the error message below: any guidance is welcome. Thank you:
> 
> Getter method in jsvabean (javabean compiles fine):
> 
> public String getTempFilePath() {
> this.downloadedfilename=
> tempFilePath;
> return this.downloadedfilename;
> 
>   }
> 
> JSP call to getter method above:
> 
>  class="hall.RadTicketsFileDownloadForEmailAttachmentBean">
>   property="fileId"
>   value="${all_attachments_for_this_ticket_row.id}" />
> 
>   property="originalFileName"
>   value="${all_attachments_for_this_ticket_row.attachment_name}" />
> 
>  var="all_attachments_for_this_ticket_row">
> 
> 
> 
> <%-- /RadTicketsFileDownloadForEmailAttachment?attachmentId=${
> all_attachments_for_this_ticket_row.id}&fileName=${all_attachments_for_this_ticket_row.attachment_name}
> --%>
>  name="${all_attachments_for_this_ticket_row.attachment_name}"
> filename="<%=
> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
> 
> 
> 
> 
> 
> 
> 
> ... And the error message:
> 
> org.apache.jasper.JasperException: Unable to compile class for JSP:
> 
> An error occurred at line: 97 in the jsp file:
> /web/radtickets/ticket_email_response/ticket_email_response_dispatcher_page.jsp
> Cannot make a static reference to the non-static method
> getTempFilePath() from the type
> RadTicketsFileDownloadForEmailAttachmentBean
> 94:   
> 95:
> 96:   <%-- 
> /RadTicketsFileDownloadForEmailAttachment?attachmentId=${all_attachments_for_this_ticket_row.id}&fileName=${all_attachments_for_this_ticket_row.attachment_name}
> --%>
> 97:98:   name="${all_attachments_for_this_ticket_row.attachment_name}"

> 99:   filename="<%=
> RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" />
> 100:

So don't make a static reference to the bean:

 RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath()

 .getTempFilePath()


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread Michele Mase'
Both windoz and linux use the same java :(

On Fri, Sep 3, 2010 at 12:01 PM, André Warnier  wrote:

> Hi.
>
> From what I can see below (and what you explain yourself), this problem has
> nothing to do with Tomcat.  It is the (your) webapp which uses an SSL
> connection to some other server, and which receives this exception.  Tomcat
> does not even know that this is happening.
> Tomcat in this case is just the engine which runs your webapp.
>
> What may have something to do with the error, is the java JVM which is used
> to run both Tomcat and your webapp.  Have you tried updating the JVM to a
> more recent version (like 1.6) ? You can run the same Tomcat (and your
> webapp) under the newer JVM without any change.
>
> The reason why it happens under Linux and not under Windows, is most
> probably because the JVM is different.
>
>
> Michele Mase' wrote:
>
>> On Sun, Jul 25, 2010 at 9:06 PM, Michele Mase' > >wrote:
>>
>>  Hi folks!
>>> I've a strange problem, please help me to find a solution (not telling me
>>> to make a script in order restart tomcat in case of the exception)
>>> Under linux environment,
>>> RedHat EL5.5
>>> Jdk 1.5.0_22
>>> Tomcat6.0.26
>>> axis1.4
>>> our webapps takes strange intermittent "javax.net.ssl.SSLException:
>>> Invalid
>>> padding" errors.
>>> The same webapp under a windows system never catches the exception
>>> The webapps uses tomcat like a client with the axis library (1.4 version
>>> only, it is non axis <1.4 capable) in order to connect to an external
>>> webservice with https.
>>> You catch the exception after 1 hour of work, 5, 7 hours and more than 24
>>> hours of work.
>>> Once the exception is catched, the only solution to make the webapp can
>>> work again, is to restart the tomcat.
>>> Under the windows machine we never caught the exception.
>>>
>>> Attachments:
>>> wsloader.txt is the code for the invocation of webservices.
>>> I also attach the wireshark compatible files of both situations:
>>> interop91ko.enc when it doesn't work; you can take a look at the pattern
>>> 294.  http://www.ietf.org/rfc/rfc2246.txt?number=2246
>>>
>>> bad_record_mac
>>>   This alert is returned if a record is received with an incorrect
>>>   MAC. This message is always fatal.
>>>
>>> interop91ok.enc when it work
>>>
>>> The attachment logs-ko.txt is the application log when it doesn't work
>>> The attachment logs-ok.txt is the application log when it works.
>>>
>>> pls, Help me! My boss wants to use the webapp under windows (migrating it
>>> from linux) since in windoz test environment we have never seen the
>>> exception
>>>
>>> Regards Michele Masè
>>>
>>>
>>>
>>
>> 
>>
>>
>> -
>> 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: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to work

2010-09-03 Thread Pid
On 03/09/2010 07:31, AVSUNIL wrote:
> 
> Tomcat ver 5.0.19

Which was released 2004-08-28, over 6 years ago.

The most recent v5.0.29 was released 2005-02-19 - because 5.0.x is no
longer supported.  Upgrading to the latest 5.5 shouldn't be too much of
a trauma - you're already on Java 5.


I'm not sure it'll cure your problem, but it's a Really Good Idea.


p


> JVM 1.5
> Linux platform
> No exceptions in logs
> Single SIgn On mode works through a load balancer
> Normal mode URL hits the individual server directly
> In below mail, the jsp name was put incorrectly. It is always invoking
> myapp.jsp 
> 
> From the web.xml I infer that if listings or 404 error will be displayed
> based on settings in defaultServlet settings, if the welcome files are
> missing. Now the question is welcome file (myapp.jsp) is present in
> webapps/WEB-INF/jsp diretcory of application. Why does it not find the same
> first time and why will it find it after one mroe restart
> 
> --
> 
> 
> n828cl wrote:
>>
>>> From: Sunil A V [mailto:sunil...@infosys.com] 
>>> Subject: Tomcat Web App - Strange Issue - Need 2 restarts for SSO mode to
>>> work
>>
>> Tomcat version?  JVM level?  Platform?  Anything of interest in the Tomcat
>> logs?
>>
>>> The web application is available through 2 modes of links -
>>> one is regular without load balacer and other is Single Sign
>>> On based through load balancer.
>>
>> Please explain how that is configured.  Are they completely separate
>> Tomcat instances on different boxes?
>>
>>> Deployment Procedure:
>>> Stop the server
>>> Copy the new war to webapps replacing the old one
>>> remove the complete diretcory of MyApp recursively (rm -rf MyApp)
>>> start the server
>>
>> Should be ok, although it's a bit heavy-handed.
>>
>>> We try both the links of application.
>>
>> What is a "link"?
>>
>>> Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has
>>> below
>>> 
>>> myapp.jsp
>>> 
>>
>> Which leaves directory listings enabled for the webapp.
>>
>>> The application has only myapp.jsp and none of index.* files
>>
>>> Tomcat might not be finding xcard.jsp
>>
>> Why would it?  Based on your description of the file contents, there is no
>> xcard.jsp, just a myapp.jsp.
>>
>>  - 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
>>
>>
>>
> 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: URL Rewrite

2010-09-03 Thread Ognjen Blagojevic

On 3.9.2010 12:02, michel wrote:

I have been using the tuckey urlrewrite with some results, in that if I want to 
have an incoming URL coming in as
gallery/pic20 gets changed to gallery.jsp?pic=20
But the tool bar URL gets displayed as   gallery.jsp?pic=20
and I want to display  gallery/pic20


Just use rule, not outbond-rule:


  /gallery/pic([0-9]+)
  /gallery.jsp?pic=$1


-Ognjen

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



Re: URL Rewrite

2010-09-03 Thread Pid
On 03/09/2010 11:02, michel wrote:
> I have been using the tuckey urlrewrite with some results, in that if I want 
> to have an incoming URL coming in as
> 
> gallery/pic20 gets changed to gallery.jsp?pic=20
> 
> But the tool bar URL gets displayed as   gallery.jsp?pic=20
> 
> and I want to display  gallery/pic20 
> 
> I tried the '', but that didn't have any effect. I also did 
> some reading, and there was some talk about internal and external rewrite, 
> but I have no real clue on how and what to do with that either.

I usually solve this problem by writing a Servlet Filter to parse the
URL and supply the id via a request attribute, to the JSP.

 String pathToJsp = "WEB-INF/jsp/item_page.jsp";
 String id = parseId(request.getRequestURL());

 request.setAttribute("id", id);
 request.getRequestDispatcher(pathToJsp).forward(request, response);


Map the url-pattern for the Filter to /gallery/* and you're set.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread André Warnier

Hi.

From what I can see below (and what you explain yourself), this problem has nothing to do 
with Tomcat.  It is the (your) webapp which uses an SSL connection to some other server, 
and which receives this exception.  Tomcat does not even know that this is happening.

Tomcat in this case is just the engine which runs your webapp.

What may have something to do with the error, is the java JVM which is used to run both 
Tomcat and your webapp.  Have you tried updating the JVM to a more recent version (like 
1.6) ? You can run the same Tomcat (and your webapp) under the newer JVM without any change.


The reason why it happens under Linux and not under Windows, is most probably because the 
JVM is different.



Michele Mase' wrote:

On Sun, Jul 25, 2010 at 9:06 PM, Michele Mase' wrote:


Hi folks!
I've a strange problem, please help me to find a solution (not telling me
to make a script in order restart tomcat in case of the exception)
Under linux environment,
RedHat EL5.5
Jdk 1.5.0_22
Tomcat6.0.26
axis1.4
our webapps takes strange intermittent "javax.net.ssl.SSLException: Invalid
padding" errors.
The same webapp under a windows system never catches the exception
The webapps uses tomcat like a client with the axis library (1.4 version
only, it is non axis <1.4 capable) in order to connect to an external
webservice with https.
You catch the exception after 1 hour of work, 5, 7 hours and more than 24
hours of work.
Once the exception is catched, the only solution to make the webapp can
work again, is to restart the tomcat.
Under the windows machine we never caught the exception.

Attachments:
wsloader.txt is the code for the invocation of webservices.
I also attach the wireshark compatible files of both situations:
interop91ko.enc when it doesn't work; you can take a look at the pattern
294.  http://www.ietf.org/rfc/rfc2246.txt?number=2246

bad_record_mac
   This alert is returned if a record is received with an incorrect
   MAC. This message is always fatal.

interop91ok.enc when it work

The attachment logs-ko.txt is the application log when it doesn't work
The attachment logs-ok.txt is the application log when it works.

pls, Help me! My boss wants to use the webapp under windows (migrating it
from linux) since in windoz test environment we have never seen the
exception

Regards Michele Masè








-
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



URL Rewrite

2010-09-03 Thread michel
I have been using the tuckey urlrewrite with some results, in that if I want to 
have an incoming URL coming in as


gallery/pic20 gets changed to gallery.jsp?pic=20


But the tool bar URL gets displayed as   gallery.jsp?pic=20


and I want to display  gallery/pic20 


I tried the '', but that didn't have any effect. I also did some 
reading, and there was some talk about internal and external rewrite, but I 
have no real clue on how and what to do with that either.



Michel


Anyone????? intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x axis 1.4 jdk 1.5 linux

2010-09-03 Thread Michele Mase'
On Sun, Jul 25, 2010 at 9:06 PM, Michele Mase' wrote:

> Hi folks!
> I've a strange problem, please help me to find a solution (not telling me
> to make a script in order restart tomcat in case of the exception)
> Under linux environment,
> RedHat EL5.5
> Jdk 1.5.0_22
> Tomcat6.0.26
> axis1.4
> our webapps takes strange intermittent "javax.net.ssl.SSLException: Invalid
> padding" errors.
> The same webapp under a windows system never catches the exception
> The webapps uses tomcat like a client with the axis library (1.4 version
> only, it is non axis <1.4 capable) in order to connect to an external
> webservice with https.
> You catch the exception after 1 hour of work, 5, 7 hours and more than 24
> hours of work.
> Once the exception is catched, the only solution to make the webapp can
> work again, is to restart the tomcat.
> Under the windows machine we never caught the exception.
>
> Attachments:
> wsloader.txt is the code for the invocation of webservices.
> I also attach the wireshark compatible files of both situations:
> interop91ko.enc when it doesn't work; you can take a look at the pattern
> 294.  http://www.ietf.org/rfc/rfc2246.txt?number=2246
>
> bad_record_mac
>This alert is returned if a record is received with an incorrect
>MAC. This message is always fatal.
>
> interop91ok.enc when it work
>
> The attachment logs-ko.txt is the application log when it doesn't work
> The attachment logs-ok.txt is the application log when it works.
>
> pls, Help me! My boss wants to use the webapp under windows (migrating it
> from linux) since in windoz test environment we have never seen the
> exception
>
> Regards Michele Masè
>
>
public String inviaMessaggio(String username, String password) throws 
ErroreServizio {

Message out_msg = null;

Message in_msg = null;

String s_msg = null;

try{

//se ci sono allegati, li converto

if(getAthIN() != null)

trascodeAttachments();

//Se il soapmessage è in formato B64, lo decodifico

String soapMsg = getSerializedMessage();

if (com.insiel.lz.xml.Base64.isBase64(soapMsg)){

byte[] btin = b64.decode(getSerializedMessage());

s_msg = new String(btin);

}

else

s_msg = soapMsg;

 

 

Service server = new Service();

Call call = (Call) server.createCall();

String wsAddress = getWsAddress();

if ((wsAddress!=null) && (wsAddress.length()>0))

call.setTargetEndpointAddress(new URL(wsAddress));

 

else

throw new Exception("Impossibile caricare l'URL del web-service!");

//Se il servizio usa la Basic-Authentication, questa deve essere aggiunta alle 
proprietà della chiamata

if ((username!=null) && (username.length()>0))

call.setUsername(username);

if ((password!=null) && (password.length()>0))

call.setPassword(password);

//preparazione msg. SOAP

out_msg = new Message(s_msg);

// se ci sono allegati, li aggiungo al messaggio

if(getAttachments() != null){

int numAllegati = getAttachments().size();

for(int i=0; iINFO - 2010-06-11 09:29:23,366 - Classe: 
xmlbean.porte.trattamentoMessaggio.TracciamentoXMLDB - Metodo: esegui - 
Descrizione: Tempo impiegato per espletare il servizio: 
xmlbean.porte.trattamentoMessaggio.TracciamentoXMLDB 27 millisecondi
WARN - 2010-06-11 09:29:23,369 - Classe: com.insiel.lz.eccezione.ErroreArchivio 
- Metodo:  - Descrizione: com.insiel.lz.eccezione.ErroreArchivio Name 
USE_DB is not bound in this Context
%% No cached client session
*** ClientHello, TLSv1
RandomCookie:  GMT: 1276175571 bytes = { 178, 104, 165, 213, 42, 242, 127, 104, 
185, 96, 10, 10, 144, 135, 31, 215, 19, 15, 193, 29, 90, 155, 117, 55, 129, 
146, 158, 37 }
Session ID:  {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, 
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, 
TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, 
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, 
SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, 
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, 
SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, 
SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, 
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods:  { 0 }
***
http-8080-Processor22, WRITE: TLSv1 Handshake, length = 79
http-8080-Processor22, WRITE: SSLv2 client hello message, length = 107
http-8080-Processor22, READ: TLSv1 Handshake, length = 2027
*** ServerHello, TLSv1
RandomCookie:  GMT: 76 bytes = { 47, 165, 19, 221, 87, 70, 210, 132, 119, 202, 
97, 193, 19, 205, 134, 244, 181, 99, 28, 99, 172, 255, 204, 192, 49, 82, 4, 7 }
Session ID:  {0, 0, 1, 3, 106, 113, 89, 150, 68, 243, 18, 1, 225, 101, 242, 
210, 143, 9, 97, 96, 88, 88, 88, 88, 76, 17, 229, 191, 0, 3, 43, 128}
Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA
Compression Method: 0
***
%% Created:  [Session-4, TLS_RSA_WITH_AES_256_CBC_SHA]
** TLS_RSA_WITH_AES_256_CBC_SHA
*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject: CN=mirservicetest.sanita.fi

Re: Best practice to upgrade (redeploy) .war files

2010-09-03 Thread Domenico Briganti
Il giorno ven, 03/09/2010 alle 08.53 +0200, Rainer Frey ha scritto:
> How 
> do you actually upgrade deployed applications? 

There is a recent thread on this topic, see
http://old.nabble.com/Best-practices-for-deployment-on-cluster-environment-td29532493.html

If you need service continuity, you have to use at least 2 Tomcat
instances

Regards, 
Domenico


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



Re: Best practice to upgrade (redeploy) .war files

2010-09-03 Thread Ognjen Blagojevic

Hi,

I just use Tomcat Manager webapp: undeploy and deploy without restarting 
Tomcat. It brings no downtime to other webapps/hosts on the same Tomcat, 
and downtime of the webapp itself is few seconds per deploy.


This is acceptable for me, since the server load is really low.

If a webapp cleans up after itself, it will cause no problems on 
performance.


Regards,
Ognjen


On 3.9.2010 8:53, Rainer Frey wrote:

On Monday 30 August 2010 12:55:19 Rainer Frey wrote:

Hi,


It's not normally my style, but is there really no feedback on this topic?
Does anyone use explicit hot deployment with Tomcat Manager in production? How
do you actually upgrade deployed applications?

And if you use cold deployment only, how do you avoid downtime for other apps?
Do you really use one Tomcat  instance per app?

I'd really like to hear some input / experiences about production use with
several applications with independent release/deploy cycles.

Thanks again
Rainer


what is the best practice to replace a webapp with a newer version in
production?

I'm using Tomcat 6.0.29, with unpackWARs="true" autoDeploy="false". All
Webapps reside in appBase, some have a machine-specific context descriptor,
that I manually copy to conf/Catalina/localhost.

I use the Tomcat Manager (via HTML-Interface) to deploy applications. What
is the recommended way to upgrade a webapp to a newer version (same war
name, same desired context path)?

The HTML manager has no "redeploy" option. "deploy" is not possible as the
context already exists. I tried to put the new war file into appBase, and
use reload, but that won't update the expanded directory to the new war
file.

What I did is:
  * undeploy
  * copy new war file
  * deploy

This is cumbersome as I have to switch forth and back between manager and
file operations.

Is there a better way?

Thanks
Rainer


-
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: Host Manager.

2010-09-03 Thread Mark Thomas
On 02/09/2010 23:14, Christopher Schultz wrote:
> Jeffrey,
> 
> On 9/2/2010 5:40 PM, Jeffrey Janner wrote:
>> I'd be happy if it just wrote out a new file based on the settings at
>> the time I said save -- damn the comments.
>> At least then, it's a pretty straight-forward bit of save code.
>> But, if you're one of those who has to save the commentary that's
>> already there, then have fun.
> 
> It doesn't seem unreasonable to persist the comments: they're XML
> elements, too. If you can write code to parse and insert elements into
> an XML tree, you can afford to keep the comments in there, too.

There is some code that tries to save server.xml in the 5.5. tree. It
was used by the admin app.

Mark

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



Re: Questions about Server Side Includes (SSI) implementation

2010-09-03 Thread Mark Thomas
On 01/09/2010 22:14, Christopher Schultz wrote:
> Was this done for performance reasons?
Not to my knowledge.

> I have to imagine that a "parallel" SSI processor configuration could
> avoid these potentially large buffers without degrading performance: a
> win-win.
+1

> Complications arise, of course, because the content type is not
> guaranteed to be set when the first byte of output is sent and because
> the response might be reset somewhere along the way. I believe these
> issues are not deal-breakers.
No different to a normal servlet. Once the response has been committed,
headers can't change.

> The SSI filter would also not be able to
> set the Content-Length header in this case. I'm not sure if that's a
> problem or not.
Shouldn't be. Chunked encoding will handle that.

> Second, for configurations where the content type of the original
> resource is unimportant, it might be nice to avoid the overhead of a
> regular expression pattern match. I'd be happy to provide a simple patch
> that avoids the pattern match for patterns like ".*" or "".
I use an explicit pattern of "" to skip the match.

> These were just some thoughts I had while reading-through the SSI filter
> code. Any thoughts?

Patches welcome :)

Mark

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