Results 1 to 3 of 3
  1. #1
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default simple question about servlets

    hi thanks for reading.

    I just want to ask maybe a simple question, i did a short tutorial on the web on this site Java Tips - Introduction to Java Servlets with Eclipse

    it create a simple jsp talking to a servlet.

    did everything, the jsp and the servlet. I believe I got the servlet to the correct package then I exported the project to the webapp folder of my tomcat.

    typed in localhost:8080/MyFirstServlet on mozilla then the jsp page came up, after clicking the button that calls the servlet page, it gave me a 404 pag not found error.

    checked the webapps, and the servlet page which is named GreetingServlet is located under webapps/MyFirstServlet/WEB-INF/classes/com/mycompany/servlet/servletLiesHere

    it is there but I don't understand why it is not seen

    then I tried to run the package inside eclipse and the project worked perfectly, the jsp page and successfully called the servlet with the greeting

    to make things short, I did a project. used mozilla to run it, it was not able to find the servlet.

    then I ran the package inside eclipse and it worked perfectly.

    don't know what is the problem, can you please give me some ideas? :confused::confused::confused:

  2. #2
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    never mind, checked out how the examples were saved and i just copied it.

    the folder that eclipse exported has this files saved, inside the package 'MyFirstServlet' were folders meta-inf, web-inf and index.jsp. what I did i took out the classes folder from the web-inf folder.

    so the folders inside MyFirstServlet is classes, meta inf, web inf and the index.jsp
    it worked. still don't know why eclipse would create folder hierarchy that is not identified by tomcat

  3. #3
    kulangotski is offline Senior Member
    Join Date
    Feb 2009
    Posts
    117
    Rep Power
    0

    Default

    never mind, just transferred the classes folder inside the the project eclipse export and it worked with mozilla

Similar Threads

  1. very simple Question
    By arsenal4ever_11 in forum NetBeans
    Replies: 2
    Last Post: 05-27-2010, 09:51 PM
  2. some simple question?
    By jperson in forum New To Java
    Replies: 4
    Last Post: 05-03-2010, 06:32 PM
  3. Simple Question
    By barusk in forum Networking
    Replies: 13
    Last Post: 03-04-2009, 08:33 PM
  4. question on servlets
    By Minu in forum Java Servlet
    Replies: 4
    Last Post: 01-16-2009, 11:21 AM
  5. Probably a really simple question...
    By ibanez270dx in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •