Describe the various HTTP request methods?
HTTP defines eight methods (sometimes referred to as "verbs") indicating the desired action to be performed on the identified resource. What this resource represents, whether pre-existing data or data that is generated dynamically, depends on the implementation of the server. Often, the resource corresponds to a file or the output of an executable residing on the server. ; HEAD : Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. ; GET : Requests a representation of the specified resource. Note that GET should not be used for operations that cause side-effects, such as using it for taking actions in web applications. One reason for this is that GET may be used arbitrarily by robots or crawlers, which should not need to consider the side effects that a request should cause. See safe methods below. ; POST : Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both. ; PUT : Uploads a representation of the specified resource. ; DELETE : Deletes the specified resource. ; TRACE : Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. ; OPTIONS : Returns the HTTP methods that the server supports for specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource. ; CONNECT : Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy.[3]
How should a meeting use a gavel?
A gavel is typically used by the chairperson to signal the start or end of a meeting, to call for order, or to bring attention to important points being made. It should be used respectfully and sparingly to maintain decorum and attention during the meeting.
What is Servlet API used for connecting database?
The Servlet 2.3 API consists of two packages: javax.servlet and javax.servlet.http. The base functionality is defined in the javax.servlet package whose classes and interfaces outline a generic, protocol-independent implementation. This means you can use it for non-Web applications, too. The javax.servlet.http interface defines classes and interfaces that are specific to the Hypertext Transfer Protocol (HTTP).
Can you use jsp and servlets together?
Yes, JSP (JavaServer Pages) and Servlets can be used together in a web application. Servlets handle the business logic and processing of requests, while JSP is used to create the user interface and generate dynamic content. Servlets can interact with JSP pages to pass data and control the flow of the application.
JSP Skeleton
Below is how a Skeleton JSP File would look like. (The file has to be saved as .jsp)
// Page Imports
<%@ page import = “com.xyz.ClassName %>
// Tag Library References
<%@ taglib URI = “path to Taglib file†prefix = “xx†%>
// here xx refers to the prefix with which the tag library will be referred to
// HTML Head & Title Content
// Java Script Content
// HTML Body & Form Contents
Note: Java code can be placed within the <% %>tags in the body part of the JSP page within the Body tags
How do you dynamically identify the jsp in servlet?
You can dynamically identify the JSP file in a servlet by using the request URL or request parameters to determine which JSP to forward the request to. You can also store necessary information in session attributes or external configurations to help determine the appropriate JSP to display. Finally, you can use a servlet mapping or URL pattern to route requests to different JSP files based on the URL.
What is the difference between an ASP and an ISP?
An ASP (Application Service Provider) provides software applications over the internet, while an ISP (Internet Service Provider) provides access to the internet. ISPs offer connectivity services like email, web hosting, and domain registration, whereas ASPs offer software applications for a fee.
The Servlet Context
A Web application includes many parts. It is more than just one servlet or JSP. Numerous JSPs and one or more Servlets and other supporting java classes together form the web application. To help manage an application, you will sometimes need to set and get information that all of the servlets share together, which we will refer to as context-wide.
For Example, if you want a single name using which you can refer to the application, you can set it in the servlet context and have it shared across all instances that use the application.
Ex Code:
public void init(ServletConfig config) throws ServletException
{
super.init(config);
// Get the Context
ServletContext context =config.getServletContext();
// Set the attribute
context.setAttribute("appName", "My Test App");
}
Any time you want, you can refer to this attribute in the context and get its value like below:
String appName = context.getAttribute("appName");
After the above line of code, the variable appName will have the value "My Test App
What are the advantages and disadvantages of JSP?
Advantages of JSP
1. HTML friendly simple and easy language and tags.
2. Supports Java Code.
3. Supports standard Web site development tools.
Disadvantages of JSP
1. As JSP pages are translated to servlets and compiled, it is difficult to trace
errors occurred in JSP pages.
2. JSP pages require double the disk space to hold the JSP page.
3. JSP pages require more time when accessed for the first time as they are to be
compiled on the server.
Set and get session attributes syntax in servlets and java script?
Setting and getting session attributes is fairly easy. It is the same in both Servlets and JSPs with one exception. In a JSP, you already have access to the session object, and you do not have to declare it. In a Servlet, you must get the session like this: javax.servlet.http.HttpSession session = request.getSession(); Once you have done that, you can set a session object like this: session.setAttribute("name","value"); To retrieve the value, do this: String foo = (String) session.getAttribute("name"); A couple of things to keep in mind: * The second parameter in the setAttribute method is an Object, not a String. When you retrieve the value, you have to cast it. In the example above, I am casting it to a String. * If you try to perform a getAttribute on a session attribute that does not exist, or was not set, it will return a null. * Session attributes are not available using JavaScript. You can not set or get an attribute in JavaScript. * You do NOT need to do the 'session = request.getSession() in a JSP. It is only necessary in a Servlet.
What is a session What are the different ways of session tracking in servlet programming?
Why do we need a Session?
When one page needs to share information with another, the scope of the data broadens beyond processing a single request. This is because, when a response gets committed, all the data that was held in the request that generated that response is destroyed. So, if you want that data in another page, you will be looking at a blank request object with no data in it. When such a need arises, you must send the data from one page to the server and from the server to the next requested page, whether it be the same page or another page altogether. There are several ways to share state information between requests. However, the primary or the easiest way is to use sessions.
How Do Sessions Work?
The container generates a session ID. When you create a session, the server saves the session ID on the client's machine as a cookie. If cookies are turned off then it appends the ID in the URL. On the server, whatever you add to the session object gets placed in server memory-very resource intensive. The server associates that object in memory with the session ID. When the user sends a new request, the session ID is sent too. The server can then match the objects in its memory with that session ID. This is how we maintain client state.
How do you get servlet context instance to servlet?
You can get the ServletContext instance in a servlet by using the getServletContext() method provided by the HttpServlet class, which is the base class for servlets. This method returns the ServletContext object associated with the servlet. For example: ServletContext context = getServletContext();
Write a servlet to display request header information?
Retrieving HTTP Request Header Information
The Http Request header is the area where all the details of the request are bundled. This is where the browser specifies the file wanted, date, image file support, and a lot more. Let us take a look at a sample Servlet that is going to read through the Http Request Header.
Servlet code:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
* Displaying request headers
*
* @author Anand V
*/
public class ReadHttpRequestHeaderServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/HTML");
PrintWriter out = response.getWriter();
out.println("< HTML >");
out.println("< head >");
String title = "Read Request Header Example";
out.println("< title >" + title + "");
out.println("< / head >");
out.println("< body >");
out.println("< h3 >" + title + "< / h3 >");
out.println("< table >");
Enumeration e = request.getHeaderNames();
while (e.hasMoreElements())
{
String headerName = (String)e.nextElement();
String headerValue = request.getHeader(headerName);
out.println("< tr >< td bgcolor="#CCCCCC" > " + headerName);
out.println("< / td >< td > " + headerValue + " < / td > < / tr >");
}
out.println("< / table >");
out.println("< / body >");
out.println("< / HTML >");
}
}
What is the difference between servlet context page context?
ServletContext is an interface for communication with the servlet container while PageContext is an object for managing data related to a JSP page. ServletContext is used for application-wide resources while PageContext is specific to a single JSP page.
How do you create an address book using jsp and store all the information?
To create an address book using JSP, you can create a form to input contact information like name, email, phone number, etc. When the form is submitted, you can handle the data in a servlet and store it in a database like MySQL using JDBC. Then, you can retrieve and display this information in the JSP using Java servlets.
How do you retrieve data from an SQL database so that it can be viewed on a web page using JSP?
import java.sql.*;
public class Lookup { public static voidmain(String[] args) { String dbUrl = "jdbc:odbc:people"; String user = ""; String password = ""; try { // Load the driver (registers itself) Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c = DriverManager.getConnection( dbUrl, user, password); Statement s = c.createStatement(); // SQL code: ResultSet r = s.executeQuery( "SELECT FIRST, LAST, EMAIL " + "FROM people.csv people " + "WHERE " + "(LAST='" + args[0] + "') "+ " AND (EMAIL Is Not Null) " + "ORDER BY FIRST"); while(r.next()) { // Capitalization doesn't matter: System.out.println(r.getString("Last") + ", " + r.getString("fIRST") + ": " + r.getString("EMAIL") ); } s.close(); // Also closes ResultSet } catch(Exception e) { e.printStackTrace(); } } } ///:~
In the context of JSP, the Model-View-Controller (MVC) pattern can be implemented by having the JSP act as the View to display data from the Model (usually Java objects) and the Controller can be represented by servlets or Java classes that handle business logic and interact with the Model. The JSP page is responsible for displaying the data provided by the Controller, maintaining a separation of concerns between the presentation (View) and business logic (Controller).
What class is a new servlet usually inherited?
The servlet class created in web applications usually extend the javax.servlet.HttpServlet class. The HttpServlet extends the javax.servlet.GenericServlet. These classes contain the basic features that are required to run a web application.
How do you you refresh your Instagram page?
you cant in the main part when you are looking at your profile, but you can refresh pictures by clicking on them and you can refresh your newsfeed
How do you refresh a page on a tablet?
It depends on what kind of tablet.. For an iPad there is a little arrow going in a circle at the end of the box were it shows the website URL or link. It might be the same with android tablets but i am not sure. It usually looks like an arrow rounded into a circle.
JSP stands for Java Server Pages. JSP is an integral part of any j2ee application. It handles the User Interface (UI) layer of any web based application. It has support to execute java code and also can use HTML and java script. The output of a JSP page is usually viewed in a web browser like Internet Explorer or Mozilla Firefox etc.
How do you retrieve table data from mysql to jsp?
<%@ page import ="java.sql.*" %>
<%@ page import ="javax.sql.*" %>
<%@ page import ="java.io.*" %>
<%@ page language="java" import="java.util.*,java.text.SimpleDateFormat;" pageEncoding="ISO-8859-1"%>
<html>
<%
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat formatter= new SimpleDateFormat("dd/MM/yyyy");
String dateNow = formatter.format(currentDate.getTime());
String nam=(String)request.getAttribute("uname");
String pwd=(String)request.getAttribute("pwd");
request.setAttribute("date",dateNow);
request.setAttribute("nam",nam);
request.setAttribute("pwd",pwd);
System.out.print(nam);
%>
<%
String full_name=request.getParameter("fname");
String cn=request.getParameter("name");
String deg=request.getParameter("designation");
String ema=request.getParameter("email");
String mobile=request.getParameter("mob_no");
String serial=request.getParameter("ser_no");
String department=request.getParameter("deptt_name");
String off_add=request.getParameter("office_address");
String st_name=request.getParameter("state_name");
String spin=request.getParameter("pin");
String phn_no=request.getParameter("phone_no");
String svar1=request.getParameter("srvip");
String svar2=request.getParameter("srvloc");
String svar3=request.getParameter("destport");
String svar4=request.getParameter("descrsrv");
String placen=request.getParameter("place");
String vdate=request.getParameter("date");
String rname=request.getParameter("r_name");
String rdesg=request.getParameter("r_designation");
String remail=request.getParameter("r_email");
String rphone=request.getParameter("r_phone");
String cname=request.getParameter("c_name");
String cdesg=request.getParameter("c_designation");
String cemail=request.getParameter("c_email");
String cphone=request.getParameter("c_phone");
String issby=request.getParameter("captchatext");
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/vpn","root","test123");
Statement st= con.createStatement();
int i=st.executeUpdate("insert into vpn_registration(cname,name,designation,email,mobile,serial_no,name_dept,off_add,state,pincode,off_phone,place,rname,rdesign,rmail,rmob,c_name,cdesign,cmail,cmob,issuedby) values ('"+cn+"','"+full_name+"','"+deg+"','"+ema+"','"+mobile+"','"+serial+"','"+department+"','"+off_add+"','"+st_name+"','"+spin+"','"+phn_no+"','"+placen+"','"+rname+"','"+rdesg+"','"+remail+"','"+rphone+"','"+cname+"','"+cdesg+"','"+cemail+"','"+cphone+"','"+issby+"')");
Statement st1= con.createStatement();
int y=st1.executeUpdate("insert into server_details(registration_no,serip,serloc,destport,desc_service) values ('"+svar1+"','"+svar2+"','"+svar3+"','"+svar4+"')");
st.close();
con.close();
%>
<head>
<title>ONLINE VPN REGISTRATION FORM</title>
<style>
a, A:link, a:visited, a:active
{color: #0000aa; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
A:hover
{color: #ff0000; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
p, tr, td, ul, li
{color: #000000; font-family: Tahoma, Verdana; font-size: 11px}
.header1, h1
{color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; font-size: 13px; margin: 0px; padding-left: 2px; height: 21px}
.ctrl
{font-family: Tahoma, Verdana, sans-serif; font-size: 12px; width: 100%;}
.btnform
{border: 0px; font-family: tahoma, verdana; font-size: 12px; background-color: #DBEAF5; width: 100%; height:18px; text-align: center; cursor: hand;}
.btn
{background-color: #DBEAF5; padding: 0px;}
textarea, select,input
{font: 9px Verdana, arial, helvetica, sans-serif; background-color: #DBEAF5;}
</style>
<SCRIPT language="javascript">
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
if(rowCount>6)
{
alert("Cannot add more than 6 rows.");
return false;
}
document.getElementById("rowlength").value=rowCount;
var row = table.insertRow(rowCount);
var counts=rowCount-1;
var cell0 = row.insertCell(0);
var chk = document.createElement("input");
chk.type = "checkbox";
chk.name="chk"+counts+"";
cell0.appendChild(chk);
var cell1 = row.insertCell(1);
var srvip = document.createElement("input");
srvip.name="srvip"+counts+"";
srvip.id="srvip"+counts+"";
srvip.className='ctrl';
srvip.type = "text";
//srvip.onClick="hello()";
cell1.appendChild(srvip);
var cell2 = row.insertCell(2);
var srvloc = document.createElement("input");
srvloc.type = "text";
srvloc.className='ctrl';
srvloc.name="srvloc"+counts+"";
cell2.appendChild(srvloc);
var cell3 = row.insertCell(3);
var destport = document.createElement("input");
destport.type = "text";
destport.className='ctrl';
destport.name="destport"+counts+"";
destport.id="destport"+counts+"";
cell3.appendChild(destport);
var cell4 = row.insertCell(4);
var descrsrv = document.createElement("input");
descrsrv.type = "text";
descrsrv.className='ctrl';
descrsrv.name="descrsrv"+counts+"";
cell4.appendChild(descrsrv);
}
</SCRIPT>
<script type="text/javascript">
function clearFields()
{
document.cmaForm.reset();
}
</script>
<SCRIPT language="javascript">
function deleteRow(tableID) {
try {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;
}
table.deleteRow(i);
rowCount--;
i--;
}
}
}catch(e) {
alert(e);
}
}
</SCRIPT>
<script type="text/javascript">
function setid()
{
var x=document.cmaForm.rowlength.value;
//alert(x);
document.cmaForm.id=x;
return true;
}
</script>
<script type="text/javascript" src="vpn.js"></script>
</head>
<body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="noBack();" bgcolor="white">
<!-- Header -->
<table cellpadding="0" cellspacing="0" width="100%" border="0" bgcolor="#ffffff">
<tr>
<td align="center"><img src="img/nic.jpg" width="65%" height="80" border="0" alt="NIC Logo"></td>
</tr>
<tr><td><img src="img/line9.gif" width="1" height="5" border="0"></td></tr>
</table>
<!-- Form -->
<form method="post" name="cmaForm" action="vpn_registration.jsp" id="0" onSubmit="return setid(),validate_form(this.id)" >
<table cellpadding="0" cellspacing="0" border="0" width="65%" align="center">
<tr>
<td bgcolor="#4682B4" width="10"><img src="img/line9.gif" width="10" height="1" border="0"></td>
<td class="header1" nowrap>NIC VPN Services<img src="img/line9.gif" width="10" height="1" border="0"></td>
<td><img src="img/line5.gif" width="10" height="21" border="0"></td>
<td background="img/line8.gif" width="100%"> </td>
<td background="img/line8.gif"><img src="img/line9.gif" width="10" height="1" border="0"></td>
</tr>
<tr>
<td background="img/line6.gif"><img src="img/line9.gif" border="0"></td>
<td colspan="3"><img src="img/line9.gif" width="1" height="10" border="0"><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td bgcolor="#DBEAF5">
<table cellspacing="1" cellpadding="2" border="0" width="100%">
<tr bgcolor="#ffffff">
<td colspan="7" align="center"><font size="2">National Infomatics Centre <br> Department of Information Technology<br>Ministry of Communications and Information Technology
<br> Government of India</font></td>
</tr>
<tr bgcolor="#4682B4">
<td colspan="7" align="center"><font size="2" color="white"><b>VPN Registration Form</b></font></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7"><b>Note:</b> Fields marked<font size="2" color="red"> * </font>are mandatory.
</td>
</tr>
<logic:present name="fail">
<tr><td colspan=7 align="center" ><font color="red" size="5">${fail}</font></td></tr>
</logic:present>
<tr bgcolor="#ffffff">
<td colspan="7" align="center"><b>SECTION I : SUBSCRIBER INFORMATION</b></td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="7"> 1.1 Personal Details:</td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Full Name:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="fname" class="ctrl"></td>
<td colspan="1" width="5%"> Common Name:</td>
<td colspan="5" width="50%"><input type="text" name="name" value="<%= request.getParameter("uname")%>" readonly="readonly"class="ctrl"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Designation:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="designation" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> E-mail Address:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="email" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Mobile:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="mob_no" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> DC Serial No.:</td>
<td colspan="5" width="50%"><input type="text" name="ser_no" value="<%= request.getParameter("pwd")%>" readonly="readonly"class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="7"> 1.2 Official Address:</td>
</tr>
<tr bgcolor="#ffffff">
<td> Name of the Department:<font size="2" color="red">* </font></td>
<td bgcolor="#ffffff" colspan="7"><input type="text" name="deptt_name" size="35" class="ctrl"></td>
</tr>
<tr bgcolor="#ffffff">
<td > Office Address:<font size="2" color="red">* </font></td>
<td colspan="7"><input type="text" name="office_address" size="35" class="ctrl"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> State:</td>
<td colspan="1" width="35%"><input type="text" name="state_name" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Pin Code:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="pin" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%" > Office Telephone:</td>
<td colspan="1" width="35%"><input type="text" name="phone_no" size="35" class="ctrl"></td>
<td colspan="6" width="5%"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="7"> 1.3 List of Server to access through VPN:<font size="2" color="red">* </font></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7">
<TABLE border="1" class="ctrl" id="addressesTable">
<TR>
<td width="21"> </td>
<TD width="150">IP Address of the Server</TD>
<TD width="196">Location of the Server</TD>
<TD width="167">Destination Port</TD>
<TD width="162">Website/URL of Servers</TD>
</TR>
<TR>
<TD>
<INPUT name="chk" type="checkbox" class="ctrl" disabled="disabled"/></TD>
<TD><INPUT name="srvip0" type="text" id="srvip0" class="ctrl" /></TD>
<TD><input name="srvloc0" type="text" class="ctrl" value=""></TD>
<TD><INPUT name="destport0" type="text" id="destport0"class="ctrl" /></TD>
<TD><INPUT name="descrsrv0" type="text" class="ctrl" />
<input type="hidden" name="rowlength" id="rowlength" value="1">
</TD>
</TR>
</TABLE>
</td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7" align="left"><input name="des_ser2" value="Add New" type="button" onClick="addRow('addressesTable')" />
<INPUT type="button" value="Delete" onClick="deleteRow('addressesTable')" /></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7" align="center"><font size="2"><u>DECLARATION</u></font></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7">I hereby declare that<br> 1. The information provided is correct.<br>
2. Is responsible for the safety of the Digital Certificate, PIN, Username and Password issued for accessing VPN Service.<br>
3. I undertake to surrender the VPN account and Digital certificate on transfer / leaving the division.<br>
4. The certificate and VPN account are issued will be used only for accessing the NIC VPN Service as per the list provided in 1.3.<br>
5. Will not indulge in any activity and no attempt will be made to gain unauthorized access to other NIC Websites and facilities.<br>
6. I am responsible for the content/ data uploaded in the servers through VPN connection.<br>
I have read the terms and conditions of NIC VPN Services and will comply with. If at a later stage any information is found to be incorrect or non-compliance with the terms and conditions will result in the cancellation of the DC issued by NIC for NIC VPN service.</td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Place:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="place" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Date:</td>
<td colspan="5" width="50%"><input type="text" name="date" value="${date}" readonly="readonly" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7" align="center"><b>SECTION II : RECOMMENDATION</b></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7"> This is to certify that the person as identified in SECTION-I has provided correct information and is authorized on behalf of the organization to update and access servers listed in 1.3.<br>
I shall intimate NIC VPN Division to deactivate the account when the person is transferred / relived from responsibility for which the VPN account and digital certificate is issued.
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="7"> 2.1 Verification by Recommending/Reporting/Head of Office</td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Name:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="r_name" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Designation:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="r_designation" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> E-mail Address:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="r_email" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Contact No.:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="r_phone" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7" align="center"><b>SECTION III : Verification by NIC-Coordinator</b></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7" align="left" ><a href="http://webservices.nic.in/webcoord.aspx" target="blank"> <u> Please refer the authorised NIC Web Co-ordinator</a></u></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="7"> User Category: Free / Paid<br>
If free enclose the copy of the approval.<br>
If paid, then confirm the period for which payment is made: From:.................To:.................<br>
Project No. ......................................................................................................................<br>
The web sites mentioned at 1.3 (a) in SECTION-I am correct. The subscriber is the authorized person to update this web site and require VPN Services. Permission may give for the same.<br>
I shall intimate NIC VPN division to deactivate the account when the person is transferred / relived from responsibility for which the VPN account and digital certificate is issued.
</td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Name:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="c_name" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Designation:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="c_designation" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> E-mail Address:<font size="2" color="red">* </font></td>
<td colspan="1" width="35%"><input type="text" name="c_email" size="12" class="ctrl"></td>
<td colspan="1" width="5%"> Contact No.:<font size="2" color="red">* </font></td>
<td colspan="5" width="50%"><input type="text" name="c_phone" class="ctrl" size="10"></td>
</tr>
<tr bgcolor="#ffffff">
<td width="15%"> Enter the Letters:<font size="2" color="red">* </font></td>
<td colspan="1" width="20%"><input type="text" name="captchatext" size="12" class="ctrl"></td>
<td colspan="1" width="20%">"</td>
<td colspan="1" width="20%"><input type="image" name="captchaimg" src="/vpn_app/jcaptcha" size="12" class="ctrl"></td>
<td colspan="4" width="25%"></td>
</tr>
</table></td></tr></table>
<img src="img/line9.gif" width="1" height="10" border="0"><br>
</td>
<td background="img/line7.gif"><img src="img/line9.gif" border="0"></td>
</tr>
<tr>
<td width="10"><img src="img/line4.gif" width="10" height="20" border="0"></td>
<td bgcolor="#4682B4" colspan="4" align="right">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="btn" width="100"><input type="submit" name="Submit" value="Submit" class="btnform"></td>
<td width="1"><img src="img/line9.gif" width="1" height="18" border="0"></td>
<td class="btn" width="100"><input type="reset" name="Reset" value="Reset" class="btnform"></td>
<td width="1"><img src="img/line9.gif" width="1" height="18" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!-- Footer -->
<table align="center" cellpadding="3" cellspacing="0" width="65%" border="0" height="22">
<tr bgcolor="#DBEAF5">
<td align="center"><font face="Tahoma">For any query please contact VPN Support:</font><font color="blue" face="Tahoma">vpnsupport[at]nic[dot]in</font>
<br>
<font face="Tahoma">Contact No:</font> <font color="blue" face="Tahoma">+91-11-24305391 / 99</font></td>
</tr>
<logic:present name="fail">
${fail}
</logic:present>
</table>
<!-- /Footer -->
</body>
</html>
How do you get the image file from the database with JSP?
You can retrieve an image file from a database in JSP by writing a servlet that fetches the image from the database and streams it to the JSP page. The servlet will set the content type to "image/jpeg" or the appropriate image format and write the image data to the response output stream. In the JSP page, you can then display the image by setting the source attribute of the img tag to the servlet URL.
Is the JSP tutorial easy to follow and understand?
Yes, the JSP tutorial is easy to follow and understand. It tells you what it is doing from start to finish. When the JSP life cycle is complete a screen will pop up and they are finished.
A Servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web servers
A Servlet is a Java-based server-side web technology.
The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container.