Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

I created html and a servlet. I have treid to run it, but it seems the html doesn't know where to find the servlet. I have posted the html, the servlet, and the web.xml on pastebin called WelcomeServlet. I tried to alter the web.xml as the older Deitel book suggested, but it ws not well-formed and didn't run at all. Can somebody help me figure out how to tell the html where the servlet is? Thanks so much for your help on my first post.

OpenStudy (anonymous):

I was using a Tomcat server 6 and Spring with Jav2EE. I am not sure if configuration file names have changed, or what.

OpenStudy (rsmith6559):

Without any code, this is basically impossible. If any other servlets on that server work, I'd just graft their URL into the HTML.

OpenStudy (anonymous):

I did put the code on pastebin. I figured it was too much to paste into the window here. I guess you need the link to see it. - http://pastebin.com/zkk9qvgf Sorry, I am completely new to this.

OpenStudy (rsmith6559):

I haven't worked with servlets. The HTML says: <form action = "/WelcomeServlet/welcome1" method = "get"> That would dictate that WelcomeServlet is a top-level directory in the HTML folder, with welcome1 being a file inside of it. I'd bet that this isn't right. Unless everything on that server goes to a Java executable environment.... I'm expecting to see something more along the lines of /tomcat/WelcomeServlet/welcome1, so that it's in (Apache's) Java server. I am surmising most of this.

OpenStudy (anonymous):

Thanks. I just now saw your post and I will be going to bed now. I will try checking on that tomorrow morning.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!