Dave:
Like I said, I'm using Eclipse, so I don't really know where everything
ends up on the server. I've set the default class directory to <project
root>/build/classes, and that's where struts.xml is. The default content
root is <project root>/content, if that's any help.
Alberto:
Yes, I have a <project root>/classpath folder, and it seems to be the
same as <project root>/build/classes, because when I edit
classpath/struts.xml, build/classes/struts.xml recieves the same change.
What's strange about all this is that struts reads <constant
name="struts.devMode" value="true" /> and goes into devMode, but doesn't
find my actions...
/Emil
Dave Newton wrote:
You never answered the question about where you were deploying it to: are you
deploying it to the root context?
Dave
Alberto Flores skrev:
I just tried both on my own terminal and these work just fine. Here is
a layout of my war:
foo
- WEB-INF
-lib
struts2-core.jar (and the other 3 minimum jars you need)
-classes
-struts.xml
-jsp
-page
-home.jsp
-web.xml
you said you have a classpath folder?
Emil Lundberg wrote:
Yes, it is configured to intercept all requests, and I wouldn't get a
Struts error message if the FilterDispatcher didn't launch, would I?
And I did post my struts.xml and the URL, but Mr. Dave didn't include
it in his reply. Both http://localhost/home.action and
http://localhost/random.action return the same error message, see my
first post.
---classpath/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>
<constant name="struts.devMode" value="true" />
<package name="default" namespace="/" extends="struts-default">
<action name="home"
class="my.package.web.struts.action.HomeAction">
<result>/WEB-INF/jsp/page/home.jsp</result>
</action>
<action name="random"
class="my.package.web.struts.action.HomeAction">
<result>/WEB-INF/jsp/page/home.jsp</result>
</action>
</package>
</struts>
------end struts.xml------
---content/WEB-INF/web.xml---
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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>MyProject</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<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>
</web-app>
---------end web.xml---------
Carlos Luis Zúñiga Sibaja wrote:
Is the Struts Dispatcher configured in your web.xml to intercept all
requests?
Carlos Luis Zúñiga Sibaja
__________________________
[EMAIL PROTECTED]
divide et impera...
Alberto A. Flores wrote:
please post your struts.xml and the url you are trying to hit. Your
web.xml
relevant part will also behelpful ...
On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg
<[EMAIL PROTECTED]>wrote:
That's strange... When i set <constant name="struts.devMode"
value="true"
/> in struts.xml, struts goes into devMode, but still doesn't find
my action
mappings. Did I do something wrong? I've worked with struts before
but I
just can't seem to get this right for some reason... Could it have
something
to do with that I'm not using Spring yet in this project?
/Emil
Dave Newton wrote:
--- On Mon, 9/22/08, Emil Lundberg <[EMAIL PROTECTED]> wrote:
I'm having a problem with Struts2 in Eclipse. I've
set all the JARs up and the FilterDispatcher launches
properly. The problem is that it seems my struts.xml is never read,
because I keep getting a message saying "There is no Action
mapped for
namespace / and action
name home. - [unknown location]" when trying to access
http://localhost/home.action (yes, Tomcat is configured to port 80).
I've searched all over for a week or so but I still haven't found a
solution. I think the problem is where I put struts.xml or some
configuration somewhere.
Are you deploying it to the root application context?
If you put struts.xml at the root of your source directory it
should be
deployed properly.
If you haven't already, turn on devMode. You can also set the
XWork and S2
logging to DEBUG to get more of an idea what's happening with the
configuration.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]