aspose file tools*
The moose likes Servlets and the fly likes Help - How to Call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help - How to Call "Servlet though HTML" File" Watch "Help - How to Call "Servlet though HTML" File" New topic
Author

Help - How to Call "Servlet though HTML" File

Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
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

Joined: Jan 08, 2001
Posts: 2164
Rashid,
try:
<FORM METHOD="GET" ACTION="http://localhost/servlet/HelloWorld">
[ January 28, 2002: Message edited by: Axel Janssen ]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
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 ]

Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
Thanks for both of your replies.
I got able to run my servlet through html.
Thanks again.
Rashid Ali
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help - How to Call "Servlet though HTML" File
 
Similar Threads
Deploying Servlet in Tomcat 5.0
A problem in executing the servlet
Request Resource not available JSP
How to upload a file using servlets to a webserver
Servlet becomming slow