html to xml to servlets

C

cat_dog_ass

I have the following html file:
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\Deepanjan\HTML\html1.html

I have the following xml file:
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\Deepanjan\WEB-INF\web.xml

I have the following servlet:
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\Deepanjan\Servlet1\Servlet1.class

Tomcat is up & running.
The html file shows up fine and has the following cantent:

<html>
<head><title>This is the title</title></head>
<body>
<form action="Servlet1" methed="get">
<input type="submit">
</form>
</body>
</html>

The xml file has the following content:
<web-app>
<display-name>counter</display-name>
<description>
Welcome to Tomcat
</description>
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
</web-app>

When I click on the Submit button on the HTML file, I get:
Firefox can't find the file at /C:/Program Files/Apache Software
Foundation/Tomcat 5.5/webapps/Deepanjan/HTML/Servlet1?


What's the problem?
 
T

Timo Stamm

cat_dog_ass said:
When I click on the Submit button on the HTML file, I get:
Firefox can't find the file at /C:/Program Files/Apache Software
Foundation/Tomcat 5.5/webapps/Deepanjan/HTML/Servlet1?

Hi Cat Dog Ass,

you should sue your parents for giving you this name.

What's the problem?


The problem is that you double-clicked the file "html1.html", which just
opened this file in your browser.

What you want is probably to open the URL

http://localhost:8080/Deepanjan/html1.html

in your browser. How this URL looks depends on your tomcat and webapp
configuration.


Timo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top