• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Help - How to Call "Servlet though HTML" File

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear folks
I need your help to run my first servlet page through html file. Please suggest how can i do this:
My HtmlServlet.html is in c:\java\ directory in WIN98 environment:


My following HelloWorld.class file is in C:\orion\default-web-app\WEB-INF\classes directory:

Please note that I will run this example using orion web server.
Normally without .html file i run my above .class file of above servlet using:
http://localhost/servlet/HelloWorld in explorer after starting orion and it works fine. But now i wanna to run the same though calling the above .html file.
You help in this regard shall highly be appreciated.
Thank you in advance.
Rashid Ali
[ January 28, 2002: Message edited by: Rashid Ali ]
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rashid,
try:
<FORM METHOD="GET" ACTION="http://localhost/servlet/HelloWorld">
[ January 28, 2002: Message edited by: Axel Janssen ]
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update your ACTION method to ACTION="http://localhost:8080/servlet/HelloWorld" Put your HTML file anywhere on your directory and acxcess it from there.
[ January 28, 2002: Message edited by: Bosun Bello ]
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for both of your replies.
I got able to run my servlet through html.
Thanks again.
Rashid Ali
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic