Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Servlet-Interview-Questions Call a servlet on click of hyperlink
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
Call a servlet on click of hyperlink
1 Answer(s)      2 years and 6 months ago
Posted in : Servlet Interview Questions


Call a servlet on click of hyperlink


Advertisement
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>


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> <
eclips hyperlink - JSP-Servlet
eclips hyperlink  In my myeclipse if hyperlink is provided in any application , it's not working when I deploy it. I also use net at my PC, is there any problem due to IP Address
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 - JSP-Servlet
friend, If you click on "more..." If data come from database then call
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 call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
Connecting to Database from a hyperlink in JSP - JSP-Servlet
Connecting to Database from a hyperlink in JSP  How can I connect to database by clicking on a hyperlink in a JSP Page.Can you please give me sample code for that? Thanks, Srinivasa Rao  Hi friend, insert code
use data from database table as hyperlink value - JSP-Servlet
use data from database table as hyperlink value  I'm creating a web... to hyperlink. I want to use this data as hyperlink and use it as the value of the hyperlink in order to view the complete details of the row of the resultset. e.g.
Click on Page Refresh - JSP-Servlet
Click on Page Refresh  hi ,i am working on jsp with mysql. i m facing a problem whenever i click on page refresh or f5 button, the value on form... is click". If u have more problem then give error page code. Thanks
get a radio button click value - JSP-Servlet
") in servlet that is used in another jsp so can i call getParameter("radio") i.e...get a radio button click value  thanks sir for sending code ,but i...();"> 2) main.jsp:   Hi Friend, If you want to call
how to call jsp variable through servlet
how to call jsp variable through servlet  Hi deepak; i am posting some peace of code. and i need to call jsp varable <%=f%> through servlet so... a hyperlink to call this downlode page like out.println("Download document"); when i
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
how to pass the mutiple values from    I am getting the error when passing the values from this way emp2=${employee.lastName1} & name=${employee.firstName.How to pass the values from hyperlink in column
Call servlet from javascript - JSP-Servlet
Call servlet from javascript  Hi in my application i have jsp that designs view, javascript for validation and servlet that perform business logic... the read column values present in grid and pass it to servlet along with url
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
enable hyperlink
enable hyperlink  How to enable hyperlink
Diff ways to call a EJB from Servlet, JSP - Java Interview Questions
Diff ways to call a EJB from Servlet, JSP  How can I call EJB from Servlet or JSP
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
How to call jasper from jsp or servlet - JSP-Servlet
How to call jasper from jsp or servlet  Hi Expert , I created jasper report using ireport.how to call that jasper with jsp file or servlet file ? Thanks in advance Eswaramoorthy.s
call dll from java - JSP-Servlet
call dll from java  Hello all how to call dll file methods in java
application of remote procedure call - JSP-Servlet
application of remote procedure call  give the small application for the remote procedure call and its related program code in java
Call dll from java - JSP-Servlet
Call dll from java  Any one tell me how to call dll from java. Basically , i want read the cash m/c parameters(4,i.e i want to read the cash count) in java .For this i want to call a dll from java . Also any one have
remote procedure call using java - JSP-Servlet
remote procedure call using java  what is the romote procedure call... Call) is a mechanism that enables a remote procedure call from a client... services to call other applications or Web services. JAX-RPC provides a uniform
how to call a java class in jsp - JSP-Servlet
how to call a java class in jsp  hi.. friends iam new to roseindia.i found it very nice site to clarify our douts. i have a problem to use my java class in a jsp.can anyone please help me with this query
how to call a java class in jsp - JSP-Servlet
how to call a java class in jsp  hi.. friends iam new to roseindia.i found it very nice site to clarify our douts. i have a problem to use my java class in a jsp.can anyone please help me with this query
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
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
error got minus one from read call - JSP-Servlet
error got minus one from read call  hiiii while connecting my servlet... minus one from a read call oracle.jdbc.dbaccess.DBError.throwSqlException...) the code is as follows: // *DataBase Connectivity from the Servlet. import
Use of Hyperlink in Swing - Swing AWT
Use of Hyperlink in Swing  Hi, We are developing the UI using the Java Swing and I have to create Hyperlink in the JTable cell so that if the user click on the Hyperlink it will open other window/screen/panel. My Question
Advertisements
 

 

 

DMCA.com