Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread Federico Fissore

Christopher Schultz, il 02/07/2010 23:00, ha scritto:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Federico,

On 7/2/2010 8:36 AM, Federico Fissore wrote:

I've embedded tomcat so to have multiple webapps running with separate
java processes (each embedded tomcat runs its own webapp, listening to a
different tcp port), because of some memory issues we have.


Have you considered simply using CATALINA_BASE to run separate Tomcats?
That would likely be easier than writing an embedded Tomcat wrapper, etc.



yes, but embedding tomcat is part of a wider plan of building an 
internal management system




Are you sure Tomcat is completely shut down when you perform the delete?
If not, Tomcat might have some in-memory notion of what's on the disk,
and get confused when the files suddenly disappear.


yes, i'm sure. work wipe out occurs in the shutdown hook of the embedded 
tomcat and when it terminates the related java process no

longer exists (just like when you kill a process on linux)




Have you tried undeploying the webapp and re-deploying? That should
cause Tomcat to clear it's own work directory for that webapp.



as said, when we wipe out, tomcat is running no more, so it couldn't 
clear the folder on its own


thanks for the reply

federico

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



Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread 赵顺
It seems like the bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=49539
the tomcat delete workdir while startup with errors

On Sat, Jul 3, 2010 at 4:03 PM, Federico Fissore fiss...@celi.it wrote:

 Christopher Schultz, il 02/07/2010 23:00, ha scritto:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Federico,

 On 7/2/2010 8:36 AM, Federico Fissore wrote:

 I've embedded tomcat so to have multiple webapps running with separate
 java processes (each embedded tomcat runs its own webapp, listening to a
 different tcp port), because of some memory issues we have.


 Have you considered simply using CATALINA_BASE to run separate Tomcats?
 That would likely be easier than writing an embedded Tomcat wrapper, etc.


 yes, but embedding tomcat is part of a wider plan of building an internal
 management system


 Are you sure Tomcat is completely shut down when you perform the delete?
 If not, Tomcat might have some in-memory notion of what's on the disk,
 and get confused when the files suddenly disappear.


 yes, i'm sure. work wipe out occurs in the shutdown hook of the embedded
 tomcat and when it terminates the related java process no
 longer exists (just like when you kill a process on linux)



 Have you tried undeploying the webapp and re-deploying? That should
 cause Tomcat to clear it's own work directory for that webapp.


 as said, when we wipe out, tomcat is running no more, so it couldn't clear
 the folder on its own

 thanks for the reply

 federico

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




-- 
   致
   礼!


  赵顺cnjoy...@gmail.com


Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread Mark Thomas

On 03/07/2010 10:13, 赵顺 wrote:

It seems like the bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=49539
the tomcat delete workdir while startup with errors


The configuration in that bug report is completely invalid. If you use 
an invalid configuration, then there is always the chance it will have 
side-effects you don't want.


Mark



On Sat, Jul 3, 2010 at 4:03 PM, Federico Fissorefiss...@celi.it  wrote:


Christopher Schultz, il 02/07/2010 23:00, ha scritto:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Federico,

On 7/2/2010 8:36 AM, Federico Fissore wrote:


I've embedded tomcat so to have multiple webapps running with separate
java processes (each embedded tomcat runs its own webapp, listening to a
different tcp port), because of some memory issues we have.



Have you considered simply using CATALINA_BASE to run separate Tomcats?
That would likely be easier than writing an embedded Tomcat wrapper, etc.



yes, but embedding tomcat is part of a wider plan of building an internal
management system



Are you sure Tomcat is completely shut down when you perform the delete?
If not, Tomcat might have some in-memory notion of what's on the disk,
and get confused when the files suddenly disappear.



yes, i'm sure. work wipe out occurs in the shutdown hook of the embedded
tomcat and when it terminates the related java process no
longer exists (just like when you kill a process on linux)




Have you tried undeploying the webapp and re-deploying? That should
cause Tomcat to clear it's own work directory for that webapp.



as said, when we wipe out, tomcat is running no more, so it couldn't clear
the folder on its own

thanks for the reply

federico

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










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



Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread Federico Fissore

赵顺, il 03/07/2010 10:13, ha scritto:

It seems like the bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=49539
the tomcat delete workdir while startup with errors



uhm no, in this case it's me that it's clearing the work folder and btw 
I have some fifty webapps that runs smootly, restarting and continuously 
redeploying every day. just sometimes one or two (at random manifest the 
problem)


Really looks like a concurrency problem to me: too random but hard to 
spot (I have 12 server with 4 to 10 tomcats running and it's not always 
the same server suffering the problem)


in the meanwhile, digging into log files, I've found a
Jul 3, 2010 6:36:09 AM org.apache.jasper.EmbeddedServletOptions init
SEVERE: The scratchDir you specified: 
/opt/tomcats/work/StandardHost[localhost].StandardContext[/myWebApp]Engine/localhost/myWebApp 
is unusable.

Jul 3, 2010 6:36:09 AM org.apache.coyote.http11.Http11Protocol init

I've checked the permissions and they are all ok (every tomcat runs with 
same user privileges and they own the whole folder structure)


federico

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



Re: [OT] Using httpd's mod_rewrite with mod_jk

2010-07-03 Thread Rainer Jung

On 02.07.2010 22:02, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 7/2/2010 10:13 AM, Rainer Jung wrote:

On 02.07.2010 02:37, Christopher Schultz wrote:


Okay, I changed my RewriteRule to this:

  RewriteRule .* /bad-browser.shtml [L,E=no-jk]


OK, I did a little test:

RewriteRule .* /bad-browser.shtml [L,E=no-jk:1]

should work. A quick glance at mod_rewrite's code indicates it drops E=
rules when no value is present.


You know, I should have thought of that. My other experiences with
environment variables and non-env variables with Apache was that you can
set a variable to nothing but it is still considered set (or
defined, if you prefer). In this case, it is not.


Right, I'd say it's a buglet in mod_rewrite. Maybe something I can 
improve for httpd trunk ... (I need to check whether it still behaves 
the same there).


Regards,

Rainer

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



EL expressions do not work in tag file (tomcat 6.26)

2010-07-03 Thread 赵顺
my web.xml

--
web-app xmlns=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;
version=2.4
use jsp 2.4
--
jsp-config
 taglib
   taglib-urijet/taglib-uri
   taglib-location/WEB-INF/jet.tld/taglib-location
/taglib
jsp-property-group
url-pattern*.jsp/url-pattern
el-ignoredfalse/el-ignored
page-encodingUTF-8/page-encoding
scripting-invalidtrue/scripting-invalid
/jsp-property-group
   jsp-property-group
url-pattern*.tag/url-pattern
el-ignoredfalse/el-ignored
page-encodingUTF-8/page-encoding
scripting-invalidtrue/scripting-invalid
/jsp-property-group
/jsp-config
-
and the el expressions works fine in jsp file such as ${1+1} ${var}
but the same expressions do not work in .taf file it print out the
expression directly

It both work fine in tomcat 6.0.18

but in 6.0.26  the tag file did not show expression correctly




-- 
   致
   礼!


  赵顺cnjoy...@gmail.com


Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread Pid
On 03/07/2010 12:11, Federico Fissore wrote:
 赵顺, il 03/07/2010 10:13, ha scritto:
 It seems like the bug
 https://issues.apache.org/bugzilla/show_bug.cgi?id=49539
 the tomcat delete workdir while startup with errors

 
 uhm no, in this case it's me that it's clearing the work folder and btw
 I have some fifty webapps that runs smootly, restarting and continuously
 redeploying every day. just sometimes one or two (at random manifest the
 problem)
 
 Really looks like a concurrency problem to me: too random but hard to
 spot (I have 12 server with 4 to 10 tomcats running and it's not always
 the same server suffering the problem)
 
 in the meanwhile, digging into log files, I've found a
 Jul 3, 2010 6:36:09 AM org.apache.jasper.EmbeddedServletOptions init
 SEVERE: The scratchDir you specified:

 /opt/tomcats/work/StandardHost[localhost].StandardContext[/myWebApp]Engine/localhost/myWebApp

Is that really the path in use?

/opt
 /tomcats
  /work
   /StandardHost[localhost].StandardContext[
/myWebApp]Engine
 /localhost
  /myWebApp

Looks a little weird to me, the square brackets are split across
directories and there's a reference to myWebApp and localhost in two places.


p

 is unusable.
 Jul 3, 2010 6:36:09 AM org.apache.coyote.http11.Http11Protocol init
 
 I've checked the permissions and they are all ok (every tomcat runs with
 same user privileges and they own the whole folder structure)
 
 federico
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: [OT] Using httpd's mod_rewrite with mod_jk

2010-07-03 Thread Rainer Jung

On 03.07.2010 14:08, Rainer Jung wrote:

On 02.07.2010 22:02, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 7/2/2010 10:13 AM, Rainer Jung wrote:

On 02.07.2010 02:37, Christopher Schultz wrote:


Okay, I changed my RewriteRule to this:

RewriteRule .* /bad-browser.shtml [L,E=no-jk]


OK, I did a little test:

RewriteRule .* /bad-browser.shtml [L,E=no-jk:1]

should work. A quick glance at mod_rewrite's code indicates it drops E=
rules when no value is present.


You know, I should have thought of that. My other experiences with
environment variables and non-env variables with Apache was that you can
set a variable to nothing but it is still considered set (or
defined, if you prefer). In this case, it is not.


Right, I'd say it's a buglet in mod_rewrite. Maybe something I can
improve for httpd trunk ... (I need to check whether it still behaves
the same there).


I made the VAL argument in ENV=VAR:VAL optional for httpd trunk:

http://svn.apache.org/viewvc?rev=960233view=rev

and proposed it for backport to httpd 2.2.x. It's a trivial change, no 
risk, and a nice shortcut for configuration. Otherwise the module should 
at least complain about an invalid flag syntax.


Nice cross project interaction :)

Regards,

Rainer

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



Re: embedded tomcat, work folder wipe out issue

2010-07-03 Thread Federico Fissore

Pid, il 03/07/2010 16:08, ha scritto:

Is that really the path in use?

/opt
  /tomcats
   /work
/StandardHost[localhost].StandardContext[
 /myWebApp]Engine
  /localhost
   /myWebApp

Looks a little weird to me, the square brackets are split across
directories and there's a reference to myWebApp and localhost in two places.



you are right. the path is weird. wasn't intentional but generated. btw 
I've changed it to
/opt/tomcats/work/myWebApp/localhost/myWebApp (the last two folders are 
generated by tomcat)


thanks for pointing that out

federico

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



Re: Getting a servlet to work within static pages

2010-07-03 Thread David Kerber

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 7/2/2010 10:04 AM, David kerber wrote:
  

On 7/2/2010 9:23 AM, Pid wrote:



  

Silly question, have you got the jars for that taglib in:

ROOT/WEB-INF/lib?

p
  

Not silly at all.  I was thinking they'd pick up what they need from the
ginp webapp, but I've never done this kind of cross-context calling
before.  I'll try that.



Tomcat isn't going to load taglibs from another context, so you'd better
deploy the taglib JAR in both contexts. Once you do that, use the
correct taglib URI to reference it. Presumably /ginp isn't correct.
It's probably something like http://www.ginp.com/taglibs/v1; or
something like that.
  
Yep, that's basically what's going on:  /ginp is the root of the ginp 
context on my web site, and my ROOT context won't reach across the 
context boundaries.  Unfortunately, the ginp project is written to be 
build into a standalone .war file rather than a library .jar and a set 
of front-end classes, and I'm having to do a bit of futzing around to 
get the bits I need to work in my ROOT context, but I'm getting there. 

It would require a major refactoring to get the http pieces of ginp 
separated out from the parts that could be in a library .jar file, and 
I'm not ready to tackle that right now.  So I'm looking at some kind of 
deployment script to copy the .tld and other config files I need into 
the correct spots in my ROOT context.


D



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



Re: Application vars -

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric,

On 6/28/2010 11:37 PM, Eric P wrote:
 I've been loading up my web.xml with context and init params for my
 first app, but I'm thinking at some point it'd be nice to tweak these
 values on the fly while the app is running.
 
 What are some good practices to accomplish this?
 
 I'm leaning towards storing all application variables in a database
 table w/one record, and loading these values into the application scope
 w/a servlet on app startup.  Then if I need to tweak any values I could
 update the db record and hit this servlet to reload all the application
 scope vars.

I think this seems like a reasonable idea. I would use a
ServletContextListener to trigger the initial load from the db or other
data source (properties file, etc.).

You could even use variables from web.xml in init-params if you want.
The only caveat to this option is that you can't very well change
web.xml during runtime and re-load the vars. Instead, you'd have to have
a mechanism to change those variables either manually and individually
(like an admin system settings page), or load from another data
source, at which point you may as well forget init-params in the first
place.

You'll want to use a servlet, of course, for re-loading your settings
from file/db/etc. I would recommend making the aforementioned
ServletContextListener and this servlet share a helper class that loads
and settings and puts them into the application scope. Heck, you can
even use a single class that is a servlet but also implements
ServletContextListener, and have everything in one class.

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

iEYEARECAAYFAkwv7SUACgkQ9CaO5/Lv0PAyBQCggcLWFKXPqTSksO5dUVORJ8ih
LtQAoK6wZbIArJSQe1pZ9fqeGWtn/PvV
=Vdua
-END PGP SIGNATURE-

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



Re: Getting a servlet to work within static pages

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 7/3/2010 9:24 PM, David Kerber wrote:
 Yep, that's basically what's going on:  /ginp is the root of the ginp
 context on my web site, and my ROOT context won't reach across the
 context boundaries.  Unfortunately, the ginp project is written to be
 build into a standalone .war file rather than a library .jar and a set
 of front-end classes, and I'm having to do a bit of futzing around to
 get the bits I need to work in my ROOT context, but I'm getting there.
 It would require a major refactoring to get the http pieces of ginp
 separated out from the parts that could be in a library .jar file, and
 I'm not ready to tackle that right now.  So I'm looking at some kind of
 deployment script to copy the .tld and other config files I need into
 the correct spots in my ROOT context.

Maybe you could just merge your stuff into the /ginp webapp? That might
be simpler.

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

iEYEARECAAYFAkwv7k8ACgkQ9CaO5/Lv0PAAZwCghzAIlgUY3/oZfnPkdISTSFPC
YNkAnjosXoREucQguLfzCaVjAohQvs95
=MWcv
-END PGP SIGNATURE-

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



Re: [OT] Using httpd's mod_rewrite with mod_jk

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 7/3/2010 1:54 PM, Rainer Jung wrote:
 On 03.07.2010 14:08, Rainer Jung wrote:
 On 02.07.2010 22:02, Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Rainer,

 On 7/2/2010 10:13 AM, Rainer Jung wrote:
 On 02.07.2010 02:37, Christopher Schultz wrote:

 Okay, I changed my RewriteRule to this:

 RewriteRule .* /bad-browser.shtml [L,E=no-jk]

 OK, I did a little test:

 RewriteRule .* /bad-browser.shtml [L,E=no-jk:1]

 should work. A quick glance at mod_rewrite's code indicates it drops E=
 rules when no value is present.

 You know, I should have thought of that. My other experiences with
 environment variables and non-env variables with Apache was that you can
 set a variable to nothing but it is still considered set (or
 defined, if you prefer). In this case, it is not.

 Right, I'd say it's a buglet in mod_rewrite. Maybe something I can
 improve for httpd trunk ... (I need to check whether it still behaves
 the same there).
 
 I made the VAL argument in ENV=VAR:VAL optional for httpd trunk:
 
 http://svn.apache.org/viewvc?rev=960233view=rev
 
 and proposed it for backport to httpd 2.2.x. It's a trivial change, no
 risk, and a nice shortcut for configuration. Otherwise the module should
 at least complain about an invalid flag syntax.
 
 Nice cross project interaction :)

Always glad to help, even on trivial matters. Thanks for the patch.

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

iEYEARECAAYFAkwv7xcACgkQ9CaO5/Lv0PA8QwCbBPjZm3IbEaCu6X3rzicMQsNF
3kwAn0482j+zHRGDbdvO/kvO7h6vIoss
=/2zE
-END PGP SIGNATURE-

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



Re: EL expressions do not work in tag file (tomcat 6.26)

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

赵顺,

On 7/3/2010 8:44 AM, 赵顺 wrote:
 web-app xmlns=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;
 version=2.4
 use jsp 2.4


That's not JSP 2.4, it's JSP 2.0. You might want to specify 2.5, which
will get you JSP 2.1. That might fix everything for you.

  taglib
taglib-urijet/taglib-uri
taglib-location/WEB-INF/jet.tld/taglib-location
 /taglib

And what does your JSP look like?

 and the el expressions works fine in jsp file such as ${1+1} ${var}
 but the same expressions do not work in .taf file it print out the
 expression directly

You mean a .tag file, right? Can you post one of those that doesn't work
properly?

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

iEYEARECAAYFAkwv8Q4ACgkQ9CaO5/Lv0PCapgCdHCFfTa8ENdX9ACBXj7dW93Zf
SBMAoLqzG31PYu3i6lHuCc9blWgRpXsF
=BVEs
-END PGP SIGNATURE-

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



Re: Question about BASIC Authentication

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 7/1/2010 3:31 AM, Pid wrote:
 On 01/07/2010 02:30, Christopher Schultz wrote:
 Matthew,

 On 6/30/2010 8:20 PM, Matthew Mauriello wrote:
 The behavior seems rather strange to me in fact, I've seen other websites
 run on what looks to be BASIC Authentication without popping these browser
 messages when leaving secured sections.

 Most websites use HTTP AUTH consistently, at least for a particular URL
 prefix.

 See the http://user:passw...@website.com/SOLR is only used once and it
 might actually be http://user:passw...@website.com/SOLR/ I have to look
 into this.

 I feel like the authentication cookie is being created for the user and
 then being forwarded to every page the user visits after that.
 
 BASIC auth doesn't create an authentication cookie does it?  The browser
 sends an 'Authorization' header instead.

Yep, no cookie.

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

iEYEARECAAYFAkwv8ToACgkQ9CaO5/Lv0PARzgCfbS+vLZEPbBuZpLs1ebiiLWTq
K1cAoLo8yixRBwEO2urSaRaT214bNa0Y
=P9fN
-END PGP SIGNATURE-

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



Re: Application vars -

2010-07-03 Thread Hassan Schroeder
On Sat, Jul 3, 2010 at 7:08 PM, Christopher Schultz
ch...@christopherschultz.net wrote:

 Heck, you can
 even use a single class that is a servlet but also implements
 ServletContextListener, and have everything in one class.

Setting up a case study for a Real-life Refactoring course?  :-)

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

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



Re: Servlet mapping question -- way to include everythign EXCEPT a directory?

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 7/1/2010 12:31 PM, Caldarale, Charles R wrote:
 From: laredotornado [mailto:laredotorn...@gmail.com]
 Subject: RE: Servlet mapping question -- way to include everythign
 EXCEPT a directory?

 I like your idea about specifying the DefaultServlet, 
 but what do you mean by the DefaultServlet ?
 
 Tomcat's built-in servlet that handles all static content. It's
 defined in the global conf/web.xml, and thus included in all deployed
 webapps:

[snip]

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/play/sports/includes/*/url-pattern
 servlet-mapping

Just a note to Dave: using this mapping might couple your webapp to
Tomcat by relying on a global-mapping with a servlet called default. I
don't think that's in the spec, so you might want to put a comment in
your web.xml pointing out that the mapping might be Tomcat-specific.
You'll save yourself (or someone else) a lot of headache in the future
with that simple comment.

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

iEYEARECAAYFAkwv8iQACgkQ9CaO5/Lv0PAZbACfYXCGM/cybZnFAanvjr3eMhVl
WeEAn3Q3z12dsOd5N3IqJTCU9hs+QTyP
=8CwB
-END PGP SIGNATURE-

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



Re: JNI error under tomcat: java.lang.UnsatisfiedLinkError

2010-07-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dennis,

On 7/2/2010 3:46 AM, dennis ch wrote:
 However, when I deploy it as a web service (tomcat 6.0.26 + axis2 1.5.1 +
 eclipse jee helios) to call the native method, I got the following error
 (the first line means the .so was successfully loaded):
 
 Load library successfully
 
 [ERROR] com.model.modelJNI.initModel()V
 java.lang.reflect.InvocationTargetException

[...]

 Caused by: java.lang.UnsatisfiedLinkError: com.model.modelJNI.initModel()V
 at com.model.modelJNI.initModel(Native Method)
 at com.model.model.initModel(model.java:13)
 at com.webservice.run(EvalVita.java:763)
 ... 25 more

Sounds like a Java-class/native-library mismatch. Are you sure your
.java file and .c files are sync'd up properly? Try recompiling
everything, and double-check your JNI method signatures.

What does modelJNI.initModel look like in the Java method declaration?
What does the same method signature in your native code look like?

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

iEYEARECAAYFAkwv82YACgkQ9CaO5/Lv0PABewCeIC0qjqJdNm80GMByJBJn4VEs
KzsAoKDPzdgXUJKMq/S4xruHd0RlNJCv
=VA0U
-END PGP SIGNATURE-

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



Re: EL expressions do not work in tag file (tomcat 6.26)

2010-07-03 Thread 赵顺
It steel does not work after I change to 2.5 and tomcat 6.0.18 works(both
*.jsp and *.tag) and 6.0.26 does not work in *.tag file
web-app xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd 
version=2.5
my tag file like this

%@ attributename=widthtype=java.lang.Integer
required=falsedescription=width %
%@ tag

import=org.apache.commons.beanutils.BeanUtils,javax.servlet.jsp.tagext.SimpleTagSupport,javax.servlet.jsp.tagext.SimpleTag
pageEncoding=utf-8
description=grid  %

c:if test=${empty (width)}
c:set var=width value=120/
/c:if
jsp:doBody var=jspBody scope=page /
${width}


it seem to be show the value of width  on the page but in tomcat 6.0.26 it
show ${width} directly

On Sun, Jul 4, 2010 at 10:25 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 赵顺,

 On 7/3/2010 8:44 AM, 赵顺 wrote:
  web-app xmlns=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;
  version=2.4
  use jsp 2.4


 That's not JSP 2.4, it's JSP 2.0. You might want to specify 2.5, which
 will get you JSP 2.1. That might fix everything for you.

   taglib
 taglib-urijet/taglib-uri
 taglib-location/WEB-INF/jet.tld/taglib-location
  /taglib

 And what does your JSP look like?

  and the el expressions works fine in jsp file such as ${1+1} ${var}
  but the same expressions do not work in .taf file it print out the
  expression directly

 You mean a .tag file, right? Can you post one of those that doesn't work
 properly?

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

 iEYEARECAAYFAkwv8Q4ACgkQ9CaO5/Lv0PCapgCdHCFfTa8ENdX9ACBXj7dW93Zf
 SBMAoLqzG31PYu3i6lHuCc9blWgRpXsF
 =BVEs
 -END PGP SIGNATURE-

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




-- 
   致
   礼!


  赵顺cnjoy...@gmail.com