You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by thecyth <th...@hotmail.com> on 2007/12/01 22:11:13 UTC
[Struts 2] Unable to access resources
I get this error message when I try to access ANY of the
resources in my app.
The requested resource (/EcoSim/web/welcome.action) is not
available.
Here's my setup:
------------------
welcome.jsp:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Please log-in...</title>
</head>
<body>
<s:form action="WelcomeAction" method="POST">
...
</s:form>
</body>
</html>
------------------
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 id="WebApp_9" 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">
<display-name>EcoSim</display-name>
<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>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
------------------------
struts.xml:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts><!-- Configuration for the default package. -->
<package name="actions" namespace="/"
extends="struts-default">
<action name="WelcomeAction"
class="actions.WelcomeAction">
<result>/web/success.jsp</result>
</action>
</package>
</struts>
--------------
I can get the struts blank project loaded just fine. When I deploy
my war file, the system gets angry at
me... I've been stuck on this problem for days now, any help
would be greatly appreciated!
--
View this message in context: http://www.nabble.com/-Struts-2--Unable-to-access-resources-tf4929583.html#a14109568
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] Unable to access resources
Posted by thecyth <th...@hotmail.com>.
Yep, it's in there. My directory structure is as follows:
/EcoSim/
/EcoSim/web (JSPs are here)
/EcoSim/META-INF
/EcoSim/WEB-INF/ (web.xml is here)
/EcoSim/WEB-INF/classes (struts.xml is here)
/EcoSim/WEB-INF/classes/actions (WelcomeAction.class is here)
/EcoSim/WEB-INF/lib (JARs are here)
nuwan chandrasoma-2 wrote:
>
> Hi,
>
> Where do you have your sturts.xml? is it inside the folder
> WEB-INF/classes/ ? if not you have to move the file to that folder and
> try.
>
> Thanks,
>
> Nuwan
>
>
--
View this message in context: http://www.nabble.com/-Struts-2--Unable-to-access-resources-tf4929583.html#a14112315
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] Unable to access resources
Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,
Where do you have your sturts.xml? is it inside the folder
WEB-INF/classes/ ? if not you have to move the file to that folder and try.
Thanks,
Nuwan
thecyth wrote:
> I typed this in:
>
> http://localhost:8080/EcoSim/WelcomeAction.action
>
> Same result:
>
> The requested resource (/EcoSim/WelcomeAction.action) is not available.
>
>
>
> nuwan chandrasoma-2 wrote:
>
>> Hi,
>>
>> Based on your struts.xml, i dont think you have a URL configured like this
>>
>> /EcoSim/web/welcome.action
>>
>> so why don't you type this URL in the browser and see what is the outcome
>>
>> /EcoSim/WelcomeAction.action
>>
>> Thanks,
>>
>> Nuwan
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] Unable to access resources
Posted by thecyth <th...@hotmail.com>.
I typed this in:
http://localhost:8080/EcoSim/WelcomeAction.action
Same result:
The requested resource (/EcoSim/WelcomeAction.action) is not available.
nuwan chandrasoma-2 wrote:
>
> Hi,
>
> Based on your struts.xml, i dont think you have a URL configured like this
>
> /EcoSim/web/welcome.action
>
> so why don't you type this URL in the browser and see what is the outcome
>
> /EcoSim/WelcomeAction.action
>
> Thanks,
>
> Nuwan
>
--
View this message in context: http://www.nabble.com/-Struts-2--Unable-to-access-resources-tf4929583.html#a14112243
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] Unable to access resources
Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,
Based on your struts.xml, i dont think you have a URL configured like this
/EcoSim/web/welcome.action
so why don't you type this URL in the browser and see what is the outcome
/EcoSim/WelcomeAction.action
Thanks,
Nuwan
thecyth wrote:
> I get this error message when I try to access ANY of the
> resources in my app.
>
> The requested resource (/EcoSim/web/welcome.action) is not
> available.
>
> Here's my setup:
>
> ------------------
> welcome.jsp:
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
> <head>
> <title>Please log-in...</title>
> </head>
> <body>
> <s:form action="WelcomeAction" method="POST">
> ...
> </s:form>
> </body>
> </html>
> ------------------
> 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 id="WebApp_9" 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">
> <display-name>EcoSim</display-name>
> <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>
>
> <welcome-file-list>
> <welcome-file>index.html</welcome-file>
> </welcome-file-list>
> </web-app>
> ------------------------
> struts.xml:
> <!DOCTYPE struts PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration
> 2.0//EN"
> "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts><!-- Configuration for the default package. -->
> <package name="actions" namespace="/"
> extends="struts-default">
> <action name="WelcomeAction"
> class="actions.WelcomeAction">
> <result>/web/success.jsp</result>
> </action>
> </package>
> </struts>
> --------------
>
> I can get the struts blank project loaded just fine. When I deploy
> my war file, the system gets angry at
> me... I've been stuck on this problem for days now, any help
> would be greatly appreciated!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org