I agree with everything in both posts, but I just don't see what the / location/ of the jsp files (inside/outside WEB-INF) has to do with it. All that controls is whether a user/client can find a way to look inside the file. One can (as I do) follow the separation of concerns quite strictly (app logic in java files; presentation in jsp files), and have those jsp files residing in something like webapps/app/pages, while the classes of course normally reside in webapps/app/WEB-INF/classes. And I'm sure we could find (in the wild out there, not developed by anyone here) JSP pages residing under WEB-INF which were
horribly encrusted with java code and application logic.

It's more a matter of developer discipline than anything else.

....my 2 bits...Ken

On Mar 9, 2009, at 3:49 PM, Hassan Schroeder wrote:

On Mon, Mar 9, 2009 at 12:23 PM, Len Popp <len.p...@gmail.com> wrote:
What I mean is, clients *never* access a .jsp file by URL, e.g.
"http://www.example.com/app/foo.jsp";. All URLs seen by the client are
mapped to servlets, not JSP files.

The reason for doing it this way is to separate app logic from page
layout. I find it difficult to code a substantial app by mixing Java
code into JSP pages, and it's lots easier to modify the format of a
web page if the app logic isn't all tangled up in it.

+1 on that approach, makes life a whole lot easier.

Besides being MVC, it goes along with Tim B-L's classic stance that
"cool urls don't change" -- don't reveal the technology being used by
using a file suffix that you may later want/need to change...

--
Hassan Schroeder ------------------------ hassan.schroe...@gmail.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

Reply via email to