Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets

 
swati maken
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic