Does the project not come with a build file, for instance build.xml for ANT, or something like it? The deployment details should be in there.
A servlet is really nothing more than a normal Java class file, so yes just like any other .java source files it needs to be recompiled. How it is "distributed" depends on the actual application it is part of. You'll need to look at how the application is currently set up on the web or app server (i.e. Tomcat, JBoss, Websphere, ...). Most likely it will either be sitting as a .class (compiled file) somewhere under the WEB-INF/classes directory in your web app work directory, or somewhere inside a jar file under WEB-INF/lib, or inside a war file. Jar and war files are essentially nothing more than zip files.
posted 8 years ago
There's nothing inside the WEB-INF directory that has the words *.class
I am also having trouble deploying to a server, there is already an instance of Jakarta on the machine. I guess I will uninstall that and reinstall regular old Apache Tomcat.
I would like to do what is required to the servlet and redistribute it but I am unsure as to how to do this. I have the build automatically checked.
I notice the previous developer has a build directory but nothing is in it.
Like Koen said, there are many ways of deploying the servlet. You should do the same thing that the previous developer was doing. You should either ask the previous developer or look at the deployment scripts that s/he has already implemented.
If you have the deployment scripts, you can post them here, and people can help you reverse engineer them. Given what you have told us until now, there is not enough information
posted 8 years ago
I do see a script, utilizing ant. I am including the code here
I appears that the Ant build script you posted should compile the servlet and add it to the WEB-INF/classes directory. The build, however, does not create a WAR file so I assume that the app will be deployed in its exploded form to Tomcat.
I assume that you obfuscated the values of src.dir and dest.dir. If the dest.dir is within your project's directory, then you will have to still copy the entire WAR contents to to the Tomcat/webapps directory. Unfortunately, because of the directory name obfuscation, I cannot tell you exactly what to copy over (based on dest.dir value, it would be the contents of d:/blah, expect that I would not expect to see src within that directory, as given in src.dir)
I cannot be any clearer because of lines 20 and 29 in the build.xml file you posted. The values (directory locations)) make no sense to me. Are those the correct directory locations or did you change them before posting? If you changed them, could you either post the real directory names or do a better job of changing the names.
For example, one of my projects has these directories:
Note that if I would have changes the name the same way you did, then in line 20 the "blah" would be "/opt/workspace/helloweb" while in line 29 the "blah" is "/opt/workspace/helloweb/webapp". Now, I would line to tell you to copy "blah" to some location, but if I tell you that, you won't know whether I mean /opt/workspace/helloweb or /opt/workspace/helloweb/webapp.