November 30th, 2001, 02:51 AM
linking to a servlet from a html link
I am new at writing java servlets.
How can I link to a java servlet using html links?
Will the following work?
<a href="<host>:<port>/<class_name>?sessionid=23"> MY LINK </a>
Thanks in advance
November 30th, 2001, 08:39 AM
form action = "<host>:<port>/servlet/name_of_servlet"
November 30th, 2001, 10:28 AM
it's not always host>:<port>/servlet/name_of_servlet
U can change mapping of Ur servlets, so U don't need to specify "servlet" folder
November 30th, 2001, 03:14 PM
I want to run a servlet when a html link in clicked.
By html link I mean:
<a href="...something"> Link leading to my servlet </a>
I know how to run a servlet from a form element.
December 7th, 2001, 03:17 PM
depending on where your document root is....
i just call <A HREF='/servlets/servletname'>
if its in a package, then the /servlets/com.cma.servletname...
it all depends on where you start from when you call /servlets