You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allen Williams <an...@csunv.com> on 2006/05/18 15:10:11 UTC

Newbie: Help on directory structure

I have an Java app called login, in a package called UserConfig.  This is
just a very simple app to help me get started.

The directory structure:

app-name|
        |-login.jsp
        |-welcome.jsp
        |-WEB-INF|
        |        |-classes|
        |        |        |-UserConfig|
        |        |        |           |-login.class
        |-src/
        |-etc.///

In a form in a (very simple) login.jsp file, I have tried referencing
"servlets/UserConfig.login",
"classes/UserConfig.login", "classes/UserConfig/login", and just about every
other permutation.  I have also moved classes/UserConfig/login.class to
classes/login.class, classes/UserConfig.login.class, and
classes/UserConfig/UserConfig.login.class.

To each of these combinations and permutations, I get a "resource
unavailable" message referencing whatever I have currently called the .class
file in the
login.jsp file.

Can anyone give me an explanation of what the directory structure is
supposed to be, and what this class is supposed to be called?  Is this
convention documented anywhere?

Thanks,
anw


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Newbie: Help on directory structure

Posted by Hassan Schroeder <ha...@gmail.com>.
On 5/18/06, Allen Williams <an...@csunv.com> wrote:
> I have an Java app called login, in a package called UserConfig.  This is
> just a very simple app to help me get started.
>
> The directory structure:
>
> app-name|
>         |-login.jsp
>         |-welcome.jsp
>         |-WEB-INF|
>         |        |-classes|
>         |        |        |-UserConfig|
>         |        |        |           |-login.class
>         |-src/
>         |-etc.///
>
> In a form in a (very simple) login.jsp file, I have tried referencing
> "servlets/UserConfig.login",

You need to provide a mapping for your servlets in web.xml, e.g.

  <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>UserConfig.login</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/login</url-pattern>
  </servlet-mapping>

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Newbie: Help on directory structure

Posted by Steve Ochani <oc...@ncc.edu>.
On 18 May 2006 at 9:10, Allen Williams wrote:

> I have an Java app called login, in a package called UserConfig.  This
> is just a very simple app to help me get started.
> 
> The directory structure:
> 
> app-name|
>         |-login.jsp
>         |-welcome.jsp
>         |-WEB-INF|
>         |        |-classes|
>         |        |        |-UserConfig|
>         |        |        |           |-login.class
>         |-src/
>         |-etc.///
> 
> In a form in a (very simple) login.jsp file, I have tried referencing
> "servlets/UserConfig.login", "classes/UserConfig.login",
> "classes/UserConfig/login", and just about every other permutation.  I
> have also moved classes/UserConfig/login.class to classes/login.class,
> classes/UserConfig.login.class, and
> classes/UserConfig/UserConfig.login.class.

Did you try UserConfig.login   (dot in between package name and class name)?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org