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

Help - How to Call "Servlet though HTML" File

 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • 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 ]
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rashid,
try:
<FORM METHOD="GET" ACTION="http://localhost/servlet/HelloWorld">
[ January 28, 2002: Message edited by: Axel Janssen ]
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks for both of your replies.
I got able to run my servlet through html.
Thanks again.
Rashid Ali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic