This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

(Beginner) Calling Servlet from Applet

 
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
 
I just had the craziest dream. This tiny ad was in it.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic