org.apache.jasper.JasperException: Cannot find bean under name org.apache.struts.taglib.html.BEAN

Hi,
Iam using struts tags in  innerhtml to generate some dynamic content, when i post the request, iam getting an exception like :

org.apache.jasper.JasperException: Cannot find bean under name org.apache.struts.taglib.html.BEAN

iam submitting my code for your referal.

============================================================================

inner1 = '<table width="100%" border="1" cellpadding="0" cellspacing="0">';

 inner2 = '<tr><td></td><td bgcolor="#F8F8EF" height="22" width="116" valign="top"><span class="bodybold">&nbsp;Location " + displayNum + " </span></td>';

 inner3 = '<td bgcolor="#F8F8EF" class="body" align="left" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">';

 inner4 = '<tr valign="top"><td class="body" width="55">Country</td><td class="body" width="150">';

 inner5 = '<html:select tabindex="3" property="country" >';

 inner6 = '<html:option value=" ">select</html:option><html:option value="India">India</html:option><html:option value="United States">United States</html:option></html:select>';

 inner7 = '</td><td width=55>&nbsp;</td><td>&nbsp;</td></tr>';

 inner8 = '<tr valign="top"><td>Address 1</td>';

 inner9 = '<td><html:text property="address1" size="24" /></td>';

 inner10 = '<td>Address 2</td><td><html:text property="+address2+" size="24" /></td></tr>';

 inner11 = '<tr valign="top"><td class="body">State</td>';

 inner12 = '<td class="body"><html:select tabindex="3" property="state" ><html:option value=" ">select</html:option></html:select></td>';

 inner13 = '<td class="body">City</td><td class="body"><html:select tabindex="3" property="city" ><html:option value=" ">select</html:option></html:select></td></tr>';

 inner14 = '<tr valign="top"><td class="body">Zip Code</td><td class="body"><html:text property="zipcode" size="12" /></td><td class="body">&nbsp;</td><td class="body" />&nbsp; </td></tr>';

 inner15 = '<tr valign="top"><td class="body">Phone No.</td><td class="body">';

 inner16 = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink"><tr> ';

 inner17 = '<td valign="top"><html:select property="phone"  size="3" ></html:select></td>';

 inner18 = '</tr><tr><td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td></tr>';

 inner19 = '</table></td><td class="body">EPABX</td><td class="body"><html:select property="epabx"  size="4" ></html:select></td></tr>';

 inner20 = '<tr valign="top"><td class="body">Extension</td><td class="body"> ';

 inner21 = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink"><tr><td valign="top"><html:select property="extension"  size="3" >';

 inner22 = '</html:select></td></tr><tr><td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td></tr></table>';

 inner23 = '</td><td class="body">&nbsp;</td><td class="body">&nbsp; </td></tr>';

 inner24 = '</table></td><td></td></tr></table>';

 newdiv.innerHTML = inner1 + inner2 + inner3 + inner4 + inner5 + inner6 + inner7 + inner8 + inner9 + inner10 + inner11 + inner12 + inner13 + inner14 + inner15 + inner16 + inner17 + inner18 + inner19 + inner20 + inner21 + inner22 + inner23 + inner24;
            
  ni.appendChild(newdiv);
==============================================================================
Hope to get an early reply
Thanks in advance
annapolistechAsked:
Who is Participating?
 
bloodredsunConnect With a Mentor Commented:
This is what would happen to a normal struts page with some javascript in it.

JSP--> converted to servlet code --> java code (inc. struts tag) executed on server --> html generated and sent to the browser --> javascript executed on the browser

Can you see why your code will never work?! You are trying to use javascript to control something that has already happened. Even if you are trying to generate the javascript from the struts, the struts code will not work properly as it is badly formed.

Just try to get the struts section working first without worrying about the javascript section. If you separate the two, you will have a better chance of getting it to work.

0
 
bloodredsunCommented:
As you are using the innerHTML function, I would guess that you are using Javascript in the above snippet.

This means that you are using a client side script to invoke a server side technology!

What exactly are you trying to do here?

All I can see you are doing is trying to create some badly formed strus tags and html (there is no <html:form> element around the <html:select>  and other struts html tags) via javascript. As struts is executed on the server way before the javascript is executed, I can see what you are trying to achieve.
0
 
rama_krishna580Commented:
Hi,

It can't find this bean in scope so either
- you are using the wrong name
- you haven't set that bean in scope
- you need to put this inside your html:form tags

Check your form bean and make sure it has getters/setters for each element in the <html:form></html:form> tag. If it is getting thrown during validation this may be what is causing your problem.

look at here; it might help you..
http://forum.java.sun.com/thread.jspa?threadID=726100&messageID=4185218
http://www.jguru.com/faq/view.jsp?EID=925277

R.K
0
 
annapolistechAuthor Commented:
Hi,
       Iam using struts tags in  innerhtml to generate some dynamic content, when i post the request, iam getting an exception like : "org.apache.jasper.JasperException: Cannot find bean under name org.apache.struts.taglib.html.BEAN"
        i am using DynaActionForm (formbean) and i have configured this in struts-config.xml. I m ading my complete struts page(basicForm.jsp) for ur referral

Thanks in advance

====struts-config.xml======
<form-bean name = "basicForm" type = "org.apache.struts.action.DynaActionForm">
             <form-property name = "searchBox" type = "java.lang.String"/>
               <form-property name = "locationList" type = "java.lang.Integer"/>
               <form-property name = "country" type = "java.lang.String"/>
               <form-property name = "address1" type = "java.lang.String"/>
               <form-property name = "address2" type = "java.lang.String"/>
               <form-property name = "state" type = "java.lang.String"/>
               <form-property name = "city" type = "java.lang.String"/>
               <form-property name = "zipcode" type = "java.lang.Integer"/>
               <form-property name = "phone" type = "java.lang.Integer"/>
               <form-property name = "epabx" type = "java.lang.Integer"/>
               <form-property name = "extension" type = "java.lang.Integer"/>
               <form-property name = "department" type = "java.lang.String"/>
               <form-property name = "team" type = "java.lang.String"/>
               <form-property name = "designation" type = "java.lang.String"/>
               <form-property name = "bankName" type = "java.lang.String"/>
               <form-property name = "accountType" type = "java.lang.String"/>jsp
               <form-property name = "accountNumber" type = "java.lang.Integer"/>
               <form-property name = "branch" type = "java.lang.String"/>
      </form-bean>
 </form-beans>
<action-mappings>
<action path="/basic" type="dhs.action.BasicAction" name="basicForm"
          input="/Admin/Rules/basicForm.jsp" scope="request" validate="true">
          <forward name="Success" path="/Success.jsp"/>
          <forward name="Failure" path="/Failure.jsp"/>
  </action></action-mappings>

======basicForm.jsp=====

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested"%>

<html:html>
<head>
<title>Annapolis - Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../../script/style.css" type="text/css">
<script language = "javascript">
function addSpecificTable(){
  var getLoc = document.forms[0].locationList.value;
  var num = (document.getElementById("theValue").value -1)+ 1;
  var enterNum =  10 - parseInt(num);
  var setNumber = 10 - (parseInt(getLoc)+parseInt(num));

  if(setNumber<0)
  {
    alert("You have already " + (num) + "  Events. The maximum events you can enter is 10. Please enter a value lesser than " + enterNum );
  }
   else
  {
            for(var i=0;i<getLoc;i++)
              {
              addLocation();
             }
  }
 
}
function addLocation()
{
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById("theValue").value -1)+ 2;
  numi.value = num;
  var divIdName = "my"+num+"Div";
  var location = num + "i";
  var country = "country" + num;
  var address1 =  "address1" + num;
  var address2 = "address2" + num;
  var state = "state" + num;
  var city = "city" + num;
  var zipcode = "zipcode" + num;
  var phone = "phone" + num;
  var epabx = "epabx" + num;
  var extension = "extension" + num;
  var displayNum = 0;
   
    if(num<1)
      {
        displayNum = "0" + num;
      }
      else
      {
        displayNum = num + 1  ;
    }
       var newdiv = document.createElement('div');
       newdiv.setAttribute("id",divIdName);
             
var inner1 = "";
var inner2 = "";
var inner3 = "";
var inner4 = "";
var inner5 = "";
var inner6 = "";
var inner7 = "";
var inner8 = "";
var inner9 = "";
var inner10 = "";
var inner11 = "";
var inner12 = "";
var inner13 = "";
var inner14 = "";
var inner15 = "";
var inner16 = "";
var inner17 = "";
var inner18 = "";
var inner19 = "";
var inner20 = "";
var inner21 = "";
var inner22 = "";
var inner23 = "";
var inner24 = "";

 inner1 = "<table width=\"100%\" border=\"3\" cellpadding=\"0\" cellspacing=\"0\">";
 inner2 = "<tr><td></td><td bgcolor=\"#F8F8EF\" height=\"22\" width=\"116\" valign=\"top\"><span class=\"bodybold\">&nbsp;Location " + displayNum + " </span></td>";
 inner3 = "<td bgcolor=\"#F8F8EF\" class=\"body\" align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\">";
 inner4 = "<tr valign=\"top\"><td class=\"body\" width=\"55\">Country</td><td class=\"body\" width=\"150\">";
 inner5 = "<html:select tabindex=\"3\" property=\'"+country+"' \ style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px\" >";
 inner6 = "<html:option value=\"\">Select</html:option><html:option value=\"India\">India</html:option><html:option value=\"United States\">United States</html:option>";
 inner7 = "</html:select></td><td class=\"body\" width=\"55\">&nbsp;</td><td class=\"body\">&nbsp;</td></tr>";
 inner8 = "<tr valign=\"top\"><td class=\"body\">Address 1</td>";
 inner9 = "<td class=\"body\"><html:text property=\'"+address1+"'\ size=\"24\" style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana\"/></td>";
 inner10 = "<td class=\"body\">Address 2</td><td class=\"body\"><html:text property=\'"+address2+"'\ size=\"24\" style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana\"/></td></tr>";
 inner11 = "<tr valign=\"top\"><td class=\"body\">State</td>";
 inner12 = "<td class=\"body\"><html:select tabindex=\"3\" property=\'"+state+"'\ style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px\"><html:option value=\"\">Select</html:option></html:select></td>";
 inner13 = "<td class=\"body\">City</td><td class=\"body\"><html:select tabindex=\"3\" property=\'"+city+"'\ style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px\" ><html:option value=\"\">Select</html:option></html:select></td></tr>";
 inner14 = "<tr valign=\"top\"><td class=\"body\">Zip Code</td><td class=\"body\"><html:text property=\'"+zipcode+"'\ size=\"12\" style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana\"/></td><td class=\"body\">&nbsp;</td><td class=\"body\">&nbsp; </td></tr>";
 inner15 = "<tr valign=\"top\"><td class=\"body\">Phone No.</td><td class=\"body\"> ";
 inner16 = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"monalink\"><tr> ";
 inner17 = "<td valign=\"top\"><html:select property=\'"+phone+"'\ style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px\" size=\"3\" ></html:select></td>";
 inner18 = "</tr><tr><td valign=\"bottom\" class=\"body\" height=\"15\"><a href=\"#\">Add New</a> / <a href=\"#\">Modify</a></td></tr>";
 inner19 = "</table></td><td class=\"body\">EPABX</td><td class=\"body\"><html:select property=\'"+epabx+"'\ style=\"background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px\" size=\"4\" ></html:select></td></tr>";
 inner20 = "<tr valign=\"top\"><td class=\"body\">Extension</td><td class=\"body\"> ";
 inner21 = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"monalink\"><tr><td valign=\"top\"><html:select property=\'"+extension+"'\ style=\" background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px\" size=\"3\" >";
 inner22 = "</html:select></td></tr><tr><td valign=\"bottom\" class=\"body\" height=\"15\"><a href=\"#\">Add New</a> / <a href=\"#\">Modify</a></td></tr></table>";
 inner23 = "</td><td class=\"body\">&nbsp;</td><td class=\"body\">&nbsp; </td></tr>";
 inner24 = "</table></td><td></td></tr></table>";
  newdiv.innerHTML = inner1 + inner2 + inner3 + inner4 + inner5 + inner6 + inner7 + inner8 + inner9 + inner10 + inner11 + inner12 + inner13 + inner14 + inner15 + inner16 + inner17 + inner18 + inner19 + inner20 + inner21 + inner22 + inner23 + inner24;
  ni.appendChild(newdiv);
}

</script>
</head>
<body bgcolor="#345684" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<logic:messagesPresent>
   <bean:message key="basicForm.errors"/>
    <ul>
   <html:messages id="error">
      <li><bean:write name="error"/></li>
   </html:messages>
   </ul><hr>
</logic:messagesPresent>
<html:form action="/basic">
  <table width="780" border="0" cellspacing="0" cellpadding="0" align="center" height="100%">
    <tr>
      <td valign="top" bgcolor="#FFFFFF">
        
        <!-- #BeginLibraryItem "/Library/Admin_Navi_Top.lbi" --><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#DFEDFA" height="66" width="9">&nbsp;</td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="../landing.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','../../image/navigation/home_1.jpg',1)"><img name="home" border="0" src="../../image/navigation/home.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="../Profile/landing.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('profile','','../../image/navigation/profile_1.jpg',1)"><img name="profile" border="0" src="../../image/navigation/profile.jpg" width="50" height="55"></a></td>
           
    <td bgcolor="#DFEDFA" height="66" width="50"><a href="../Common/holiday.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('holiday','','../../image/navigation/holiday_1.jpg',1)"><img name="holiday" border="0" src="../../image/navigation/holiday.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('update','','../../image/navigation/update_1.jpg',1)"><img name="update" border="0" src="../../image/navigation/update.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="JavaScript:window.print();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('print','','../../image/navigation/print_1.jpg',1)"><img name="print" border="0" src="../../image/navigation/print.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('download','','../../image/navigation/download_1.jpg',1)"><img name="download" border="0" src="../../image/navigation/download.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66" width="50"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('photo','','../../image/navigation/photo_1.jpg',1)"><img name="photo" border="0" src="../../image/navigation/photo.jpg" width="50" height="55"></a></td>
           
    <td bgcolor="#DFEDFA" height="66" width="50"><a href="../../Login.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('signout','','../../image/navigation/signout_1.jpg',1)"><img name="signout" border="0" src="../../image/navigation/signout.jpg" width="50" height="55"></a></td>
            <td bgcolor="#DFEDFA" height="66">&nbsp;</td>
            <td bgcolor="#EDF5FC" height="66" align="right" width="255"><img src="../../image/common/logo.jpg" width="217" height="66"></td>
          </tr>
        </table><!-- #EndLibraryItem -->
            
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#595959"><img width="1" height="1"></td>
          </tr>
        </table>
        <span class="passivelink"> </span><span class="passivelink"> </span><!-- #BeginLibraryItem "/Library/Admin_Navi.lbi" --><span class="passivelink"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="23" width="6" bgcolor="#8BB8E3">&nbsp;</td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="90" class="globallink" align="center"><a href="#">Leave
              Details</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="103" class="globallink" align="center"><a href="#">News
              &amp; Updates</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="75" class="globallink" align="center"><a href="#">Suggestion</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="115" class="globallink" align="center"><a href="#">Evaluation
              Module</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="117" class="globallink" align="center"><a href="#">Employee
              Referral</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="80" class="globallink" align="center"><a href="#">Suggestions</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="63" class="globallink" align="center"><a href="#">Requests</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
           
    <td onMouseOver="bgColor='#BCD0F2'" onMouseOut="bgColor='#8BB8E3'" bgcolor="#8BB8E3" height="23" width="96" class="globallink" align="center"><a href="landing.htm">
      Company Rules</a></td>
            <td height="23" bgcolor="#595959" width="1"><img width="1" height="1"></td>
            <td height="23" bgcolor="#8BB8E3">&nbsp;</td>
          </tr>
        </table></span><!-- #EndLibraryItem --><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#595959"><img width="1" height="1"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top">
              <table width="780" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td bgcolor="#FAF7E4" height="36" align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td>&nbsp;</td>
                              <td align="right" width="40"><html:img page="/image/common/signature.jpg" width="29" height="30" hspace="5"></html:img></td>
                              <td class="signature" width="158" align="right">Company Rules </td>
                              <td width="15">&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td bgcolor="#828791" height="1"><img width="1" height="1"></td>
                      </tr>
                      <tr>
                        <td height="27"> <table width="100%" border="0" cellspacing="2" cellpadding="0">
                            <tr>
                              <td width="8">&nbsp;</td>
                              <td class="bodybrown" width="66" align="right">User Name:</td>
                              <td class="bodybrownbold" width="130">Kishor Kumar</td>
                              <td class="bodybrown" width="75" align="right">Department:</td>
                              <td class="bodybrownbold" width="90">Administration</td>
                              <td class="bodybrown" align="right">Search&nbsp;</td>
                              <td align="right" width="10"> <html:text property="searchBox" size="18" style="background-color:#F4F5F4; border: 1 solid; font-size: 10; color:#631E12; font-family: verdana"> </html:text>
                              </td>
                              <td valign="bottom" width="15" align="right"><html:link page="#"><html:img page="/image/common/go.gif" width="14" height="10" vspace="1" alt="Go" border="0"></html:img></html:link></td>
                              <td width="12">&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr>
                        <td bgcolor="#828791" height="1"><img width="1" height="1"></td>
                      </tr>
                      <tr>
                        <td height="4"><img width="1" height="1"></td>
                      </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="activelink">
                      <tr>
                        <td width="11" height="30">&nbsp;</td>
                        <td valign="top"><span class="bodybrownbold">You are here:</span>
                          <span class="body"><html:link page="../landing.jsp">Home</html:link>
                          &gt; <html:link page="landing.htm">Company Rules</html:link> &gt; Basic Details</span></td>
                        <td class="heading" valign="top" width="10">&nbsp;</td>
                      </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="13">&nbsp;</td>
                        <td width="756" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td bgcolor="#7F8792" width="1"><img width="1" height="1"></td>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                              <td width="1" bgcolor="#7F8792"><img width="1" height="1"></td>
                            </tr>
                            <tr>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                              <td bgcolor="#ABCCEB" height="23"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="passive1link">
                                  <tr valign="middle">
                                    <td bgcolor="#C9E0F5" class="bodybold" width="85" align="left">&nbsp;&nbsp;Basic
                                      Details</td>
                                    <td width="7"><img src="../../image/navigation/curve_1.gif" width="7" height="23"></td>
                                    <td class="bodybold" width="82" align="left">&nbsp;&nbsp;<html:link page="salary.jsp">Salary Rules</html:link></td>
                                    <td width="7"><img src="../../image/navigation/curve.gif" width="7" height="23"></td>
                                    <td align="left" width="110" class="bodybold">&nbsp;&nbsp;<html:link page="attendance.jsp">Attendance Rules</html:link></td>
                                    <td width="7"><img src="../../image/navigation/curve.gif" width="7" height="23"></td>
                                    <td>&nbsp;</td>
                                  </tr>
                                </table></td>
                              <td bgcolor="#7F8792" width="1"><img width="1" height="1"></td>
                            </tr>
                            <tr>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                            </tr>
                            <tr>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                              <td bgcolor="D2D2C3" height="22"><span class="bodybold">&nbsp;&nbsp;Basic Company Rules</span></td>
                              <td bgcolor="#7F8792"><img width="1" height="1"></td>
                            </tr>
                          </table>
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td bgcolor="#7F8792" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                                                   <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22">No of Location</td>
                                    <td class="body" bgcolor="#F8F8EF"> <html:select tabindex="3" property="locationList" onchange="addSpecificTable()" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 45px" >
                                        <html:option value="">Select</html:option>
                                                            <html:option value="01">01</html:option>
                                        <html:option value="02">02</html:option>
                                        <html:option value="03">03</html:option>
                                        <html:option value="04">04</html:option>
                                        <html:option value="05">05</html:option>
                                        <html:option value="06">06</html:option>
                                        <html:option value="07">07</html:option>
                                        <html:option value="08">08</html:option>
                                        <html:option value="09">09</html:option>
                                        <html:option value="10">10</html:option>
                                      </html:select> </td>
                                    <td class="bodybold">&nbsp;</td>
                                    <td class="body">&nbsp; </td>
                                  </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="1"><img width=1> </td>
                                    <td bgcolor="#F8F8EF" height="22" width="121" valign="top"><span class="bodybold">&nbsp;Location 1 </span></td>
                                    <td width="1" bgcolor="#7F8792" class="body" align="right"><img width=1></td>
                                    <td bgcolor="#F8F8EF" class="body" align="left" valign="top">
                                      <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                        <tr valign="top">
                                          <td class="body" width="55">Country</td>
                                          <td class="body" width="150"> <html:select tabindex="3" property="country" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px" >
                                              <html:option value="">Select</html:option>
                                              <html:option value="India">India</html:option>
                                              <html:option value="United States">United States</html:option>
                                            </html:select> </td>
                                          <td class="body" width="55">&nbsp;</td>
                                          <td class="body">&nbsp;</td>
                                        </tr>
                                        <tr valign="top">
                                          <td class="body">Address 1</td>
                                          <td class="body"> <html:text property="address1" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                          </td>
                                          <td class="body">Address 2</td>
                                          <td class="body"> <html:text property="address2" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                          </td>
                                        </tr>
                                        <tr valign="top">
                                          <td class="body">State</td>
                                          <td class="body"> <html:select tabindex="3" property="state" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px">
                                              <html:option value="">Select</html:option>
                                            </html:select> </td>
                                          <td class="body">City</td>
                                          <td class="body"> <html:select tabindex="3" property="city" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 100px" >
                                              <html:option value="">Select</html:option>
                                            </html:select> </td>
                                        </tr>
                                        <tr valign="top">
                                          <td class="body">Zip Code</td>
                                          <td class="body"> <html:text property="zipcode" size="12" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                          </td>
                                          <td class="body">&nbsp;</td>
                                          <td class="body">&nbsp; </td>
                                        </tr>
                                        <tr valign="top">
                                          <td class="body">Phone No.</td>
                                          <td class="body"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink">
                                              <tr>
                                                <td valign="top"> <html:select property="phone" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="3" multiple="true">
                                                  </html:select> </td>
                                              </tr>
                                              <tr>
                                                <td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td>
                                              </tr>
                                            </table></td>
                                          <td class="body">EPABX</td>
                                          <td class="body"> <html:select property="epabx" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="4" multiple="true">
                                            </html:select> </td>
                                        </tr>
                                        <tr valign="top">
                                          <td class="body">Extension</td>
                                          <td class="body"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink">
                                              <tr>
                                                <td valign="top"> <html:select property="extension" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="3" multiple="true">
                                                  </html:select> </td>
                                              </tr>
                                              <tr>
                                                <td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td>
                                              </tr>
                                            </table></td>
                                          <td class="body">&nbsp;</td>
                                          <td class="body">&nbsp; </td>
                                        </tr>
                                      </table></td>
                                    <td width="1"><img width="1"></td>
                                  </tr>
                                </table>

                                                <table width="100%" border="0" cellspacing="1" cellpadding="1" >
                                                 <tr bgcolor="#F8F8EF">
                                     <td valign="top" align="center">
                                                           <html:hidden value="0" styleId="theValue" property="NumberOfLocations"/>
                                                             <div id="myDiv">
                                                            </div>
                                                      </td>
                                </tr>
                                                </table>                                                
                                                
                                <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22" width="115">Department</td>
                                    <td class="body" width="155"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink">
                                        <tr>
                                          <td valign="top"> <html:select property="department" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="3" multiple="true">
                                            </html:select> </td>
                                        </tr>
                                        <tr>
                                          <td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td>
                                        </tr>
                                      </table></td>
                                    <td class="bodybold" width="110">Team</td>
                                    <td width="349" class="body"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink">
                                        <tr>
                                          <td valign="top"> <html:select property="team" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="3" multiple="true">
                                            </html:select> </td>
                                        </tr>
                                        <tr>
                                          <td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td>
                                        </tr>
                                      </table></td>
                                  </tr>
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22" bgcolor="#F8F8EF">Designation</td>
                                    <td class="body"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="monalink">
                                        <tr>
                                          <td valign="top"> <html:select property="designation" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#3E2303; font-family: verdana; WIDTH: 136px" size="3" >
                                            </html:select> </td>
                                        </tr>
                                        <tr>
                                          <td valign="bottom" class="body" height="15"><a href="#">Add New</a> / <a href="#">Modify</a></td>
                                        </tr>
                                      </table></td>
                                    <td class="bodybold">&nbsp;</td>
                                    <td class="body">&nbsp; </td>
                                  </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="1"><img width=1> </td>
                                    <td bgcolor="D2D2C3" height="22"><span class="bodybold">&nbsp;Bank Details </span></td>
                                    <td width="100" bgcolor="D2D2C3" class="body" align="right">
                                      <input type="button" id="button0" onClick="return redirectpage('profile.htm')" value="Add New" class="usermgr" name="Button2322">
                                      &nbsp; </td>
                                    <td width="1"><img width=1></td>
                                  </tr>
                                </table>
                                <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td width="150" class="bodybold" height="22" bgcolor="#F8F8EF">Bank Name </td>
                                    <td class="body" bgcolor="#F8F8EF"> <html:text property="bankName" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                    </td>
                                  </tr>
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22">Account Type</td>
                                    <td class="body"> <html:text property="accountType" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                    </td>
                                  </tr>
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22">Account Number</td>
                                    <td class="body"> <html:text property="accountNumber" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                    </td>
                                  </tr>
                                  <tr valign="top" align="left" bgcolor="#F8F8EF">
                                    <td class="bodybold" height="22">Branch</td>
                                    <td class="body"> <html:text property="branch" size="24" style="background-color:#ffffff; border: 1 solid; font-size: 10; color:#000000; font-family: verdana"> </html:text>
                                    </td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                          <table width="350" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td align="left"> <html:submit value="Submit" ></html:submit>
                                <html:reset value="Reset" ></html:reset>
                                <html:cancel value="Cancel"></html:cancel>
                              </td>
                            </tr>
                          </table></td>
                        <td class="body" width="11">&nbsp;</td>
                      </tr>
                      <tr>
                        <td><img width="1" height="1"></td>
                        <td class="body" height="8"><img width="1" height="1"></td>
                        <td><img width="1" height="1"></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
             
            </td>
          </tr>
        </table>
       
      </td>
    </tr>
    <tr>
      <td align="center" height="17" background="../../image/common/bg_bottom.gif">
        <!-- #BeginLibraryItem "/Library/Bottom Navigation.lbi" --><table width="70%" border="0" cellspacing="0" cellpadding="0" class="activelink">
          <tr>
           
    <td align="center"><span class="copyright"><a href="http://www.annapolistech.com" target="_blank">About
      Annapolis India</a> &nbsp;</span><span class="body">|</span><span class="copyright">
      &nbsp;<a href="../../Employee/common/sitemap.htm">Sitemap</a> &nbsp;</span><span class="body">|</span><span class="copyright">
      &nbsp;<a href="mailto:monangku@annapolistech.com?subject=Annapolis Intranet">Contact
      Webmaster</a></span></td>
          </tr>
        </table><!-- #EndLibraryItem --></td>
    </tr>
  </table>
</html:form>
</body>
</html:html>

0
 
annapolistechAuthor Commented:
hi
  the struts page works fine with out javascript and i am also able to generate only one location fields, but when i add the above javascript to generate dynamic locations based on the selection, it throws the same error. "org.apache.jasper.JasperException: Cannot find bean under name org.apache.struts.taglib.html.BEAN"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.