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

servlet not running from html file

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm starting with servlets in java and tried deploying the servlet class file in its package com\examples\web
I have a under html file and an also xml file for address mapping. The html file is opening properly in the browser but when I submit it, it looks like no action is being taken... Can you please tell me what I should be looking at?

Thanks,
Vishwanath K
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the URL being shown in the browser when you open that HTML file? Does it start with "file:" or "http:"? If the former, then that's not going to work. You need to get the page from the server, not the file system. If the latter, can you see the request getting through to the server (by looking at the server logs)?
 
Vishwanath Krishnamurthi
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

It is http. It is http://localhost:8080/ApplicationOne/form.html

The problem is, clicking the submit button takes no action at all, as if it wasn't clicked at all. Not even an error msg!!

My servlet class is deployed here in
D:\tomcat\webapps\ApplicationOne\WEB-INF\classes\com\examples\web

My html code looks like


I tried opening the web.xml file using xml editor and it did not show any error. It looks like:
It is put under D:\tomcat\webapps\ApplicationOne\WEB-INF



Confused

Vishwa.
 
Vishwanath Krishnamurthi
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops.. I just found the typo in my html file.
I had typed "form" as "from"

Thanks,
Vishwa
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vishwanath Murthi wrote:Oops.. I just found the typo in my html file.
I had typed "form" as "from"



Good Catch
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic