Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

html to xml to servlets

Thread view: 
cat_dog_a.s - 23 Mar 2006 06:43 GMT
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?
Timo Stamm - 23 Mar 2006 13:07 GMT
> 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 a.s,

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.