Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets" Watch "Servlets" New topic
Author

Servlets

swati maken
Greenhorn

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>
where:
'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
Thanx.
Waiting for ur reply.
Swati
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 http://www.webappcabaret.com/swati/ for the [****] part where www.webappcabaret.com is the host where you deploy your appln and "swati" is the ServletContext name.
regds
maha anna
 
wood burning stoves
 
subject: Servlets
 
Similar Threads
Servlet to Applet communication
getting url from where servlet called
ServletConfig getInitParameter() ????
Passed SCWCD with 81%
How to pass multiple params