aspose file tools*
The moose likes Servlets and the fly likes SOS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "SOS " Watch "SOS " New topic
Author

SOS

Dhaval Patel
Greenhorn

Joined: Jan 02, 2001
Posts: 7
Hi All,
I m new to servlets, I had installed jsdk2.1 as my webserver, i made a html file & a java program in the ..\examples\servlets\directory (which is my root directory)
I can access my servlet by http://localhost:8080/examples/servlet/s2
but i can't access the html file by writing http://localhost:8080/examples/servlet/form.html
Both the files are in same directory, eventhough it works for servlet but not for html files
Please help me to clear concept of working directory for servlets & also tell the way to access servlets in the sub directory eg. ..\examples\servlets\myjava\s3..
Appreciate yr support.
Thanx
Dhaval Patel.
vikas sahni
Greenhorn

Joined: Jan 01, 2001
Posts: 7
hi,
i have also used jsdk but the path ie required to invoke the servlet is http://localhost:8080/servlet/filename there is no need to write examples in between because servletrunner defaults the directory to examples as u can see when u run servletrunner.
u are not required to keep the html file in the same dir..
u can keep it anywhere and just pass the address of the servlet as above..that dir has somewhat different classloader may that would be creating some problem.
and if u want to place it in myjava dir, then place your servlet in package myjava
and call like this http://localhost:8080?servlet/myjava.s3
vikas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOS
 
Similar Threads
Tocat issue
page not found error
Help -unable to run servlet in APACHE
Can't run JSP/HTML files in Tomcat
HTTP 404 error