| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/06/2006 14:47:40
|
Anonymous
|
Code:
javax.servlet.ServletException: Could not find action for actionName: preeespelho
org.mentawai.core.Controller.service(Controller.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Não existe força nesse mundo que faz meu controller achar o meu action.
Alguem me ajuda ..... Ja chequei 5 mil vezes minhas classes e ele não acha nem sobre tortura.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/06/2006 15:06:19
|
saoj
![[Avatar]](/images/avatar/d3d9446802a44259755d38e6d163e820.png)
Joined: 01/07/2005 09:59:17
Messages: 2808
Location: Rio de Janeiro, RJ
Offline
|
Posta aqui o seu web.xml e o seu ApplicationManager.java
|
Sergio Oliveira
AAA
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/06/2006 15:13:00
|
Anonymous
|
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>
<display-name>Nome</display-name>
<servlet>
<servlet-name>Controller</servlet-name>
<servlet-class>org.mentawai.core.Controller</servlet-class>
<init-param>
<param-name>applicationManager</param-name>
<param-value>br.com.telenews.control.ApplicationManager</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>*.mtw</url-pattern>
</servlet-mapping>
</web-app>
Code:
public class ApplicationManager extends ApplicationManager {
public void init(Context application) {
// Injeta no objeto de DAO generico o DAO do Hibernate
ioc("gdao", HibernateGenericDAO.class, REQUEST);
ioc("espelhodao", DAOEspelho.class, REQUEST);
}
public void loadActions() {
// Filtro global que controla as transações Hibernate
filter(new HibernateTransactionFilter());
// Filtro global de Inversão de Controle
filter(new IoCFilter());
// Filtro global que injeta valores direto na action
filter(new InjectionFilter());
//Essa action trata a ação preespelho.exibe
ActionConfig ac = new ActionConfig("/preespelho",PreEspelhoAction.class);
ac.addConsequence(SUCCESS, new Forward("/preespelho.jsp"));
ac.addConsequence(ERROR, new Forward("/error.jsp"));
addActionConfig(ac);
}
public void loadLocales() {
LocaleManager.add(new Locale("pt", "BR"));
}
}
A classe PreEspelhoAction e o link na hora que chamo a ação fica http://localhost:8080/Aplicacao/preeespelho.mtw. Eu não entendo porque o controller fala que não existe action para o preeespelho.
Vlw
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/06/2006 15:15:54
|
Anonymous
|
A classe PreEspelhoAction e o link na hora que chamo a ação fica http://localhost:8080/Aplicacao/preeespelho.mtw. Eu não entendo porque o controller fala que não existe action para o preeespelho.
*A classe PreEspelhoAction existe e o link que chama a ação fica assim http://localhost:8080/Aplicacao/preeespelho.mtw. Eu não entendo porque o controller fala que não existe action para a ação preeespelho.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 09/06/2006 10:09:11
|
Anonymous
|
Já achei o erro.
Ontem eu estava muito cansado e com dor de cabeça, ai hoje foi só sentar na cadeira que vi o grande vascilo.
Vlw ... brigado!
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11/02/2010 06:44:20
|
logicalusman
Joined: 11/02/2010 06:19:51
Messages: 5
Offline
|
I have got the same problem ..
// my ApplicationManager is residing at the package root (no package)
// loadActions
public void loadActions()
{
System.out.println("ApplicationManager.loadActions:: Mapping actions");
setDebugMode(true);
ActionConfig ac = new ActionConfig("/feeds", FeedModule.class,"getFeed");
addActionConfig(ac);
System.out.println("ApplicationManager.loadActions():: Finished");
}
// FeedModule
public class FeedModule extends BaseAction {
public String getFeed()
{
String jsonFeed = "{name: \"this is a sample feed\" }";
System.out.println("hello here");
return SUCCESS;
}
}
// web.xml
<web-app>
<servlet>
<servlet-name>Controller</servlet-name>
<servlet-class>org.mentawai.core.Controller</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>*.mtw</url-pattern>
</servlet-mapping>
</web-app>
my url is http://localhost:8080/ws/feeds.mtw
This is what i get
SEVERE: Servlet.service() for servlet Controller threw exception
javax.servlet.ServletException: Could not find action for actionName: Feeds
at org.mentawai.core.Controller.service(Controller.java:555)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Anyone have an idea about what is getting wrong?
thanks
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 04/03/2010 12:52:32
|
spinow
![[Avatar]](/images/avatar/58ae749f25eded36f486bc85feb3f0ab.jpg)
Joined: 22/07/2008 15:39:02
Messages: 58
Offline
|
ActionConfig ac = new ActionConfig("feeds", FeedModule.class,"getFeed");
right?
|
 
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 04/03/2010 13:15:55
|
IceW0lf
![[Avatar]](/images/avatar/7cbbc409ec990f19c78c75bd1e06f215.jpg)
Joined: 16/03/2006 08:33:38
Messages: 1540
Location: Brasília
Offline
|
I beleave.... You has set this in your ApplicationManager
Code:
ActionConfig ac = new ActionConfig("/feeds", FeedModule.class,"getFeed");
addActionConfig(ac);
And you are requesting that:
http://localhost:8080/ws/feeds.mtw
I believe that is correct for your url.
http://localhost:8080/ws/feeds.getFeed.mtw
When you requesting....
http://localhost:8080/ws/feeds.mtw
by default the method will be required execute and you not have this setting...
|
Leiber Wallace
Voixy ::: Soluções em Telecomunicações |
|
|
 |
|
|