Loading ...
Sorry, an error occurred while loading the content.

about tomcat 5

Expand Messages
  • abhijit_java21
    I have copied my java class file( Hello.class )in the following directory Tomcat 5.0 WEBAPPS servlets-examples WEB-INF CLASSES Hello . Then start Tomcat 5
    Message 1 of 4 , Jul 6, 2004
    • 0 Attachment
      I have copied my java class file("Hello.class")in the following
      directory "\Tomcat 5.0\WEBAPPS\servlets-examples\WEB-INF\CLASSES\Hello".
      Then start Tomcat 5 from "/bin/startup.bat".
      Openned internet explorer . put url written as below
      "http://127.0.0.1:8080/servlets-examples\WEB-INF\CLASSES\Hello"
      The messege "no resources found" is given by the browser.
      But when i try 2 run their example class it gives desired result.
      My Hello.java is totally correct . I copied it from "The complete
      reference Java 2" by Herbert Schilt.
      Plz help me.
      plz tell me where i hav 2 copy my java class file & what will be the
      url in my browser.
      Thanks
    • Evgeniy Platonov
      Hello abhijit_java21 I have no a great experience in JSP, but I have already used Tomcat :). I have done it in following way: In %CATALINA)HOME%/webapps I ve
      Message 2 of 4 , Jul 9, 2004
      • 0 Attachment
        Hello abhijit_java21

        I have no a great experience in JSP, but I have already used Tomcat :).
        I have done it in following way:
        In "%CATALINA)HOME%/webapps" I've created my folder("oil"), then I've
        put here my jsp-page file ("login.jsp"). And there I've created folders
        "/WEB_INF/classes/". Into ".../classes/" I've put my beans class file
        (diplom.web.beans.UserSessionBean - I've got following path for my file -
        ".../oil/WEB-INF/classes/diplom/web/beans/UserSessionBean.class" )

        For deploing all the files (.jsp and .class) I used ant.

        And then in my "login.jsp" I've used <jsp:UseBean> tag:
        <jsp:useBean id='userBean' class = 'diplom.web.beans.UserSessionBean'
        scope='session' />

        Then I restarted Tomcat and typed in my browser
        "http://localhost:8080/oil/login.jsp"

        If my memory service me right that's all. It was my first experience of
        using Tomcat :))

        Thanks.

        ~
        Best regards
        Platonov Evgeniy
        ----
        http://autonews.com.ua
      • Amish Shah
        I guess your Hello.java is a standalone file with main method. WEB-INF is the folder which is never accessible via browser its the only directory within which
        Message 3 of 4 , Jul 9, 2004
        • 0 Attachment
          I guess your Hello.java is a standalone file with main
          method.

          WEB-INF is the folder which is never accessible via
          browser its the only directory within which via a
          browser no files or directories can be accessed
          otherwise people will start downloading the code of
          somebosy else website.

          Aslo if ur Hello is a servlet then u need to access as

          http://127.0.0.1:8080/servlets-examples/servlet/Hello

          Regards,
          Amish

          --- abhijit_java21 <abhijit_java21@...> wrote:
          > I have copied my java class file("Hello.class")in
          > the following
          > directory "\Tomcat
          >
          5.0\WEBAPPS\servlets-examples\WEB-INF\CLASSES\Hello".
          > Then start Tomcat 5 from "/bin/startup.bat".
          > Openned internet explorer . put url written as below
          >
          "http://127.0.0.1:8080/servlets-examples\WEB-INF\CLASSES\Hello"
          > The messege "no resources found" is given by the
          > browser.
          > But when i try 2 run their example class it gives
          > desired result.
          > My Hello.java is totally correct . I copied it from
          > "The complete
          > reference Java 2" by Herbert Schilt.
          > Plz help me.
          > plz tell me where i hav 2 copy my java class file &
          > what will be the
          > url in my browser.
          > Thanks
          >
          >
          >
          >


          =====
          ____________________________________
          Regards
          Amish Shah (B.E. Computer)
          Ph : +919820893839
          ____________________________________



          __________________________________
          Do you Yahoo!?
          Yahoo! Mail Address AutoComplete - You start. We finish.
          http://promotions.yahoo.com/new_mail
        • barenca
          Another thing that you shut remember is that in tomcat you have to uncomment out some lines if you want to use servlets (unless you include those lines in your
          Message 4 of 4 , Jul 16, 2004
          • 0 Attachment
            Another thing that you shut remember is that in tomcat you have to
            uncomment out some lines if you want to use servlets (unless you
            include those lines in your web.xml)
            Regards

            --- In gelide@yahoogroups.com, "abhijit_java21" <abhijit_java21@y...>
            wrote:
            > I have copied my java class file("Hello.class")in the following
            > directory "\Tomcat 5.0\WEBAPPS\servlets-examples\WEB-INF\CLASSES\Hello".
            > Then start Tomcat 5 from "/bin/startup.bat".
            > Openned internet explorer . put url written as below
            > "http://127.0.0.1:8080/servlets-examples\WEB-INF\CLASSES\Hello"
            > The messege "no resources found" is given by the browser.
            > But when i try 2 run their example class it gives desired result.
            > My Hello.java is totally correct . I copied it from "The complete
            > reference Java 2" by Herbert Schilt.
            > Plz help me.
            > plz tell me where i hav 2 copy my java class file & what will be the
            > url in my browser.
            > Thanks
          Your message has been successfully submitted and would be delivered to recipients shortly.