File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets" Watch "Servlets" New topic


swati maken

Joined: Jan 12, 2001
Posts: 14

My question is that suppose we have created one html page which contains the following line - "invoke the servlet" in href tag like this line no.1)
<a href "http://localhost:8080/servlet/abcservlet">invoke the servlet</a>
'abcservlet' is the name of a servlet.
My html page on local host works fine but if i have to host this page on internet i.e on one server then will there be any change in 'line no. 1' (i.e <a href ...> ) or not .If yes then what changes are to be made.
And my second question is : where to keep html pages and images which are calling/invoking the servlets i.e is it necessary to keep these files in public_html directory of java web server. Or there is any other way out
Waiting for ur reply.
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
From "/servlet/abcServlet" onwards it will be same whereever you deploy. But in [****]/servlet/abcServlet format, the [****] part will differ if you deploy in another server. It could be for the [****] part where is the host where you deploy your appln and "swati" is the ServletContext name.
maha anna
I agree. Here's the link:
subject: Servlets
It's not a secret anymore!