Here is what I have for a server.xml component ..... I'm have also
requested addition information concerning the
application context.xml or additional configuration information
NOTE: XXXXX = my site name
=============
<Host name="XXXXX.com" appBase="/home/XXXXX/public_html">
<Alias>www.XXXXX.com</Alias>
<Context path="" reloadable="true" docBase="/home/XXXXX/public_html"
debug="1"/>
<Context path="/manager" debug="0" privileged="true"
docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
</Context>
</Host>
============
**********************************************
My web.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<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>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</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>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>newArticle.jsp</welcome-file>
</welcome-file-list>
</web-app>
*****************************************
My struts-config.xml is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="AddArticleForm"
type="com.XXXXX.action.forms.AddArticleForm"/>
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
<forward name="welcome" path="/Welcome.do"/>
</global-forwards>
<action-mappings>
<action name="AddArticleForm" path="/addArticle" scope="request"
type="com.XXXXX.actions.AddArticleAction" validate="false">
<forward name="success" path="/WEB-INF/successAddArticle.jsp"/>
<forward name="failure" path="/newArticle.jsp"/>
</action>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
</action-mappings>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="com/myapp/struts/ApplicationResource"/>
<!-- ========================= Tiles plugin
===============================-->
<!--
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from
web.xml, thenoverload them with parameters defined here. All parameters
are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true
(default), there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this
later case, it is still needed to declare one plugin per module.
The factory will be initialized with parameters found in the first
initialized plugin (generally the one associated with the default
module).
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header (default)
false : no validation
Paths found in Tiles definitions are relative to the main context.
-->
<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" />
</plug-in>
<!-- ========================= Validator plugin
================================= -->
<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>
*******************************************
I am currently placing my components within the directory structure of
public_html/TestStruts1.
The components within this structure are as follows:
newArticle.jsp
WEB-INF
classes
lib
struts-confg.xml
successAddArticle.jsp
tiles-defs.xml
validation.xml
validator-rules.xml
web-xml
The classes folder contains my servlets and struts actions.
The lib folder contains the .jar files.
Again, I have this working in my testing environment. It is only an issue
after deployment to my web site.
Also note that is will work if I access the application in the following manner:
http://XXXXX.com:8080/TestStruts1/
TestStrust1 is the folder I copied all of components to.
The above method will render the initial JSP with a form to enter data. After
entering the data on the form and hitting submit the success page does return
completed with the input data provided on the form. This is what I expect to
occur in my test.
So this does work ....
It will not work however when I attempt to run it
withhttp://www.XXXXX.com/TestStruts1/newArticle.jsp.
After I press the submit button I continue to get page with the following:
/TestStruts1/addArticle.do
The support staf is indicating they are finding this in the log:
[Sat Feb 13 08:19:10 2010] [error] [client xxx.xxx.xx.xxx] File does not exist:
/home/XXXXX/public_html/TestStruts1/addArticle.do
On 2/14/2010 10:48 AM, Caldarale, Charles R wrote:
From: Steve Campisano [mailto:w1...@yahoo.com]
Subject: Re: File does not exist error - public_html/addArticle.do
I spoke to soon ..... I'm still getting the same error .....
So respond to Pid's suggestion:
"Without seeing the server.xml, any application context.xml or additional config,
we're going to struggle to help you."
You've sent three follow-up messages, none of which provide the requested (and
required) information.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org