DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891

JspC does not work for webapps





------- Additional Comments From [EMAIL PROTECTED]  2002-09-27 15:40 -------
Hi,

I analyzed the problem with jspc and jsp pages in a directory structure.

These are the problems based on the Tomcat 4.1.12 version:

1. the directory structure is copied to place the generated Java files into it. 
But there's a problem with the package names. What are you doing if there's a 
directory or sub-directory with a not legal Java package name, e.g. 'static' or 
'public' etc. so that e.g. a directory name would be /static/public/infopages. 
This should be converted into e.g. '_static/_public/_infopages'.

2. The generated Java file has always the same package (the first line in the 
Java source file). That's by default org.apache.jsp. It should be the converted 
directory structure to a legal package name: for the example above it should be: 
'package _static._public._infopages;'

3. Probably there are also restrictions for a Java class name. Probably some 
characters are not allowd in the class name but are legal for jsp names. These 
should be escaped.

4. The servlet mappings file generator should use all the above used techniques 
to generate a correct mapping. For the above example it should be (with the page 
Test.jsp):

<servlet>
  <servlet-name>_static__public__infopages_Test_jsp</servlet-name>
  <servlet-class>_static._public._infopages.Test_jsp</servlet-class>
</servlet>

<servlet-mapping>
 <servlet-name>_static__public__infopages_Test_jsp</servlet-name>
 <url-pattern>/static/public/infopages/Test.jsp</url-pattern>
</servlet-mapping>

I hope these comments are useful for a correct implementation of the JspC for 
larger web applications with a rich directory structure and jsp names.

With Regards,
Udo Walker

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to