File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Issue with Struts 1.2 and Java 1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Issue with Struts 1.2 and Java 1.5" Watch "Issue with Struts 1.2 and Java 1.5" New topic

Issue with Struts 1.2 and Java 1.5

murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
Hi Folks,

I am trying to access my Struts web application then i am getting the following Exception.

Error 500--Internal Server Error
javax.servlet.jsp.JspException: Exception creating bean of class test.NameForm: {1}
at org.apache.struts.taglib.html.FormTag.initFormBean(
at org.apache.struts.taglib.html.FormTag.doStartTag(
at jsp_servlet.__index._jsp__tag0(
at jsp_servlet.__index._jspService(
at weblogic.servlet.jsp.JspBase.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.WebAppServletContext$
at Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(
at weblogic.servlet.internal.WebAppServletContext.execute(

Is this because of the Struts 1.2 and Java 1.5 compatability problem.

Please help me to resolve this issue.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<title>Sample Struts Application</title>

<html:form action="/Name">
Name: <html:text property="name" />
<html:submit />



package test;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class NameForm extends ActionForm {
private String name = null;
public String getName() {
return (name);
public void setName(String name) { = name;
public void reset(ActionMapping mapping, HttpServletRequest request) { = null;

<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.2//EN" "">
<form-bean name="nameForm" type="test.NameForm"/>

<exception type="java.lang.Exception"
<action path="/Name" type="test.NameAction" name="nameForm" >
<forward name="success" path="/displayname.jsp"/>
<forward name="failure" path="/index.jsp"/>


<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">






Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

murali kankanala wrote:
Is this because of the Struts 1.2 and Java 1.5 compatability problem.

Not at all . the problem due to some other reason . i go through your code , it looks fine for me. just verify your NameForm location
I agree. Here's the link:
subject: Issue with Struts 1.2 and Java 1.5
It's not a secret anymore!