$WAS_HOME
refers to the directory in which you
have installed WebSphere Application Server, and
$STRUTS_HOME
is the
directory in which you unpacked the Struts binary
distribution.
$STRUTS_HOME/webapps/struts-example.war
. Press the Next button
$WAS_HOME/hosts/default_host
. Press the Next button
$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets
ServletContext.getResource(String)
or
ServletContext.getResourceAsStream(String)
. This manifests itself as an
exception in the application server stdout log, e.g.
default_server_stdout.log.
http://localhost/struts-example/
it will fail.
getResourceAsStream
is called:
ResourceTag.doStartTag() ActionServlet.initMapping() PropertyMessageResources.loadLocale(String)
of these,
ActionServlet
is the most important.
// Acquire an input stream to our configuration resource InputStream input = getServletContext().getResourceAsStream(config);
to
// Acquire an input stream to our configuration resource InputStream input = new java.io.FileInputStream(getServletContext().getRealPath(config));
.class
file to
$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets/
org/apache/struts/action/ActionServlet.class
$STRUTS_HOME/lib/struts-config_1_0.dtd
$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets/org/apache/struts/resources/struts-config_1_0.dtd
Back to Installation