Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(Beginner) Calling Servlet from Applet

 
joseph corner
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to call a servlet from an applet. It's working at the moment, but the applet is in the web module which also contains the servlet. I would like to put the applet in my normal htdocs folder, as I'm trying to implement http tunneling. The applet must therefore be called via port 80, from a normal html page.
At the moment, the applet finds the servlet address by using getCodeBase().
I'd like to just use (my website URL + /servlet/ + servletName) to form the servlet URL.
However, in my local tests, I can't get my servlets to display using, eg. http://localhost/servlet/myServlet. Instead, I must use http://localhost:8080/myWebModule/myServlet
What must I do to make "/servlet/" work? Am I right in thinking that it would be a mistake to hardcode the port number, as it might not always be the same? Do I need to include the name of the web module in the servlet URL? (e.g. http://localhost/servlet/myWebModule/myServlet) Needless to say, I have tried this and it didn't work...
I'm testing using Eclipse with the Lomboz plug-in.
Thanks for guidance!
J
[ March 08, 2004: Message edited by: joseph corner ]
 
joseph corner
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And my servlet container is Tomcat, btw.
J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic