JSP overview example

JSP overview example

i need example and code of JSP overview

View Answers

April 23, 2008 at 8:26 PM

Hi


<%@page contentType="text/html" import="java.util.*" %>
<html>
<title>JSP Autocompleter Example!</title>
<head>
<script type="text/javascript" language="JavaScript">

function initRequest() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
return new ActiveXObject("Microsoft.XMLHTTP");
}
}

function doCompletion() {
if (completeField.value == "") {
clearTable();
} else {
var url = "autocomplete?action=complete&id=" +
escape(completeField.value);
var req = initRequest();
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200) {
parseMessages(req.responseXML);
} else if (req.status == 204){
clearTable();
}
}
};
req.open("GET", url, true);
req.send(null);
}
}
</script>

</head>
<body>
<h1>JSP Autocompleter Example!</h1>
<input type="text" size="20" autocomplete="off"
id="complete-field" name="id" onkeyup="doCompletion();">
</body>
</html>

-----------------------------

April 23, 2008 at 8:40 PM

Hi

This is usable code.

<html>
<head>
<title>Dynamic ListBox Demonstration</title>
</head>
<body bgcolor="#ffffff" OnLoad="setOption(document.ThisForm, 0)">
<h2>Dynamic ListBox Demonstration</h2>
<hr>
<blockquote>
<form name="ThisForm">
<select name="List1" OnChange="setOption(this.form, this.selectedIndex)">
<option>Animals
<option>Colours
<option>Numbers
<option>Places
</select><p>
<select name="List2" OnChange="this.form.ValueIn2.value=this.options[this.selectedIndex].value">
<option>
<option>
<option>
<option>
<option>
<option>
<option>
</select>
Value in second listbox: <input name="ValueIn2" size="5">
</form>
<script language="javascript">
<!--
function setOption(form, index) {
for (var i = 0; i < form.List2.length; i++){
form.List2.options[i].text = "";
form.List2.options[i].value = "";
}

if (index == 0) {
form.List2.options[0].text = "Cat";
form.List2.options[0].value = "ani0";
form.List2.options[1].text = "Lion";
form.List2.options[1].value = "ani1";
form.List2.options[2].text = "Tiger";
form.List2.options[2].value = "ani2";
form.List2.options[3].text = "Dog";
form.List2.options[3].value = "ani3";
form.List2.options[4].text = "Cow";
form.List2.options[4].value = "ani4";
form.List2.options[5].text = "Snake";
form.List2.options[5].value = "ani5";
form.List2.options[6].text = "Monkey";
form.List2.options[6].value = "ani6";
}
else if (index == 1) {
form.List2.options[0].text = "Blue";
form.List2.options[0].value = "col0";
form.List2.options[1].text = "Red";
form.List2.options[1].value = "col1";
form.List2.options[2].text = "Yellow";
form.List2.options[2].value = "col2";
form.List2.options[3].text = "Green";
form.List2.options[3].value = "col3";
form.List2.options[4].text = "Orange";
form.List2.options[4].value = "col4";
form.List2.options[5].text = "Pink";
form.List2.options[5].value = "col5";
}
else if (index == 2) {
form.List2.options[0].text = "One";
form.List2.options[0].value = "num0";
form.List2.options[1].text = "Two";
form.List2.options[1].value = "num1";
form.List2.options[2].text = "Three";
form.List2.options[2].value = "num2";
form.List2.options[3].text = "Four";
form.List2.options[3].value = "num3";
form.List2.options[4].text = "Five";
form.List2.options[4].value = "num4";
}
else if (index == 3) {
form.List2.options[0].text = "Airport";
form.List2.options[0].value = "pla0";
form.List2.options[1].text = "Railway Station";
form.List2.options[1].value = "pla1";
form.List2.options[2].text = "Museum";
form.List2.options[2].value = "pla2";
form.List2.options[3].text = "Stadium";
form.List2.options[3].value = "pla3";
}
form.List2.selectedIndex = 0;
form.ValueIn2.value = form.List2.options[form.List2.selectedIndex].value;
}
//-->
</script>

<center>

</body>
</html>
---------------------









Related Tutorials/Questions & Answers:
need a jsp example - JSP-Servlet
need a jsp example  I need a jsp example to send a voice message or a audio .wav file from my pc to a mobile phone
Simple JSP program example
example? I am beginner in JSP and looking for example for getting started with the simple JSP example program. Give me simple jsp program example. Thanks  ... date on the JSP page. Check tutorial JSP Hello World example using Eclipse IDE
Advertisements
Example questions of JSP & Servlet
Example questions of JSP & Servlet  Give me some JSP & Servlet Question and their answers
Example of handling form in JSP
Example of handling form in JSP  Hi, I am learning to handle the form in JSP. Can you tell me the the example of handling form in JSP. How to handle a form in JSP? Thanks   Hi, In JSP page you can get the values
jsp maps api example - JSP-Servlet
jsp maps api example  Can u give a complete working example on usage of JSP GOOGLE MAP API
JSP Database Example
This example shows you how to develop JSP that connects to the database and retrieves the data from database. The retrieved data is displayed on the browser. Read Example JSP Database Example Thanks
JSP Comment Types with example
JSP Comment Types with example  Hi, Please explains me about the different types of comments in JSP and how use each of these comment types? Thanks   Hi, Commenting in JSP allows the programmer to embed the comment
JSP Paging Example in Datagrid - JSP-Servlet
JSP Paging Example in Datagrid  Hi, I have tested JSP Paging Example... it successfully. http://www.roseindia.net/jsp/paging.shtml When i try... on the url http://www.roseindia.net/jsp/paging.shtml is customizable or not if yes
provide example in J2ee/jsp - JSP-Servlet
provide example in J2ee/jsp  how to manage search options page in jsp using back end as oracle/sql? i am using multiple search options. so please provide code for this or tutorial
JSP for loop Example
JSP for loop Example We are going to discus about for loop in JSP page's. JSP provides loop statement and conditional checks. We first initialize... is as follows: We always write "for loop" inside JSP tag i.e.<
JSP Paging Example in Datagrid - JSP-Servlet
JSP Paging Example in Datagrid  Hello, This is with refernece to the paging smaple provided on the URL http://www.roseindia.net/jsp/paging.shtml... Folder Name is datagridsample that has a jsp page named search.jsp WEBINF\lib
JQuery-JSP AJAX example not working
JQuery-JSP AJAX example not working  Hi, I while back ran you... development code (following your example (and by the way, thanks for helping me get... to the original example figuring I must be doing something wrong. I again copied
JSP include directive tag syntax and example
JSP include directive tag syntax and example  The syntax and example of the JSP include directive tag.   Hi, The syntax of the JSP include...; The example of the JSP include directive tag is: <%@include file="filename" />
How to write first JSP Hello World example?
How to write first JSP Hello World example?  Hi, How to make first simple JSP program which prints simple Hello World example? I want to learn to make fist JSP page which prints the Hello World example. Thanks   Hi
Overview of Bioinformatics
Overview of Bioinformatics     .... For example, sequence of the genome, identification and quantitation of all... for discovery science and can assay how global information sets, for example
Java runtime example - JSP-Servlet
Java runtime example  in eclipse after submiting the data throgh jsp page i got the following error com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1. the code is: Bean
JSP date example
JSP date example          Till now you learned about the JSP syntax, now I will show you how to create a simple dynamic JSP page that prints
java technologies overview
java technologies overview  java technologies overview
Java bean example in JSP
Java bean example in JSP     ... that help in understanding Java bean example in JSP.This code illustrates... of Java bean. Understand with ExampleADS_TO_REPLACE_1 In this example we want
Bit torrent technology code example - JSP-Servlet
to start implementing it to a code so please send me a sample code in java or jsp... the following example which asks user to upload an image on the server and then you can get the path of that image on the JSP page by using the code like
Simplest Login and Logout example in JSP
Simplest Login and Logout example in JSP   This JSP example shows you how to login and logout the session between JSP pages. JSP provide an implicit object that is session in which use to save
collection overview and collection interface
collection overview and collection interface  write the program for collection interface?   Please visit the following links: http://www.roseindia.net/java/jdk6/Collection-Interfaces.shtml http://www.roseindia.net
Overview of Thread
Overview of Threads       Process A process is an instance of a computer program... be associated with the same program. For example, to check the spelling
ModuleNotFoundError: No module named 'csv_overview'
ModuleNotFoundError: No module named 'csv_overview'  Hi, My Python... 'csv_overview' How to remove the ModuleNotFoundError: No module named 'csv_overview' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'csv_overview'
ModuleNotFoundError: No module named 'csv_overview'  Hi, My Python... 'csv_overview' How to remove the ModuleNotFoundError: No module named 'csv_overview' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'data-overview'
ModuleNotFoundError: No module named 'data-overview'  Hi, My... 'data-overview' How to remove the ModuleNotFoundError: No module named 'data-overview' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'overview-upload'
ModuleNotFoundError: No module named 'overview-upload'  Hi, My... named 'overview-upload' How to remove the ModuleNotFoundError: No module named 'overview-upload' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'csv_overview'
ModuleNotFoundError: No module named 'csv_overview'  Hi, My Python... 'csv_overview' How to remove the ModuleNotFoundError: No module named 'csv_overview' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'data-overview'
ModuleNotFoundError: No module named 'data-overview'  Hi, My... 'data-overview' How to remove the ModuleNotFoundError: No module named 'data-overview' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'df-overview'
ModuleNotFoundError: No module named 'df-overview'  Hi, My Python... 'df-overview' How to remove the ModuleNotFoundError: No module named 'df-overview' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'facets-overview'
ModuleNotFoundError: No module named 'facets-overview'  Hi, My... named 'facets-overview' How to remove the ModuleNotFoundError: No module named 'facets-overview' error? Thanks   Hi, In your python
data science overview
data science overview  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science overview Try to provide me good examples or tutorials links so that I can learn
an overview of ejb 3
An overview of EJB 3. As we know that EJB architecture has failed in keeping the promise of increased productivity whereas EJB 3.0 has succeeded in doing so. It has reduced the complexity for the developers. It has succeeded in reducing
Overview of Web 3
Overview of Web 3.0 Overview  As the times goes and the technology enriches, the experts feels to develop some thing better that can be more fruitful... advance in searching the information for example of Cars, Web 3.0 uses the further
The quick overview of JSF Technology
JSF Overview          The quick Overview of JSF Technology This section gives you an overview of Java Server Faces technology, which
JSP Scriptlets Example
JSP Scriptlets Example In this section, we will understand  Scriptlets with the help of an Example. JSP allows you embed java code inside JSP page... as Scriplets. Scriplets is executed every time a JSP page is invoked.The syntax
JSP If statement Example
JSP If statement Example In this section with the help of example you will learn about the "If" statement in JSP. Control statement is used... a simple JSP program. Example : This example will help you to understand how to use
Hibernate JSP
In this section, you will learn about Hibernate with JSP using simple pagination example
JSON-JSP example
JSON-JSP example       In the previous section of JSON-Servlet example you have... will tell you how to use JSON to use it into JSP pages. In this example we have
JSP date example
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
for converting the database data for example population into any type of graph using jsp and servlets pls help me out how to write the coding for converting the database data for example population into any type of graph using jsp and servlet
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... through a full code-example. The example give you the full exposure to network.... Here we explain some example that shows the proper use for communicate
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... through a full code-example. The example give you the full exposure to network.... Here we explain some example that shows the proper use for communicate
JSP Login Logout Example
JSP Login Logout Example In this section we will discuss how to create... example in JSP we will use Eclipse IDE for compile and Tomcat 7 server... login logout example. We will create this example using JSP. In this example we
Overview of Networking through JAVA
Overview of Networking through JAVA  ...-on Java  Networking example   Find Your Host Name/IP Address... to retrieve the host name of the local system in a very simple example. Here we
JSP Cookies Example
JSP Cookies Example   ... how to handle cookies in JSP pages. In this tutorial you will learn how to add cookies through jsp page and then show the value of the same cookie in another
JSP - JSP-Servlet
JSP & Servlet Example Code  Need example of JSP & Servlet
JSP
://www.roseindia.net/jsp/simple-jsp-example/LifeCycleOfJspPage.shtml http://roseindia.net/jsp/simple-jsp-example/expressionLanguage.shtml   EL parser...Can you explain jsp page life cycle what is el how does el search
JSP
the following links: http://www.roseindia.net/jsp/simple-jsp-example/UsingBeansAndPageScope.shtml http://www.roseindia.net/jsp/simple-jsp-example/UsingBeanScopeRequest.shtml http://www.roseindia.net/jsp/simple-jsp-example
ModuleNotFoundError: No module named 'overview-plugin-workqueue'
ModuleNotFoundError: No module named 'overview-plugin-workqueue'  Hi...: No module named 'overview-plugin-workqueue' How to remove the ModuleNotFoundError: No module named 'overview-plugin-workqueue' error? Thanks  

Ads