Forums Register Login

help, where to put servelet, html, jsp file

+Pie Number of slices to send: Send
Hi,
I am new to Servlet and try to get some execise done.
I have downloaded the Tomcat, figure out the classpath. I look Ok.
I read some previous discussion about where to put servlet and html and jsp.
It was said to put html, jsp under c:\tomcat\web-apps\examples and servelet to c:\tomcat\web-apps\examples\web-inf\classes under the root directory where html, jsp were.
SO I Have tried, the examples from book: Java servelet programming, HelloWorld.java: If I put this file under c:\tomcat\bin it worked fine, but if I put this under c:\tomcat\web-apps\examples\web-inf\classes and it will not work.
Given Information:
Error: 404
Location: /servlet/HelloWorld
Same strang thing happened to second example, which come with one form.html and related servelet Hello.java. If I Put form.html under c:\tomcat\web-apps\examples and Hello.java under c:\tomcat\bin it worked, but if I moved Hello to c:\tomcat\web-apps\examples\web-inf\classes it will not work.
I have read some material about this, but I still confused and do not know how to put html, jsp, servlet file.
Please help
Thank in advance.
+Pie Number of slices to send: Send
Hellen,
Do one thing. Ar present use the 'examples' web application dir structure in ...web-apps dir. Now store any .hrml file under

Try it ! It should work. Make HelloWorld.class as a servlet class file. PLease come back if you have some difficulty.
regds
maha anna
+Pie Number of slices to send: Send
Hi, maha:
Thanks for your response, now I know where to put those files, and thanks you.
Best regards
Look ma! I'm selling my stuff!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1398 times.
Similar Threads
Help -unable to run servlet in APACHE
HFS: Problem with deploying and testing Beer-v1 App
Problem in running JSPs on Tomcat
page not found error
Tomcat WebApp Deployment
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:05:45.