Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in running Struts application

Status
Not open for further replies.

bibudh

Programmer
Nov 25, 2004
1
GB
Hi,
I'm a newbie in the Struts world. I've downloaded a simple Struts application (struts blank )from the jakarta site and I'm trying to run it from Oracle 9i JDeveloper by building the project from the existing WAR. I've defined the classpath as follows:

C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-beanutils.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-collections.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-digester.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-fileupload.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-logging.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\commons-validator.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\jakarta-oro.jar;C:\Struts_Workspace\Project\struts-examples\WEB-INF\lib\struts.jar


The struts-config.xml file under WEB-INF/lib folder is defined as follows:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"<struts-config>
<!--============================================== Form Bean Definitions -->
<form-beans>
<!-- Registration form bean -->
<form-bean name="registrationForm" type="org.apache.struts.webapp.validator.RegistrationForm" />
<!-- Multi-Part Registration form bean -->
<form-bean name="multiRegistrationForm" type="org.apache.struts.webapp.validator.RegistrationForm" />
<!-- Type form bean -->
<form-bean name="typeForm" type="org.apache.struts.webapp.validator.TypeForm" />
<!-- JavaScript Type form bean -->
<form-bean name="jsTypeForm" type="org.apache.struts.webapp.validator.TypeForm" />
<!-- Locale form bean -->
<form-bean name="localeForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="language" type="java.lang.String" />
<form-property name="country" type="java.lang.String" />
</form-bean>
</form-beans>
<!-- ======================================== Global Forward Definitions -->
<global-forwards>
<forward name="home" path="/index.jsp" />
</global-forwards>
<!-- ========================================= Action Mapping Definitions -->
<action-mappings>
<action path="/welcome" forward="/index.jsp" />
<!-- Registration Action -->
<action path="/registration" forward="/registration.jsp" />
<action path="/registration-submit" type="org.apache.struts.webapp.validator.RegistrationAction" name="registrationForm" scope="request" validate="true" input="input">
<forward name="input" path="/registration.do" />
<forward name="success" path="/index.jsp" />
</action>
<action path="/jsRegistration" forward="/jsRegistration.jsp" />
<!-- Multi-Part Registration Action -->
<action path="/multiRegistration" forward="/multiRegistration1.jsp" />
<action path="/multiRegistration-submit" type="org.apache.struts.webapp.validator.MultiRegistrationAction" name="multiRegistrationForm" scope="request" validate="false">
<forward name="success" path="/welcome.do" />
<forward name="input1" path="/multiRegistration1.jsp" />
<forward name="input2" path="/multiRegistration2.jsp" />
</action>
<!-- Type Action -->
<action path="/type" forward="/type.jsp" />
<action path="/type-submit" type="org.apache.struts.webapp.validator.TypeAction" name="typeForm" scope="request" validate="true" input="input">
<forward name="input" path="/type.do" />
<forward name="success" path="/welcome.do" />
</action>
<!-- JavaScript Type Action -->
<action path="/editJsType" type="org.apache.struts.webapp.validator.EditTypeAction" scope="request" validate="false">
<forward name="success" path="/jsType.do" />
</action>
<action path="/jsType" forward="/jsType.jsp" />
<action path="/jsType-submit" type="org.apache.struts.webapp.validator.TypeAction" name="jsTypeForm" scope="request" validate="true" input="input">
<forward name="input" path="/editJsType-submit.do?typeForm.reset=false" />
<forward name="success" path="/welcome.do" />
</action>
<!-- Locale Action -->
<action path="/locale" type="org.apache.struts.webapp.validator.LocaleAction" name="localeForm" scope="request">
<forward name="success" path="/welcome.do" />
</action>
</action-mappings>
<!-- ============================================= Controller Definition -->
<controller inputForward="true" />
<!-- ===================================== Message Resources Definitions -->
<message-resources parameter="org.apache.struts.webapp.validator.MessageResources" />
<!-- ============================================ Plug Ins Configuration -->
<!--
Add multiple validator resource files by setting the pathnames property
with a comma delimitted list of resource files to load.
-->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validator/validation.xml" />
<set-property property="stopOnFirstError" value="true" />
</plug-in>
</struts-config>


But when I'm trying to run index.jsp it is giving me the following error:

javax.servlet.jsp.JspException: Missing message for key "index.title"
int org.apache.struts.taglib.bean.MessageTag.doStartTag()
void _index._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
[/index.jsp]
void com.orionserver[Oracle9iAS (9.0.2.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
boolean com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io_OutputStream, boolean)
void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run()

Can anyone give a solution?
 
javax.servlet.jsp.JspException: Missing message for key "index.title"
means it cannot find the value for "index.title" which should be stored in file MessageResources.properties in this example.
For Tomcat server, this file should be like this:
struts-blank\WEB-INF\classes\MessageResources.properties
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top