File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes chat servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "chat servlet" Watch "chat servlet" New topic

chat servlet

payal sharma
Ranch Hand

Joined: Oct 04, 2000
Posts: 57
I am able to use JSK2.1,jwsk,tomcat.

I was trying to make a chat applet wriiten in "Java Servlet programming" by jason hunter.
In I am getting localhost:8080/servlet/ as my getServletPath whereas I had kept all my class related to it in localhost:8080/examples/servlets/ directory.

My all code work with localhost:8080/examples/servlet/ directory which is not present.I think it is virtual.

my applet code is this
<APPLET CODE= HttpChatApplet codebase= http://localhost:8080/examples/servlet/ width=500 HEIGHT=170>

It is showing HttpChatApplet class in not and other my codes are in e:\win98\jsdk\jsdk2.1\examples\web-inf\servlets\ directory

I could not understand where it is looking for class.As I had put all my classes where I usually use to as above.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13024
You should put your applet class files in the same directory as the HTML page that the applet lives in and use codebase to point to them. The URL
goes through special processing by the server. Don't use if for anything other than servlet classes.
I agree. Here's the link:
subject: chat servlet
It's not a secret anymore!