Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

invoking a servlet  RSS feed

 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have written a servlet code for the sign up page
iam using tomcat 4.1 as the server..
had a small problem ..
Where do we store the servlet java file and the servlet class file?
i have stored the file in my directory under the root dir. and the class file in the web-inf dir..under the classes dir..
but when i submit the form..
it gives an error .. the servlet/Registration file not available
thanks
jyotsana
 
vijaykumar shah
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"i have written a servlet code for the sign up page
iam using tomcat 4.1 as the server..
had a small problem ..
Where do we store the servlet java file and the servlet class file?"
Have a habit of reading the help file available with the server, no problem if u haven't read but if u read lot of problem will be solved
Now while working with tomcat 4.1 what u can do is whenever its time to put servlet , in servlet u can place the .java and .class file both in the web-inf\classes directory, if u can view examples available they are all taken from that directory , so put your .class and .java file in classes
while accessing
u have to write in url
http://localhost:8080/servlets/whatever
whatever is your class file
not putting the jsp file
u can place your jsp , html file in the root
and access as http://localhost:8080/home.jsp or home.html
"i have stored the file in my directory under the root dir. and the class file in the web-inf dir..under the classes dir..
but when i submit the form..
it gives an error .. the servlet/Registration file not available"
if u still have problems u can come online on yahoo id vijayshahbiis2003 or vijay_shah_78 send me message i shall let u know what is to be done
there is also concept of context.. and many more...... with tomcat..
this is beyound the scope of this session
thanks
vijay
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!