javax.servlet.jsp.JspException: Cannot find message resources under key org

Dears,

1st sorry for bad english,

my problem is that i want to display the data of bean class.

i have created an action assingonlinenode and created object of bean class, all values have been intialized manually, and this object is then converted to formObject throght transformer function, and this formObject is set to to request, but when i want to get display the forms values using bean:write tag on jsp page i get

javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE exception,

here is code of action class

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception

{

AssignOnlineNode node = new AssignOnlineNode(); // bean class

AssignOnlineNodeForm assignForm = (AssignOnlineNodeForm) form;

node.setNodeAssignId(100);

node.setNodeId(200);

node.setStatus(300);

node.setIpAddress("400");

node.setTimeStamp(new Date());

AssignOnlineNodeTransformer nodeTransformer = new AssignOnlineNodeTransformer();

try

{

AssignOnlineNodeForm onLineNodes = (AssignOnlineNodeForm) nodeTransformer.toFormBean(node, new AssignOnlineNodeForm());

request.setAttribute("onLineNodes", onLineNodes);

return mapping.findForward("success");

}

catch (Exception e)

{

e.printStackTrace();

}

return mapping.findForward("failure");

}

//////////

transfermor function

public Object toFormBean(Object object, BaseForm form) throws Exception

{

AssignOnlineNodeForm onlineNodeForm = (AssignOnlineNodeForm)form ;

AssignOnlineNode onlineNode =(AssignOnlineNode)object ;

if(onlineNode.getNodeAssignId() !=0 && !("".equals(onlineNode.getNodeAssignId())))

{

onlineNodeForm.setNodeAssignId(onlineNode.getNodeAssignId());

}

if(onlineNode.getNodeId() !=0 && !("".equals(onlineNode.getNodeId())))

{

onlineNodeForm.setNodeId(onlineNode.getNodeId());

}

if(onlineNode.getStatus() != 0 && !("".equals(onlineNode.getStatus())))

{

onlineNodeForm.setStatus(onlineNode.getStatus());

}

if(onlineNode.getIpAddress() !=null && !("".equals(onlineNode.getIpAddress())))

{

onlineNodeForm.setIpAddress(onlineNode.getIpAddress());

}

if(onlineNode.getTimeStamp() != null && !(onlineNode.getTimeStamp().equals("")))

{

onlineNodeForm.setTimeStamp(onlineNode.getTimeStamp());

}

return onlineNodeForm;

}

// struts-config.xml

<action path="/getAssignOnlineNode" name="assignOnlineNodeForm" type="com.otengo.web.action.ActionAssignOnlineNode" scope="request" validate="false">

<forward name="success" path="jsp/view-online-node.jsp"/>

<forward name="failure" path="jsp/online-nodes-error.jsp"/>

</action>

// jsp page is here

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

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

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

<table border="0" cellspacing="0" cellpadding="3">

<tr>

this is jsp

<html:form action="/getAssignOnlineNode">

<td nowrap="nowrap">Node ID</td>

<td nowrap="nowrap">Status</td>

<td nowrap="nowrap">IP Address</td>

<td nowrap="nowrap">Time Stamp</td>

</tr>

<tr>

<td><bean:write property="nodeAssignId" name="onLineNodes" /> </td>

<td><bean:write property="nodeId" name="onLineNodes" /> </td>

<td><bean:write property="status" name="onLineNodes" /> </td>

<td><bean:write property="ipAddress" name="onLineNodes" /> </td>

<td><bean:write property="timeStamp" name="onLineNodes" /> </td>

</tr>

</table>

</html:form>

plz help me to find out the problem

[4220 byte] By [Farrukh_Abrar_Hussaina] at [2007-10-3 0:54:47]
# 1

You need to add a MessageResources reference to your strut-config.

This should reference the standard struts properties (MessageResources.properties) in the WEB-INF/classes directory.

You can specify any resource file you like though.

<message-resources null="false" parameter="MessageResources"/>

evnafetsa at 2007-7-14 17:50:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...