There are two things you can do to help you get better answers here:
1) Be sure to take the time to compose descriptive subjects for your posts; read this for more information.
A title such as "can you please help" is worse than useless. What would happen if all posts had such a title?
Please go back and change your post to add a more meaningful subject by clicking the button on your post.
2) Be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.
You can go back and change your post to add code tags by clicking the button on your post.
While this probably isn't the cause of any problems, why is your source in WEB-INF? That's really odd. Your source shouldn't even be part of the deployed web application.
If you are trying to make your source public, there are better means of distribution.
With regards to your compilation problems, once you've reformatted your post with code tags, maybe someone will spot the issue. But one thing that's evident right off the bat: your classes should be in a package other than the default package.
Hai First if you are using tomcat this is how you must deploy your webb application..I will take you thorugh these steps okay
1) you have webapps directory.......Create a folder with your project name
2) inside the project you have a WEB-INF directory which contains a folder named classes and a file web.xml(i am sure you know how to use the dd file)
3) all your sevlet codes must go the classes folder........
4)there you may have as many packages as you like....
if you have to know more about packages read java2 complete reference it helped me a lot.......
from your explanation i believe your deployment itself is wrong
james smitho wrote:
But that's surely because of that db, right? How do I correct that last error? Please.
I believe if you are a beginner then it will be helpful if you use some j2ee IDE(like Eclipse Galileo) for the structure.
Also just check whether you configured your servlet in deployment descriptor (/WEB-INF/web.xml).
Joined: Nov 16, 2009
Thank you all! You were very friendly. I must read what you said.
variable db has found, I just defined it...
S3 compiles now!!
But Just one error, from a web browser;
The requested resource (/tomcat....servlet/S3) is not available. S2 is available.
Yes, I had and have folder MyProject and inside that is WEB-INF.
I had also some old classes in WEB-INF/classes. I have a S1.class in there,
BUT NOT S2.
Now I must put these classes that I want in WEB-INF/classes.
contains web.xml and java-files.
Something in web.xml;
I believe this a small problem, I must have S3 available with my web browser. Indeed, S2 is available.
Joined: Nov 16, 2009
now I have also S3 in WEB-INF/classes.
Now web browser says about S3;
The server encountered an internal error () that prevented it from fulfilling this request.
javax.servlet.ServletException: Cannot allocate servlet instance for path /tomcat//MyProject/servlet/S3