Dear all,
I'm facing a strange problem in my project.
I'm using Visual Age 3.5.2 with IBM
tomcat test environment 3.1 as my Test environment so that I can support
servlet 2.2 &
JSP 1.1 in my application.
I developed the application & it works fine in the test environment, but yesterday I just deployed it on the WebSphere Application Server 3.5.5 that supports ( servlet 2.2 & JSP 1.1 ) and some strange behaviour happened
:
I was testing the application before deployment before passing it to the QA team for testing, and I found a failure in a certain page that displays empty.
The page is used for either creation or modification in my application, depeneding in the parameters sent to it, in the creation it works fine but in the modification mode it throws exception. I traced the error till I found out that this error occures when I pass certain object in the request object from the servlet to the JSP, by the way I'm using MVC model implementaion recommended by IBM.
The object that is passed is just a class with member fields & accessors & implements Comparable, I also added implements java.io.Serializable but it didn't get me anywhere, its code is like the following:
public class FolderBrief
implements Comparable, java.io.Serializable
{
protected int m_nId_o;
protected
String m_szName_o;
protected String m_szDescription_o;
protected String m_szKeyword_o;
protected String m_szEditable_o;
protected int m_nParentId_o;
protected String m_szIfsName_o;
public int compareTo( Object p_objFolderBrief )
{
FolderBrief l_FolderBrief = (FolderBrief) p_objFolderBrief;
String l_szFolderName = this.getName().toLowerCase(),
l_szOtherFolderName = l_FolderBrief.getName().toLowerCase();
return l_szFolderName.compareTo( l_szOtherFolderName );
}
public boolean equals( Object p_objObject )
{
//Comparison is made on the ID, which is the unique id
FolderBrief l_Folder = (FolderBrief)p_objObject;
int l_FolderId = l_Folder.getId();
if ( l_FolderId == this.m_nId_o )
return true;
else
return false;
}
public String toString()
{
return "Id:" + this.m_nId_o + ", Name:"+ this.m_szName_o;
}
}
The exception happens when I use:
getServletContext().getRequestDispatcher( "/admin/create_modify.jsp" ).forward( req, res );
Not when I add the object to the request:
req.setAttribute( "folder_modified", l_Folder );
the exception:
com.ibm.servlet.engine.webapp.UncaughtServletException: Server caught unhandled exception from servlet [jsp11]
Any suggestion