You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Lee <to...@shaw.ca> on 2002/12/06 12:42:20 UTC

Where to put JSP files?

Where should I put my jsp files? I usually put them above the /web-inf folder, but this 
would allow  clients to see the directory listing. Should I use a redirect mapping to 
protect them from being viewed? In which file should I do it?

Thanks

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Where to put JSP files?

Posted by Aleksandr Shneyderman <al...@law.columbia.edu>.
> -----Original Message-----
> From: Lindomar [mailto:lindomar.silva@bol.com.br]
> Sent: Friday, December 06, 2002 6:59 AM
> To: Tomcat Users List; tomcatuser@shaw.ca
> Subject: Re: Where to put JSP files?
> 
> 
> You can put in:
> 
> webapps
>     |_your app <- yoiu can put here (1)
>        |_<you can create a new folder, then put here> (2)

The option (2) is recursive
meaning you can create as many subfolders 
as you wish :-)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Where to put JSP files?

Posted by Lindomar <li...@bol.com.br>.
You can put in:

webapps
    |_your app <- yoiu can put here (1)
       |_<you can create a new folder, then put here> (2)

Option 1:  http://localhost:8080/yourapp/yourfile.jsp
Option 2: http://localhost:8080/yourapp/yournewfolder/yourfile.jsp

I hope help you.


----- Original Message -----
From: "Peter Lee" <to...@shaw.ca>
To: <to...@jakarta.apache.org>
Sent: Friday, December 06, 2002 09:42
Subject: Where to put JSP files?


> Venha para a VilaBOL!
> O melhor lugar para você construir seu site. Fácil e grátis!
> http://vila.bol.com.br
> Where should I put my jsp files? I usually put them above the /web-inf
folder, but this
> would allow  clients to see the directory listing. Should I use a redirect
mapping to
> protect them from being viewed? In which file should I do it?
>
> Thanks
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Where to put JSP files?

Posted by micael <ca...@harbornet.com>.
Thanks.  I have always put the webpages under WEB-INF to avoid directory 
views.  This is a realistic option.

At 03:45 AM 12/6/2002 -0800, you wrote:
>To prevent users from seeing any directory add the
>entry
>         <welcome-file-list>
>                 <welcome-file>index.jsp</welcome-file>
>         </welcome-file-list>
>To your web.xml and in every directory, place a copy
>of index.jsp.  It can just be a redirect to your home
>page.
>--- Peter Lee <to...@shaw.ca> wrote:
> > Where should I put my jsp files? I usually put them
> > above the /web-inf folder, but this
> > would allow  clients to see the directory listing.
> > Should I use a redirect mapping to
> > protect them from being viewed? In which file should
> > I do it?
> >
> > Thanks
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Micael

-------------------------------------------------------

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Where to place static content? Tomcat/Apache

Posted by Andreas Hucks <an...@duochrome.de>.
Hi,

I am just starting with the Tomcat/Apache combo, so this is a rather basic
question:
With larger projects, is it better to place the static content with the
webapp (being able to distribute it inside the .war) or to map just the
servlets to Tomcat and have the rest served by Apache (better performance?)
Is Tomcat slower than Apache serving static files? Is it worth the
inconvenience of not having it all in one place?

Not that it matters right now (it's not a production environment, of
course), just being curious about "best practice".

Andreas


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Where to put JSP files?

Posted by micael <ca...@harbornet.com>.
You can check the struts list archives and look under jim mitchell's 
name.  He has provided a sample application with all he JSP pages  under 
WEB-INF.  The key is just to put the JSP pages where you want them 
protected under WEB-INF and then to map your result pages to wherever you 
put them.  It is straightforward.  The idea some people have given you of 
using drilled pages in webapps, of course, does not answer your 
question.  I like the idea of the welcome page solution offered 
though.  That is nice!

Micael

At 03:42 AM 12/6/2002 -0800, you wrote:
>Where should I put my jsp files? I usually put them above the /web-inf 
>folder, but this
>would allow  clients to see the directory listing. Should I use a redirect 
>mapping to
>protect them from being viewed? In which file should I do it?
>
>Thanks
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Micael

-------------------------------------------------------

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Where to put JSP files?

Posted by Carl Trusiak <ca...@yahoo.com>.
To prevent users from seeing any directory add the
entry 
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
To your web.xml and in every directory, place a copy
of index.jsp.  It can just be a redirect to your home
page.
--- Peter Lee <to...@shaw.ca> wrote:
> Where should I put my jsp files? I usually put them
> above the /web-inf folder, but this 
> would allow  clients to see the directory listing.
> Should I use a redirect mapping to 
> protect them from being viewed? In which file should
> I do it?
> 
> Thanks
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>