File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

chat servlet

 
payal sharma
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic