Re: Tomcat 5.5 and SSL connector: keystore was tampered with [SOLVED]

2008-02-02 Thread Samuli Seppänen
Just for future reference to others, the problem was this line in 
Funambol data synchronization server's start.sh script:


JAVA_OPTS=$JAVA_OPTS 
-Djavax.net.ssl.trustStore=$FUNAMBOL_HOME/lib/security/cacerts


Commenting this out fixed the problem. I still fail to see how this 
should affect the keystorePass parameter handling in Tomcat in any way. 
So why does changeit work but some other password doesn't?


Well, go figure.

Samuli


From: Samuli Seppänen [mailto:[EMAIL PROTECTED] Subject: 
Re: Tomcat 5.5 and SSL connector: keystore was tampered with [SOLVED]


I suppose this Tomcat home does not apply if I use absolute 
pathnames, like /root/newkeystore?


There's always a home directory for the process, usually based on the 
userid the process is running under.  If you've put the keystore file 
in any location other than the userid's home directory, you must 
specify the location with the keystoreFile attribute.


Just for reference, the problem was not Tomcat after all... it is 
somehow related to Funambol sync server.


Until this point I had started Tomcat only via the Funambol startup 
scripts. Then I tested Tomcat 5.5.25 standalone on my laptop and on the 
Funambol server (e.g. with startup.sh and shutdown.sh) and everything 
worked perfectly with JRE 1.5 and 1.6. I could select whatever password 
I want and the SSL listener would come up just fine. I have to dig into 
Funambol to see  what is going on here, it's pretty weird.


Anyway, thanks for the tips!

Samuli




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JasperException: PermGen space

2008-02-02 Thread Dave
Hi, I am using JBoss 4.0.5GA on Federa Core 6 Linux for JSF application. After 
running for two days, got the following exception on server side. How to avoid 
it? Thanks for help. Dave
   
  Caused by: org.apache.jasper.JasperException: PermGen space
at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:455)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)

   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

RE: hibernate3 / JPA / JBossCache / tomcat

2008-02-02 Thread David Cassidy
Erik

Thank you very much for this. I've used the link to the usun site to now use up 
your bandwidth

Was there anything you had to configure in tomcat to make it all work
or was it just magic ?

:)

Thanks again

D

 We use the same configuration and use this in our Maven pom.xml
 http://ldvapp07.fao.org:8032/fenixRepo/javax/transaction/jta/1.0.1B/

 If I remember correctly we downloaded this jar from the sun website. The link
 I sended is our own maven repository






 -Original Message-
 From: itay sahar [mailto:[EMAIL PROTECTED]
 Sent: Fri 01/02/2008 17:43
 To:   Tomcat Users List
 Cc:
 Subject:  Re: hibernate3 / JPA / JBossCache / tomcat

 Tomcat can use JTA. I use it also with Hib3. My sugession to you is to find
 the appropriate jar with JBossCache and for tomcat version.

 On 2/1/08, David Cassidy [EMAIL PROTECTED] wrote:

 Hey guys

 Having problems getting Hib3/JPA working with JBossCache within tomcat.

 Am I trying for the impossible?
 I could get it working with OSCache but JBossCache likes to have a JTA
 now unless I'm missing something Tomcat doesn't do JTA

 Anyone got the answer as to what my persistence.xml should look like and
 if I need anything else in my server.xml

 Help 

 Thanks guys

 David




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperException: PermGen space

2008-02-02 Thread Mariano López

Try adding more -XX:MaxPermSize when Jboss starts up.

Best regards,

Mariano

Dave escribió:

Hi, I am using JBoss 4.0.5GA on Federa Core 6 Linux for JSF application. After 
running for two days, got the following exception on server side. How to avoid 
it? Thanks for help. Dave
   
  Caused by: org.apache.jasper.JasperException: PermGen space

at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:455)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)

   
-

Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Resources / docBase question

2008-02-02 Thread Chris Hut

Hi all,

I'm wondering how to point Tomcat to an expanded webapp location whose
resources are served from a different location.

It's easy to point Tomcat to external resources by providing a
deployment descriptor; for example, if I have the following in
${CATALINA_BASE}/conf/Catalina/localhost/imageApp.xml:

Context docBase=c:/images /

Then requests for: localhost:8080/imageApp/foo.jpg will serve the file
from c:/images/foo.jpg

But, I want to add servlet filtering to the webapp with the class files
in my expanded application hierarchy (containing a WEB-INF/classes and
web.xml file):

Context docBase=c:/source/imageApp /

Now localhost:8080/images/foo.jpg will 404 (requested resource not
available) because the file isn't in the source/imageApp hierarchy -
makes sense so far.

I thought that configuring a Resources element for the Context,
redefining the docBase to my external directory, might do the trick:

Context docBase=c:/source/imageApp
Resources
className=org.apache.naming.resources.FileDirContext
docBase=c:/images /
/Context

But image requests are still resulting in a 404 not found.

Is there a way (other than using symlinks) to run code from an expanded
webapp hierarchy docBase but serve static content from an external
location?

Thanks much!
Chris

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reg Software

2008-02-02 Thread Mark Thomas

Java Guru wrote:

Hi Everyone,

   Can any one tell me if there is any package in the Apache which can give
line number in which the error occurred in JSP rather than line number of
servlet to which JSP is converted at run time.


The standard error page for JSPs should do exactly what you are looking 
for. It also includes a snippet of the JSP in the error page.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperException: PermGen space

2008-02-02 Thread David Brown
Hello, also try to upgrade to 4.2.1 or 4.2.2 if not higher. HTH

Mariano López wrote ..
 Try adding more -XX:MaxPermSize when Jboss starts up.

 Best regards,

 Mariano

 Dave escribió:
  Hi, I am using JBoss 4.0.5GA on Federa Core 6 Linux for JSF application. 
  After
 running for two days, got the following exception on server side. How to avoid
 it? Thanks for help. Dave
 
Caused by: org.apache.jasper.JasperException: PermGen space
  at 
  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:455)
  at 
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
  at 
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  at 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  at 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at 
  org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
  at 
  org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
  at 
  org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
  at 
  org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
  at 
  org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
 
 
  -
  Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Reg Software

2008-02-02 Thread Martin Gainty

Hello Guru
as a quick test I put in a bogus jsp
htmlbody%=getSomethingThatDoesntExist();%/form/body/html
when referenced in address bar I see (in the browser)
org.apache.jasper.JasperException: Unable to compile class for JSPAn error 
occurred at line: 3 in the jsp file: /ChangeConfig.jspGenerated servlet 
error:Syntax error on token ;, delete this token
perhaps if you provide the jsp/taglibs/tld and config we can try on our own tc
 
?Martin __Disclaimer and 
confidentiality noteEverything in this e-mail and any attachments relates to 
the official business of Sender. This transmission is of a confidential nature 
and Sender does not endorse distribution to any party other than intended 
recipient. Sender does not necessarily endorse content contained within this 
transmission. Date: Fri, 1 Feb 2008 21:46:15 -0500 From: [EMAIL PROTECTED] 
To: users@tomcat.apache.org Subject: Reg Software  Hi Everyone,  Can any 
one tell me if there is any package in the Apache which can give line number 
in which the error occurred in JSP rather than line number of servlet to which 
JSP is converted at run time.  J4v4guru
_
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/

Re: Status 404 in tomcat

2008-02-02 Thread mgainty
is your manager's version of index.jsp located at
$TOMCAT_HOME\server\webapps\manager

?
M-

- Original Message -
Wrom: KPNKMBIPBARHDMNNSKVFVWRKJVZCMH
To: users@tomcat.apache.org
Sent: Saturday, February 02, 2008 12:54 AM
Subject: Fwd: Status 404 in tomcat


 Hello,
 I have installed tomcat in my WHM (WHM - cPanel - Manage plugins -
click
 on Addon Modules tomcat ).

 The tomcat work..
 When I tried the nmap 209.62.89.18 command line, the output is:
 ……
 80/tcp open http
 8009/tcp open ajp13
 8080/tcp open http-proxy
 ……

 And it can run jsp pages with http://uskongjian.gmakj.com:8080
 However, I installed servlets to my virtualhost (WHM - Account
Functions -
 Install Servlets).

 After that, the virtualhost configure in /etc/httpd/conf/httpd.conf is
 LoadModule jk_module libexec/mod_jk.so
 VirtualHost 209.62.89.18:80
 ServerName gmakj.lw173.net
 ServerAlias www.gmakj.lw173.net
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /home/gmakjlw/public_html
 IfModule mod_suphp.c
 suPHP_UserGroup gmakjlw gmakjlw
 /IfModule
 IfModule !mod_disable_suexec.c
 User gmakjlw
 Group gmakjlw
 /IfModule
 BytesLog /usr/local/apache/domlogs/gmakj.lw173.net-bytes_log
 CustomLog /usr/local/apache/domlogs/gmakj.lw173.net combined
 ScriptAlias /cgi-bin/ /home/gmakjlw/public_html/cgi-bin/
 IfModule mod_jk.c
 JkMount /*.jsp ajp13
 JkMount /servlet/* ajp13
 JkMount /servlets/* ajp13
 /IfModule
 /VirtualHost

 And then, I add the following lines in
 /usr/local/jakarta/tomcat/conf/server.xml

Host name=gmakj.lw173.net appBase=/home/gmakjlw/public_html

   Context path= reloadable=true
 docBase=/home/gmakjlw/public_html debug=1/

   Context path=/manager debug=0 privileged=true

   docBase=/usr/local/jakarta/tomcat/server/webapps/manager

 Valve
className=org.apache.catalina.valves.RemoteAddrValve
 

   /Context

/Host
 However, when I opened the URL http://gmakj.lw173.net, the browser is
ending
 up with the following error:

 type Status report
 message /index.jsp
 description The requested resource (/index.jsp) is not available.

 I tried to uncomment the following lines in
 /usr/local/Jakarta/tomcat/conf/web.xml to turn on the invoker servlet:
 servlet
 servlet-nameinvoker/servlet-name
 servlet-class
 org.apache.catalina.servlets.InvokerServlet
 /servlet-class
 init-param
 param-namedebug/param-name
 param-value0/param-value
 /init-param
 load-on-startup2/load-on-startup
 /servlet
 servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
 servlet-mapping

 After that, I restarted the tomcat and retried to open the same URL .
 However, I got the same error.
 Can someone to tell me why this situation appear, please?
 Thanks and Regards
 Charles



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Only see html/code

2008-02-02 Thread Chris Baty
Thanks everyone for their patience and support.  I reviewed my overall file 
structure, web.xml, and server.xml.  I re-read 
http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html which is an excellent 
tutorial.  I was missing:
Context path= docBase=/usr/share/tomcat5.5-webapps/cwrecyclers debug=0 
reloadable=true/
in the Host section of server.xml.

I've found that there's a lot of partial or misleading information on the web.

Thank again.
Chris

- Original Message 
From: David Smith [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, February 1, 2008 9:11:59 PM
Subject: Re: Only see html/code


I know I'm coming into this whole thing late, but  this thread seems to
 
have gone on for a while and I see a number of conflicts in your config
 
that need to be addressed.  I'm assuming your cwrecyclers folder is a 
full webapp complete with WEB-INF folder and it's own web.xml file.  If
 
it's just a folder of jsps in the ROOT webapp, then you still need to 
fix your DocumentRoot to be /usr/share/tomcat5.5-webapps/ROOT.

1. Don't try to put your webapp in the ROOT folder in tomcat's webapps 
directory.  Instead, it should be on the same level as the ROOT webapp.
  
If it's your intent to make your cwrecyclers webapp the default webapp 
responding to requests for /, then delete the original ROOT webapp 
folder and rename cwrecyclers to ROOT.

2. Depending on how you dealt with no. 1, either change your JkMount or
 
your DocumentRoot to line up the URL paths between tomcat and httpd.
  If 
you renamed cwrecyclers to ROOT to make it the default webapp, 
DocumentRoot should be /usr/share/tomcat5.5-webapps/ROOT and JkMount 
should be /*.jsp.  If you decided to keep the cwrecyclers webapp name, 
then DocumentRoot needs to be /usr/share/tomcat5.5-webapps/cwrecyclers 
and the first JkMount is fine.  Remove the second one in either case.

--David

Chris Baty wrote:
 Hi Guys,
 I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of
 a newbie).  I got my Tomcat working fine at
 /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the browser 
(locally) at
 localhost:8180/cwrecyclers/ I see exactly what I expect.  But when I look 
remotely
 also I see is the html.  I've looked at all my config files and they
 all look fine.  Could someone point me in the right direction?
 Thanks
 Chris

 Apache:
 VirtualHost  67.207.133.158:80
 ServerAdmin [EMAIL PROTECTED]
 ServerName  cwrecyclers.hopto.org
 
 # Indexes + Directory Root.
 DirectoryIndex index.jsp
 DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
 #DocumentRoot /var/www/cwrecyclers/

 JkMount /cwrecyclers/*.jsp cwrecyclers
 JkMount /cwrecyclers/* cwrecyclers


 # Globally deny access to the WEB-INF directory
  LocationMatch .*WEB-INF.*
 deny from all
  /LocationMatch


 # Logfiles
 ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
 CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log
 combined
 /VirtualHost



 workers.properties
 # Tomcat and Java configuration
 #
 workers.tomcat_home=/usr/share/tomcat5.5
 workers.java_home=/usr/lib/jvm/java-1.5.0-sun
 ps=/
 worker.list=yougarage

 # Definition for local worker using AJP 1.3
 #
 worker.yougarage.type=ajp13
 worker.yougarage.host=yougarage.tv
 worker.yougarage.port=8009
 worker.yougarage.cachesize=20

 worker.list=cwrecyclers

 # Definition for local worker using AJP 1.3
 #
 worker.cwrecyclers.type=ajp13
 worker.cwrecyclers.host=cwrecyclers.hopto.org
 worker.cwrecyclers.port=8009
 worker.cwrecyclers.cachesize=20






  
 

 Be a better friend, newshound, and 
 know-it-all with Yahoo! Mobile.  Try it now.
  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Well, I was certain it had to be the difference in the JDKs causing it, but 
after compiling the filter with the Sun JDK, the same exception is still 
present.  The localhost log has this:

SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)

So for some reason it does not see the filter after I add this code:

		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
			{
			   public java.lang.String getParameter(java.lang.String name) 
			   {
			  if (foo.equals(name)) 
			  {
			 return bar;   
			  }
			  else 
			  {
			 return super.getParameter(name);   
			  }

   }
};

Without this code the filter runs fine.  Any ideas?

Thanks,
- Ole



Ole Ersoy wrote:
Actually I probably got this one.  I'm compiling the filter with 
IcedTea, but using the Sun JDK to run tomcat, since IcedTea has issues 
with keystore certificates.  So if I compile with the Sun JDK I think 
the issue will go away.


Cheers,
- Ole
Ole Ersoy wrote:

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code 
compiles fine and the filter part causing the ruckus looks like this:


HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
{
   public java.lang.String getParameter(java.lang.String 
name){

  if (foo.equals(name))   {
 return bar; }
  else   {
 return 
super.getParameter(name); }

   }
};
Thoughts?

Thanks,
- Ole













-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

I managed to narrow it down a little further.  The same exception appears if 
the HttpServletRequestWrapper instance is defined like this:

		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest)

{
			   public String getParameter(String name) 
			   { 
return foo;

   }
};

The filter runs fine if I replace the above with this:
		HttpServletRequestWrapper wrapper = 
			new HttpServletRequestWrapper((HttpServletRequest)servletRequest);


Any ideas?

Thanks,
- Ole


Ole Ersoy wrote:
Well, I was certain it had to be the difference in the JDKs causing it, 
but after compiling the filter with the Sun JDK, the same exception is 
still present.  The localhost log has this:


SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)

So for some reason it does not see the filter after I add this code:

HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) {
   public java.lang.String getParameter(java.lang.String 
name){

  if (foo.equals(name))   {
 return bar; }
  else   {
 return super.getParameter(name); }
   }
};

Without this code the filter runs fine.  Any ideas?

Thanks,
- Ole



Ole Ersoy wrote:
Actually I probably got this one.  I'm compiling the filter with 
IcedTea, but using the Sun JDK to run tomcat, since IcedTea has issues 
with keystore certificates.  So if I compile with the Sun JDK I think 
the issue will go away.


Cheers,
- Ole
Ole Ersoy wrote:

Hi,

I'm getting a:

org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

When inluding an HttpServletRequestWrapper in a filter.  The code 
compiles fine and the filter part causing the ruckus looks like this:


HttpServletRequestWrapper wrapper = new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest) 
{
   public java.lang.String getParameter(java.lang.String 
name){

  if (foo.equals(name))   {
 return bar; }
  else   {
 return 
super.getParameter(name); }

   }
};
Thoughts?

Thanks,
- Ole















-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Konstantin Kolinko
How do you package and deploy your application?

If you are seeing
java.lang.NoClassDefFoundError: test/filter/TestFilter$1

please check, that the class file TestFilter$1.class is present in
your app's WEB-INF/classes/test/filter/ directory on the web server.


  still present.  The localhost log has this:
 
  SEVERE: Exception starting filter testFilter
  java.lang.NoClassDefFoundError: test/filter/TestFilter$1
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
 at java.lang.Class.getConstructor0(Class.java:2699)
 at java.lang.Class.newInstance0(Class.java:326)
 at java.lang.Class.newInstance(Class.java:308)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StandardContext start,SEVERE: Error filterStart When Including HttpServletRequestWrapper in Filter in 6.0.14

2008-02-02 Thread Ole Ersoy

Hi Konstantin,

In this case I just recompiling the filter and copying it over the the classes 
folder of the webapp.  It's definitely there.  If I compile and copy with a 
statement like this in the filter:

HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest)servletRequest); 


The filter works.  As soon as I override getParameter like this:


HttpServletRequestWrapper wrapper =  new 
HttpServletRequestWrapper((HttpServletRequest)servletRequest)
{
public String getParameter(String name)
{
  return foo;
}
}; 


I get the class not found exception.  Strange right?

- Ole



Konstantin Kolinko wrote:

How do you package and deploy your application?

If you are seeing
java.lang.NoClassDefFoundError: test/filter/TestFilter$1

please check, that the class file TestFilter$1.class is present in
your app's WEB-INF/classes/test/filter/ directory on the web server.



still present.  The localhost log has this:

SEVERE: Exception starting filter testFilter
java.lang.NoClassDefFoundError: test/filter/TestFilter$1
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



j_security_check

2008-02-02 Thread Ashok Venkat
Hi,
I have the following code in a scheduler class, which is trying to 
invoke a servlet

 String url = https://localhost:8444/servlet/TestServlet;;

// Get HTTP client instance
HttpClient httpClient = new HttpClient();
// Create HTTP GET method and execute it

GetMethod getMethod = null;
PostMethod postMethod = null;

int int_result = 0;
getMethod = new GetMethod( url );
getMethod.setFollowRedirects(true);
int_result = httpClient.executeMethod( getMethod );
String contents = getMethod.getResponseBodyAsString();
getMethod.releaseConnection();

postMethod = new PostMethod( 
https://localhost:8444/j_security_check; );
postMethod.addParameter( j_username,  test );
postMethod.addParameter( j_password, test );
int_result = httpClient.executeMethod( postMethod );
contents = postMethod.getResponseBodyAsString();
postMethod.releaseConnection();

postMethod = new PostMethod( url );
postMethod.addParameter( Password, foo );
int_result = httpClient.executeMethod( postMethod );

--At this point when the test servlet is called, the parameter 
password is null. 
 getParameter always returns null
 getMethod returns GET when it should be post 
It seems that the  POST is behaving like a GET. 

This code works just fine on tomcat 5.0. After upgrading to 6.0, i am seeing 
this bizarre behaviour

Any thoughts?


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

appBase

2008-02-02 Thread Paul Wallace
Hi,

 

Using Tomcat 5.5 I wish to provide my own appBase to a relative or fully
formed path e.g:

 

   Host name=localhost appBase=C:/mypath/mysite

   unpackWARs=true autoDeploy=true

   xmlValidation=false xmlNamespaceAware=false

 

or

 

   Host name=localhost appBase=../../mysite

   unpackWARs=true autoDeploy=true

   xmlValidation=false xmlNamespaceAware=false

 

(assuming mysite is two folders above CATALINA_HOME)

 

Neither work and an HTTP 400 is returned. 

 

This stops the show also in server.xml:

 

Context path=/ docBase=../../site privileged=false
antiResourceLocking=false antiJARLocking=false/

 

How do I point the root of the said release of Tomcat at, preferably, a
folder relative to CATALINA_HOME?

 

Thanks

 

Paul.