Re: Mapping JSP's to outside of the war or expanded folder

2008-02-26 Thread emerson cargnin
Still, the main issue that remains is the jsp's.

We have three options here:

- Creating symlinks: this solves the problem in linux. In windows we
would have to copy manually or through a build script/maven extension
the content from outside the project to inside the war. Always a risk
to have different ways to build in different platforms.

- Applying a patch: Applying the patch mentioned before to keep the
same approach we use now with resin. This would be the least effort
solution. But not the most reliable solution, as always have to mess
with tomcat builds would be unacceptable.

- Restructing the application: moving the related jsp's to inside the
war is doable, but would take some effort.  We would still have the
shared jsps. They are managed by our content department using a CMS
tool. They include headers, footers and some other common JSP's. They
would have to be included in the war during packing or using symlinks
in linux.

regards
Emerson

On 21/02/2008, Ralph Goers [EMAIL PROTECTED] wrote:
 We put a proxy in front of Tomcat. It serves all the static content.

 emerson cargnin wrote:
  Well, I said at the beginning that I'm not a big fan of this approach,
  but I understand the reasons behind it and the difficulties it would
  have to change it.
 
  Other reason for using this approach is when you have a great amount
  of static content, like images. An update of the war would have to
  include 1 or more giga of images and static html pages.
 
  What about if you have different applications (wars) that share common
  headers, footers, images, etc?
  Now people usually do it using symlinks, which makes it difficult using 
  windows.
 
 
 

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



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-26 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
---
- Original Message - 
From: emerson cargnin [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, February 18, 2008 1:26 PM
Subject: Re: Mapping JSP's to outside of the war or expanded folder
==
I dont know if this will help... it seems the main problem is that its 
deployed as a War..
Its not quite the same as Resin, but I'm almost certain Tomcat can deploy 
something
called a localwar... because if one thinks about it, thats what the IDE's 
are doing.


So you can place your unpacked War anywhere on the machine... and just 
tell tomcat to use it.
Everything is outside tomcat and if you change Jsp's they in the open then 
just have to use the deployment
manager to deploy again... it just means you have to FTP the files up or 
install them to begin with

but this I think is what you looking for anyway..

Just look that up in the TC deployment manager stuff...
==

The policy of our company is to deploy the jsp's separated from the
war file, to allow a finer grained control over deployment. I'm not
very fan of it, but it's something I won't be able to change. So I
need a way to point the following URL's to another place in the file
system.
http://server/[context]/jsp/*
http://server/[context]/css/*
http://server/[context]/html/*
http://server/[context]/images/*

Thanks
emerson

On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
Once the .war is expanded why would you want to map to JSPs outside of 
the file system package?


emerson cargnin wrote ..
 Hi there

 We use resin here in my work. Resin allows in its web.xml an element 
 like:


   path-mapping
 url-pattern/jsp/*/url-pattern
 real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
 /path-mapping
path-mapping



 This can also be used in resin.conf, amking the war more portable.

 Now we are starting a migration to tomcat. But as far as I know TC
 doesnt not allow to have the JSP's out side of the war or the expanded
 war. I did a research a couple of years ago. Did it changed? Is there
 anyway now of mapping the jsp's of an app to an outside folder?

 Thanks
 Emerson Cargnin

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

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




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





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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-26 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
---
- Original Message - 
From: Johnny Kewl [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, February 26, 2008 2:19 PM
Subject: Re: Mapping JSP's to outside of the war or expanded folder




---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
---
- Original Message - 
From: emerson cargnin [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, February 18, 2008 1:26 PM
Subject: Re: Mapping JSP's to outside of the war or expanded folder
==
I dont know if this will help... it seems the main problem is that its 
deployed as a War..
Its not quite the same as Resin, but I'm almost certain Tomcat can deploy 
something
called a localwar... because if one thinks about it, thats what the IDE's 
are doing.


So you can place your unpacked War anywhere on the machine... and just 
tell tomcat to use it.
Everything is outside tomcat and if you change Jsp's they in the open then 
just have to use the deployment
manager to deploy again... it just means you have to FTP the files up or 
install them to begin with

but this I think is what you looking for anyway..

Just look that up in the TC deployment manager stuff...
==


Here is an example ant script for the deployment manager
I found some script lying around.

 target name=deploy description=Deploy web application
   deploy url=http://localhost:8080/manager; username=admin password=
   localWar=/ThePath/To/The/Unpacked/War
   path=/The/Url/Context
   update=true
   /
 /target

In theory you can also deploy from the browser like this

http://localhost:8080/manager/deploy?localWar=Yadapath=Blahupdate=true

So... its all outside... you got to get it there... and then you can tell TC 
to use it...


Have fun...



The policy of our company is to deploy the jsp's separated from the
war file, to allow a finer grained control over deployment. I'm not
very fan of it, but it's something I won't be able to change. So I
need a way to point the following URL's to another place in the file
system.
http://server/[context]/jsp/*
http://server/[context]/css/*
http://server/[context]/html/*
http://server/[context]/images/*

Thanks
emerson

On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
Once the .war is expanded why would you want to map to JSPs outside of 
the file system package?


emerson cargnin wrote ..
 Hi there

 We use resin here in my work. Resin allows in its web.xml an element 
 like:


   path-mapping
 url-pattern/jsp/*/url-pattern
 real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
 /path-mapping
path-mapping



 This can also be used in resin.conf, amking the war more portable.

 Now we are starting a migration to tomcat. But as far as I know TC
 doesnt not allow to have the JSP's out side of the war or the expanded
 war. I did a research a couple of years ago. Did it changed? Is there
 anyway now of mapping the jsp's of an app to an outside folder?

 Thanks
 Emerson Cargnin

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

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




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





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





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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-26 Thread emerson cargnin
Hummm, right, I haven't thought of it. But this would make the whole
deployment process awkward. The generation of the war and it's
expansion would have to be done manually, but it's one more option.
Thanks
Emerson

On 26/02/2008, Johnny Kewl [EMAIL PROTECTED] wrote:

 ---
 HARBOR: http://coolharbor.100free.com/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 Making the Java dream come true.
 ---
 - Original Message -
 From: Johnny Kewl [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, February 26, 2008 2:19 PM
 Subject: Re: Mapping JSP's to outside of the war or expanded folder


 
  ---
  HARBOR: http://coolharbor.100free.com/index.htm
  The most powerful application server on earth.
  The only real POJO Application Server.
  Making the Java dream come true.
  ---
  - Original Message -
  From: emerson cargnin [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, February 18, 2008 1:26 PM
  Subject: Re: Mapping JSP's to outside of the war or expanded folder
  ==
  I dont know if this will help... it seems the main problem is that its
  deployed as a War..
  Its not quite the same as Resin, but I'm almost certain Tomcat can deploy
  something
  called a localwar... because if one thinks about it, thats what the IDE's
  are doing.
 
  So you can place your unpacked War anywhere on the machine... and just
  tell tomcat to use it.
  Everything is outside tomcat and if you change Jsp's they in the open then
  just have to use the deployment
  manager to deploy again... it just means you have to FTP the files up or
  install them to begin with
  but this I think is what you looking for anyway..
 
  Just look that up in the TC deployment manager stuff...
  ==

 Here is an example ant script for the deployment manager
 I found some script lying around.

  target name=deploy description=Deploy web application
deploy url=http://localhost:8080/manager; username=admin password=
localWar=/ThePath/To/The/Unpacked/War
path=/The/Url/Context
update=true
/
  /target

 In theory you can also deploy from the browser like this

 http://localhost:8080/manager/deploy?localWar=Yadapath=Blahupdate=true

 So... its all outside... you got to get it there... and then you can tell TC
 to use it...

 Have fun...

 
  The policy of our company is to deploy the jsp's separated from the
  war file, to allow a finer grained control over deployment. I'm not
  very fan of it, but it's something I won't be able to change. So I
  need a way to point the following URL's to another place in the file
  system.
  http://server/[context]/jsp/*
  http://server/[context]/css/*
  http://server/[context]/html/*
  http://server/[context]/images/*
 
  Thanks
  emerson
 
  On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
  Once the .war is expanded why would you want to map to JSPs outside of
  the file system package?
 
  emerson cargnin wrote ..
   Hi there
  
   We use resin here in my work. Resin allows in its web.xml an element
   like:
  
 path-mapping
   url-pattern/jsp/*/url-pattern
   real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
   /path-mapping
  path-mapping
  
  
  
   This can also be used in resin.conf, amking the war more portable.
  
   Now we are starting a migration to tomcat. But as far as I know TC
   doesnt not allow to have the JSP's out side of the war or the expanded
   war. I did a research a couple of years ago. Did it changed? Is there
   anyway now of mapping the jsp's of an app to an outside folder?
  
   Thanks
   Emerson Cargnin
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 

Re: Mapping JSP's to outside of the war or expanded folder

2008-02-21 Thread emerson cargnin
Well, i don't really see the difference regarding security of having
the jsp's separated or not. Even with the JSP's inside the war, once
expanded you could change a JSP without that been detected anyway.




On 20/02/2008, Ralph Goers [EMAIL PROTECTED] wrote:
 Right.

 The only way access to your servers is totally strict is if they have
 no network connection and no human input devices connected. However, in
 the spirit in which you probably meant this, I will have to point out
 that if your web apps are running on the internet then what you are
 requesting violates any competent security audit. If they are running on
 your local intranet then yes, it might not be a big deal. But even then,
 if the server could be used to get at personnel records or payroll, etc.
 then this could be just as big an issue.

 Ralph

 emerson cargnin wrote:
  This is not really an issue for me, as the access to the servers are
  totally strict
 
  and... any idea on how to map to the jsp's outside?
  Nobody ever need it? how do people migrate from resin then?
 
 
 

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



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-21 Thread emerson cargnin
Well, I said at the beginning that I'm not a big fan of this approach,
but I understand the reasons behind it and the difficulties it would
have to change it.

Other reason for using this approach is when you have a great amount
of static content, like images. An update of the war would have to
include 1 or more giga of images and static html pages.

What about if you have different applications (wars) that share common
headers, footers, images, etc?
Now people usually do it using symlinks, which makes it difficult using windows.


regards
emerson

On 19/02/2008, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  From: emerson cargnin [mailto:[EMAIL PROTECTED]
  Subject: Re: Mapping JSP's to outside of the war or expanded folder
 
  and... any idea on how to map to the jsp's outside?
  Nobody ever need it? how do people migrate from resin then?

 Nobody needs it because it's a clear violation of the servlet  JSP
 specs.  It's somewhat ironic that your company appears to have a policy
 that requires non-adherence to the technology specification they choose
 to employ.  The fact that resin supports such a violation is just
 another example of how some vendors try to lock customers into their
 unique implementations by providing non-compliant capabilities.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.

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



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-21 Thread Tim Funk
It got rolled back due to some vetos. (Hence the if your brave comment). 
See the dev list for details.


The patch itself works fine.

-Tim

emerson cargnin wrote:

Thanks Tim.
Do you know if this will be included on next release of tomcat6?

regards
emerson

On 19/02/2008, Tim Funk [EMAIL PROTECTED] wrote:

If you are brave ... you can apply this patch:

http://svn.apache.org/viewvc?view=revrevision=575332

-Tim



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



RE: Mapping JSP's to outside of the war or expanded folder

2008-02-21 Thread Caldarale, Charles R
 From: emerson cargnin [mailto:[EMAIL PROTECTED] 
 Subject: Re: Mapping JSP's to outside of the war or expanded folder
 
 Other reason for using this approach is when you have a great amount
 of static content, like images.

One would normally package a large amount of static information in a
separate webapp, so it would not have to be reloaded when something in
the dynamic ones change.

 What about if you have different applications (wars) that share common
 headers, footers, images, etc?

That should be handled during creation of the .war, not via deployment
tricks.  Whatever scripts you use to build the war files should copy the
common stuff from one location into each war.  Again looking at the
servlet spec, the philosophy is to keep webapps as independent as
possible.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-21 Thread Ralph Goers

We put a proxy in front of Tomcat. It serves all the static content.

emerson cargnin wrote:

Well, I said at the beginning that I'm not a big fan of this approach,
but I understand the reasons behind it and the difficulties it would
have to change it.

Other reason for using this approach is when you have a great amount
of static content, like images. An update of the war would have to
include 1 or more giga of images and static html pages.

What about if you have different applications (wars) that share common
headers, footers, images, etc?
Now people usually do it using symlinks, which makes it difficult using windows.


  


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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread emerson cargnin
We use windows on the dev workstatios and unix (SunOS 5.10
Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T200) on dev/qa/production
servers.
We use Java 5 and we are migrating to tomcat 5.5 or 6.

Ralph, why do you say it's dangerous? Even if it doesn't have java
code, it would have tagslibs. Actually  I don't really see any
advantage using Velocity than JSP here.

Anyway, we are quite a big company and I couldn't ask to change our
tecnology just like this. We use this currently with resin, and it
works just fine. We leave css, jsp and html in a separated root.

If I use sym links it would be more difficult for developers to work
with windows, although they could still copy everything to inside
their webapps/[context], anyway it would be a more clumsy solution.

I managed to get css/images and html as a separated context in tomcat.
The only problem for me now is to have the JSP's separated.
Would exist a plugin or some hack (argh) that would enable to map the
JSP's from somewhere else in the file system?

Thanks
Emerson
On 18/02/2008, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 We also do this with Velocity (we use Spring MVC rather than JSP) and point 
 our Velocity ResourceLoader to somewhere else on the filesystem (away from 
 any Apache document root so they aren't accessible). This brings benefits of 
 being able to do hot-deploy of content/templates for urgent copy changes, 
 should we need to, ability to work with things like AlFresco, and not having 
 any logic other than minimal presentational logic in the view layer.

 -Original Message-
 From: Ralph Goers [mailto:[EMAIL PROTECTED]
 Sent: 18 February 2008 17:37
 To: Tomcat Users List
 Subject: Re: Mapping JSP's to outside of the war or expanded folder


 We have a similar need. But doing this with JSPs is very dangerous since
 they can have java code within them. Instead, using a templating
 language like Velocity would seem to be a mucn better approach.

 emerson cargnin wrote:
  The policy of our company is to deploy the jsp's separated from the
  war file, to allow a finer grained control over deployment. I'm not
  very fan of it, but it's something I won't be able to change. So I
  need a way to point the following URL's to another place in the file
  system.
  http://server/[context]/jsp/*
  http://server/[context]/css/*
  http://server/[context]/html/*
  http://server/[context]/images/*
 
  Thanks
  emerson
 
  On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
 
  Once the .war is expanded why would you want to map to JSPs outside of the 
  file system package?
 
  emerson cargnin wrote ..
 
  Hi there
 
  We use resin here in my work. Resin allows in its web.xml an element like:
 
path-mapping
  url-pattern/jsp/*/url-pattern
  real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
  /path-mapping
 path-mapping
 
 
 
  This can also be used in resin.conf, amking the war more portable.
 
  Now we are starting a migration to tomcat. But as far as I know TC
  doesnt not allow to have the JSP's out side of the war or the expanded
  war. I did a research a couple of years ago. Did it changed? Is there
  anyway now of mapping the jsp's of an app to an outside folder?
 
  Thanks
  Emerson Cargnin
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


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



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread Ralph Goers

emerson cargnin wrote:

We use windows on the dev workstatios and unix (SunOS 5.10
Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T200) on dev/qa/production
servers.
We use Java 5 and we are migrating to tomcat 5.5 or 6.

Ralph, why do you say it's dangerous? Even if it doesn't have java
code, it would have tagslibs. Actually  I don't really see any
advantage using Velocity than JSP here.

  
Since JSPs can contain any Java code, someone could put in code that 
does something completely unrelated to your application (send passwords 
or account information somewhere, etc).  This is pretty hard to do 
without being detected when the JSPs are inside of a War file. When you 
put them outside of the war the controls are necessarily loosened 
because, presumably, you actually want people to be able to change these 
from time to time - so you may never know when one was changed 
inappropriately.  With templates this can still happen, but since they 
can't add anything to a template that does more than change the view 
this isn't that dangerous. 


Ralph

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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread emerson cargnin
This is not really an issue for me, as the access to the servers are
totally strict

and... any idea on how to map to the jsp's outside?
Nobody ever need it? how do people migrate from resin then?

On 19/02/2008, Ralph Goers [EMAIL PROTECTED] wrote:
 emerson cargnin wrote:
  We use windows on the dev workstatios and unix (SunOS 5.10
  Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T200) on dev/qa/production
  servers.
  We use Java 5 and we are migrating to tomcat 5.5 or 6.
 
  Ralph, why do you say it's dangerous? Even if it doesn't have java
  code, it would have tagslibs. Actually  I don't really see any
  advantage using Velocity than JSP here.
 
 
 Since JSPs can contain any Java code, someone could put in code that
 does something completely unrelated to your application (send passwords
 or account information somewhere, etc).  This is pretty hard to do
 without being detected when the JSPs are inside of a War file. When you
 put them outside of the war the controls are necessarily loosened
 because, presumably, you actually want people to be able to change these
 from time to time - so you may never know when one was changed
 inappropriately.  With templates this can still happen, but since they
 can't add anything to a template that does more than change the view
 this isn't that dangerous.

 Ralph

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



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



RE: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread Caldarale, Charles R
 From: emerson cargnin [mailto:[EMAIL PROTECTED] 
 Subject: Re: Mapping JSP's to outside of the war or expanded folder
 
 and... any idea on how to map to the jsp's outside?
 Nobody ever need it? how do people migrate from resin then?

Nobody needs it because it's a clear violation of the servlet  JSP
specs.  It's somewhat ironic that your company appears to have a policy
that requires non-adherence to the technology specification they choose
to employ.  The fact that resin supports such a violation is just
another example of how some vendors try to lock customers into their
unique implementations by providing non-compliant capabilities.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread Tim Funk

If you are brave ... you can apply this patch:

http://svn.apache.org/viewvc?view=revrevision=575332

-Tim


emerson cargnin wrote:

This is not really an issue for me, as the access to the servers are
totally strict

and... any idea on how to map to the jsp's outside?
Nobody ever need it? how do people migrate from resin then?



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-19 Thread Ralph Goers

Right.

The only way access to your servers is totally strict is if they have 
no network connection and no human input devices connected. However, in 
the spirit in which you probably meant this, I will have to point out 
that if your web apps are running on the internet then what you are 
requesting violates any competent security audit. If they are running on 
your local intranet then yes, it might not be a big deal. But even then, 
if the server could be used to get at personnel records or payroll, etc. 
then this could be just as big an issue.


Ralph

emerson cargnin wrote:

This is not really an issue for me, as the access to the servers are
totally strict

and... any idea on how to map to the jsp's outside?
Nobody ever need it? how do people migrate from resin then?


  


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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread David Brown
Once the .war is expanded why would you want to map to JSPs outside of the file 
system package?

emerson cargnin wrote ..
 Hi there
 
 We use resin here in my work. Resin allows in its web.xml an element like:
 
   path-mapping
 url-pattern/jsp/*/url-pattern
 real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
 /path-mapping
path-mapping
 
 
 
 This can also be used in resin.conf, amking the war more portable.
 
 Now we are starting a migration to tomcat. But as far as I know TC
 doesnt not allow to have the JSP's out side of the war or the expanded
 war. I did a research a couple of years ago. Did it changed? Is there
 anyway now of mapping the jsp's of an app to an outside folder?
 
 Thanks
 Emerson Cargnin
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread David Brown
In the future to get the gurus to reply supply more info about your systems 
overall (OS, JDK, TC version, hardware, network topology, etc.). If you are 
running a NIX box you could possibly create some soft links in the directories 
you have named below. I have not tried something like that nor have I ever seen 
any discussion about something like soft links in the /WEB-INF directory. HTH.

emerson cargnin wrote ..
 The policy of our company is to deploy the jsp's separated from the
 war file, to allow a finer grained control over deployment. I'm not
 very fan of it, but it's something I won't be able to change. So I
 need a way to point the following URL's to another place in the file
 system.
 http://server/[context]/jsp/*
 http://server/[context]/css/*
 http://server/[context]/html/*
 http://server/[context]/images/*
 
 Thanks
 emerson
 
 On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
  Once the .war is expanded why would you want to map to JSPs outside of the 
  file
 system package?
 
  emerson cargnin wrote ..
   Hi there
  
   We use resin here in my work. Resin allows in its web.xml an element like:
  
 path-mapping
   url-pattern/jsp/*/url-pattern
   real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
   /path-mapping
  path-mapping
  
  
  
   This can also be used in resin.conf, amking the war more portable.
  
   Now we are starting a migration to tomcat. But as far as I know TC
   doesnt not allow to have the JSP's out side of the war or the expanded
   war. I did a research a couple of years ago. Did it changed? Is there
   anyway now of mapping the jsp's of an app to an outside folder?
  
   Thanks
   Emerson Cargnin
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread philip.coates
We also do this with Velocity (we use Spring MVC rather than JSP) and point our 
Velocity ResourceLoader to somewhere else on the filesystem (away from any 
Apache document root so they aren't accessible). This brings benefits of being 
able to do hot-deploy of content/templates for urgent copy changes, should we 
need to, ability to work with things like AlFresco, and not having any logic 
other than minimal presentational logic in the view layer.

-Original Message-
From: Ralph Goers [mailto:[EMAIL PROTECTED]
Sent: 18 February 2008 17:37
To: Tomcat Users List
Subject: Re: Mapping JSP's to outside of the war or expanded folder


We have a similar need. But doing this with JSPs is very dangerous since 
they can have java code within them. Instead, using a templating 
language like Velocity would seem to be a mucn better approach. 

emerson cargnin wrote:
 The policy of our company is to deploy the jsp's separated from the
 war file, to allow a finer grained control over deployment. I'm not
 very fan of it, but it's something I won't be able to change. So I
 need a way to point the following URL's to another place in the file
 system.
 http://server/[context]/jsp/*
 http://server/[context]/css/*
 http://server/[context]/html/*
 http://server/[context]/images/*

 Thanks
 emerson

 On 18/02/2008, David Brown [EMAIL PROTECTED] wrote:
   
 Once the .war is expanded why would you want to map to JSPs outside of the 
 file system package?

 emerson cargnin wrote ..
 
 Hi there

 We use resin here in my work. Resin allows in its web.xml an element like:

   path-mapping
 url-pattern/jsp/*/url-pattern
 real-pathc:/resin/resin-2.1.4/apps/ucs//real-path
 /path-mapping
path-mapping



 This can also be used in resin.conf, amking the war more portable.

 Now we are starting a migration to tomcat. But as far as I know TC
 doesnt not allow to have the JSP's out side of the war or the expanded
 war. I did a research a couple of years ago. Did it changed? Is there
 anyway now of mapping the jsp's of an app to an outside folder?

 Thanks
 Emerson Cargnin

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


 

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

   

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


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