The contents of my struts-config are...
................................. <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more... etc --> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"> <!-- This is a blank Struts configuration file with an example.. etc --> <struts-config> <!-- ================================================ Form Bean Definitions --> <form-beans> <form-bean name="personDataForm" type="com.pdata.PersonData"/> </form-beans> <!-- ========================================= Global Exception Definitions --> <global-exceptions /> <!-- =========================================== Global Forward Definitions --> <global-forwards> <!-- Default forward to "Welcome" action --> <!-- Demonstrates using index.jsp to forward --> <forward name="welcome" path="/Welcome.do" /> </global-forwards> <!-- =========================================== Action Mapping Definitions --> <action-mappings> <!-- Default "Welcome" action --> <!-- Forwards to Welcome.jsp --> <action path="/Welcome" forward="/pages/Welcome.jsp" /> <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> </action-mappings> <!-- ======================================== Message Resources Definitions --> <message-resources parameter="MessageResources" /> </struts-config> ................................. -----Original Message----- From: Alexandru BARBAT [mailto:[EMAIL PROTECTED] Sent: 25 January 2008 10:14 To: Struts Users Mailing List Subject: Re: Noddy struts problem: java.lang.NullPointerException: Module 'null' not found It seems to be a problem of xml syntax in 'struts-config.xml'. You could post the content of struts-config.xml. You could refactoring a little(for now) your file structure and move all *.java into /src/com/pdata. (but it has nothing with your error) ----- Original Message ----- From: "James Cockrill" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Friday, January 25, 2008 11:17 AM Subject: RE: Noddy struts problem: java.lang.NullPointerException: Module 'null' not found > Alexandru, thanks for the reply. > > I've changed my form-bean config to match the suggestion below, however > I'm still getting the following error: > > > 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 wonder if my folder structure is the problem? It looks a bit like: > > /ant > /build.xml (main build xml that I use to clean the project from > tomcat and copy files over to the webapps directory) > /src/com/pdata > /PersonData.java > /PersonDataAction.java > /Webroot > /pages > /error.jsp > /personData.jsp > /results.jsp > /Welcome.jsp > /WEB-INF > /classes > /com/pdata > /PersonData.class > /PersonDataAction$Forwards.class > /PersonDataAction.class > /MessageResources.properties > /lib (bunch of library files, can define these if > needed?) > /src > /java/MessageResources.properties > /build.xml (supplied by struts-blank and not > used) > /README.txt > /struts-config.xml > /validation.xml > /web.xml > /index.jsp > > > If there's any other useful information I can provide, please let me > know. Thanks for the help so far > > Thanks > > Jamie > > > -----Original Message----- > From: Alexandru BARBAT [mailto:[EMAIL PROTECTED] > Sent: 24 January 2008 16:25 > To: Struts Users Mailing List > Subject: Re: Noddy struts problem: java.lang.NullPointerException: > Module 'null' not found > > hi, > You don't have to define properties form in struts-config when you use > classic ActionForm. > > it will be enough : > ... > <form-bean name="personDataForm" type="com.pdata.PersonData"/> > ... > > ----- Original Message ----- > From: "James Cockrill" <[EMAIL PROTECTED]> > To: <user@struts.apache.org> > Sent: Thursday, January 24, 2008 6:07 PM > Subject: Noddy struts problem: java.lang.NullPointerException: Module > 'null' > not found > > > > 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] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]