But surely if you have two files with the same name in different directories
they will conflict and cause a compilation error if they have the same
package name?

I.e.

/messageboard/search.jsp
/mail/search.jsp

Will create the .java files:

com/mycompany/jsp/messageboard/search.java with package com.mycompany.jsp
com/mycompany/jsp/mail/search.java with package com.mycompany.jsp

When you compile the compiler will throw an Exception.  Surely this is not
correct behaviour?  Or at the least this should not be allowed.  But it does
happen.

Regards,

kam

On 10/9/02 20:09, "John Trollinger" <[EMAIL PROTECTED]> wrote:

> That is the correct behavior.  When you goto a JSP page through the
> browser it will do the same thing.
> 
> The spec leaves the package naming to the implementation
> 
>> -----Original Message-----
>> From: Khamsouk Souvanlasy [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, October 08, 2002 9:34 PM
>> To: Tomcat Users List
>> Subject: Jasper and java source package problem
>> 
>> 
>>  Hi, 
>> 
>> Couldn't see this in the archives but I am sure someone has
>> come across this before.
>> 
>> When trying to pre-compile my pages using Jasper (tomcat
>> 4.1.12) with Ant 1.5.1 I have problems getting it to put in
>> the proper package names for the source files it generates.
>> 
>> i.e. my jsp pages are in the following directories:
>> /
>> /mail
>> /messageboard
>> /admin
>> 
>> And I want Jasper to create packages for the file in the
>> following manner: com.mycompany.jsp com.mycompany.jsp.mail
>> com.mycompany.jsp.messageboard com.mycompany.jsp.admin
>> 
>> Is this possible? So far, Jasper creates the Java source
>> directory structures in the correct manner but the package
>> names in the source file is always com.mycompany.jsp
>> 
>> I am using the following ant command (taken pretty much from the Jspc
>> javadoc):
>> <jasper2 verbose="0" package="com.mycompany.jsp"
>> uriroot="${web.dir}" webXmlFragment="${build.dir}/webinc.xml"
>> outputDir="${src.dir}"/>
>> 
>> I also tried using ant's jspc command but it has the same
>> problem, actually a lot more broken since it can't even
>> output the web xml fragment.
>> 
>> Thanks in advance,
>> 
>> Kam
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <mailto:tomcat-user-> [EMAIL PROTECTED]>
>> For 
>> additional commands,
>> e-mail: <mailto:[EMAIL PROTECTED]>
>> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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

Reply via email to