This discussion is archived
2 Replies Latest reply: Jan 10, 2013 1:36 PM by 939520 RSS

Code Written In Servelet Is Not Working

984078 Newbie
Currently Being Moderated
1. My name is Anand Patil, I have developed a web project with my partner.
2. We both are using Tom Cat 6.0. And eclipse Juno as a IDE
3. My partner is using operating system Windows 07 and I am using operating system Windows XP.
4. All project files are exported on Windows 07 by using File System through eclipse juno
5. When I import all project files by using File Systems on Windows XP through eclipse juno it gets imported properly.
6. Now I have added a simple code System.out.println("check point one"); with other SOP. After addition of a small code
I run the server, and when I check the output I donot get my newly added SOP message. The out put that I get is of previous code.
7. This shows that updations in code are not working properly.
8. Can any body will help me in getting out of this problem?
9. I think may this problem is due to use of different operating system. Is it so?

Actions taken to solve this problem are as bellow -

1. We checked BuildAutomatically check mark from proect ment, that was on.
2. We also clicked on clean option from project menu and we also refreched project list.
3. We also deleted the whole project, server and workspace.
4. We re-created workspace on different location and then re-imported the project.
5. We also cleared Work directory that is present in ProgramFiles of TomCat server directory.

By taking all above actions still we are facing same problem.
  • 1. Re: Code Written In Servelet Is Not Working
    gimbal2 Guru
    Currently Being Moderated
    You are putting a lot of effort into making your question as hard to read as possible :/

    The heart of the matter is this:
    Now I have added a simple code System.out.println("check point one"); with other SOP. After addition of a small code I run the server, and when I check the output I donot get my newly added SOP message. The out put that I get is of previous code.
    That must mean the updated .class file that Eclipse created (assuming build automatically is switched on) is not deployed to the tomcat instance you are using. You need to figure out why not, it is going to be a configuration mistake; try searching for Eclipse tutorials that describe how to deploy stuff to Tomcat from Eclipse and compare what you read to what you're doing yourself. In my experience it never works properly out of the box to be honest, there is always some mistake in the deployment assembly, build path, etc.
  • 2. Re: Code Written In Servelet Is Not Working
    939520 Explorer
    Currently Being Moderated
    I don't know if this will help, but you can try creating a very simple SOP project and see if that works on both machines. It might give you some ideas on how to solve your problem. Another possibility is to create a brand new project and copy your java code and configuration files into it. This may (or may not) eliminate any IDE configuration issues that is in the way.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points