Re: Hide JSP name using web.xml

2010-03-31 Thread 2smart4u
hm, might be a bit of typo-work, but why not specify them in your
deployment-descriptor (aka web.xml)?

example (snippet):



SomeName
MyServlet
/WEB-INF/yourJSPFile.jsp


MyServlet
/MyServlet


Hope I got your requirements correctly.

Cheers

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

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



Re: DB connection error -Tomcat 6 config

2010-03-19 Thread 2smart4u
just a quick thought:

have you tried installing Tomcat into a directory where it's name is
*not* containing any spaces?

cheers

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

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



Re: Always load balance to same box with different tomcat contexts

2010-03-19 Thread 2smart4u
Guys,

On Fri, Mar 19, 2010 at 5:12 PM, Mark Thomas  wrote:
> On 19/03/2010 12:16, 2smart4u wrote:
>
> As per the thread title the OP wanted to:
> "Always load balance to same box with different tomcat contexts"
>

I understood it that way that he always wanted to loadbalance the same
sessions to the same box: Maybe I misunderstood that, but I don't see
any sense in loadbalancing every request independent of any session-
data to the same box: Why then use a loadbalancer anyways? But I guess
I'm missing something here

I guess this is a communication-(language?)-problem: A lot of ppl here
are not native speakers, so things got & will get mixed up.

Anyways, I guess the OP now has a whole bunch of information where he
can pick the most suitiable from

>
> That's the thing with e-mail, no-one can tell what tone of voice you are
> using or see the smile on your face as you type it. Particularly on
> mailing lists where people don't know each other, recipients have to
> reply soley on the text they see in front of them. What seems humerous
> to one person can appear completely differently to someone else. To me,
> "2smart4u" comes across as arrogant rather than funny.
>
Well, I really do hope that I don't appear  - apart from 2smart4u,
what's more or less a joke - arrogant, especially not within my posts.
If so, let me know since that's really, really not my intention.

And maybe you remember Amsterdam 2009, where we had a few beer and, if
I get it right, some mongolean food together ;)

I just didn't like my real name to show up in the lists any more since
I got mails from too many ppl asking nonsense (esp. headhunters
looking for cheap Tomcat-Admins).

Ok, I'll call it a weekend now and I'll be off for a
premier-league-football-match here in Cologne: I'm afraid we'll loose
that one anyways, but I rather watch my favourite team loose a match
than bumping around in the office ;)

Cheers!

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

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



Re: Always load balance to same box with different tomcat contexts

2010-03-19 Thread 2smart4u
Mark,

had a bad day?

On Fri, Mar 19, 2010 at 12:46 PM, Mark Thomas  wrote:

> The question was how to make session stickiness apply to all applications on
> a host. Clustering was mentioned but isn't relevant to this question (and
> the OP's original post seemed to suggest they were having issues with
> session replication).

Hm, either my English is too bad to understand the OP's question, or
you might have missed something. The OP wrote:

> Also it's setup as cluster with Clustered SSO Valve:

So to my understanding it *is* about clustering and different hosts -
or am I wrong here?

> As an aside, have you considered using a less arrogant e-mail address?

First off, I don't see the email-adress as arrogent (since it's
rc46fi). However, I'm owning a domain 2smart4u, and since I stopped
using my real name in public emails (thanks to seach-engines and
spam), I'm using it as a name, but I'm using it with a wink in my
eyes.

Sorry if this might have insulted you or others.

Cheers

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

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



Re: Always load balance to same box with different tomcat contexts

2010-03-19 Thread 2smart4u
On Fri, Mar 19, 2010 at 11:54 AM, Mark Thomas  wrote:
>
>> 2) There is cookie in browser - it will loadbalance to engine which
>> already
>> has session - since cookie has no context path
>
> Correct.
>

Mark, I think you might be missing something here.

If I got the OP correct, it's not only about loadbalancing but also
about maintaing the session between different Tomcat instances.

Given that, when you want to loadbalance between two or more Tomcat
instances where those instances don't know from each other, each
instance will create it's very own session-cookie (at least this is
how it shows up in our setup).

So to my understanding the only solution to maintain
session-information between multiple loadbalanced Tomcat instances is
to run them within a cluster.

Please correct me if I'm wrong.

Cheers

Gregor


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



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

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



Re: Always load balance to same box with different tomcat contexts

2010-03-19 Thread 2smart4u
On Fri, Mar 19, 2010 at 11:05 AM, Andrey Ilyin  wrote:
>
>
> Does this mean that session/servletContext is shared between contexts? E.g.
> if I have some attribute in session/application contexts in webapp1 would it
> be accesible in webapp2?
>

when the context is dropped from a Cookie-path, the cookie is valid
for any context on that host

> So my understanding how it works:
>
> 1) There is no cookie in browser - it will loadbalance to any engine

you'll loose the session without a cookie, unless you're using
url-rewriting to store the session-information.
best practise is to use a cookie, though

> 2) There is cookie in browser - it will loadbalance to engine which already
> has session - since cookie has no context path

nope. actually the cookie can now be shared between various contexts
on the same engine (machine).
when having multiple instances of tomcat running where you want to
share the session-information, IMHO you'll need to setup a
tomcat-cluster.

hth

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

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



Re: DB connection error -Tomcat 6 config

2010-03-18 Thread 2smart4u
One more word:

The config I posted refers to 2.4 xsd, so put this at the beginning of
your deployment-descriptor:


http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

Cheers

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

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



Re: DB connection error -Tomcat 6 config

2010-03-18 Thread 2smart4u
Resource-Ref is definately 2.3-standard.

Here's a configuration we're running in production. Adapt it to your
needs, should work with TC 5.5 and 6.x:

META-INF/context.xml:



  


You don't habe to specify the DS in your deployment-descriptor (web.xml) at all.

Within your servlet / jsp, your get a handle from the DS as follows:

Context env = (Context) new InitialContext()
.lookup("java:comp/env");
DataSource dbDS = (DataSource) env.lookup(dataSourceName);

HTH

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

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



Re: Always load balance to same box with different tomcat contexts

2010-03-18 Thread 2smart4u
>From the docs:

= [cut] =

If set to true, all paths for session cookies will be set to /. This
can be useful for portlet specification implementations. If not
specified, this attribute is set to false.

= [cut] =

More or less, it drops the context from the Cookie-path, meaning the
cookie is valid for all contexts.

Cheers

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

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



Re: mod_jk - apache to tomcat using SSL

2010-03-18 Thread 2smart4u
On Tue, Mar 16, 2010 at 9:53 PM, Campbell, Lance  wrote:
> I have a web server and an application server.  I use mod_jk to
> communicate between apache2.0 and tomcat 6.  I don't believe the
> communication between apache and tomcat is secured by default.  Is there
> a way to have it send the information in a secure way.
>

hm, first thing popping up in my mind:

why encrypting the traffic between httpd and tomcat (frontend /
backend) anyways? ain't it sufficient to ssl the traffic between
client and frontend (httpd)?

just wondering...

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

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



Re: Unable to compile APR (tomcat-native-1.1.20) on Debian Lenny

2010-03-16 Thread 2smart4u
On Tue, Mar 16, 2010 at 8:07 PM, Mladen Turk  wrote:
>
> And we were all sick of worrying what's going on with you ;)
>

I absolutely believe that ;)

well, my junior is keeping me busy, that means less time for browsing
the list, but I'll promise to show up a bit more often.

>
> Seems to me like a compiler problem.
>

yes, actually that was it, and Debian *sic* fooled me:

a compiler was installed, but the gcc-meta-package was missing (why
the heck do i need a meta-package when the compiler is in place?
wtf)

anyhow, it's working now :)

btw, since I'm trying out clustering, I guess I might show up more often now ;)

Cheers!

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

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



Re: Unable to compile APR (tomcat-native-1.1.20) on Debian Lenny

2010-03-16 Thread 2smart4u
Mabye a little piece of infor which might be helpful:

excerpt from config.log (not working):

configure:3402: i486-linux-gnu-gcc --version >&5
./configure: line 3404: i486-linux-gnu-gcc: command not found

in config.log (working) the output is

configure:2737: i486-linux-gnu-gcc --version &5
i486-linux-gnu-gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Strange thing is, that I do have a c-compiler installed:

 gcc --version
gcc (GCC) 4.1.3 20080704 (prerelease) (Debian 4.1.2-27)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However, on Debia Etch, I've got version 4.1.2, in Lenny it's 4.1.3 -
might that be the cause of the problem?

TIA

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

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



Unable to compile APR (tomcat-native-1.1.20) on Debian Lenny

2010-03-16 Thread 2smart4u
Hi guys,

long time no see ;)

I hope somebody can shed some light here since meanwhile I'm running
out of ideas:

I set up a Vanilla Debian Lenny and downloaded the latest Tomcat
6.0.26 from tomcat.apache.org.

I've also installed libapr1, libapr1-dev, openssl and libssl-dev

I untared tomcat-native-1.1.20, went into jni/native and issued

./configure --with-apr=/usr/bin/apr-1-config
--with-java-home=$JAVA_HOME --with-ssl=yes

However, I got the following output:

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.20
checking for chosen layout... tcnative
checking for APR... yes
  setting CC to "i486-linux-gnu-gcc"
  setting CPP to "i486-linux-gnu-gcc -E"
checking for a BSD-compatible install... /usr/bin/install -c
checking for JDK location (please wait)... /usr/lib/jvm/java-6-sun
checking Java platform... checking Java platform...
checking for sablevm... NONE
  adding "-I/usr/lib/jvm/java-6-sun/include" to TCNATIVE_PRIV_INCLUDES
checking os_type directory...  linux
  adding "-I/usr/lib/jvm/java-6-sun/include/linux" to TCNATIVE_PRIV_INCLUDES
checking for gcc... i486-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: in
`/home/cluster/tomcat/current/bin/tomcat-native-1.1.20-src/jni/native':
configure: error: C compiler cannot create executables
See `config.log' for more details.

The config.log:

===[cut]=

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ ./configure --with-apr=/usr/bin/apr-1-config
--with-java-home=/usr/lib/jvm/java-6-sun --with-ssl=yes

## - ##
## Platform. ##
## - ##

hostname = someHost
uname -m = i686
uname -r = 2.6.32-trunk-686
uname -s = Linux
uname -v = #1 SMP Sun Jan 10 06:32:16 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## --- ##
## Core tests. ##
## --- ##

configure:2024: checking build system type
configure:2042: result: i686-pc-linux-gnu
configure:2064: checking host system type
configure:2079: result: i686-pc-linux-gnu
configure:2101: checking target system type
configure:2116: result: i686-pc-linux-gnu
configure:2158: checking for a BSD-compatible install
configure:2226: result: /usr/bin/install -c
configure:2244: checking for working mkdir -p
configure:2260: result: yes
configure:2353: checking for chosen layout
configure:2355: result: tcnative
configure:2512: checking for APR
configure:2597: result: yes
configure:2667: checking for a BSD-compatible install
configure:2735: result: /usr/bin/install -c
configure:2750: checking for JDK location (please wait)
configure:2778: result: /usr/lib/jvm/java-6-sun
configure:2861: checking Java platform
configure:2886: checking Java platform
configure:2893: result:
configure:2903: checking for sablevm
configure:2934: result: NONE
configure:3011: checking os_type directory
configure:3135: checking for gcc
configure:3162: result: i486-linux-gnu-gcc
configure:3394: checking for C compiler version
configure:3402: i486-linux-gnu-gcc --version >&5
./configure: line 3404: i486-linux-gnu-gcc: command not found
configure:3406: $? = 127
configure:3413: i486-linux-gnu-gcc -v >&5
./configure: line 3415: i486-linux-gnu-gcc: command not found
configure:3417: $? = 127
configure:3424: i486-linux-gnu-gcc -V >&5
./configure: line 3426: i486-linux-gnu-gcc: command not found
configure:3428: $? = 127
configure:3451: checking for C compiler default output file name
configure:3473: i486-linux-gnu-gccconftest.c  >&5
./configure: line 3475: i486-linux-gnu-gcc: command not found
configure:3477: $? = 127
configure:3515: result:
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3521: error: in
`/home/cluster/tomcat/current/bin/tomcat-native-1.1.20-src/jni/native':
configure:3524: error: C compiler cannot create executables
See `config.log' for more details.

##  ##
## Cache variables. ##
##  ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_en