Hi there,
I am developing a web application using
servlets on my home machine but need to transfer it to a different computer for demonstration. As much as possible I am using relative URLs in my servlets when e.g. submitting forms to make this process straightforward.
However, I also have some static HTML pages that point to servlets and vice versa - these are located in a different directory than the servlet class files obviously. (I'm using
Tomcat so the HTML files are in tomcat_home/webapps/ ROOT and the servlets in ...ROOT/WEB-INF/
classes/package_name). I can't seem to make either the HTML file or the servlet point to each other using relative URLs and so have to use the full URLs in each case.
I've tried various things but nothing works except a full URL - I would think that using a relative URL is possible, could someone tell me what I should write as my relative URL (in both directions - from the HTML file to a servlet and vice versa).
Much appreciated!
Gillian Klee