Migrated from struts 1.0 to struts 1.1

Hi

I have migrated my application from struts1.0 to struts 1.1

I have done the follwing steps for doing the migration

a) changed the <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

from struts-config_1_0.dtd to struts-config_1_1.dtd

b) replaced the struts.jar ,struts.tld file for struts 1.0 with struts 1.1

The issue which I am facing is that the application works absolutely fine for some forms but for some forms for a submit action I am getting

the following exception:

java.lang.IllegalArgumentException: No bean specified

at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java(Compiled Code))

at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934)

at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)

at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)

at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)

at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)

at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)

at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)

at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)

at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)

at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

Please help me in resolving the above issues

Thanks in advance

Siddhartha

[2989 byte] By [sidd_07a] at [2007-11-26 23:43:15]
# 1
struts 1.1 (or whateve) comes with a set of jar libraries that you should use.look at struts1.1/lib/ directory, you'll find there the compatible jars to have to use.for example jakarta-commons.jarhth
java_2006a at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 2
hi I have replcaed all the set of jar librairies that comes with struts1.1but still i am facing the same issue
sidd_07a at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 3
could you post an except of the jsp that wont work plz ?
java_2006a at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 4
are you, by any chance, embedding struts taglib form elements inside a regular html <form> tag?
georgemca at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 5

Hi

As required by you I am pasting my jsp page

*************************************************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@ taglib uri="/struts-html" prefix="html" %>

<%@ taglib uri="/struts-bean" prefix="bean" %>

<%@ taglib uri="/struts-logic" prefix="logic" %>

<%@ taglib uri="/actabpanel" prefix="ap" %>

<%@ taglib uri="/WEB-INF/datagrid.tld" prefix="grd" %>

<%@ include file="/authenticate.jsp" %>

<%

String load_first_time="no";

String url="";

String validated="no";

String display_datagrid="no";

String Load_first_time="yes";

String grid_type="";

String error_message="";

if(request.getAttribute("orderbyview") !=null){

grid_type=(String) request.getAttribute("orderbyview");

}

if (request.getAttribute("validated") != null){

validated = (String) request.getAttribute("validated");

}

if (request.getAttribute("loadFirsttime") != null){

Load_first_time = (String) request.getAttribute("loadFirsttime");

}

if (request.getAttribute("displaygrid") != null){

display_datagrid = (String) request.getAttribute("displaygrid");

}

if(request.getAttribute("ErrorMessage") !=null){

error_message=(String) request.getAttribute("ErrorMessage");

}

if (request.getAttribute("url") != null){

url = (String) request.getAttribute("url");

}

intintCurr= 1;

String strTmp= null;

String strSortCol = null;

String strSortOrd = "ASC";

boolean blnSortAsc = true;

int totRec=0;

java.util.List list=null;

strTmp = request.getParameter("txtCurr");

try

{

if (strTmp != null)

intCurr = Integer.parseInt(strTmp);

}

catch (NumberFormatException NFEx)

{

}

if (request.getAttribute("datagridpage") != null){

String strpage=(String)request.getAttribute("datagridpage");

intCurr = Integer.parseInt(strpage);

}

if (request.getAttribute("UserdetailsDg") != null){

list = (java.util.List) request.getAttribute("UserdetailsDg");

}

strSortCol = request.getParameter("txtSortCol");

strSortOrd = request.getParameter("txtSortOrd");

if (strSortCol == null) strSortCol = "GROUPCD";

if (strSortOrd == null) strSortOrd = "ASC";

blnSortAsc = (strSortOrd.equals("ASC"));

%>

<html:html>

<HEAD>

<TITLE> User Details </TITLE>

<%@ include file="../Menu/Menu.jsp" %>

<script type="text/javascript" src="../js/commonvalidation.js"></SCRIPT>

<SCRIPT language="javascript" src="../js/viewer.js"> </SCRIPT>

<LINK rel="stylesheet" href="../CSS/ecrmi.css" type="text/css">

<LINK rel="stylesheet" href="../CSS/GridStyle.css" type="text/css">

</HEAD>

<BODY onload="javascript:showReportPage('<%=url%>')">

<script LANGUAGE="javascript">

function doNavigate(pstrWhere, pintTot)

{

var strTmp;

var intPg;

strTmp = document.UserdetailsNew.txtCurr.value;

intPg = parseInt(strTmp);

if (isNaN(intPg)) intPg = 1;

if ((pstrWhere == 'F' || pstrWhere == 'P') && intPg == 1)

{

alert("You are already viewing first page!");

return;

}

else if ((pstrWhere == 'N' || pstrWhere == 'L') && intPg == pintTot)

{

alert("You are already viewing last page!");

return;

}

if (pstrWhere == 'F')

intPg = 1;

else if (pstrWhere == 'P')

intPg = intPg - 1;

else if (pstrWhere == 'N')

intPg = intPg + 1;

else if (pstrWhere == 'L')

intPg = pintTot;

if (intPg < 1)

intPg = 1;

if (intPg > pintTot)

intPg = pintTot;

document.UserdetailsNew.txtCurr.value = intPg;

navigate_datagrid();

document.UserdetailsNew.submit();

}

function doSort(pstrFld, pstrOrd)

{

document.UserdetailsNew.txtSortCol.value = pstrFld;

document.UserdetailsNew.txtSortAsc.value = pstrOrd;

//document.UserWorkdetails.submit();

}

</script>

<html:form action="/private/customize/User/UserDetails.do" method="post" name="UserdetailsNew" type="com.ssc.ecr.mi.User.formbeans.UserdetailsNew">

<table width="100%" border="0" height="52" cellpadding="0" cellspacing="0">

<tr>

<th scope="col" height="45"> </th>

</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<th scope="col"><img src="../images/UserDetails.jpg" width="209" height="29" align="left"></th>

</tr>

</table>

<table border="0">

<tr>

<td> </td>

<td>

<FIELDSET style="border: 1px ridge black; width: 45px" ><LEGEND><B></B></LEGEND>

<table border="0" width="680">

<TR>

<td height="171"></td>

<TD height="171" valign="top">

<TABLE border="0" width="20" height="171">

<TBODY>

<TR>

<TD valign="top" nowrap="nowrap" height="1"> <B>Groups</B>

</TD>

</TR>

<TR valign="top">

<TD align="left" height="170"><%if(Load_first_time.equalsIgnoreCase("yes")){%>

<ap:GroupTag control="combo" name="groups" onchange="javascript:populateuserid(this.value)">

</ap:GroupTag> <%}else{%>

<html:select property="groups"styleClass="combo2" onchange="javascript:populateuserid(this.value)">

<logic:present name="GroupList">

<html:options collection="GroupList" property="value" labelProperty="label" />

</logic:present>

</html:select> <%}%></TD>

</TR>

</TBODY>

</TABLE>

</TD>

<TD height="171">

<table border="0" width="100" height="171">

<tr>

<td nowrap="nowrap" valign="top" height="1" class="labels"> <b>Available

Users</b></td>

</tr>

<tr valign="top">

<td height="170"><%if(Load_first_time.equalsIgnoreCase("yes")){%>

<SELECT name="userId" multiple="multiple" size="6"

style="width: 100%">

</SELECT> <%}else{%> <html:select property="userId"

multiple="true" size="6" style="width: 100%">

<logic:present name="UserDetailsList">

<html:options collection="UserDetailsList" property="value"

labelProperty="label" />

</logic:present>

</html:select> <%}%></td>

</tr>

</table>

</TD>

<TD valign="top" height="171">

<table border="0" width="1" height="94">

<tr>

<td nowrap="nowrap" height="1"> </td>

</tr>

<tr valign="middle">

<td align="left" height="99">

<Ahref="javascript:transfer('UserdetailsNew','userId','selectedUsers','no')" target="_self"><IMG src="../images/singleforward.jpg" border="0"></A>

<Ahref="javascript:transfer('UserdetailsNew','userId','selectedUsers','yes')" target="_self"><IMG src="../images/multipleforward.jpg" border="0"></A>

<Ahref="javascript:transfer('UserdetailsNew','selectedUsers','userId','no')" target="_self"><IMG src="../images/singlebackward.jpg" border="0"></A>

<Ahref="javascript:transfer('UserdetailsNew','selectedUsers','userId','yes')" target="_self"><IMG src="../images/multiplebackwardward.jpg" border="0"></A></td>

</tr>

</table>

</TD>

<TD height="171">

<table border="0" width="100" height="171">

<tr>

<td nowrap="nowrap" height="1" valign="top" class="labels"> <b>Selected Users</b>

</td>

</tr>

<tr valign="top">

<td height="170">

<%if(Load_first_time.equalsIgnoreCase("yes")){%>

<SELECT name="selectedUsers" multiple="multiple" size="6"

style="width: 100%">

</SELECT>

<%}else{%>

<html:select property="selectedUsers" multiple="true" size="6" style="width: 100%">

<logic:present name="selectedusers">

<html:options collection="selectedusers" property="value" labelProperty="label"/>

</logic:present>

</html:select>

<%}%>

</td>

</tr>

</table>

</TD>

<TD height="171" valign="top">

<table border="0" width="150" height="171">

<tr>

<td nowrap="nowrap" align="center" valign="top" class="labels" height="19"> <b>Order By</b></td>

</tr>

<tr valign="top">

<td height="173">

<%if(Load_first_time.equalsIgnoreCase("yes")){%>

<SELECT name="udOrderBy" class="combo2" >

<option value=""></option>

<option value="Experience Level">Experience Level</option>

<option value="QueuePrivileges">Queue Privileges</option>

<option value="Work Type Privileges">Work Type Privileges</option>

</SELECT>

<%}else{%>

<html:select property="udOrderBy" styleClass="combo2">

<logic:present name="orderdatagrid">

<html:options collection="orderdatagrid" property="value" labelProperty="label"/>

</logic:present>

</html:select>

<%}%>

</td>

</tr>

</table>

</TD>

<TD height="171">

<TABLE border="0" width="150" height="155">

<TBODY>

<TR valign="top">

<TD height="155"><INPUT type="image" name="test"

src="../images/view.jpg" onclick="javascript:view()"> <INPUT

type="image" name="test" src="../images/Reset.jpg"

onclick="javascript:reset_form()"> <INPUT type="image"

name="test" src="../images/Report.jpg"

onclick="javascript:report()"> <INPUT type="image" name="test"

src="../images/Close.jpg" onclick="javascript:movetohomepage()">

</TD>

</TR>

</TBODY>

</TABLE>

</TD>

</TR>

</table>

</FIELDSET>

<P class="errormessg"><%=error_message%> </P>

sidd_07a at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 6
jesus! post something readable!
georgemca at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...
# 7
Hi guys thanks for the help i resolved the issueI was emmbeding an HTML: tag inside a struts tag lib
sidd_07a at 2007-7-11 15:13:04 > top of Java-index,Java Essentials,New To Java...