Newbie - JSP problem.

Discussion in 'Java' started by zalek, Jul 9, 2008.

  1. zalek

    zalek Guest

    I have a space on a Tomcat server where I have some Java servlets.
    Compiled servlets are located in
    /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp/WEB-INF/classes
    directory

    I started to learn JSP. Into which directory should I put my .jsp
    programs?
    I put my first HelloWorld.jsp to:
    /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp

    and here is what is what I am getting:

    Hello! The time is now <%= new java.util.Date() %>


    Thanks,

    Zalek
     
    zalek, Jul 9, 2008
    #1
    1. Advertising

  2. zalek

    Arne Vajhøj Guest

    zalek wrote:
    > I have a space on a Tomcat server where I have some Java servlets.
    > Compiled servlets are located in
    > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp/WEB-INF/classes
    > directory
    >
    > I started to learn JSP. Into which directory should I put my .jsp
    > programs?
    > I put my first HelloWorld.jsp to:
    > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp
    >
    > and here is what is what I am getting:
    >
    > Hello! The time is now <%= new java.util.Date() %>


    That is the correct directory assuming you want URL:

    http://localhost:8080/myapp/foobar.jsp

    You do not have an Apache HTTPD serving the file ?

    Arne
     
    Arne Vajhøj, Jul 9, 2008
    #2
    1. Advertising

  3. zalek

    Guest

    On Jul 8, 10:17 pm, Arne Vajhøj <> wrote:
    > zalek wrote:
    > > I have a space on a Tomcat server where I have some Java servlets.
    > > Compiled servlets are located in
    > > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp/WEB-INF/classes
    > > directory

    >
    > > I started to learn JSP. Into which directory should I put my .jsp
    > > programs?
    > > I put my first HelloWorld.jsp to:
    > > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp

    >
    > > and here is what is what I am getting:

    >
    > > Hello! The time is now <%= new java.util.Date() %>

    >
    > That is the correct directory assuming you want URL:
    >
    > http://localhost:8080/myapp/foobar.jsp
    >
    > You do not have an Apache HTTPD serving the file ?
    >
    > Arne

    This is correct except that file name is HelloWorld.jsp so url would
    be
    http://localhost:8080/myapp/HelloWorld.jsp

    Alex.
    http://www.myjavaserver.com/~alexfromohio/
     
    , Jul 9, 2008
    #3
  4. zalek

    Arne Vajhøj Guest

    wrote:
    > On Jul 8, 10:17 pm, Arne Vajhøj <> wrote:
    >> zalek wrote:
    >>> I have a space on a Tomcat server where I have some Java servlets.
    >>> Compiled servlets are located in
    >>> /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp/WEB-INF/classes
    >>> directory
    >>> I started to learn JSP. Into which directory should I put my .jsp
    >>> programs?
    >>> I put my first HelloWorld.jsp to:
    >>> /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp
    >>> and here is what is what I am getting:
    >>> Hello! The time is now <%= new java.util.Date() %>

    >> That is the correct directory assuming you want URL:
    >>
    >> http://localhost:8080/myapp/foobar.jsp
    >>
    >> You do not have an Apache HTTPD serving the file ?


    > This is correct except that file name is HelloWorld.jsp so url would
    > be
    > http://localhost:8080/myapp/HelloWorld.jsp


    And you still see the JSP source and you are not running Apache
    HTTPD in front of Tomcat ?

    Arne
     
    Arne Vajhøj, Jul 13, 2008
    #4
  5. zalek wrote:
    > I have a space on a Tomcat server where I have some Java servlets.
    > Compiled servlets are located in
    > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp/WEB-INF/classes
    > directory
    >
    > I started to learn JSP. Into which directory should I put my .jsp
    > programs?
    > I put my first HelloWorld.jsp to:
    > /home/catalina/jakarta-tomcat-4.1.29/webapps/myapp
    >
    > and here is what is what I am getting:
    >
    > Hello! The time is now <%= new java.util.Date() %>


    Does the myapp folder have the folder WEB-INF with a valid web.xml file?


    --
    Roger Lindsjö
     
    Roger Lindsjö, Aug 3, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias Nietz
    Replies:
    1
    Views:
    3,471
    VisionSet
    Nov 12, 2003
  2. Replies:
    0
    Views:
    4,447
  3. Replies:
    5
    Views:
    484
  4. Replies:
    2
    Views:
    525
  5. zalek
    Replies:
    1
    Views:
    380
Loading...

Share This Page