aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "chat servlet" Watch "chat servlet" New topic
Author

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 ChatDispatch.java 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>
</APPLET>

It is showing HttpChatApplet class in not found.it 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
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
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
http://localhost:8080/examples/servlet/
goes through special processing by the server. Don't use if for anything other than servlet classes.
WBB

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: chat servlet
 
Similar Threads
problems with deploying servlet
ServletConfig getInitParameter() ????
TOMCAT - Path to GIF files
Stuck on HelloWorldServlet
ServletRunner