Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 15123 invoked from network); 10 Jul 2003 21:48:36 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 10 Jul 2003 21:48:36 -0000 Received: (qmail 23696 invoked by uid 97); 10 Jul 2003 21:51:09 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 23689 invoked from network); 10 Jul 2003 21:51:09 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 10 Jul 2003 21:51:09 -0000 Received: (qmail 13139 invoked by uid 500); 10 Jul 2003 21:48:16 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 13115 invoked from network); 10 Jul 2003 21:48:15 -0000 Received: from 202-0-37-44.cable.paradise.net.nz (HELO kumachan.net.nz) (202.0.37.44) by daedalus.apache.org with SMTP; 10 Jul 2003 21:48:15 -0000 Received: from kumachan.net.nz [192.168.0.4] by kumachan.net.nz (FTGate 2, 2, 0, 1); Fri, 11 Jul 03 09:55:45 +1200 Message-ID: <3F0DDECD.6060007@kumachan.net.nz> Date: Fri, 11 Jul 2003 09:46:53 +1200 From: Jason Lea User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: ja, en-us, en, en-nz MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: Location of JSP Pages References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DVINCENT@bnpfactor.fr wrote: > Hi, > > For security reasons (forbid direct access to JSP Pages), I've localized my > JSP Pages under WEB-INF. > Each page is fronted with a Struts Action. > > > I encounter since JSP compilation problems : > > "org.apache.jasper.JasperException: Unable to compile class for JSP > An error occurred at line: -1 in the jsp file: null > Generated servlet error: > [javac] Compiling 1 source file > M: > \wsad\VINCENT_view_tomcatservices\WebServicesNet\work\org\apache\jsp\WEB-INF\pages\accueil_jsp.java:1: > > ';' expected > package org.apache.jsp.WEB-INF.pages; > 1 error " > > '-' char (from WEB-INF) seems not to be valid for package name ... > > I use Tomcat 4.1.12 > > Is it possible to protect JSP Pages from direct access ? > What is the best practice for that ? Yes, but it looks like you have put them in the wrong place. Your web app should look something like this: /../webapp /WEB-INF /classes (your java classes get compiled into here) /lib (your jar files go here) /struts-config.xml /web.xml (your index.html and other plain files can go here, images directory) I created a 'jsp' directory under WEB-INF and put my directory structure of jsps there eg /../webapp /WEB-INF /classes /lib /jsp /layout /layout.jsp /tiles /tile1.jsp /tile2.jsp Hope that helps... -- Jason Lea --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org