[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.6

struts :Exception creating bean of class net.foong.newitemForm

Asked by ultraman7719 in Java Server Pages (JSP), Plug Ins

Tags: bean, creating, exception, class

hi there, i have this error,
javax.servlet.ServletException: Exception creating bean of class net.foong.newitemForm: {1}
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
      org.apache.jsp.pages.newitemForm_jsp._jspService(newitemForm_jsp.java:80)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
      javax

and below is the rest of my struts program.

1. sturts-config.xml

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<!-- ======================================== Form Bean Definitions -->
    <form-beans>
    <form-bean name="newitemForm" type="net.foong.newitemForm">
    </form-bean>
  </form-beans>
<!-- ================================= Global Exception Definitions -->
    <global-exceptions>
    </global-exceptions>
<!-- =================================== Global Forward Definitions -->
    <global-forwards>
        <forward name="welcome" path="/do/Welcome" />
 </global-forwards>

<!-- =================================== Action Mapping Definitions -->
    <action-mappings>
            <!-- Default "Welcome" action -->
            <!-- Forwards to Welcome.jsp -->
                     <action path="/Welcome" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Welcome.jsp" />
                     <action path="/newitemForm" type="org.apache.struts.actions.ForwardAction" parameter="/pages/newitemForm.jsp" />
                  <action path="/newitem" type="net.foong.newitemAction" name="newitemForm" scope="request" validate="false" parameter="/do/newitemForm.jsp">
                  <forward name="success" path="/pages/cofirmation.jsp" />
            </action>            
    </action-mappings>

<!-- ===================================== Controller Configuration -->

    <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" />

<!-- ================================ Message Resources Definitions -->

    <message-resources parameter="resources.application" />

<!-- ======================================= Plug Ins Configuration -->

  <!-- comment following if struts1.0.x -->
  <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
    <set-property property="moduleAware" value="true" />
    <set-property property="definitions-parser-validate" value="true" />
  </plug-in>

  <!-- end comment if struts1.0.x -->

  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  </plug-in>
</struts-config>

2. my link page whereby will call the <html:link page="/do/newitemform" />

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

<html:html locale="true">
<head>
<link href="<html:rewrite page="/pages/rr.css" />" rel="stylesheet" type="text/css">
      
<title><bean:message key="welcome.title"/></title>
<html:base/>
</head>
<body bgcolor="white">

<logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application">
  <font color="red">
    ERROR:  Application resources not loaded -- check servlet container
    logs for error messages.
  </font>
</logic:notPresent>
<h3><bean:message key="welcome.heading"/></h3>
<!-- <p><bean:message key="welcome.message"/></p>
-->
<p><bean:message key="welcome.msg"/></p>
<html:link page="/do/newitemForm">Create New Item</html:link>
</body>
</html:html>

3. newitemForm.jsp in "/pages/newitemForm.jsp"

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html>
<html:html locale="true">
<head>
<link href="<html:rewrite page="/pages/rr.css" />" rel="stylesheet" type="text/css">
<title><bean:message key="welcome.title"/></title>
<body>
<html:form action="newitem" focus="itemName" >
<table>
      <tr>
            <td>Item Name :      </td>
            <td><html:text property="itemName" /></td>
      </tr>
      <tr>
            <td>Quantity</td>
            <td><html:text property="quantity" /></td>
      </tr>
</table>
<html:submit><bean:message key="button.submit" /></html:submit>
</html:form>
</html:html>
</body>
</html>

4. my newitemForm.java in net.foong package

package net.foong;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class newitemForm extends ActionForm {
      private String itemName;
      private String quantity;
      public newitemForm() { super(); }
      
      public void setItemName(String itemName) { this.itemName=itemName; }
      public void setQuantity(String quantity) { this.quantity=quantity; }

      public String getItemName() { return itemName; }
      public String getQuantity() { return quantity; }
      public void reset(ActionMapping mapping, HttpServletRequest request) {
             this.itemName = null;
             this.quantity = null;
       }
}

*********

I can see the welcome.jsp page. I put the link in that page and enable user to click and view the page, but too bad i can onl;y the the exception shown in above... and i have no ideas...

Thank you.
 
Related Solutions
Keywords: struts :Exception creating bean of cla…
 
Loading Advertisement...
 
[+][-]01/05/04 06:18 PM, ID: 10049162Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/04 06:20 PM, ID: 10049172Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/04 06:23 PM, ID: 10049190Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/04 06:31 PM, ID: 10049228Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/04 06:39 PM, ID: 10049269Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/04 07:44 PM, ID: 10049542Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/05/04 11:39 PM, ID: 10050303Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 12:30 AM, ID: 10050470Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 01:24 AM, ID: 10050796Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 01:26 AM, ID: 10050803Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 01:57 AM, ID: 10050926Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 04:11 PM, ID: 10057520Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 04:12 PM, ID: 10057536Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 04:34 PM, ID: 10057688Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 04:39 PM, ID: 10057720Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 05:04 PM, ID: 10057854Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 05:12 PM, ID: 10057904Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 05:18 PM, ID: 10057934Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 08:00 PM, ID: 10058790Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 08:10 PM, ID: 10058844Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 10:13 PM, ID: 10059363Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 11:03 PM, ID: 10059519Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 11:30 PM, ID: 10059644Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/06/04 11:40 PM, ID: 10059683Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/06/04 11:44 PM, ID: 10059693Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/07/04 12:05 AM, ID: 10059755Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/07/04 12:23 AM, ID: 10059822Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/07/04 12:39 AM, ID: 10059898Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Server Pages (JSP), Plug Ins
Tags: bean, creating, exception, class
Sign Up Now!
Solution Provided By: kokchoon78
Participating Experts: 3
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81