I am using the html form for the input and using the servlet class
Originally posted by Bear Bibeault:
Welcome to the Ranch.
First, here's a useful tip for making your posts easier to read. Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and most people will just go elsewhere. Please read this for more information.
You can go back and change your post to add code tags by clicking the .
Originally posted by Ben Souther:
Is your app the root webapp inside your container?
If you're not sure what this means, post the FULL path to your HTML file, starting with the drive letter of your hard drive.
Originally posted by Ben Souther:
No, that's not what I was asking.
Is your app THE root web application for your container?
Please post the full path to your servlet.
Originally posted by Ben Souther:
"coz" isn't a word.
Post the full path to your servlet class file.
Example:
c:\tomcat\webapps\myapp\WEB-INF\classes\com\mypackage\MyServlet.class
Originally posted by Ben Souther:
"coz" isn't a word.
Post the full path to your servlet class file.
Example:
c:\tomcat\webapps\myapp\WEB-INF\classes\com\mypackage\MyServlet.class
Originally posted by sachin mesala:
<form name="input" action="C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Lasto\WEB-INF\classes\Test1.class" method="post">
Originally posted by Ben Souther:
I wasn't suggesting that you put the full path in your form.
I just wanted you to post it here so we can see what it is.
Your application is not the root application in your server.
It has a contextPath of "Lasto".
Therefore, Lasto needs to be part of your URL when calling your servlet.
Originally posted by Ben Souther:
The 3 dots (an ellipse) mean that I left the rest out for brevity.
Make sure your tag is complete.
Originally posted by sachin mesala:
I kept in the form action="Lasto/xyz" ....
Originally posted by Ben Souther:
Your not writing any output or forwarding to any JSPs in your servlet.
There is no reason why it should show you anything.
Originally posted by Ben Souther:
There's nothing missing as far as the attribute goes.
You're binding it to request scope.
Your JSP is reading it back from session scope.
What's missing is the forward from the servlet to the JSP.
Download the SimpleMVC example in our code barn.
Drop the war file in your webapps directory and Tomcat will deploy it.
You will then have a working example that does all of this.
Originally posted by sachin mesala:
Any good suggestion from you to me, after seeing my errors , as i want to be a good programmer.
Originally posted by Ben Souther:
Yes. Pick up a good book on the subject.
I used Core Servlet and Java Server Pages years ago.
I know there is a newer edition of it out there but haven't looked at it yet.
Another one that is popular is the Head First Servlets book.
Originally posted by sachin mesala:
Hi Bean,
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |