Call a servlet on click of hyperlink

Ads
 

Call a servlet on click of hyperlink

Call a servlet on click of hyperlink

View Answers

May 11, 2012 at 11:26 AM

. request.getContextPath() is used to return the portion of the request URL and specifies the context of the request. You have to put the servlet url of desired servlet as href="<%=request.getContextPath()%>/CallServlet? . CallServlet is the url of the Servlet.

 <html>
        <head>
              <title>Calling servlet</title>
              </head>
<body>
   <h2>Click on bellow hyperlink to call a servlet</h2><br/>
         <a href="<%=request.getContextPath()%>/ServletConstructor">Click to call servlet</a>
</body>
        </html>

Ads









Related Tutorials/Questions & Answers:
Call a servlet on click of hyperlink
Call a servlet on click of hyperlink  Call a servlet on click...; </head> <body> <h2>Click on bellow hyperlink...;%=request.getContextPath()%>/ServletConstructor">Click to call servlet</a> <
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
Advertisements
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
hyperlink
hyperlink  I have a .xls file and i want the code to open this .xls file in read only mode when i click on a hyperlink,it should not not be editable,please send me the code
How to make a servlet to automatically call another servlet at some time instant.
How to make a servlet to automatically call another servlet at some time instant.  Can some one assist me How to make a servlet to automatically call... to display in separate HTML page, in which first servlet display should call second
SaveAs Dialogue box is not working on button click in servlet
SaveAs Dialogue box is not working on button click in servlet  Hii Sir, i added response.setHeader into my servlet code to export the data into excel file but this is not working on button click ...plz give me
How can I call a Servlet that is declare on web.xml with spring framework
How can I call a Servlet that is declare on web.xml with spring framework ... the problem is when Report.rpt call the servlet CrystalReportViewerServlet the servlet... spring dispacher to call a servlet that is declare on my Web.xml here is my
how to call servlet from html page at anchor tag ?
how to call servlet from html page at anchor tag ?  I have a very different problem as i am using netbeans ide 6.9 ml to make a website in java... to other page and at that place i give url of a servlet but in server that url
enable hyperlink
enable hyperlink  How to enable hyperlink
how to call our servlet once the credentials and url provided in the Salesforce login page.
how to call our servlet once the credentials and url provided in the Salesforce login page.  Hi All, I am working on the Integration openbravo(java) to salesforce how to call our servlet once the credentials and url provided
how to call our servlet once the credentials and url provided in the Salesforce login page.
how to call our servlet once the credentials and url provided in the Salesforce login page.  Hi All, I am working on the Integration openbravo(java) to salesforce how to call our servlet once the credentials and url provided
servlet
servlet  I designed 1 html form & a servlet but when I click on form I don't get output of servlet Please help
servlet
servlet  I designed 1 html form & a servlet but when I click on form I don't get output of servlet Please help
Hyperlink
use data from database as hyperlink and pass the data in the hyperlink
use data from database as hyperlink and pass the data in the hyperlink  Hi Friends, I am using the data from database as hyperlink and pass the data as a parameter in the hyperlink to a servlet page. By using display table
ModuleNotFoundError: No module named 'hyperlink'
ModuleNotFoundError: No module named 'hyperlink'  Hi, My Python... 'hyperlink' How to remove the ModuleNotFoundError: No module named 'hyperlink' error? Thanks   Hi, In your python environment you
retrieve data from database with hyperlink
called 'name' having two values i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....how... have values C C++ i have to retrieve and if i click C its sub categories should
Hyperlink on UILabel iPhone SDK
Hyperlink on UILabel iPhone SDK  Hi, I wanted to set a hyperlink on UILabel in my iPhone application. Can anyone suggest me how to do it? Thanks
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
SERVLET
to the servlet and if the user id is correct then a new page will be displayed with his name,when user enter his id and click on the edit button,then the value should pass to the servlet and all the fields brlongs to that id will be appear
Servlet Question - JSP-Servlet
Servlet Question  I want to call one servlet when the browser window is closed by User
Servlet Question - JSP-Servlet
Servlet Question  I want to call one servlet when the browser window is closed by User
Servlet
Servlet  how to navigate one servlet page to another servlet page
ModuleNotFoundError: No module named 'hyperlink-extractor'
ModuleNotFoundError: No module named 'hyperlink-extractor'  Hi, My... named 'hyperlink-extractor' How to remove the ModuleNotFoundError: No module named 'hyperlink-extractor' error? Thanks   Hi
call a constructor
call a constructor  How do you call a constructor for a parent class
servlet
servlet  is there any way to include pdf's in servlet
servlet
servlet  what are the methods and interfaces in the servlet api ?   Servlet Tutorials

Ads