Dear All,

I've been trying to set up a little struts app to play with some actions
and whatnot and just as a little exercise and I seem to have rather
stumped myself. Essentially I'm getting a
java.lang.NullPointerException: Module 'null' not found. Exception when
I deploy to Tomcat.

However as far as I've figured out, the problem is to do with my struts
config as a little further up the stacktrace there is:

SEVERE: Servlet /Struts Taster threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path jndi:/localhost/Struts Taster/WEB-INF/struts-config.xml

I think I've narrowed it down to a form-bean definition. My
spring-config for the form-bean is essentially:
    
        <form-bean name="personDataForm" type="com.pdata.PersonData">
                <form-property name="firstname" type="java.lang.String"
/>
                <form-property name="lastname" type="java.lang.String"
/> 
                <form-property name="address" type="java.lang.String" />
                <form-property name="telephoneNumber"
type="java.lang.String" />
        </form-bean>
        
And 'PersonData' is defined as such...

package com.pdata;

import org.apache.struts.action.ActionForm;

public class PersonData extends ActionForm {
        private String firstname = null;
        private String lastname = null;
        private String address = null;
        private String telephoneNumber = null;

with getters and setters for each field.

I'm fairly sure it's this formbean definition as when I comment it out,
I get through to the default welcome page just fine. Interestingly, one
of my action-mapping entries is:

        <action path="/PersonData" forward="/pages/personData.jsp" />   

        <action path="/Results" type="com.pdata.PersonDataAction"
                    name="personDataForm"
                    scope="request"
                    input="/pages/personData.jsp">
            <forward name="success" path="/pages/results.jsp" />
                <forward name="failed" path="/pages/error.jsp" />
        </action>

Now, if I change personDataForm's form-bean definition and remove the
'com.pdata.' part of it, then the app builds within tomcat and deploys,
however if I hit /PersonData.do in my browser, I get:
javax.servlet.ServletException: Cannot retrieve definition for form
bean: "personDataForm" on action: "/Results", which I guess it means it
can't compile the form bean definition as it can't find the bean.

Commenting out the form-properties has no effect. I'm presuming that
I've done something (fairly elementary) wrong. Hopefully this'll be easy
for someone to diagnose. Please let me know if you require more
information

Thanks,

Jamie

PS, I based most of what I've done on the tutorial at
http://www.abqswt.com/tutorials/basicStruts/index.php

However I have deviated in a few places as it seems to do a few strange
things unnecessarily (like manually copying files about willy nilly). 



This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory.  The contents of this email may relate to dealings 
with other companies within the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to