File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "org.apache.jasper.JasperException: java.lang.NullPointerException: Module Watch "org.apache.jasper.JasperException: java.lang.NullPointerException: Module New topic
Author

org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.

Meg Jolie
Greenhorn

Joined: Jul 03, 2009
Posts: 20
Hello,
I am working on Online Banking project, right now on the enrollment part. My code is not yet complete, still have to take care of validations, set the results etc. I wanted to check whether my code written until now works correctly. But I am getting the Module 'null' exception. I have copied all the jar files in WEB-INF/lib directory. struts-config and web.xml are under WEB-INF directory.

Can you help me find where I am going wrong. Any help will be greatly appreciated!
Thanks!

org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NullPointerException: Module 'null' not found.
org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
org.apache.jsp.enroll_jsp._jspx_meth_html_005fform_005f0(enroll_jsp.java:139)
org.apache.jsp.enroll_jsp._jspService(enroll_jsp.java:93)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

------------------------------------------------------------------------
index.jsp

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<html>

<head>
<title>ABC Bank</title>
</head>


<body>
<html:link forward="enroll">Enroll now</html:link>
</body>

</html>

--------------------------------------------------------------------------------------------------------

enroll.jsp

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>


<html>

<head>
<title>ABC Bank - Enroll</title>
</head>

<body>

<font size="+1">If you do not already have an ABC Bank account, please open an account </font>
Get Started \n
Please provide the requested information \n
*=required information


<html:errors/>
<html:form action="/enroll">

<table>

<tr>
<td> <bean:message key="label.enroll.firstName" /> </td>
<td> <html:text property="firstName"/> </td>
</tr>


<tr>
<td> <bean:message key="label.enroll.middleInitial" /> </td>
<td> <html:text property="middleInitial"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.lastName" /> </td>
<td> <html:text property="lastName"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.addressLine1" /> </td>
<td> <html:text property="addressLine1"/> </td>
</tr>
<tr>
<td> <bean:message key="label.enroll.addressLine2" /> </td>
<td> <html:text property="addressLine2"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.city" /> </td>
<td> <html:text property="city"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.state" /> </td>
<td> <html:text property="state"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.zip" /> </td>
<td> <html:text property="zip"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.primaryPhone" /> </td>
<td> <html:text property="primaryPhone"/> </td>
</tr>


<tr>
<td> <bean:message key="label.enroll.alternatePhone" /> </td>
<td> <html:text property="alternatePhone"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.emailAddress" /> </td>
<td> <html:text property="emailAddress"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.reenterEmailAddress" /> </td>
<td> <html:text property="reenteredEmailAddress"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.isCitizen" /> </td>
<td> <html:text property="isCitizen"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.ssn" /> </td>
<td> <html:text property="ssn"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.dob" /> </td>
<td> <html:text property="dob"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.sourceOfIncome" /> </td>
<td> <html:text property="sourceOfIncome"/> </td>
</tr>

<tr>
<td> <bean:message key="label.enroll.occupation" /> </td>
<td> <html:text property="occupation"/> </td>
</tr>

<tr>
<td> <html:submit/> </td>
</tr>

</table>

</html:form>


</body>
</html>
-----------------------------------------------------------------------------------------------------------------------------------------------------

EnrollForm.java


import javax.servlet.http.HttpServletRequest;

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

public class EnrollForm extends ActionForm
{
private String firstName;
private char middleInitial;
private String lastName;
private String addressLine1;
private String addressLine2;
private String city;
private String state;
private String zip;
private String primaryPhone;
private String alternatePhone;
private String emailAddress;
private String reenteredEmailAddress;
private boolean isCitizen;
private String ssn;
private String dob;
private String sourceOfIncome;
private String occupation;


public void setFirstName (String firstName)
{
this.firstName = firstName;
}

public String getFirstName ()
{
return firstName;
}

public void setMiddleInitial (char middleInitial)
{
this.middleInitial = middleInitial;
}

public char getMiddleInitial ()
{
return middleInitial;
}

public void setLastName (String lastName)
{
this.lastName = lastName;
}

public String getLastName ()
{
return lastName;
}

public void setAddressLine1 (String addressLine1)
{
this.addressLine1 = addressLine1;
}

public String getAddressLine1 ()
{
return addressLine1;
}

public void setAddressLine2 (String addressLine2)
{
this.addressLine2 = addressLine2;
}

public String getAddressLine2 ()
{
return addressLine2;
}

public void setCity (String city)
{
this.city = city;
}

public String getCity ()
{
return city;
}

public void setState (String state)
{
this.state = state;
}

public String getState ()
{
return state;
}

public void setZip (String zip)
{
this.zip = zip;
}

public String getZip ()
{
return zip;
}

public void setPrimaryPhone (String primaryPhone)
{
this.primaryPhone = primaryPhone;
}

public String getPrimaryPhone ()
{
return primaryPhone;
}

public void setAlternatePhone (String alternatePhone)
{
this.alternatePhone = alternatePhone;
}

public String getAlternatePhone ()
{
return alternatePhone;
}

public void setEmailAddress (String emailAddress)
{
this.emailAddress = emailAddress;
}

public String getEmailAddress ()
{
return emailAddress;
}

public void setReenteredEmailAddress (String reenteredEmailAddress)
{
this.reenteredEmailAddress = reenteredEmailAddress;
}

public String getReenteredEmailAddress ()
{
return reenteredEmailAddress;
}

public void setCitizen (boolean citizen)
{
this.isCitizen = isCitizen;
}

public boolean isCitizen ()
{
return isCitizen;
}

public void setSsn (String ssn)
{
this.ssn = ssn;
}

public String getSsn ()
{
return ssn;
}

public void setDOB ()
{
this.dob = dob;
}

public String getDob ()
{
return dob;
}

public void setSourceOfIncome (String sourceOfIncome)
{
this.sourceOfIncome = sourceOfIncome;
}

public String getSourceofIncome ()
{
return sourceOfIncome;
}

public void setOccupation (String occupation)
{
this.occupation = occupation;
}

public String getOccupation ()
{
return occupation;
}

public void reset (ActionMapping mapping, HttpServletRequest request)
{
}

// Validate form data
public ActionErrors validate (ActionMapping mapping, HttpServletRequest request)
{
ActionErrors errors = new ActionErrors ();
return errors;
}

}

------------------------------------------------------------------------------------------------------------------------------------

EnrollAction.java

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

public final class EnrollAction extends Action
{
public ActionForward execute (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
{
EnrollForm ef = (EnrollForm) form;

String firstName = ef.getFirstName();
char middleInitial = ef.getMiddleInitial();
String lastName = ef.getLastName();
String addressLine1 = ef.getAddressLine1();
String addressLine2 = ef.getAddressLine2();
String city = ef.getCity();
String state = ef.getState();
String zip = ef.getZip();
String primaryPhone = ef.getPrimaryPhone();
String alternatePhone = ef.getAlternatePhone();
String emailAddress = ef.getEmailAddress();
String reenteredEmailAddress = ef.getReenteredEmailAddress();
boolean isCitizen = ef.isCitizen ();
String ssn = ef.getSsn();
String dob = ef.getDob();
String sourceOfIncome = ef.getSourceofIncome();
String occupation = ef.getOccupation();

EnrollService es = new EnrollService ();
es.enroll(firstName, middleInitial, lastName, addressLine1, addressLine2, city, state, zip, primaryPhone, alternatePhone, emailAddress, reenteredEmailAddress, isCitizen, ssn, dob, sourceOfIncome, occupation);

return mapping.getInputForward ();
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EnrollService.java

public class EnrollService
{
public int enroll (String firstName, char middleInitial, String lastName, String addressLine1,String addressLine2,
String city, String state, String zip, String primaryPhone, String alternatePhone,
String emailAddress, String reenteredEmailAddress, boolean isCitizen, String ssn, String dob,
String sourceOfIncome,
String occupation)
{
// returns 1 if enrollment was successful otherwise return 0

DatabaseService dbs = new DatabaseService ();

dbs.connect ();

dbs.addRecord (firstName, middleInitial, lastName, addressLine1, addressLine2,
city, state, zip, primaryPhone, alternatePhone, emailAddress,
isCitizen, ssn, dob, sourceOfIncome, occupation);


return 1;
}
}
------------------------------------------------------------------------------------------------------------------------------------------------------

DatabaseService.java


import java.sql.*;

public class DatabaseService
{
Connection connection;
Statement stmt;


public Connection connect()
{
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
connection = DriverManager.getConnection("jdbc:sqlserver://localhost;databaseName=Bank");
}
catch (ClassNotFoundException cnfE)
{
System.out.println(cnfE);
}
catch (SQLException sqlE)
{
System.out.println(sqlE);
}
return connection;
}

private Statement getStatement()
{
try
{
stmt = connection.createStatement();
}
catch (SQLException sqlE)
{
System.out.println(sqlE);
}
return stmt;
}

public void addRecord(String firstName, char middleInitial,
String lastName, String addressLine1, String addressLine2,
String city, String state, String zip, String primaryPhone,
String alternatePhone, String emailAddress, boolean isCitizen,
String ssn, String dob, String sourceOfIncome, String occupation)
{
String comma = ",";
String insertQuery = "INSERT INTO PersonalInformation "
+ "(firstName, middleInitial, lastName, addressLine1, addressLine2, city, state, zip, "
+ "primaryPhone, alternatePhone, emailAddress, isCitizen, ssn, dob, sourceOfIncome, occupation) VALUES ()"
+ firstName
+ comma
+ middleInitial
+ comma
+ lastName
+ comma
+ addressLine1
+ comma
+ addressLine2
+ comma
+ city
+ comma
+ state
+ comma
+ zip
+ comma
+ primaryPhone
+ comma
+ alternatePhone
+ comma
+ emailAddress
+ comma
+ isCitizen
+ comma
+ ssn
+ comma
+ dob
+ comma
+ sourceOfIncome
+ comma
+ occupation + ")";

} // end of method addRecord

} // end of class DatabaseService

--------------------------------------------------------------------------------------------------
struts-config.xml

<xml version="1.0">

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<!-- Global Forwards Configuration -->
<global-forwards>
<forward name="enroll" path="/enroll.jsp"/> <!-- used in index.jsp file -->
</global-forwards>

<!--Form Beans configuration-->
<form-beans>
<form-bean name="enrollForm" type="EnrollForm" />
</form-beans>

<!-- Action Mappings configuration -->

<action-mappings>
<action path="/enroll" type="EnrollAction" name="enrollForm" scope="request" validate="true" input="/enroll.jsp"/>
</action>
</action-mappings>

<!-- Message Resources Configuration -->
<message-resources parameter="MessageResources" null="true"/>

</struts-config>

</xml>
--------------------------------------------------------------------------------------
web.xml


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">



<web-app>

<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>


<!-- Action Servlet mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>


</web-app>
-----------------------------------------------------------------------------------------------------
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Meg,
Welcome to JavaRanch. In order to get quick Reply, please Read
IsolateTheProblem,
UseCodeTags

And to answer your question, here is the Struts FAQ Entry, ModuleNull

HTH

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Meg Jolie
Greenhorn

Joined: Jul 03, 2009
Posts: 20
Thank you so much for the reply..
I did check the link that you have given.
1. Accordingly I changed the value of load on startup from 1 to 2
2. I checked once again that I have all the jar files in WEB-INF/lib directory
But I still get that exception
3. I am not sure if I am checking the correct log files. I checked the log files under tomcat directory and did not find any error there.
Still trying to figure out whats wrong.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Meg Jolie wrote:
--------------------------------------------------------------------------------------
web.xml


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">



<web-app>

<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>


<!-- Action Servlet mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>


</web-app>
-----------------------------------------------------------------------------------------------------

Is thats how your web.xml looks, than you are putting wrong DOCTYPE dtd deceleration,
Also the problem is with the struts configuration, what exactly you need to post is struts-config.xml, action class and may by action form, not database code and any helper classes. It may be possible that some one who want to help you will just move on when he/she saw such long, untidy code .
Meg Jolie
Greenhorn

Joined: Jul 03, 2009
Posts: 20
Thanks again Sagar. I changed the web.xml DTD as you pointed out. But I am still getting the same exception. I will once again post my question in a new topic, now with only the required files.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Meg Jolie wrote:Thanks again Sagar. I changed the web.xml DTD as you pointed out. But I am still getting the same exception.

You can post the new changed web.xml file here OR validate it using the IDE like, Eclipse or netbeans..
Meg Jolie
Greenhorn

Joined: Jul 03, 2009
Posts: 20
Below are the web.xml and struts-config.xml files. Thanks..


web.xml

<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>

<!-- Action Servlet mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>

</web-app>

--------------------------------------------------------------------------------------------------
struts-config.xml

<?xml version="1.0"?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<!--Form Beans configuration-->
<form-beans>
<form-bean name="enrollForm" type="EnrollForm" />
</form-beans>

<!-- Global Forwards Configuration -->
<global-forwards>
<forward name="enroll" path="/enroll.jsp" /> <!-- used in index.jsp file -->
</global-forwards>

<!-- Action Mappings configuration -->
<action-mappings>
<action path="/enroll" type="EnrollAction" name="enrollForm"
scope="request" validate="true" input="/enroll.jsp" />
</action-mappings>

<!-- Message Resources Configuration -->
<message-resources parameter="MessageResources"/>

</struts-config>
</xml>
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Ok, one thing I would like to see in your next post, i.e
Use The Code Tags
Also, I request you to validate the XML before posting them here, that's just rectify error at first place, and we needn't to do an extra work of validation and checking the well formedness of XML.

Here is an error, </xml> tag has no matching start tag
Meg Jolie wrote:
.
.
</struts-config>
</xml>
Meg Jolie
Greenhorn

Joined: Jul 03, 2009
Posts: 20
Thanks a lot for all your help!
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Welcome So have you found the solution ?
monika se
Greenhorn

Joined: Mar 23, 2011
Posts: 22
I am getting error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:536)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

root cause

java.lang.NullPointerException
org.apache.jsp.hello_jsp._jspInit(hello_jsp.java:25)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:338)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.




Can you tell me possible reasons for it./...
I am trying for web work Hello World program..
please help me.. i am struggling since 2 week nearly.
anirudh jagithyala
Ranch Hand

Joined: Dec 07, 2010
Posts: 41
could you please post the Helo.jsp

and did you check out the filters......?As i find some error related to filters in the last line
monika se
Greenhorn

Joined: Mar 23, 2011
Posts: 22
SOLVED PREVIOUS ISSUES..

Now my problem is::


Stack Trace: while debugging hello.jsp on IDEA.

cmd /c ""C:\Program Files\Java\jdk1.6.0_20\bin\java" "-Dcatalina.base=C:\Documents and Settings\MBurnwal\.IntelliJIdea90\system\tomcat\hello_jsp_Monika180cd8257" "-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0" "-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp" -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:4836,suspend=y,server=n -jar "C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar" start"
Connected to the target VM, address: '127.0.0.1:4836', transport: 'socket'
Mar 29, 2011 2:24:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_20\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32;;;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;C:\Program Files\Java\jdk1.6.0_20\bin;;c:\program files\jetbrains\intellij idea 9.0.2\jre\jre\bin
Mar 29, 2011 2:24:55 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 29, 2011 2:24:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3725 ms
Mar 29, 2011 2:24:55 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 29, 2011 2:24:55 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Mar 29, 2011 2:24:55 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 29, 2011 2:24:58 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
Mar 29, 2011 2:24:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Unable to locate configuration files of the name struts-plugin.xml, skipping
Mar 29, 2011 2:24:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Mar 29, 2011 2:24:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]
Mar 29, 2011 2:25:00 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/Documents%20and%20Settings/MBurnwal/IdeaProjects/Monika1/out/artifacts/Monika1_war_exploded/WEB-INF/lib/struts-core.jar!/org/apache/struts/chain/chain-config.xml
Mar 29, 2011 2:25:01 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Mar 29, 2011 2:25:01 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Mar 29, 2011 2:25:02 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 29, 2011 2:25:02 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 29, 2011 2:25:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Mar 29, 2011 2:25:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Mar 29, 2011 2:25:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory webapp
Mar 29, 2011 2:25:02 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 29, 2011 2:25:02 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 29, 2011 2:25:02 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/93 config=null
Mar 29, 2011 2:25:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7133 ms
Connected to server

on browser: http://localhost:8080/hello.jsp
WebWork says

on running http://localhost:8080/Monika1/helloWorld.action on browser

HTTP Status 404 - There is no Action mapped for action name helloWorld.

type Status report

message There is no Action mapped for action name helloWorld.

description The requested resource (There is no Action mapped for action name helloWorld.) is not available.

Apache Tomcat/6.0.32




Doubts:

DO i need struts.xml, struts-plugins.xml,struts-config.xml , struts-default.xml also??? Because i did not updated these files. I hope there is no conflict because of it.

monika se
Greenhorn

Joined: Mar 23, 2011
Posts: 22
PLEASE CHECK LINE "INFO: Unable to locate configuration files of the name struts-plugin.xml" IN STACK TRACE./.

I AM NEW TO THIS STRUTS WEBWORK ETC... PLEASE ELABORATE WHAT SHOULD I DO... I CONFIGURED xwork.xml, webwork.properties,web.xml files correctly...
anirudh jagithyala
Ranch Hand

Joined: Dec 07, 2010
Posts: 41
Doubts:

DO i need struts.xml, struts-plugins.xml,struts-config.xml , struts-default.xml also??? Because i did not updated these files. I hope there is no conflict because of it.


yes, you need to edit these files .........
Might be Your hello.jsp is calling an action...
Even post the Hello.jsp
monika se
Greenhorn

Joined: Mar 23, 2011
Posts: 22
MY VARIOUS FILES ARE BELOW, PLEASE REFER ONCE.. DO TEL ME WHAT SHOULD I DO FOR STRUTS CONFIG ETC FILES.??

HelloWorld.java:



package sample;

import com.opensymphony.xwork.ActionSupport;

public class HelloWorld extends ActionSupport {
private String message;

public String execute() {
message = "Hello, WebWorld!";
return SUCCESS;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}


hello.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="ww" uri="/webwork" %>
<html>
<head>
<title>Hello Page</title>
</head>
<body>
WebWork says:
<h1><ww:property value="message"/></h1>
</body>
</html>

xwork.xml

<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-1.0.dtd">
<xwork>
<include file="webwork-default.xml"/>
<package name="default" extends="webwork-default">
<default-interceptor-ref name="completeStack"/>


</package>

<package name="hello" extends="default">
<action name="helloWorld" class="sample.HelloWorld">
<result name="success" type="dispatcher">hello.jsp</result>

</action>
</package>
</xwork>


web.xml


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>webwork</servlet-name>
<servlet-class>
com.opensymphony.webwork.dispatcher.ServletDispatcher
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>webwork</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<jsp-config>
<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/lib/webwork-2.2.7.jar
</taglib-location>
</taglib>
</jsp-config>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>


struts.xml


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
</struts>

struts-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

</struts-config>



anirudh jagithyala
Ranch Hand

Joined: Dec 07, 2010
Posts: 41
Please refer the opensymphony site, there you find the Hello world program directly

http://www.opensymphony.com/webwork/wikidocs/Basic%20configuration%20and%20your%20first%20action%20-%20Hello%20WebWorld.html
 
Don't get me started about those stupid light bulbs.
 
subject: org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.