Using MapViewer in JSP

Hi,
Are there any example where we can use the methods sendXMLRequest() and getXMLResponse of the MapViewer class from a jsp page ?
The response I got for the server using these methods are "Message:[oms] empty or null xml map request string."
thanks

Respect sir i m sending a code given below.sir i want to identify the map location,but my code give the some error,i could't understand what i do.becoz error are shown array out of bound index..please help me.
Code..
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page session="true" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="java.awt.geom.Point2D" %>
<%@ page import="java.awt.Dimension" %>
<%@ page import="oracle.lbs.mapclient.MapViewer" %>
<html>
<head>
<!-- flooble Color Picker header start -->
<script language="Javascript">
// Color Picker Script from Flooble.com
// For more information, visit
// You may use and distribute this code freely, as long as
// you keep this copyright notice and the link to flooble.com
// if you chose to remove them, you must link to the page
// listed above from every web page where you use the color
// picker code.
var perline = 9;
var divSet = false;
var curId;
var colorLevels = Array('0', '3', '6', '9', 'C', 'F');
var colorArray = Array();
var ie = false;
var nocolor = 'none';
     if (document.all) { ie = true; nocolor = ''; }
     function getObj(id) {
          if (ie) { return document.all[id]; }
          else {     return document.getElementById(id);     }
function addColor(r, g, b) {
     var red = colorLevels[r];
     var green = colorLevels[g];
     var blue = colorLevels;
     addColorValue(red, green, blue);
function addColorValue(r, g, b) {
     colorArray[colorArray.length] = '#' + r + r + g + g + b + b;
function setColor(color) {
     var link = getObj(curId);
     var field = getObj(curId + 'field');
     var picker = getObj('colorpicker');
     field.value = color;
     if (color == '') {
          link.style.background = nocolor;
          link.style.color = nocolor;
          color = nocolor;
     } else {
          link.style.background = color;
          link.style.color = color;
     picker.style.display = 'none';
     eval(getObj(curId + 'field').title);
function setDiv() {    
     if (!document.createElement) { return; }
var elemDiv = document.createElement('div');
if (typeof(elemDiv.innerHTML) != 'string') { return; }
genColors();
elemDiv.id = 'colorpicker';
     elemDiv.style.position = 'absolute';
elemDiv.style.display = 'none';
elemDiv.style.border = '#000000 1px solid';
elemDiv.style.background = '#FFFFFF';
elemDiv.innerHTML = '<span style="font-family:Verdana; font-size:11px;">Pick a color: '
     + '(No color)<br>'
     + getColorTable()
     + '</span>';
document.body.appendChild(elemDiv);
divSet = true;
function pickColor(id) {
     if (!divSet) { setDiv(); }
     var picker = getObj('colorpicker');      
          if (id == curId && picker.style.display == 'block') {
               picker.style.display = 'none';
               return;
     curId = id;
     var thelink = getObj(id);
     picker.style.top = getAbsoluteOffsetTop(thelink) + 20;
     picker.style.left = getAbsoluteOffsetLeft(thelink);
     picker.style.display = 'block';
function genColors() {
addColorValue('0','0','0');
addColorValue('3','3','3');
addColorValue('6','6','6');
addColorValue('8','8','8');
addColorValue('9','9','9');
addColorValue('A','A','A');
addColorValue('C','C','C');
addColorValue('E','E','E');
addColorValue('F','F','F');
for (a = 1; a < colorLevels.length; a++)
               addColor(0,0,a);
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(a,a,5);
for (a = 1; a < colorLevels.length; a++)
               addColor(0,a,0);
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(a,5,a);
for (a = 1; a < colorLevels.length; a++)
               addColor(a,0,0);
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(5,a,a);
for (a = 1; a < colorLevels.length; a++)
               addColor(a,a,0);
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(5,5,a);
for (a = 1; a < colorLevels.length; a++)
               addColor(0,a,a);
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(a,5,5);
for (a = 1; a < colorLevels.length; a++)
               addColor(a,0,a);               
for (a = 1; a < colorLevels.length - 1; a++)
               addColor(5,a,5);
     return colorArray;
function getColorTable() {
var colors = colorArray;
     var tableCode = '';
tableCode += '<table border="0" cellspacing="1" cellpadding="1">';
for (i = 0; i < colors.length; i++) {
if (i % perline == 0) { tableCode += '<tr>'; }
tableCode += '<td bgcolor="#000000"><a style="outline: 1px solid #000000; color: '
     + colors[i] + '; background: ' + colors[i] + ';font-size: 10px;" title="'
     + colors[i] + '" href="javascript:setColor(\'' + colors[i] + '\');">   </a></td>';
if (i % perline == perline - 1) { tableCode += '</tr>'; }
if (i % perline != 0) { tableCode += '</tr>'; }
tableCode += '</table>';
     return tableCode;
function relateColor(id, color) {
     var link = getObj(id);
     if (color == '') {
          link.style.background = nocolor;
          link.style.color = nocolor;
          color = nocolor;
     } else {
          link.style.background = color;
          link.style.color = color;
     eval(getObj(id + 'field').title);
function getAbsoluteOffsetTop(obj) {
     var top = obj.offsetTop;
     var parent = obj.offsetParent;
     while (parent != document.body) {
          top += parent.offsetTop;
          parent = parent.offsetParent;
     return top;
function getAbsoluteOffsetLeft(obj) {
     var left = obj.offsetLeft;
     var parent = obj.offsetParent;
     while (parent != document.body) {
          left += parent.offsetLeft;
          parent = parent.offsetParent;
     return left;
function areaClicked(event, info)
alert(info);
</script>
     <!--
These two DIV objects are required for the Toolbar and Info-Tip
to work properly. Copy them as-is to your own HTML's head section.
-->
<style>
#tbar_rect
border : 1px solid red;
height : 0px;
left : 0px;
position : absolute;
top : 0px;
visibility : hidden;
width : 0px;
#infotip_window
position: absolute;
width: 150px;
border: 1px solid grey;
padding: 2px;
background-color: #DFDFDF;
visibility: hidden;
z-index: 100;
</style>
     <!-- flooble Color Picker header end -->
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>
CEA DIGITAL MAP OF INDIA
</title>
</head>
<body bgcolor="#D8D1C7">
<span style="width:100%">
     <form name=map action="try.jsp" method="get">
<table cellpadding="0" cellspacing="0" border="0" width="100%" summary="">
<tr><td>
<table cellpadding="0" cellspacing="2" border="0" width="100%" summary="">
<tr><td valign="top"></td></tr>
<FONT color="#449922" size="+1"><b>CEA MAP</b></FONT> </td></tr>
</table>
</td>
</tr>
<tr><td valign="top">
<table cellpadding="0" cellspacing="0" border="0" summary="">
<tr><td align="center"><img src="/mapviewer/myicons/t.gif" border="0" /></td></tr>
</table> </td>
</tr>
</table>
<hr>
</span>
<!-------------------------------------------------------------------------
Process the incoming map request
-------------------------------------------------------------------------->
<%
String v1=request.getParameter("q1");
// out.print(v1);
     String v = request.getParameter("q");
String dataSrc = request.getParameter("datasrc-select");
     String[][] CEA = null;
String mvURL = request.getParameter("mvurl");
if(mvURL==null || mvURL.length()==0)
mvURL = "http://"+ request.getServerName()+":"+request.getServerPort()+
request.getContextPath()+"/omserver";
// out.print(v);
     boolean newSession = false;
// retrieve mapviewer client handle from session
MapViewer mv = (MapViewer) session.getAttribute("gvis_mvhandle");
if(mv==null)
// create a new mapviewer client handle
mv = new MapViewer(mvURL);
mv.setImageFormat(MapViewer.FORMAT_PNG_URL);
mv.setMapTitle(" ");
session.setAttribute("gvis_mvhandle", mv); // keep client handle in session
newSession = true;
// enable only user selected themes
String[] checkedThemes = request.getParameterValues("_mthemev_");
if(checkedThemes!=null && checkedThemes.length>0)
mv.enableThemes(checkedThemes);
String action = request.getParameter("action");
if(action==null) action = "recenter";
String[] dataSrcList = null;
String mapW_ = request.getParameter("map_width"), mapH_=request.getParameter("map_height");
int mapW = 800, mapH = 500;
try{
mapW = Integer.parseInt(mapW_);
mapH = Integer.parseInt(mapH_);
}catch(Exception e){}
mv.setDeviceSize(new Dimension(mapW, mapH));
String aa_ = request.getParameter("map_aa");
boolean aa = false;
if(aa_!=null && "on".equalsIgnoreCase(aa_))
aa = true;
mv.setAntiAliasing(aa);
String query1=null, stroke1="#000000", fill1=null, tr1=null, labelc1=null, asis1,
query2=null, stroke2="#000000", fill2=null, tr2=null, labelc2=null, asis2,
query3=null, stroke3="#000000", fill3=null, tr3=null, labelc3=null, asis3,
               query4=null, stroke4="#000000", fill4=null, tr4=null, labelc4=null, asis4,
               query5=null, stroke5="#000000", fill5=null, tr5=null, labelc5=null, asis5;
//<!---------------------------------------- Query1 ------------------------------------------------------>
//String v1=request.getParameter("v");
//session.putValue("v1",v);
query1 = "select geom from ";
          query1+=v;
          //query1+=",";
          // query1+="lineflow where line.fnode_=lineflow.lineid";
          //query1+=;
          //query1+=;
          //query1+=.;
          //query1+=;
          //query1+=;
          //query1+=lineflow.;
          //query1+=".";
          //query1+=lineid;
          // out.print(query1);
          // out.print(query1);
stroke1 = request.getParameter("stroke_1");
fill1 = request.getParameter("fill_1");
if(stroke1==null && fill1==null)
stroke1 = "green"; //default to black stroke
fill2 = "green";
tr1 = request.getParameter("tr_1");
String l = request.getParameter("lc_1");
          // out.print(l);
          labelc1=l;
int opacity1 = (tr1!=null && tr1.equals("on"))? 128 : -1;
String style1 = "gvis_"+("NONE".equals(stroke1)?"" : stroke1) + "_"+
("NONE".equals(fill1)?"" : fill1) +
((opacity1>0)?"128" : "");
asis1 = request.getParameter("asis_1");
//<!---------------------------------------- Query2 ------------------------------------------------------>
query2 ="select GEOM from ";
          query2+="place";
          //query2+=" where ";
          //query2+="FNODE_='"+s+"'";
          //out.print(query2);
          // query2 = request.getParameter("query_2");
stroke2 = request.getParameter("stroke_2");
fill2 = request.getParameter("fill_2");
if(stroke2==null && fill2==null)
stroke2 = "#000000";
          fill2 = "red";
tr2 = request.getParameter("tr_2");
          String c = request.getParameter("lc_2");
          // out.print(c);
          labelc2=c;
//labelc2 = request.getParameter("lc");
          // out.print(labelc2);
int opacity2 = (tr2!=null && tr2.equals("on"))? 128 : -1;
String style2 = "gvis_"+("NONE".equals(stroke2)?"" : stroke2) + "_"+
("NONE".equals(fill2)?"" : fill2) +
((opacity2>0)?"128" : "");
asis2 = request.getParameter("asis_2");
//<!---------------------------------------- Query3 ------------------------------------------------------>
     query3 ="select geom from ";
          query3+="bound";
//query3 = request.getParameter("query_3");
stroke3 = request.getParameter("stroke_3");
fill3 = request.getParameter("fill_3");
if(stroke3==null && fill3==null)
stroke3 = "white";
          fill2 = "white";
tr3 = request.getParameter("tr_3");
labelc3 = request.getParameter("lc_3");
int opacity3 = (tr3!=null && tr3.equals("on"))? 128 : -1;
String style3 = "gvis_"+("NONE".equals(stroke3)?"" : stroke3) + "_"+
("NONE".equals(fill3)?"" : fill3) +
((opacity3>0)?"128" : "");
asis3 = request.getParameter("asis_3");
//<!---------------------------------------- Query4 ------------------------------------------------------>
String s = request.getParameter("t");
query4 ="select GEOM from ";
          query4+="Line";
          query4+=" where ";
          query4+="FNODE_='"+s+"'";
     //     out.print(s);
          //out.print(query4);
          // query4 = request.getParameter("query_4");
stroke4 = request.getParameter("stroke_4");
fill4 = request.getParameter("fill_4");
if(stroke4==null && fill4==null)
stroke4 = "red";
          fill4 = "red";
tr4 = request.getParameter("tr_4");
labelc4 = request.getParameter("lc_4");
int opacity4 = (tr4!=null && tr4.equals("on"))? 128 : -1;
String style4 = "gvis_"+("NONE".equals(stroke4)?"" : stroke4) + "_"+
("NONE".equals(fill4)?"" : fill4) +
((opacity4>0)?"128" : "");
asis4 = request.getParameter("asis_4");
     //<!------------------Query5----------------------------------------------->
     query5 ="select * from ";
          query5+="place";
//query3 = request.getParameter("query_3");
stroke5 = request.getParameter("stroke_5");
fill5 = request.getParameter("fill_5");
if(stroke5==null && fill5==null)
stroke5 = "#000000";
          fill5 = "red";
tr5 = request.getParameter("tr_5");
labelc5 = request.getParameter("lc_5");
          //out.print(labelc5);
int opacity5 = (tr5!=null && tr5.equals("on"))? 128 : -1;
String style5 = "gvis_"+("NONE".equals(stroke5)?"" : stroke5) + "_"+
("NONE".equals(fill5)?"" : fill5) +
((opacity3>0)?"128" : "");
asis5 = request.getParameter("asis_5");
//<!-----------------------------close----------------------------------------->
dataSrcList = mv.getDataSources();
// start processing the actual request
if(!newSession && request.getParameter("userClick.x")!=null) // user clicked on map
int x = Integer.parseInt(request.getParameter("userClick.x"));
int y = Integer.parseInt(request.getParameter("userClick.y"));
if(action.equals("recenter"))
mv.pan(x,y);
else if(action.equals("zoomin"))
mv.zoomIn(x,y, 1.5);
else if(action.equals("zoomout"))
mv.zoomOut(x,y, 1.5);
          else if(action.equals("point"))
               // mv.isClickable("theme1");
               // mv.addPointFeature(double x,double y,null,style5,"_gvis_style_text",double[] 0);
               // mv.getUserPoint(x,y);
//out.println(x);
          //out.println(y);
               else if(action.equals("id"))
String[] columns = new String[]{"AREA","CITY","id",
                                                  "a.GEOM.sdo_point.x X",
"a.GEOM.sdo_point.y Y",
                                                  "ANGLE"
//out.print(columns)
//find out the nearest office from where user clicked on the map
CEA = mv.identify(dataSrc,
"Place a", //which table
columns, //which columns to identify
"GEOM", //which geometry column
0, //srid of the geometry column
x,y //mouse click position on screen
Point2D Loc = null;
if(CEA!=null)
String X = CEA[1][10];
String Y = CEA[1][10];
Loc = new Point2D.Double(Double.parseDouble(X), Double.parseDouble(Y));
          out.print(Loc);
//mark where user clicked upon on the map with a PIN marker
Point2D p2 = mv.getUserPoint(x,y);
mv.addPointFeature(p2.getX(), p2.getY(), 0,
"M.CAPTIAL", //a Pin marker style
null, null, null);
//add a leader line from where user clicked to the nearest office
if(CEA!=null)
mv.addLinearFeature(new double[]{p2.getX(), p2.getY(), Loc.getX(), Loc.getY()},0, "NEAREST_LINE_STY", null, null, false);
/* For identifying action: use a previously generated map as backdrop
to avoid re-rendering all the base themes.
if(mv.getBackgroundImageURL()==null)
mv.setBackgroundImageURL(mv.getGeneratedMapImageURL());
String[] enabledThemes = mv.getEnabledThemes();
mv.setAllThemesEnabled(false); //temporarily disable all themes
mv.run(); // re-issue map request to draw the pin marker and leader line
//simply re-enable all themes
mv.enableThemes(enabledThemes);
mv.removeAllPointFeatures(); // clean up the PIN marker
mv.removeAllLinearFeatures(); // clean up the leader line as well
else if(!newSession) // user submitted new queries
if(mvURL!=null && mvURL.length()>0 &&
!mv.getServiceURL().equals(mvURL))
mv.setServiceURL(mvURL);
if(dataSrc!=null && dataSrc.length()>0)
mv.setDataSourceName(dataSrc);
if(query1!=null && query1.length()>9 && !mv.styleExists(style1))
mv.addColorStyle(style1, stroke1, fill1, opacity1, opacity1);
if(query2!=null && query2.length()>9 && !mv.styleExists(style2))
mv.addColorStyle(style2, stroke2, fill2, opacity2, opacity2);
if(query3!=null && query3.length()>9 && !mv.styleExists(style3))
mv.addColorStyle(style3, stroke3, fill3, opacity3, opacity3);
if(query4!=null && query4.length()>9 && !mv.styleExists(style4))
mv.addColorStyle(style4, stroke4, fill4, opacity4, opacity4);
if(query5!=null && query5.length()>9 && !mv.styleExists(style5))
mv.addColorStyle(style5, stroke5, fill5, opacity5, opacity5);
//add a temporary text style for labeling
mv.addTextStyleWithHalo("_gvis_style_text_", "PLAIN", "Serif", "12", "PLAIN", "#0000ff", 2.0);
//mv.deleteAllThemes();
if(query1!=null && query1.length()>9)
String query1_ = query1;
if(labelc1!=null && labelc1.length()>0)
int idx1 = query1.toUpperCase().indexOf("FROM");
int idx2 = query1.toUpperCase().indexOf(labelc1.toUpperCase());
if(idx2>0 && idx2 < idx1){} // already in the user query
else
query1_ = query1.substring(0, idx1) + ", "+labelc1+" "+
query1.substring(idx1, query1.length());
} else
labelc1 = null;
               mv.addJDBCTheme(dataSrc, "theme1", query1_, null, null,
style1, labelc1, "_gvis_style_text_", true);
if(query2!=null && query2.length()>9)
String query2_ = query2;
if(labelc2!=null && labelc2.length()>0)
int idx1 = query2.toUpperCase().indexOf("FROM");
int idx2 = query2.toUpperCase().indexOf(labelc2.toUpperCase());
if(idx2>0 && idx2 < idx1){} // already in the user query
else
query2_ = query2.substring(0, idx1) + ", "+labelc2+" "+
query2.substring(idx1, query2.length());
} else
labelc2 = null;
mv.addJDBCTheme(dataSrc, "theme2", query2_, null, null,
style2, labelc2 , "_gvis_style_text_", true);
if(query3!=null && query3.length()>9)
String query3_ = query3;
if(labelc2!=null && labelc2.length()>0)
int idx1 = query3.toUpperCase().indexOf("FROM");
int idx2 = query3.toUpperCase().indexOf(labelc3.toUpperCase());
if(idx2>0 && idx2 < idx1){} // already in the user query
else
query3_ = query3.substring(0, idx1) + ", "+labelc3+" "+
query3.substring(idx1, query3.length());
} else
labelc3 = null;
mv.addJDBCTheme(dataSrc, "theme3", query3, null, null,
style3, labelc3, "_gvis_style_text_", true);
//<!------------------------------- NewTheme------------------------------------------------------------------>
if(query4!=null && query4.length()>9)
String query4_ = query4;
if(labelc4!=null && labelc4.length()>0)
int idx1 = query4.toUpperCase().indexOf("FROM");
int idx2 = query4.toUpperCase().indexOf(labelc4.toUpperCase());
if(idx2>0 && idx2 < idx1){} // already in the user query
else
query4_ = query4.substring(0, idx1) + ", "+labelc4+" "+
query4.substring(idx1, query4.length());
} else
labelc4 =null ;
mv.addJDBCTheme(dataSrc, "theme4", query4, null, null,
style4, labelc4, "_gvis_style_text_", true);
if(query5!=null && query5.length()>9)
String query5_ = query5;
if(labelc5!=null && labelc5.length()>0)
int idx1 = query5.toUpperCase().indexOf("FROM");
int idx2 = query5.toUpperCase().indexOf(labelc5.toUpperCase());
if(idx2>0 && idx2 < idx1){} // already in the user query
else
query5_ = query5.substring(0, idx1) + ", "+labelc5+" "+
query5.substring(idx1, query5.length());
} else
labelc5 =null ;
mv.addJDBCTheme(dataSrc, "theme5", query5, null, null,
style5, labelc5, "_gvis_style_text_", true);
//<!--------------------------close New Theme---------------------------------->
          if(dataSrc!=null)
try{
mv.setFullExtent();
mv.run();
}catch(Exception e){out.println(e.getMessage()); }
} //user submitted queries
String url = mv.getGeneratedMapImageURL();
%>
<p><p>
<!----------------------------------------------------------------------
Generate the result web page with map image and controls
----------------------------------------------------------------------->
<form action="try.jsp" name="Main" method="get">
<%
if(url!=null)
int w = (int)mv.getDeviceSize().getWidth(), h = (int)mv.getDeviceSize().getHeight();
%><div align="center">
<TABLE border="0" width="<%=w%>" cellpadding=0 cellspacing=0 bgcolor="yellow">
<TR>
<TD width="<%=w%>" bgcolor="white">
<input type="image" border color="yellow" bgcolor="white" border="1" SRC="<%=url%>" name="userClick" width="<%=w%>" height="<%=h%>" >
</TD>
               </TR>
<tr>
<td> Click on the map to:
<input type="radio" name="action" value="zoomin" <%= action.equals("zoomin")?"checked":""%> ><B><img src="/mapviewer/myicons/zoomin.gif" alt="zoom in"></B>
<input type="radio" name="action" value="recenter" <%= action.equals("recenter")?"checked":""%> ><B><img src="/mapviewer/myicons/pan.gif" alt="re-center"></B>
<input type="radio" name="action" value="zoomout" <%= action.equals("zoomout")?"checked":""%> ><B><img src="/mapviewer/myicons/zoomout.gif" alt="zoom out"></B>
                    <input type="radio" name="action" value="point" <%= action.equals("point")?"checked":""%>
                    ><B>Point
                    </B>
                    <input type="radio" name="action" value="id" <%= action.equals("id")?"checked":""%>
                    ><B>Identy
                    </B>
</td>
</tr>
<tr><td height="15"> </td></tr>
</TABLE>
<% }
%>
<table border="0" cellpadding="2" cellspacing="1">
<tr> <td>
<input type="hidden" name="datasrc-select" value="mvd">
     <!--<img src="/mapviewer/myicons/dbconnect.gif"><FONT COLOR="#ff0000"> Datasource: </FONT>
<SELECT single size="1" name="datasrc-select">
<%
if(dataSrcList!=null)
for (int i = 0; i < dataSrcList.length; i++)
String selected = (dataSrcList.equals(dataSrc))? "selected " :"";
%> <OPTION <%=selected%> value="<%=dataSrcList[i]%>"> <%=dataSrcList[i]%> </OPTION>
<% }
%>
</SELECT>-->
               <input type="hidden" name=q value="<%=v%>">  
               <input type="hidden" name="lc_1" value="REAL">
               <input type="hidden" name="lc_4" value="FNODE_">
<!--map width: <input type="hidden" size="4" name="map_width" value="<%=(int)mv.getDeviceSize().getWidth()%>" >  
height: <input type="hidden" size="4" name="map_height" value="<%=(int)mv.getDeviceSize().getHeight()%>" >--->
<INPUT TYPE="checkbox" NAME="map_aa" <%=(mv.getAntiAliasing())?"CHECKED":""%> >AA
</td>
<td>ENTER THE LINE ID:
     <Input type="text" name="t"></td>
<td> <INPUT type=submit value=loadMap> </td>
</tr>
</tr>
<tr bgcolor="#ffffcc">
<td>Line:
<a href="javascript:pickColor('pick1097113087'); id="pick1097113087"
style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
text-decoration: none;">   </a>
<input id="pick1097113087field" size="7"
type="hidden" title="color" name="stroke_1" value="<%=stroke1%>">
<script language="javascript">relateColor('pick1097113087', getObj('pick1097113087field').value);</script>
</td>
<td>Fill:
<a href="javascript:pickColor('pick1097113085'); id="pick1097113085"
style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
text-decoration: none;">   </a>
<input id="pick1097113085field" size="7"
type="hidden" title="color" name="fill_1" value="<%=fill1%>">
<script language="javascript">relateColor('pick1097113085', getObj('pick1097113085field').value);</script>
</td>
</tr>
     <tr >
<td >
</td>
</tr>
     <tr><td><input type="hidden" name="lc_5" value=CITY></td>
</table></div>
</form>
     <% // display identified feature attributes if present
if(CEA!=null && CEA.length>0)
out.print(" <TABLE border=\"1\">\n");
for(int i=0; i<CEA.length; i++)
if(i==0) out.print("<TR BGCOLOR=\"#FFFF00\">");
else out.print("<TR>\n");
String[] row = CEA[i];
for(int k=0; k<row.length; k++)
out.print("<TD>"+row[k]+"</TD>");
out.print("</TR>\n");
out.print("</TABLE>");
%>
</form>
<p>
<P>
<HR size="1">
<P>
</body>
</html>

Similar Messages

  • Using MapViewer in JSP - 2

    To Vijay,
    -- In 'Using MapViewer in JSP' thread have occured forum exception, so to answer your question I have opened this new thread.
    There is error in your code, where zoomIn function is called.
    Below, I post samlpe code with zoomIn function:
      String mvURL = "http://your-ip:your-port/mapviewer/omserver";
      String dataSrc = "DATA_SRC";
      String baseMap = "BASE_MAP";
      int MAP_WIDTH = 700;
      int MAP_HEIGHT = 500;
      MapViewer mv = (MapViewer) session.getAttribute("MapviewerHandle");
      if(mv == null) {
        mv = new MapViewer(mvURL);
        mv.setBackgroundColor(new java.awt.Color(255,255,255));
        mv.setDeviceSize(new java.awt.Dimension(MAP_WIDTH, MAP_HEIGHT));
        mv.setDataSourceName(dataSrc);
        mv.setAntiAliasing(true);
        mv.setImageFormat(MapViewer.FORMAT_PNG_URL);
        mv.addThemesFromBaseMap(baseMap);
        session.setAttribute("MapviewerHandle", mv);
      try {
        String action = request.getParameter("action");
        int x = Integer.parseInt(request.getParameter("x"));
        int y = Integer.parseInt(request.getParameter("y"));
        int x1 = Integer.parseInt(request.getParameter("x1"));
        int y1 = Integer.parseInt(request.getParameter("y1"));
        if(action != null && action.equals("boxzoom")) {
          mv.zoomIn(x, y, x1, y1);
      } catch (Exception e) {
        System.err.println(e.getMessage());
      mv.run();Regards,
    Andrejus

    To Vijay,
    -- In 'Using MapViewer in JSP' thread have occured forum exception, so to answer your question I have opened this new thread.
    There is error in your code, where zoomIn function is called.
    Below, I post samlpe code with zoomIn function:
      String mvURL = "http://your-ip:your-port/mapviewer/omserver";
      String dataSrc = "DATA_SRC";
      String baseMap = "BASE_MAP";
      int MAP_WIDTH = 700;
      int MAP_HEIGHT = 500;
      MapViewer mv = (MapViewer) session.getAttribute("MapviewerHandle");
      if(mv == null) {
        mv = new MapViewer(mvURL);
        mv.setBackgroundColor(new java.awt.Color(255,255,255));
        mv.setDeviceSize(new java.awt.Dimension(MAP_WIDTH, MAP_HEIGHT));
        mv.setDataSourceName(dataSrc);
        mv.setAntiAliasing(true);
        mv.setImageFormat(MapViewer.FORMAT_PNG_URL);
        mv.addThemesFromBaseMap(baseMap);
        session.setAttribute("MapviewerHandle", mv);
      try {
        String action = request.getParameter("action");
        int x = Integer.parseInt(request.getParameter("x"));
        int y = Integer.parseInt(request.getParameter("y"));
        int x1 = Integer.parseInt(request.getParameter("x1"));
        int y1 = Integer.parseInt(request.getParameter("y1"));
        if(action != null && action.equals("boxzoom")) {
          mv.zoomIn(x, y, x1, y1);
      } catch (Exception e) {
        System.err.println(e.getMessage());
      mv.run();Regards,
    Andrejus

  • Using MapViewer from PL/SQL vs Java

    Hi group!
    The MapViewer User's Guide has this to say about using MapViewer from PL/SQL:
    "The usage model for the SDO_MVCLIENT package is almost identical to that of
    MapViewer JavaBean-based API" etc etc .. "For usage and reference information about specific functions or procedures, see the description of the associated JavaBean-Based API. methods and interfaces in Chapter 4"
    If I don't misunderstand the basic concept, in a Java Web App (using the MapViewer Bean) you create a MapViewer object for each HTTP-user-session, like so:
    MapViewer mv = new MapViewer("http://my_corp.com:8888/mapviewer/omserver");
    ... which you would then store in the user's session object, so that the MapViewer Bean conveniently holds the map's state on the user's behalf.
    To do the equivalent in PL/SQL, the User's Guide suggests:
    "connect scott/tiger
    call sdo_mvclient.createmapviewerclient(
    'http://www.mycorp.com:8888/mapviewer/omserver') ;
    The preceding example creates, in the current session, a unique MapViewer client
    handle to the MapViewer service URL"
    Does "current session" refer to the HTTP-user-session? While I've used PL/SQL before, I've not used the PL/SQL Web Toolkit. Is the session handling implicit here (and invisible?) or should the sdo_mvclient be subsequently stored in the PL/SQL equivalent of a (J2EE) HttpSession object?
    YT

    Part of the answer will depend on how you plan to deploy the application. If you have a few, local clients you could go with the traditional client/server model. If you have a lot of clients and/or they are spread out over a relatively large area (like a campus setting), a web front-end will save you a lot of hassels down the road when it comes time to upgrade.
    Regardless of the the front end, I can tell you that I have been greatly impressed with the throughput you can get by moving most of the code to PL/SQL packages. A few years ago we reworked a VB/Oracle app by moving a lot of the code out of VB and into packages, leaving the client to essentially call procedures and format the output. We had more than a 3x performance increase on the same hardware and our network utilization decreased noticably.
    I am now in the process of replacing the client code with Java servlets/JSP, primarily because of the maintenance hassles I mentioned earlier. There are some limitations with an HTML page but most of these have been cosmetic so far.
    We are still relying heavily on PL/SQL packages. The servlet code basically gets a request, calls a package to get the data, then hands the results to a JSP page. The JSP then formats the output and sends it to the client. We are little more than halfway through the re-write, but it appears performance will increase again. Not as noticably as before, but I will take what I can get. As you have seen, once something is rolled out it always ends up getting used more than you anticipated. Better to over-engineer now than have to patch it once it is live.
    HTH

  • WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER

    Dear Sir,
    please any one can answer me as soon as possible its very urgent
    WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER
    I     As oracle mapviewer Chapter 8 (Oracle Maps) says generating our own Web based mapping application we are trying to generate our own maps for our own data contains in our layers like example boundary lines and roads and etc. and we are following complete example as described in Oracle Mapviewer Document Chapter 8.
    Before this step we tried with demo data downloaded from OTN mvdemo. And we downloaded latest demo today itself from the OTN and imported into our database schema called mvdemo. And we copied all three jar files mvclient and mvconnection and mvpalette into our jdeveloper .
    II.     We created a jsp to execute the following code from oracle mapviewer chapter 8 documents
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/customizable" prefix="cust"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jwcache.tld"
    prefix="jwcache"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
    prefix="fileaccess"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jesitaglib.tld"
    prefix="JESI"%>
    <f:view>
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html" charset=UTF-8>
    <TITLE>A sample Oracle Maps Application</TITLE>
    <script language="Javascript" src="jslib/loadscript.js"></script>
    <script language=javascript>
    var themebasedfoi=null
    function on_load_mapview()
    var baseURL = " http://localhost:8888/mapviewer/omserver";
    // Create an MVMapView instance to display the map
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    // Add a base map layer as background
    mapview.addBaseMapLayer(new MVBaseMap("mvdemo.demo_map"));
    // Add a theme-based FOI layer to display customers on the map
    themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
    themebasedfoi.setBringToTopOnMouseOver(true);
    mapview.addThemeBasedFOI(themebasedfoi);
    // Set the initial map center and zoom level
    mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));
    mapview.setZoomLevel(4);
    // Add a navigation panel on the right side of the map
    mapview.addNavigationPanel('east');
    // Add a scale bar
    mapview.addScaleBar();
    // Display the map.
    mapview.display();
    function setLayerVisible(checkBox){
    // Show the theme-based FOI layer if the check box is checked and
    // hide the theme-based FOI layer otherwise.
    if(checkBox.checked)
    themebasedfoi.setVisible(true) ;
    else
    themebasedfoi.setVisible(false);
    </script>
    </head>
    <body onload= javascript:on_load_mapview() >
    <h2> A sample Oracle Maps Application</h2>
    <INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
    <div id="map" style="width: 600px; height: 500px"></div>
    </body>
    </html>
    </f:view>
    <!--
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>mapPage</title>
    </head>
    <body><h:form binding="#{backing_mapPage.form1}" id="form1"></h:form></body>
    </html>
    -->
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_mapPage--%>
    III.     When we run this jsp it’s giving us following Two errors
    1     Error:     ‘MVMapView’ is undefined
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    2     Error:     ‘themebasedfoi’ is null or not an object
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    Please let us know what could be problem as soon as possible. Very urgent
    Please let us know where we can find Mapviewer AJAX API’s for Jdeveloper Extention
    Thanks
    Kabeer

    I currently use parameters, and they are passed from the form to the report. Report is then generated based on a function returning ‘strongly typed’ cursor. The ‘strongly typed’ cursor in my case returns a record consisting of an orderly collection of fields.
    This collection of fields is returned by another function that relies on the IF … THEN logic.
    However, the number of IF ... THEN statements is quite large (currently 64 covering all possible combinations of 6 parameters available in the form).
    I would like to avoid the large number of IF … THEN statements, and hope that there is a way of passing a string to a query, where the Dynamic SQL would in Select close and Where close reflect parameters passed by the form.
    In addition to this I would like to avoid creating and populating a table or a view dedicated to the report, because this may lead to a conflict in case of multiple users concurrently generating reports with different choice of parameters.
    Edited by: user6883574 on May 28, 2009 9:16 PM

  • How to use MapViewer API?

    Hi,
    I have a problem that is acturally regarded to java programming. I want to use MapViewer JavaBean-Based API. I did the preparing work described in Mapviewer doc §4.2.
    I saved the demo jsp page "mapclient.jsp" in my own application folder (under oc4j\j2ee\home\default-web-app). The other jsp pages written by myself can be displayed. But this mapclient.jsp can not be retrieved. "HTTP 500 internal server error The page cannot be displayed." It seems that I don't have J2EE container that contains the MapViewer service.
    I also changed the codes of mapclient.jsp. I use
    import oracle.spatial.mapclient.MapViewer;
    MapViewer mv = new MapViewer("http://localhost ...");
    It does not work, either. "The page cannot be displayed."
    I don't know how to invoke the MapViewer service. I use oc4j standalone. I don't know how to get the error message, either.
    I hope somebody can give me some suggestions. Thanks in advance.

    Hi,
    about the addDataSource using the Java API, for now you have to disable the security
    in order to add the data source using the MapViewer client API.
    You can do that editing the MapViewer config file:
    <mv_security enforce_sec_role="false" />
    Assuming that you have added your data source, and you have rendered some map,
    you can get the attribute information using the "identify" methods of the
    MapViewer client API.
    1) To identify one individual geometry:
    String [][] result = mapviewer.identify(dataSource,table_name,columns,
    geometry_column,srid, x, y);
    where: "columns" contains the table attribute names that
    you want to retrieve
         x,y represents the device coordinate.
    2) To identify geometries inside a rectangle:
    String [][]result = mapviewer.identify(dataSource,table_name,columns,
    geometry_column,srid, xlowleft,ylowleft,
    xupright,yupright,false);
    where the rectangle coordinates are defined by xlowleft,ylowleft,
    xuprigth, and yuprigth values in device unit.
    3) The resulted String array contains on the first row the attribute
    names, and on the remaining rows the attribute values for each geometry.
    int nlin = result.length; // return the number of lines
    int col = result[0].length; // number of columns
    To get the attribute names:
    // attribute names
    Object []tableattrs = new Object[ncol];
    for(int j=0;j<ncol;j++)
    tableattrs[j] = result[0][j];
    To get the attribute values:
    Object [][]tablevalues = new Object[nlin-1][];
    for(int lin=1;lin<nlin;lin++)
    tablevalues[lin-1] = new Object[ncol];
    for(int col=0;col<ncol;col++)
    tablevalues[lin-1][col] = result[lin][col];
    Regards.

  • Using MapViewer to view a georaster: blue display

    Hi,
    I uploaded a tiff file into a georaster table. I followed all the steps to georeference the raster, generate the spatial extent, create the pyramids, etc.
    Then I executed the steps to make my raster ready for viewing:
    - Insert a row into the USER_SDO_GEOM_METADATA
    - Create a spatial index on the spatial extent of the GeoRaster table
    Once I use 'MapViewer' all I see is a blue screen. I'm using the 'georaster.jsp' that come up with 'MapViewer' installation to view my raster. Any ideas of what could be wrong ?
    Any help is appreciated
    Jeff

    Joao,
    The log file under "c:\mypath\MapViewer\mvqs10_1_2_0_2\oc4j\j2ee\home\applications\mapviewer\web\WEB-INF\log\mapviewer.log' is indedd empty.
    1)
    To georeference the tiff, I used a .tfw file, set the SRID and generate the spatial extent:
    DECLARE
    geo SDO_GEORASTER;
    BEGIN
    SELECT GEORASTER INTO geo FROM Raster1 WHERE ID=1 FOR UPDATE;
    SDO_GEOR.IMPORTFROM(geo,'blocksize=(512,512)','TIFF','file','/export/home/oracle/large.TIFF',
    'WORLDFILE','file','/export/home/oracle/large.tfw');
    UPDATE Raster1 SET GEORASTER = geo WHERE ID=1;
    COMMIT;
    END;
    DECLARE
    geo sdo_georaster;
    BEGIN
    SELECT georaster INTO geo FROM Raster1 WHERE id=1 FOR UPDATE;
    sdo_geor.setModelSRID(geo, 32611);
    UPDATE Raster1 SET georaster = geo WHERE id=1;
    END;
    UPDATE Raster1 c
    SET c.georaster.spatialExtent = sdo_geor.generateSpatialExtent(georaster)
    WHERE c.id = 1;
    COMMIT;
    2) Here is the result of the metadata query:
    GEORASTER.METADATA
    <georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
    <objectInfo>
    <rasterType>20001</rasterType>
    <isBlank>false</isBlank>
    <defaultRed>1</defaultRed>
    <defaultGreen>1</defaultGreen>
    <defaultBlue>1</defaultBlue>
    </objectInfo>
    <rasterInfo>
    <cellRepresentation>UNDEFINED</cellRepresentation>
    <cellDepth>8BIT_U</cellDepth>
    <totalDimensions>2</totalDimensions>
    <dimensionSize type="ROW">
    <size>14241</size>
    </dimensionSize>
    <dimensionSize type="COLUMN">
    <size>16201</size>
    </dimensionSize>
    <ULTCoordinate>
    <row>0</row>
    <column>0</column>
    </ULTCoordinate>
    <blocking>
    <type>REGULAR</type>
    <totalRowBlocks>28</totalRowBlocks>
    <totalColumnBlocks>32</totalColumnBlocks>
    <rowBlockSize>512</rowBlockSize>
    <columnBlockSize>512</columnBlockSize>
    </blocking>
    <interleaving>BIP</interleaving>
    <pyramid>
    <type>DECREASE</type>
    <resampling>NN</resampling>
    <maxLevel>5</maxLevel>
    </pyramid>
    <compression>
    <type>NONE</type>
    </compression>
    </rasterInfo>
    <spatialReferenceInfo>
    <isReferenced>true</isReferenced>
    <isRectified>true</isRectified>
    <SRID>32611</SRID>
    <spatialResolution dimensionType="X">
    <resolution>15.0</resolution>
    </spatialResolution>
    <spatialResolution dimensionType="Y">
    <resolution>15.0</resolution>
    </spatialResolution>
    <modelCoordinateLocation>CENTER</modelCoordinateLocation>
    <modelType>FunctionalFitting</modelType>
    <polynomialModel rowOff="0.0" columnOff="0.0" xOff="0.0" yOff="0.0" zOff="0.
    0" rowScale="1.0" columnScale="1.0" xScale="1.0" yScale="1.0" zScale="1.0">
    <pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>251920.0 0.0 -0.06666666666666667</polynomialCoe
    fficients>
    </pPolynomial>
    <qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1.0</polynomialCoefficients>
    </qPolynomial>
    <rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>-34120.0 0.06666666666666667 0.0</polynomialCoef
    ficients>
    </rPolynomial>
    <sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1.0</polynomialCoefficients>
    </sPolynomial>
    </polynomialModel>
    </spatialReferenceInfo>
    <layerInfo>
    <layerDimension>BAND</layerDimension>
    </layerInfo>
    </georasterMetadata>

  • Associating two events with submit button using  javascript in jsp

    Hi
    How can i Associate two events with submit button using javascript in jsp. Firstly it should insert the data to database and secondly it should close the same pop-up window

    Have something like :
    <input type="submit" name="submitbtn" value="Click me" onClick="function1(); function2(); " />
    You just call both functions sequentially, it's that simple. Although using javascript to work with a database, that seems a bit tricky.

  • Error while using Beans in JSP

    I am using netbeans to develop the applications and am using tomcat version (jakarta-tomcat-4.1.18).
    When I execute the following program i get the below mentioned error::
    StringBean.java
    package test;
    import java.beans.*;
    public class StringBean {
    private String message = "No message SPECIFIED";
    public String getMessage() {
    return message;
    public void setMessage(String message) {
    this.message = message;
    StringBean.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Using JavaBeans with JSP </TITLE>
    <LINK REL=STYLESHEET HREF="JSP-Styles.css" TYPE="text/css" >
    </HEAD>
    <body
    <jsp:useBean id = "SB" class = "test.StringBean" />
    initial value is : <jsp:getProperty name = "SB" property= "message"/>
    <jsp:setProperty name= "SB" property = "message" value= "this the message after the change"/>
    final value is :<jsp:getProperty name = "SB" property= "message"/>
    </body>
    </HTML>
    javax.servlet.ServletException: test/StringBean
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    Root Cause
    java.lang.NoClassDefFoundError: test/StringBean
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
         at java.lang.Class.getConstructor0(Class.java:1762)
         at java.lang.Class.newInstance0(Class.java:276)
         at java.lang.Class.newInstance(Class.java:259)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
         at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

    Ok The class isn't found, so your classpath settings of netbeans (if you are using the run function in netbeans) isn't set.
    and if you aren't using netbeans to run it, then the class isn't in the webapp/WEB-INF/classes
    good luck

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use EJB in JSP...urgent!!!

    hello,
    i am novice programmer in EJB.
    i am using weblogic 6.1 ...
    my problem is how to use EJB in jsp page.
    my code is as follow..but its not displaying any result.
    <%@ page import="javax.naming.InitialContext,
    javax.naming.Context,
    java.util.Properties,
    firstEJB.First,
    firstEJB.FirstHome"%>
    <%
         long t1 = System.currentTimeMillis();
         System.out.println(t1);
         Properties props = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
         props.put(Context.PROVIDER_URL, "localhost:7001");
         Context ctx = new InitialContext(props);
         FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
         First bean = home.create();
         String time = bean.getTime();
         bean.remove();
         ctx.close();
         long t2 = System.currentTimeMillis();
    %>
    <html>
         <head>
              <style>p { font-family:Verdana;font-size:12px; }</style>
         </head>
         <body>
              <p>Message received from bean = "<%= time %>".<br>Time taken :
              <%= (t2 - t1) %> ms.</p>
         </body>
    </html>
    please tell me the solution.

    Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
    FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class);

  • When to use servlets and jsp in an application like  shoping cart?

    Hi All
    I m going to design and implement a web application using servelts and jsp. I am still at its requirements analyze stage.
    The application is almost likely a shopping cart. So if any of you have the deep knowledge about this domain with servlets and jsp please help me for a good design. What I realy need to know is that
    1. what are the core requirements for a shoping cart ?
    2. use cases ?
    3. best way to follow mvc with servlets and jsp for it?
    you can answer to this at the abstract level. no need to go in detail.
    if you have any documents like design and use cases mail me to [email protected]
    your cooperation is highly appreciated in this regards.

    Look into this kid
    http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Session-Tracking.htm

  • Using mapviewer with database installation only (moved to db- spatial) ?

    question moved to db->spatial
    using mapviewer with database installation only ?

    You should be able to deploy MapViewer in this OC4J. Take a look on chapter 1 of the MapViewer User's Guide for information about deploying MapViewer in an Oracle application server.
    Joao

  • Using Mapviewer with MrSID format images

    Hello,
    I'm using Mapviewer, it only supports JPEG and GIF formats so If you want to use other formats, you have to create your own Custom Image Render. I have tried to do this with ECW format (there is an example in Mapviewer Documentation) because we have some images in this format, but we work with images in MrSID Format, Has anybody done a Custom Image Render for this format?, and for ECW Format?
    Thank you very much
    Carlos.

    Chris, File>Page Setup gives me the choice to select small icons for portrait or landscape or reverse landscape. The problem is that I select them, then Save (Command S), I get a landscape view in the print dialog that has the image as the same size and shape as the portrait version. It has large white bars of paper on each side of the image.
    The only way I've been able to get this to print out properly is by opening it into Keynote instead of Preview.

  • Using mapviewer with database installation only ?

    using mapviewer with database installation only ?
    i have installed oracle database 11g on windows
    the enterprise manager already relies on the ocj4 ('http://orcl:1158/em')
    if i open 'http://orcl:1158' i get the start page for the appllication server - by clicking on 'manage applications' i come to the enterprise manager start page (i thinked, i can uplaod some ear application file, sinve oc4j is present for the em)
    its possible to install the mapviewer.ear with this database installation only (since the oc4j is present for the em) - or i have to install the oc4j too?
    thx

    You should be able to deploy MapViewer in this OC4J. Take a look on chapter 1 of the MapViewer User's Guide for information about deploying MapViewer in an Oracle application server.
    Joao

  • How to create an InputSelect using ADF and JSP

    I looking for some docs/instructions on creating "an InputSelect using ADF with JSP".
    Thanks,
    BG...

    Ok here are the Steps
    1) Open the JSP editor for the page in Question.
    2) In the Data Control palette select the item that you want to become the poplist and change the "Drop As" poplist to "Single Select List"
    3) Drag the field into the page. You'll get an empty poplist which implements the <html:select> and <html:optionsCollection> tags.
    4) With the JSP editor still open click on the "UI Model" sub-tab in the Structure pane
    5) Select the field you've just dragged in - then right click to get the context menu and choose "edit"
    6) Change the List Binding Mode poplist to "LOV Mode"
    You're then taken into a couple of screens where you can select the Source VO for the poplist, and the destination dataset, along with the thing you want for the Label and the Value.

Maybe you are looking for