• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

chat servlet

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
money grubbing section goes here:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic