Re: Tomcat common and webapp classloader

2012-12-17 Thread Kris Maker
yea should work

On Mon, Dec 17, 2012 at 3:28 PM, Olivier Lamy ol...@apache.org wrote:

 2012/12/17 Antonio Manuel Muñiz Martín amu...@klicap.es:
  Hi Olivier,
 
  My fault, I found the problem, I had two spring versions in my
 dependencies.
  However I have another question, could I use dependencies from
  non-central repository in the plugin dependencies? It seems like the
  plugin only search for dependencies at central.
 
 Must work if you declare your repository in pluginRepositories section.

  Thanks,
  Antonio.
 
  2012/12/17 Olivier Lamy ol...@apache.org:
  Any sample project you could share ? Attach it in a new jira issue.
  That will help for debugging your use case.
  Thanks
 
  2012/12/16 Antonio Manuel Muñiz Martín amu...@klicap.es:
  Hello.
 
  I'm giving a try to tomcat6-maven-plugin. Good work guys, it's great!
 
  I'm getting some extrange behavior with classloaders, I think that
  tomcat common classloader is interfering in webapp classloader. I have
  Spring 2.5.5 artifacts at tomcat level (tomcat lib) and Spring 3.1.1
  at webapp level (WEB-INF/lib), and I'm getting errors because 2.5.5 is
  loaded before in the webapp.
 
  I tried to use delegate = false in the plugin config in order to get
  first the webapp artifacts, but the behavior is the same.
 
  My plugin config:
  plugin
  groupIdorg.apache.tomcat.maven/groupId
  artifactIdtomcat6-maven-plugin/artifactId
  version2.0/version
  configuration
  port8080/port
  path/app/path
  serverXmlsrc/main/config/server.xml/serverXml
 
 additionalConfigFilesDirsrc/main/config/tomcat-conf/additionalConfigFilesDir
  systemProperties
 
 JAVA_OPTS-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.conf/JAVA_OPTS
  /systemProperties
  delegatefalse/delegate
  /configuration
  dependencies
  dependency
  groupIdes.klicap.clinker/groupId
  artifactIdjosso-tomcat60-agent/artifactId
  version1.3.0/version
  /dependency
  /dependencies
  /plugin
 
  Note that josso-tomcat60-agent is the dependency that I want at tomcat
  level and it gets Spring 2.5.5 transitively.
 
  Am I using delegate correctly?
 
  Thanks!
 
  --
  Antonio Manuel Muñiz Martín
  Software Developer at klicap - ingeniería del puzle
 
  work phone + 34 954 894 322
  www.klicap.es | blog.klicap.es
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
  --
  Olivier Lamy
  Talend: http://coders.talend.com
  http://twitter.com/olamy | http://linkedin.com/in/olamy
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
  --
  Antonio Manuel Muñiz Martín
  Software Developer at klicap - ingeniería del puzle
 
  work phone + 34 954 894 322
  www.klicap.es | blog.klicap.es
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 



 --
 Olivier Lamy
 Talend: http://coders.talend.com
 http://twitter.com/olamy | http://linkedin.com/in/olamy

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




Fwd: Contact requests from Mary Lou and Howard

2012-11-16 Thread Kris Schneider
-- Forwarded message --
From: *Kris Schneider*
Date: Friday, November 16, 2012
Subject: Contact requests from Mary Lou and Howard
To: kurt schneider kurtbo...@gmail.com


Kurt,

Howard and Mary Lou have both expressed their inability to get responses
from you on matters concerning Mom's estate. If you happen to get this
email where their attempts have failed, you should probably get in touch
with both of them...


-- 
Kris Schneider



-- 
Kris Schneider


Re: Fwd: Contact requests from Mary Lou and Howard

2012-11-16 Thread Kris Schneider
On Fri, Nov 16, 2012 at 2:08 PM, Casper Wandahl Schmidt 
kalle.pri...@gmail.com wrote:

 Den 16-11-2012 20:05, Kris Schneider skrev:

 -- Forwarded message --

8 snip 8

 Thanks for letting us know :) Probably the wrong recipient?

So...this isn't the non-communicative sibling support list? I suppose
hitting up the dev list for a fraternal enhancement is right out
then...derp!

--
Kris Schneider


PooledJNDIRealm

2012-10-16 Thread Kris Easter

We are using the delivered JNDIRealm class for LDAP authN in Tomcat
7.0.29 but we're running into some problems when the back end LDAP is a
little slow (another issue being addressed separately) and having
threads stack up and timeout.  A thread dump shows we end up with a lot
of blocked threads, that timeout since we have Apache in front of
Tomcat, that seem to be stuck on the synchronized authenticate method.

We've rewritten a PooledJNDIRealm using this pooling:

http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/pool.html


the rewritten version is just the original JNDIRealm with minimal
changes to make it work with the pooling and removing the
synchronization.  Proof of concept testing seems to work but it has yet
to be subjected to a heavy load test.

Are there any gotchas around this approach?  I'm not seeing any unit
tests for JNDIRealm, and we're only using part of it, are any regression
tests available?

Thanks,
Kris



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



Form Authentication question

2012-07-30 Thread Kris Easter

I'm looking at the org.apache.catalina.authenticator.FormAuthenticator
class from the 7.0.29 src.  This portion of the authenticate method
starting around line 301 is where I'm having a little problem:


if (log.isDebugEnabled()) {
  log.debug(Authentication of ' + username + ' was successful);
}

if (session == null) {
   session = request.getSessionInternal(false);
}

if (session == null) {
  if (containerLog.isDebugEnabled()) {
containerLog.debug
   (User took so long to log on the session expired);
  }

if (landingPage == null) {

response.sendError(HttpServletResponse.SC_REQUEST_TIMEOUT,
sm.getString(authenticator.sessionExpired));
  } else {
 // Make the authenticator think the user originally requested
 // the landing page
 String uri = request.getContextPath() + landingPage;
 SavedRequest saved = new SavedRequest();
 saved.setMethod(GET);
 saved.setRequestURI(uri);
 request.getSessionInternal(true).setNote(
Constants.FORM_REQUEST_NOTE, saved);
 response.sendRedirect(response.encodeRedirectURL(uri));
  }
 return (false);
}


If the user sits too long on the login page the session times out, even
if their credentials were authenticated successfully, and sends them
back to the login page where they must re-enter their credentials.  It
works this way even if I define a landingPage.  Without a landingPage I
get the dreaded 408 error.

Can anyone enlighten me as to why it's a bad idea if:

 if (session == null) {
   session = request.getSessionInternal(false);
 }

is instead:

 if (session == null) {
  session = request.getSessionInternal(true);
 }

Thanks,
Kris



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



Re: Form Authentication question

2012-07-30 Thread Kris Easter
On Mon, 2012-07-30 at 14:36 -0600, Mark Thomas wrote:
 On 30/07/2012 21:24, Kris Easter wrote:
  
 ... 
  
  If the user sits too long on the login page the session times out, even
  if their credentials were authenticated successfully, and sends them
  back to the login page where they must re-enter their credentials.  It
  works this way even if I define a landingPage.  Without a landingPage I
  get the dreaded 408 error.
  
  Can anyone enlighten me as to why it's a bad idea if:
  
   if (session == null) {
 session = request.getSessionInternal(false);
   }
  
  is instead:
  
   if (session == null) {
session = request.getSessionInternal(true);
   }
 
 Because the session defines where to go after the authentication i.e.
 which page the user requested originally. I suppose we could allow the
 user to transition to the landing page in that case.
 
 Mark

That would be preferable for my use case.

Kris


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



Re: tomcat security authenticator

2012-06-28 Thread Kris Easter

 I think, if I replace the FormAuthenticator with an descendant, it'll
 solve the problem.
 
 To extend FormAuthenticator is simple, but how can I make Tomcat to use it?

I tested this out at one time but it was never placed in production.  My
terse notes, which might be leaving something out, on doing this are:


In web.xml define auth-method as:

auth-methodFORMOIT/auth-method

Extract org/apache/catalina/startup/Authenticators.properties from
catalina.jar add line:

FORMOIT=mynewpackage.NewFormAuthenticator

Update catalina.jar

jar -uf catalina.jar
org/apache/catalina/startup/Authenticators.properties


HTH,
Kris


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



Form based Realm Authentication question

2012-02-23 Thread Kris Easter

We're using Form based JNDIRealm Authentication against an LDAP server
and it's all working fine except for one issue.  When a user enters an
invalid username/password they get sent to the error page, but they also
get sent to the same error page if the LDAP server is down.  Is there a
way to trap the exception and redirect them to a different error page
or, using a servlet as an error page, somehow pick up on the exception
and display a slightly more specific error message like, Please contact
the help desk.  The authN server is unreachable.?

Env: Tomcat 6.0.35. on Solaris, JDK 1.6.0_31.  

Thanks,
Kris


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



Re: Tomcat filter-mapping dispatcher forward

2011-12-05 Thread Kris Schneider
On Mon, Dec 5, 2011 at 2:12 PM, Hodchenkov, Paul
paul.hodchen...@oxagile.com wrote:
 It works when using servlet 3.0 annotations api... I will write the simplest 
 test case

 Sent from my iPad

 On 05.12.2011, at 20:49, Mark Thomas ma...@apache.org wrote:

 On 05/12/2011 14:45, Hodchenkov, Paul wrote:
 Hi all,
 I am trying to configure dispatcher forward rule for filter in tomcat 7.0.22
   filter-mapping
        filter-nameUrlRewriteFilter/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
    /filter-mapping

 That looks right at first glance.

What does the web-app element look like? Is the proper version
attribute being used, along with the correct namespaces/locations?

 However, tomcat ignores dispatcher definition and does not fill dispatchers 
 in org.apache.catalina.deploy.FilterMap (used debug) , so it always returns 
 REQUEST in getDispatcherMapping.

 Hmm. Odd. This is tested by the TCK that every Tomcat release must pass
 so I don't think there is a bug - or if there is it is an odd edge case.

 I'd suggest that the way forward is to write the simplest possible test
 case (1 * JSP + 1 * Servlet + web.xml should be plenty) that
 demonstrates this issue. If you still see the issue with that test case,
 it will probably be time to open a bug.

 Mark

-- 
Kris Schneider

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



Re: Strange MySQL-Behaviour with JDBC-Realm

2011-07-16 Thread Kris
Did autoreconnect solve your problem?




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



Re: Terminating Timer Thread Gracefully

2011-07-12 Thread Kris Schneider
On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
 Subject: Terminating Timer Thread Gracefully

 Finally, in contextDestroyed, I inserted a call to
 Thread.sleep after canceling the timer and the error
 message disappeared.

 You should be able to do a Thread.join() using the timer's Thread object 
 rather than sleeping.

But Timer doesn't expose its thread. An alternative would be use
something like Executors.newSingleThreadScheduledExecutor() to get a
ScheduledExecutorService. The executor can be used to schedule a
Runnable with a fixed rate or delay. When the context is destroyed,
shutdown the executor and await its termination.

  - Chuck

-- 
Kris Schneider

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



Re: Terminating Timer Thread Gracefully

2011-07-12 Thread Kris Schneider
On Tue, Jul 12, 2011 at 10:03 AM, David kerber dcker...@verizon.net wrote:
 On 7/12/2011 9:59 AM, Kris Schneider wrote:

 On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
 chuck.caldar...@unisys.com  wrote:

 From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
 Subject: Terminating Timer Thread Gracefully

 Finally, in contextDestroyed, I inserted a call to
 Thread.sleep after canceling the timer and the error
 message disappeared.

 You should be able to do a Thread.join() using the timer's Thread object
 rather than sleeping.

 But Timer doesn't expose its thread. An alternative would be use
 something like Executors.newSingleThreadScheduledExecutor() to get a
 ScheduledExecutorService. The executor can be used to schedule a
 Runnable with a fixed rate or delay. When the context is destroyed,
 shutdown the executor and await its termination.

 No need even to do that; just .cancel() the timer.

Maybe. It sounds like that's been working for you, but I thought the
OP had already tried that. A potential issue with Timer.cancel() is
that there really aren't any guarantees about when the associated
thread is terminated and there certainly isn't any way for external
code to interact with it. Using something like an ExecutorService just
seems like a better approach to this sort of thing.

-- 
Kris Schneider

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



Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

2010-07-14 Thread Kris Schneider
You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
emptyMap method showed up in JDK 1.5...

On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq testw...@gmail.com wrote:
 I have a piece of code that retrieves data from oracle database XML type. It
 works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?


 java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
 with signature ()Ljava.util.Map; was not found.
        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
        
 gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
        gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
        gdb.ProcessInput.doPost(ProcessInput.java:116)
        
 javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
        
 javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)

 Thanks,vm

-- 
Kris Schneider

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



Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

2010-07-14 Thread Kris Schneider
Well, it looks like this is the line of code being executed:

return 
newInstance(contextPath,classLoader,Collections.String,ObjectemptyMap());

Tomcat normally dumps out at least the value of its JRE_HOME env var
upon startup, can you verify that it's really using 1.6?

On Wed, Jul 14, 2010 at 10:11 AM, testwreq wreq testw...@gmail.com wrote:
 It is jdk 1.6 from SUN
 java -version
 java version 1.6.0_20
 Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
 Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)


 On Wed, Jul 14, 2010 at 9:56 AM, Kris Schneider kschnei...@gmail.comwrote:

 You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
 emptyMap method showed up in JDK 1.5...

 On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq testw...@gmail.com wrote:
  I have a piece of code that retrieves data from oracle database XML type.
 It
  works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
 
 
  java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
  with signature ()Ljava.util.Map; was not found.
         javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
         javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
         gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
 
  gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
 
  gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
         gdb.ProcessInput.doPost(ProcessInput.java:116)
         javax.servlet.http.HttpServlet.service(
 tomcat5-servlet-2.4-api-5.5.23.jar.so)
         javax.servlet.http.HttpServlet.service(
 tomcat5-servlet-2.4-api-5.5.23.jar.so)
 
  Thanks,vm

 --
 Kris Schneider

-- 
Kris Schneider

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



Re: Why does errorPage work but WEB-INF/web.xml error-page does not?

2010-05-26 Thread Kris Schneider
)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
      at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
      at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
      at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      at java.lang.Thread.run(Thread.java:637)



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




 --
 View this message in context: 
 http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28683804.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.

-- 
Kris Schneider

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



Re: set-cookie

2010-05-26 Thread Kris Schneider
On Wed, May 26, 2010 at 2:04 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chuck,

 On 5/24/2010 3:55 PM, Caldarale, Charles R wrote:
 From: banto [mailto:banto...@gmail.com]
 Subject: Re: set-cookie

 i´m using something like
 System.out.println(Thread.currentThread().getStackTrace());

 What you got was a display of the array object - not very interesting.  
 Either iterate through the array, displaying each entry, or just do this:

     Thread.currentThread().dumpStack();

 Or the more traditional:

 new Throwable(Stack Dump).printStackTrace();

dumpStack is actually static, so:

Thread.dumpStack();

which is implemented as:

new Exception(Stack trace).printStackTrace();

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkv9YrcACgkQ9CaO5/Lv0PDXegCfeKZOUdIKnIgAnfSmrhO015D2
 lVEAnRzbT4mKvoli8WDYshlA1uNGHHQS
 =jp7W
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: Problem using response.sendRedirect to redirec t to URL that includes ñ or tilde

2010-05-17 Thread Kris Schneider
On Mon, May 17, 2010 at 10:39 AM, Perez Manglano, Moises
moises.per...@t-systems.es wrote:

 I´ve tried this:

 -- response.sendRedirect (www.coruña.es);  -- The result in the web 
 browser is: www.coru%f1.es

Interesting, because if you ask JavaScript to decode %F1, you get an error:
decodeURI(www.coru%F1a.es) - error

 -- response.sendRedirect (URLEncoder.encode(www.coruña.es), UTF-8); -- 
 The result in the web browser is: www.coru%c3%b1a.es.

This would seem to be correct as it also matches JS:
encodeURI(www.coruña.es) - www.coru%C3%B1a.es

 -- response.sendRedirect (URLEncoder.encode(www.coruña.es), UTF-16); -- 
 The result in the web browser is: www.coru%fe%ff%00%f1a.es/

 In all cases the web browser (IE8, Firefox 3.6) can´t find the server.

Chrome takes the encoded URL (www.coru%C3%B1a.es) and turns it into a
request to: http://www.xn--corua-rta.es/


 Thanks a lot.


 -Mensaje original-
 De: Pid [mailto:p...@pidster.com]
 Enviado el: lunes, 17 de mayo de 2010 16:00
 Para: Tomcat Users List
 Asunto: Re: Problem using response.sendRedirect to redirect to URL that 
 includes ñ or tilde

 On 17/05/2010 14:43, Perez Manglano, Moises wrote:
 Hello.

   I´m trying to redirect to a URL that includes ñ using
 response.sendRedirect, but it parses wrongly this kind of character; I´ve 
 tried it using URLEncoder and differents encondings (UTF-8,UTF-16,etc).

 What have you tried, and what was the exception / result?


 p

 What´s the correct way to do this redirect in Tomcat version 5.5.28?

 Thanks.

-- 
Kris Schneider

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



Re: TC 6 JSTL: attribute does not accept any expressions

2010-05-07 Thread Kris Schneider
On Fri, May 7, 2010 at 10:39 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
 All,

 I'm a complete newbie to JSTL and I'm having trouble getting a simple page
 to render. The page below gives me the error:

 org.apache.jasper.JasperException: /tasks.jsp(18,6) According to TLD or
 attribute directive in tag file, attribute items does not accept any
 expressions
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
 [...]

 It seems to me that items had better be an expression.

 I have a fresh install of Tomcat 6.0.26 running on Sun's 1.6.0-_20-b02 JVM
 on 32-bit Linux. I downloaded the JSTL api and impl packages from
 https://jstl.dev.java.net/download.html and put the JAR files directly into
 WEB-INF/lib.

 %@ page
  pageEncoding=UTF-8
  import=lj.timesheet.Task
 %
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %

The correct core taglib uri for JSTL 1.2 is: http://java.sun.com/jsp/jstl/core

Also make sure you're using a Servlet 2.5 web.xml.

 html
  head
    titleMy Tasks/title
  /head

  body
    h1My Tasks/h1

    table
      tr
        thDescription/th
      /tr
      c:forEach var=task items=${tasks}
        tr
          tdc:out value=${task.description} //td
        /tr
      /c:forEach
    /table
  /body
 /html

 I had this problem on my Linux desktop which I then rebooted back into
 Windows to write this message. Just for kicks, I tossed this JSP onto my dev
 server for work (and removed the reference to the Task class) and it worked
 no problem.

 The differences I can see between these environments are:
 1. No Task import in the environment where it works
 2. Direct call to the JSP in the environment where it works
   (rather than calling a servlet which forwards to it)
 3. Slightly different Java version (it's 1.6.0-12 in the
   working environment)
 4. Working environment is using CATALINA_BASE to run Tomcat from
   a separate directory than the actual distro


 Can anyone shed any light on this? I'm going to toss my entire WAR file into
 the environment where it /is/ working to see if it's some interaction
 problem.

 Thanks,
 -chris

-- 
Kris Schneider

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



Re: Classpath for JSP

2010-04-26 Thread Kris Schneider
On Mon, Apr 26, 2010 at 2:11 PM, Reuven Koblick groovyro...@gmail.com wrote:
 Sure Chris more specifically, from the localhost.*.log

 An error occurred at line: 21 in the jsp file:
 /admin/GenerateTriggersManually.jsp
 The constructor DB_Connection() is undefined

Does DB_Connection actually have a no-arg constructor 'cause the
compiler doesn't seem to think so...

 18:     body
 19:
 20: %
 21:         DB_Connection dbCon = new DB_Connection();
 22:
 23:         int timeInterval = 1;
 24:

 Here is the JSP file from the webapps/${appname} directory
 less admin/GenerateTriggersManually.jsp

 !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
 %...@page contentType=text/html%
 %...@page pageEncoding=UTF-8%
 %...@page import=com.bestrictlypersonal.db.DB_Connection %
 %...@page import=com.bestrictlypersonal.trigger.* %
 %...@page import=com.bestrictlypersonal.info.Volunteer %
 %...@page
 import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
 %
 %...@page import=com.bestrictlypersonal.error.ProcessError %
 %...@page import=com.bestrictlypersonal.email.Email%
 %...@page import=com.bestrictlypersonal.setup.* %
 %...@page import=com.bestrictlypersonal.util.* %
 %...@page import=com.bestrictlypersonal.info.Volunteer%



 html
    headtitleJSP Page/title/head
    body

 %
        DB_Connection dbCon = new DB_Connection();

        int timeInterval = 1;

 lastly, I go to
 webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the file
 DB_Connection.class is present and accounted for.

 Hope that is enough specific.

 Reuven







 On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Reuven,

 On 4/26/2010 1:22 PM, Reuven Koblick wrote:
  I'm getting an error when code in a *.jsp file tries to instantiate a
 class
  [that] is not found by the compiler used by Tomcat6.

 [snip]

  I verified that the class that was not found is indeed in
 /WEB-INF/classes.

 Can you be specific? Where is the .class file for that class (including
 full path)?

  Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have
 any
  thoughts or suggestions?

 Can you post the import lines from the JSP as well?

 Anything else that's relevant (symlinks, network file system, etc.)?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
 mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
 =uV0D
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: a servlet-related Java question

2010-04-22 Thread Kris Schneider
On Thu, Apr 22, 2010 at 2:37 AM, Bill Barker billwbar...@verizon.net wrote:


 Christopher Schultz ch...@christopherschultz.net wrote in message
 news:4bcf5f41.6060...@christopherschultz.net...

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 André,

 On 4/21/2010 3:46 PM, André Warnier wrote:

 Mark Thomas wrote:

 On 21/04/2010 20:24, André Warnier wrote:

 Mark Thomas wrote:
 ...

 I'd just use JAD and decompile it.

 Thanks.  But although my intentions are not obnoxious nor illegal nor
 anything of the kind, I would not want to even come under suspicion of
 reverse-engineering.  So is there something that just lists the
 standard
 calls/methods used in it ?

 No. You can see the methods it exposes, but not the methods it uses.
 Time to add some  debug code to your wrapper to see what is being
 called?

 Mmmm. :-(
 How do I do that, assuming I do not know in advance which methods it
 calls ?
 Do I need to define all the methods of HttpServletRequest in my wrapper,
 just to make them trace their call ?
 Or does there exist some more dummy-user-friendly methodology ?

 It's pretty inaccessible for novice Java programmers, but you could use
 the proxy API which is jsut about the coolest thing available in Java
 IMO.

 This is how you do the wrapping of the request:

 import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationHandler;

 public class RequestMethodCallLogger
  implements InvocationHandler, Filter
 {
  public void doFilter(...) {
   HttpServletRequest wrappedRequest
    = Proxy.newProxyInstance(HttpServletRequest.class.getClassLoader(),
                             new Class[] { HttpServletRequest.class },
                             this);

   chain.doFilter(wrappedRequest, response);
  }

  public Object invoke(Object proxy, Method method, Object[] args)
  {
   // Log to your favorite logger here

   return method.invoke(proxy, args);
  }
 }

 Basically, the Proxy class allows you to intercept the calls to
 interface methods. The implementation of the invoke method is just a
 pass-through to the real method after logging (an exercise left for
 the reader).

 This can be optimized a bit if you need to use it long-term, but the
 above is about as compact as it gets.


 If it does a forward or include done the line, this won't work with any
 remotely recent version of Tomcat.  These versions enforce the spec
 requirement that the Request has to be a subclass of HttpServletWrapper
 wrapping the original request, or the original request.

Good point - which really kills the proxy approach as a
general-purpose solution in this context...

 I'd still recommend the use of jad, honestly.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvPX0EACgkQ9CaO5/Lv0PCKVQCdG5SMXiySnsFEowVF7/44KM8s
 b7kAoIAGSzxOIWmKt4+z6ATkqslTl5uW
 =ykwF
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: a servlet-related Java question

2010-04-22 Thread Kris Schneider
On Thu, Apr 22, 2010 at 3:40 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Bill,

 On 4/22/2010 2:37 AM, Bill Barker wrote:
 It's pretty inaccessible for novice Java programmers, but you could use
 the proxy API which is [just] about the coolest thing available in
 Java IMO.

 If it does a forward or include done the line, this won't work with any
 remotely recent version of Tomcat.  These versions enforce the spec
 requirement that the Request has to be a subclass of HttpServletWrapper
 wrapping the original request, or the original request.

 How does Tomcat enforce that? HttpServletRequestWrapper doesn't expose
 the underlying request.

...but ServletRequestWrapper does

 I must admit that I didn't try it. I should.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvQpjMACgkQ9CaO5/Lv0PDioACfXvCsWsL6dPHDsegCEqCx0ISZ
 oF8Anj+PpzWrSWN9I6BWru0urmdLaWLg
 =qt08
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: a servlet-related Java question

2010-04-22 Thread Kris Schneider
On Thu, Apr 22, 2010 at 4:31 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Bill,

 On 4/22/2010 2:37 AM, Bill Barker wrote:
 If [the request/filter] does a forward or include done the line, this
 won't work with any remotely recent version of Tomcat.  These
 versions enforce the spec requirement that the Request has to be a
 subclass of HttpServletWrapper wrapping the original request, or the
 original request.

 The following filter works as expected on Tomcat 6.0.26 (some changes
 were required to make it actually work... my off-the-cuff implementation
 was lacking a few details).

 I can confirm that this filter operates properly across a forward()
 call: I have a struts action handles by the Struts servlet that forwards
 to a Velocity template handled by the Velocity servlet. All calls are
 logged to stdout. (Wow, lots of calls to Request.getAttribute!)

For reference, here's the snippet from the Servlet 2.5 Spec:

SRV.8.2 Using a Request Dispatcher

To use a request dispatcher, a servlet calls either the include method
or forward method of the RequestDispatcher interface. The parameters
to these methods can be either the request and response arguments that
were passed in via the service method of the javax.servlet interface,
or instances of subclasses of the request and response wrapper classes
that were introduced for version 2.3 of the specification. In the
latter case, the wrapper instances must wrap the request or response
objects that the container passed into the service method.

But...the proxy is created prior to entering a servlet's service
method, so it may well appear to be the original request for the
purposes of creating and validating a dispatcher and its parameters...

 import java.io.IOException;

 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;

 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;

 public class RequestMethodCallLogger
  implements Filter
 {
    public void doFilter(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain)
        throws ServletException, IOException
    {
        if(request instanceof HttpServletRequest)
            request = (ServletRequest)Proxy

 .newProxyInstance(HttpServletRequest.class.getClassLoader(),
                                    new Class[] {
 HttpServletRequest.class },
                                    new Wrapper(request));

        chain.doFilter(request, response);
    }

    public void init(FilterConfig config) { }
    public void destroy() { }

    static class Wrapper
        implements InvocationHandler
    {
        private Object _target;

        Wrapper(Object target)
        {
            _target = target;
        }

        public Object invoke(Object proxy, Method method, Object[] args)
            throws Throwable
        {
            System.out.print(Intercepted: );
            System.out.println(method);

            return method.invoke(_target, args);
        }
    }
 }
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvQsjUACgkQ9CaO5/Lv0PA65ACgiR4tiSji6MElZr9/Z0ibXdtX
 WJQAnRoB/GZbrSwdfPjcf50IpHFmW4L9
 =Stkm
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: a servlet-related Java question

2010-04-21 Thread Kris Schneider
On Wed, Apr 21, 2010 at 4:25 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 André,

 On 4/21/2010 3:46 PM, André Warnier wrote:
 Mark Thomas wrote:
 On 21/04/2010 20:24, André Warnier wrote:
 Mark Thomas wrote:
 ...

 I'd just use JAD and decompile it.

 Thanks.  But although my intentions are not obnoxious nor illegal nor
 anything of the kind, I would not want to even come under suspicion of
 reverse-engineering.  So is there something that just lists the standard
 calls/methods used in it ?

 No. You can see the methods it exposes, but not the methods it uses.
 Time to add some  debug code to your wrapper to see what is being called?

 Mmmm. :-(
 How do I do that, assuming I do not know in advance which methods it
 calls ?
 Do I need to define all the methods of HttpServletRequest in my wrapper,
 just to make them trace their call ?
 Or does there exist some more dummy-user-friendly methodology ?

 It's pretty inaccessible for novice Java programmers, but you could use
 the proxy API which is jsut about the coolest thing available in Java IMO.

 This is how you do the wrapping of the request:

Not to potentially muddy the waters, but I think your
InvocationHandler is invoking the method on the wrong object - it
shouldn't invoke it on the proxy but on the original request. So,
something like this:

public void doFilter(final ServletRequest request, ServletResponse
response, FilterChain chain) throws IOException, ServletException {

InvocationHandler handler = new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[]
args) throws Throwable {
// log some stuff
return method.invoke(request, args);
}
};

HttpServletRequest proxyRequest =
(HttpServletRequest)Proxy.newProxyInstance(HttpServletRequest.class.getClassLoader(),
new Class[] { HttpServletRequest.class }, handler);

chain.doFilter(proxyRequest, response);
}

 import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationHandler;

 public class RequestMethodCallLogger
  implements InvocationHandler, Filter
 {
  public void doFilter(...) {
    HttpServletRequest wrappedRequest
     = Proxy.newProxyInstance(HttpServletRequest.class.getClassLoader(),
                              new Class[] { HttpServletRequest.class },
                              this);

    chain.doFilter(wrappedRequest, response);
  }

  public Object invoke(Object proxy, Method method, Object[] args)
  {
    // Log to your favorite logger here

    return method.invoke(proxy, args);
  }
 }

 Basically, the Proxy class allows you to intercept the calls to
 interface methods. The implementation of the invoke method is just a
 pass-through to the real method after logging (an exercise left for
 the reader).

 This can be optimized a bit if you need to use it long-term, but the
 above is about as compact as it gets.

 I'd still recommend the use of jad, honestly.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvPX0EACgkQ9CaO5/Lv0PCKVQCdG5SMXiySnsFEowVF7/44KM8s
 b7kAoIAGSzxOIWmKt4+z6ATkqslTl5uW
 =ykwF
 -END PGP SIGNATURE-

-- 
Kris Schneider

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



Re: 405 error?

2010-02-10 Thread Kris Schneider
don't call super.doGet...

On Wed, Feb 10, 2010 at 3:20 PM, Ken Bowen kbo...@als.com wrote:

 I feel silly, but...
 Using Tomcat 6.0.20 (ordinary Apache download) with Java 1.6 on Mac OS X
 10.5.8.

 As a step towards examining what's going on in my main app, I created a
 simple auxilliary servlet; here's the web.xml entry:

 servlet
  servlet-namesbtester/servlet-name
  servlet-classcom.strongbrain.tests.SBTester/servlet-class
  /servlet

  servlet-mapping
  servlet-namesbtester/servlet-name
  url-pattern/sbtester/url-pattern
 /servlet-mapping

 [I also tried  url-pattern/sbtester/*/url-pattern with the same results
 as below.]

 Here's the code for the class:

 public class SBTester extends HttpServlet {
 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
        super.doGet(req, resp);
        String qq = req.getQueryString();
        System.out.println(SBTester.doGet: query=+req.getQueryString());
        PrintWriter pw = resp.getWriter();
        pw.println(Got: +qq);
        pw.close();
 }

 When I direct my browser to http://localhost:8080/sbtester?foo=bar
 [ or to http://localhost:8080/sbtester ]  I get this response:

 --HTTP Status 405 - HTTP method GET is not supported by this URL
 --message HTTP method GET is not supported by this URL
 --description The specified HTTP method is not allowed for the requested
 resource (HTTP method GET is not supported by this URL).

 But what is strange is that in catalina.out, I get:

 SBTester.doGet: query=foo=bar

 So, I'm a little confused.
 A)  How is this happening (doGet running, but the browser reporting an
 error)
 B)  What am I doing wrong?

 Thanks in advance,
 Ken

-- 
Kris Schneider

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



Re: Pipelining Problem after Form Authentication with Firefox and Status Code 408

2010-01-05 Thread Kris Reid

Did you find a solution? I've got the same issue



Derek-52 wrote:
 
 Hello,
 
 I have some troubles with firefox and form authentication running on  
 Tomcat 5.0.28.
 It happens as followed:
 
 User requests restricted Page and is redirected to a LoginServlet  
 which forwards the request to a Login.jsp. Nothing special here.
 Instead of logging in, the user waits, for  as long as the configured  
 session timeout e.g. 5 Minutes.
 After 5 Minutes he try to log in. The session is already expired an  
 Tomcat answers with Status Code 408.
 Status Code 408 should be handled by an error-page configured in the  
 web.xml.
 error-page
error-code408/error-code
locationError.jsp/location
 error-page
 
 With IE7 ore Safari i see ONE Request in my Tomcat Access Logfile,  
 answered with a 408, and then the Error Page is displayed.
 In Firefox 2.0.5 however, not ONE but TEN requests are made. All are  
 answered with 408, but not the Error Page is displayed, but a default  
 file not found status code 404  (j_security_check not found) is  
 displayed.
 
 If I then configure an error-page for status code 404 it gets even  
 stranger, and after all request were made, firefox displays its  
 standard The connection was reset page.
 
 As far as i understand the problem, firefox with enabled pipelining  
 sends multiple requests after the session expired and tomcat can not  
 handle those requests.
 
 What i don't understand is, why firefox sends so many requests?
 Can i control this behavior by setting some response headers? I  
 already tried Pragma: no-cache and
 Cache-Control: no-cache,no-store,must-revalidate?
 Or meta-tags in the html of the Login.jsp?
 
 Another interesting side effect is, that even so the server answer  
 with a 408, the JDBC Realm successfully authenticates the user. And  
 if you click the back button in the Browser you get to the actual  
 requested page without further Logins.
 But i guess, thats another question 
 
 Any help is appreciated,
 
 Derek
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


-
http://www.kremsoft.com Kremsoft - Software Development 
-- 
View this message in context: 
http://old.nabble.com/Pipelining-Problem-after-Form-Authentication-with-Firefox-and-Status-Code-408-tp12066543p27026693.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Understanding url-patterns

2009-12-08 Thread Kris Schneider
On Tue, Dec 8, 2009 at 1:32 PM, Jonathan Mast
jhmast.develo...@gmail.com wrote:
 I actually spent an hour and half trying to find the Servlet 2.5 specs and
 researching this question in general.  The only thing on Sun's site for
 Servlet 2.5 was the Javadocs, not the actual specs.  In fact I even found
 other people who had the same issue of not being able to find the Specs as a
 PDF.

 I have would be tickled to death to be able to read the specs straight from
 the source, but since I couldn't find the source, I figured I would ask
 another source of information, ie this list.

http://java.sun.com/products/servlet/reference/api/index.html

-- 
Kris Schneider

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



Re: How to cancel a servlet startup?

2009-11-12 Thread Kris Schneider
From a spec perspective, you're only guaranteed that the specific
servlet that throws an exception from its init method will be taken
out of service, not the entire app. One possibility might be to do the
system checks in a ServletContextListener and then have a Filter
operate on every request, inspect the status of your system checks
(hopefully a very quick inspection!), and redirect if there's a
problem.

On Thu, Nov 12, 2009 at 1:07 PM, Dan Armbrust
daniel.armbrust.l...@gmail.com wrote:
 I'll tell you what, if you can tell me how to prevent my users (who
 have full control over the application / installation / hardware where
 this is running) from being able to shoot themselves in the foot and
 do something that causes my app to fail - I'll buy you a case of beer
 and not worry about this.

 Until then, my servlet needs to do system checks - and if something is
 wrong, it needs to not deploy.  Thats the bit I haven't yet figured
 out...  How do I get tomcat to disable the entire context, when I
 detect that something is broken during startup?  And ideally, redirect
 the users to an error screen that tells them that it's broken..

 Thanks,

 Dan

 On Thu, Nov 12, 2009 at 11:42 AM, Joseph Morgan
 joseph.mor...@ignitesales.com wrote:
 Dan,

 Pardon my advice, but... this sounds like a programming/config/illegal
 state error that shouldn't make it to production.

 Of course, you could simply add instrumentation to the system to detect
 that this servlet didn't do its thing, and route every request to a
 holding page.

 Joe

 -Original Message-
 From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com]
 Sent: Thursday, November 12, 2009 10:48 AM
 To: Tomcat Users List
 Subject: How to cancel a servlet startup?

 If I have a servlet which fails during init() for whatever reason -
 the example below takes a null pointer

 public class MyServlet extends HttpServlet
 {
        private static final long serialVersionUID =
 7997991143724219371L;

       �...@override
        public void destroy()
        {
                //do stuff
                super.destroy();
        }

       �...@override
        public void init() throws ServletException
        {
                try
                {
                        String a = null;
                        a.toString();
                }
                catch (Exception e)
                {
                        System.err.println(Startup error - cancelling
 startup. +  e);
                        try
                        {
                                destroy();
                        }
                        catch (Exception e1)
                        {
                                //noop
                        }
                        throw new ServletException(Startup failing due
 to unexpected error:  + e);
                }
        }
 }


 How can I make tomcat cancel the deployment of the entire war file
 that this servlet was distributed with?

 I thought that throwing a ServletException back up to Tomcat would
 make the webapp unavailable - but Tomcat continues to serve pages from
 this webapp even though the startup failed.  That doesn't seem like
 correct behavior... am I missing a setting somewhere?

 Thanks,

 Dan

-- 
Kris Schneider

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



Re: loading a CharsetProvider via WebappClassLoader

2009-10-29 Thread Kris Schneider
While the Javadoc for CharsetProvider claims that providers are looked
up via the current thread's context class loader, the code for Charset
seems to clearly be using ClassLoader.getSystemClassLoader()...

On Thu, Oct 29, 2009 at 10:51 AM, Ronald Klop
ronald-mailingl...@base.nl wrote:
 Hi,

 I have this jar (jutf7.jar) which should register itself with the
 CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is
 ignored by Java. I understand that this is because of order in which the
 WebappClassLoader asks all other classloaders for a class.
 How can this be solved? Withouting having to deploy a jar file outside of
 the webapp. Or is this not possible?

 Thanks in advance for any tips.

 Ronald.

-- 
Kris Schneider

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



Re: loading a CharsetProvider via WebappClassLoader

2009-10-29 Thread Kris Schneider
I guess this bug will be of interest since it mentions both jutf7 and
webapps ;-)

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

On Thu, Oct 29, 2009 at 11:42 AM, Kris Schneider kschnei...@gmail.com wrote:
 While the Javadoc for CharsetProvider claims that providers are looked
 up via the current thread's context class loader, the code for Charset
 seems to clearly be using ClassLoader.getSystemClassLoader()...

 On Thu, Oct 29, 2009 at 10:51 AM, Ronald Klop
 ronald-mailingl...@base.nl wrote:
 Hi,

 I have this jar (jutf7.jar) which should register itself with the
 CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is
 ignored by Java. I understand that this is because of order in which the
 WebappClassLoader asks all other classloaders for a class.
 How can this be solved? Withouting having to deploy a jar file outside of
 the webapp. Or is this not possible?

 Thanks in advance for any tips.

 Ronald.

 --
 Kris Schneider




-- 
Kris Schneider

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



Tomcat Real Security on Port 80 - Connection Interrupted

2009-10-22 Thread Kris Reid

Hi

I have a server that hosts many websites and has Apache running on port 80.
On this server I have a few applications running on tomcat port 8080 that
use port forwarding to make it look like port 80.

For example shopping carts generally use port 80 so tomcat need to receive
on 80.

Any way this normally works perfect but for this latest application, that is
still in mid development, uses Realm security and it seems to be causing a
heck of a problem and I'm not sure where to look. Please not you might get
an error message but that will be a dead database thread in the pool (need
to look at that next) just refresh and it will be fine.

The application has username  password hard coded so feel free to take a
look

If you go to 
http://www.1realtimemlmleads.com/order/displayProducts.action
The log in screen will come up. After hitting enter it sends data back and
forth but then Connection Interrupted - Document contains no data

But if you go to 
http://www.1realtimemlmleads.com:8080/Leads/order/displayProducts.action
It works perfect

What am I missing? Been banging my head on this for days.

Any ideas would be appreciated 

Cheers

Kris


-
http://www.kremsoft.com Kremsoft - Software Development 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Real-Security-on-Port-80---Connection-Interrupted-tp26006289p26006289.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat Real Security on Port 80 - Connection Interrupted

2009-10-22 Thread Kris Reid

Hi Peter

Tomcat 5.5.25
httpd 1.3.41

We are using mod_proxy with the following commands:

Contents of
/usr/local/apache/conf/userdata/std/1/realtim1/1realtimemlmleads.com/proxy.conf:

ProxyPass / http://localhost:8080/Leads/
ProxyPassReverse / http://localhost:8080/Leads/


Does that make sense? Any other information you need?

Cheers

Kris




Peter Crowther wrote:
 
 Exact Tomcat version?
 Exact httpd version?
 How are you connecting the two?  Port forwarding seems odd unless
 you have two IP addresses so that httpd is on addr1:80 and Tomcat is
 on addr2:80.
 Once we know more, we can start to help you debug the issue!
 
 - Peter
 
 2009/10/22 Kris Reid krisrei...@gmail.com:

 Hi

 I have a server that hosts many websites and has Apache running on port
 80.
 On this server I have a few applications running on tomcat port 8080 that
 use port forwarding to make it look like port 80.

 For example shopping carts generally use port 80 so tomcat need to
 receive
 on 80.

 Any way this normally works perfect but for this latest application, that
 is
 still in mid development, uses Realm security and it seems to be causing
 a
 heck of a problem and I'm not sure where to look. Please not you might
 get
 an error message but that will be a dead database thread in the pool
 (need
 to look at that next) just refresh and it will be fine.

 The application has username  password hard coded so feel free to take a
 look

 If you go to
 http://www.1realtimemlmleads.com/order/displayProducts.action
 The log in screen will come up. After hitting enter it sends data back
 and
 forth but then Connection Interrupted - Document contains no data

 But if you go to
 http://www.1realtimemlmleads.com:8080/Leads/order/displayProducts.action
 It works perfect

 What am I missing? Been banging my head on this for days.

 Any ideas would be appreciated

 Cheers

 Kris


 -
 http://www.kremsoft.com Kremsoft - Software Development
 --
 View this message in context:
 http://www.nabble.com/Tomcat-Real-Security-on-Port-80---Connection-Interrupted-tp26006289p26006289.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


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


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


-
http://www.kremsoft.com Kremsoft - Software Development 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Real-Security-on-Port-80---Connection-Interrupted-tp26006289p26008845.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: 404 Error troubleshooting

2009-09-11 Thread Kris Schneider
On Fri, Sep 11, 2009 at 12:59 PM, Mike Baranski
list-subscripti...@secmgmt.com wrote:
 Yes, restarted Tomcat (I also opened the war and opened the web.xml inside
 of it to make sure it was what I thought it was).

 No deploy errors, either.

make sure you include the app's context (Path value in manager) in
the request...

-- 
Kris Schneider

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



Re: 404 Error troubleshooting

2009-09-11 Thread Kris Schneider
On Fri, Sep 11, 2009 at 1:06 PM, Kris Schneider kschnei...@gmail.com wrote:
 On Fri, Sep 11, 2009 at 12:59 PM, Mike Baranski
 list-subscripti...@secmgmt.com wrote:
 Yes, restarted Tomcat (I also opened the war and opened the web.xml inside
 of it to make sure it was what I thought it was).

 No deploy errors, either.

 make sure you include the app's context (Path value in manager) in
 the request...

 --
 Kris Schneider

whoops, didn't notice that Charles had addressed this a couple minutes
earlier...

-- 
Kris Schneider

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



Re: Where should we deploy/put web application patch jar in Tomcat 5.5 ?

2009-08-20 Thread Kris Schneider
On Wed, Aug 19, 2009 at 1:10 PM, Mark Thomasma...@apache.org wrote:
 Fang Zhu wrote:
 I know I can unpackage the abcPatch.jar and put under /WEB-INF/classes 
 folder, but this is not we are looking for.

 That is your only option.

 Mark

Not sure how difficult it would be to implement, but wouldn't a custom
WebappLoader and/or WebappClassLoader also be an option?

-- 
Kris Schneider

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



problems with unsubscribing

2006-06-13 Thread Kris Reese
OK -- I've been trying to unsubscribe from the mailing list, many many many 
many times now by sending a blank e-mail to 
[EMAIL PROTECTED] but it's not working.  Can anybody tell 
me what is going on here?


Thank you.



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



[5.5] path specified in context.xml not being used

2006-03-24 Thread Kris Nuttycombe
Hi, all,

Hopefully a pretty simple question:

I am attempting to deploy a warfile with an embedded
META-INF/context.xml. The contents of the context.xml file looks like this:

Context path=/idb debug=99 reloadable=true crossContext=false
override=true
...
/Context

The warfile is named idb-0.8.2-SNAPSHOT.war

Everything is working fine EXCEPT that the context path that it is
deployed under is /idb-0.8.2-SNAPSHOT instead of /idb - how can I
get it to deploy under a path different from the warfile name?

Thanks,

Kris



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