Hello guys, I'm learnig java servelts but I got problems. I'using
tomcat as a container so I have a web application named so I created a
directory named jsp within the webapps' directory. After I have created
a web.xml file and a WEB-INFO directory inside my web application
directory then I put all classes inside the WEB-INFO/classes directory.
But nothing appear. Can someone help with that? Thanx
> Hello guys, I'm learnig java servelts but I got problems. I'using
> tomcat as a container so I have a web application named so I created a
> directory named jsp within the webapps' directory. After I have created
> a web.xml file and a WEB-INFO ...
Huhh? Did you mean 'WEB-INF' (no 'O')?
>...directory inside my web application
> directory then I put all classes inside the WEB-INFO/classes directory.
Only loose classes go in the classes directory, and
then by 'reverse package name', so for example...
<snippet>
package com.ourcompany;
public class TheClass {
...
</snippet>
..should be located as..
WEB-INF/classes/com/ourcompany/TheClass.class
OTOH, if your classes are in a jar, they need
to go in WEB-INF/lib.
> But nothing appear.
Are you saying the 'classes are not found'?
Please try to give more detail of error output.
If none of the above works, don't forget to refresh
the server (restarting it is the easiest way).
HTH
Andrew T.
ck - 02 Jan 2007 14:35 GMT
> > Hello guys, I'm learnig java servelts but I got problems. I'using
> > tomcat as a container so I have a web application named so I created a
[quoted text clipped - 34 lines]
>
> Andrew T.
Adding to what Andrew has said. You could make this simpler by just
creating a jsp file(index.jsp) and putting it inside your application
folder (in this case jsp folder and not WEB-INF).
Simply delete web.xml if it contains nothing or if its giving any error
during start up of the server.
In index.jsp you could put "hello world"
In your browser try to open it (http://127.0.0.1:8080/jsp/index.jsp I
am presuming that you would have not changed the port number)
I would also like to presume that you don't know how servlets can be
invoked. So you should refer some book, how to deploy a servlet.
Hope this helps
Cheers,
Ck
http://www.gfour.net