You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dh...@lexmark.com on 2001/07/18 20:03:19 UTC
servlet-class specification in web.xml - '/' or '.' separator?
Hi everyone.
Was wondering if anyone knows whether you should use a '/' or a '.' as the
package separator in classes specified in web.xml? eg for my precompiled Jsp's:
<servlet>
<servlet-name>
changeLogFileName
</servlet-name>
<servlet-class>
JspServ/changeLogFileName
</servlet-class>
</servlet>
or
<servlet>
<servlet-name>
changeLogFileName
</servlet-name>
<servlet-class>
JspServ.changeLogFileName
</servlet-class>
</servlet>
I inherited some code which uses /'s, and this works fine on all platforms,
except AIX! I submitted a bug (tomcat), and was told that the classes must be
specified using '.'.
Does anyone familiar with the spec (Craig?) know if this is true? I checked out
the spec and couldn't find it in there.
Cheers,
Dave
Re: servlet-class specification in web.xml - '/' or '.' separator?
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Sorry I'm so far behind here.
The spec says that the <servlet-name> element should contain "the fully
qualified class name of the servlet". My understanding of the Java
Language Specification is that this means using "." to separate the
package levels.
Craig
On Wed, 18 Jul 2001 dhay@lexmark.com wrote:
>
>
> Hi everyone.
>
> Was wondering if anyone knows whether you should use a '/' or a '.' as the
> package separator in classes specified in web.xml? eg for my precompiled Jsp's:
>
> <servlet>
> <servlet-name>
> changeLogFileName
> </servlet-name>
> <servlet-class>
> JspServ/changeLogFileName
> </servlet-class>
> </servlet>
>
> or
>
> <servlet>
> <servlet-name>
> changeLogFileName
> </servlet-name>
> <servlet-class>
> JspServ.changeLogFileName
> </servlet-class>
> </servlet>
>
> I inherited some code which uses /'s, and this works fine on all platforms,
> except AIX! I submitted a bug (tomcat), and was told that the classes must be
> specified using '.'.
>
> Does anyone familiar with the spec (Craig?) know if this is true? I checked out
> the spec and couldn't find it in there.
>
> Cheers,
>
> Dave
>
>
>
>
RE: servlet-class specification in web.xml - '/' or '.' separator?
Posted by Kevin McLain <ke...@vivecon.com>.
I would think you would use the standard dot syntax because they are just
compiled classes. What are you using for your web container?
Kevin
-----Original Message-----
From: dhay@lexmark.com [mailto:dhay@lexmark.com]
Sent: Wednesday, July 18, 2001 11:03 AM
To: struts-dev@jakarta.apache.org
Subject: servlet-class specification in web.xml - '/' or '.' separator?
Hi everyone.
Was wondering if anyone knows whether you should use a '/' or a '.' as the
package separator in classes specified in web.xml? eg for my precompiled
Jsp's:
<servlet>
<servlet-name>
changeLogFileName
</servlet-name>
<servlet-class>
JspServ/changeLogFileName
</servlet-class>
</servlet>
or
<servlet>
<servlet-name>
changeLogFileName
</servlet-name>
<servlet-class>
JspServ.changeLogFileName
</servlet-class>
</servlet>
I inherited some code which uses /'s, and this works fine on all platforms,
except AIX! I submitted a bug (tomcat), and was told that the classes must
be
specified using '.'.
Does anyone familiar with the spec (Craig?) know if this is true? I checked
out
the spec and couldn't find it in there.
Cheers,
Dave