You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Milanez, Marcus" <Ma...@diebold.com> on 2007/10/29 13:01:15 UTC

Creating files dynamically and antiJarLocking

Hi all,
 
In my web project, I dynamically create JSP files in some ocasions.
These files are placed under my web application folder and only works
well if I don't use antiJarLocking='true' and
antiResourcesLocking='true'. In this case, my files are created
correctely, but I just can't reach them using their URLs. Tomcat returns
me a 404 error, just like if my pages weren't placed there. I know that
when we use antiJarLocking and antiResourcesLocking, all my war files
are unpacked under temp folder, and I suppose I should place my
dynamically created files there too right? Am I right? The only problem
is, Tomcat seems to create temp directories using a sequential number
preceding the folder name... Do I have acces to the most recent created
tempo directory?
 
thanks in advance,
 
Marcus Milanez

Re: Creating files dynamically and antiJarLocking

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/29/07, Konstantin Kolinko <kn...@gmail.com> wrote:

> Jsps are recompiled when modified, and are compiled on the first
> access. Thus I do not see why they cannot appear randomly.

Absolutely. In my dev environment I'm constantly dropping new
JSPs in, and they show up fine. If that weren't true, I'd never get
/anything/ done :-)

> I do not remember whether it is a part of the standard, but it is a
> feature, and it supposedly can be turned off by some options.

But the default certainly allows it, or more people would be having
this same problem, I suspect...

Perhaps the OP can test with a simple JSP using a fresh install?

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


Re: Creating files dynamically and antiJarLocking

Posted by Konstantin Kolinko <kn...@gmail.com>.
> This is likely because Tomcat expects all the resources for a web app to
> be available at deployment time, rather than randomly appearing during
> the life of the deployed webapp.

Jsps are recompiled when modified, and are compiled on the first
access. Thus I do not see why they cannot appear randomly.

I do not remember whether it is a part of the standard, but it is a
feature, and it supposedly can be turned off by some options.


What Tomcat version is Marcus using?

As for the path to the temp folder:
what is the result of calling ServletContext.getRealPath(...)?


2007/10/29, Christopher Schultz <ch...@christopherschultz.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Marcus,
>
> Milanez, Marcus wrote:
> > In this case, my files are created
> > correctely, but I just can't reach them using their URLs.
>
> This is likely because Tomcat expects all the resources for a web app to
> be available at deployment time, rather than randomly appearing during
> the life of the deployed webapp.
>
> I believe similar questions have been raised in the past, the the answer
> has been "don't do that". I'm not sure if there's a good way to achieve
> what you're trying to do.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHJfGH9CaO5/Lv0PARAuPxAJ0RUBs4e8Z7F921c8xCq2NTNCMsLQCgnp13
> m3QuNzpZ8L7+wiU0p3bkebA=
> =SkSm
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Creating files dynamically and antiJarLocking

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marcus,

Milanez, Marcus wrote:
> In this case, my files are created
> correctely, but I just can't reach them using their URLs.

This is likely because Tomcat expects all the resources for a web app to
be available at deployment time, rather than randomly appearing during
the life of the deployed webapp.

I believe similar questions have been raised in the past, the the answer
has been "don't do that". I'm not sure if there's a good way to achieve
what you're trying to do.

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

iD8DBQFHJfGH9CaO5/Lv0PARAuPxAJ0RUBs4e8Z7F921c8xCq2NTNCMsLQCgnp13
m3QuNzpZ8L7+wiU0p3bkebA=
=SkSm
-----END PGP SIGNATURE-----

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