Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

action not found

 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers

i am new to struts. At the time of loading my application it throws
action servlet not found.
I think i am not started in proper way. How can i develop simple struts base application. Any one can able to give me the step by step process.

thanks in advance
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you define it in web.xml?
If you did, could you please post your work?
 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

this is my web.xml snipet

<?xml version="1.0" encoding="UTF-8"?>
<!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>WEBTURBO</display-name>

<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/conf/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>com.quixiz.webturbo.servlets.Log4jInit</servlet-class>
<init-param>
<param-name>log4j-init-file</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>15</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>start.jsp</welcome-file>
</welcome-file-list>

<taglib>
.........


and the struts-config.xml as bellow

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="loginForm" type="com.quixiz.webturbo.toolbox.forms.LoginForm" />
</form-beans>
<global-exceptions>
<exception key="login.error.notLoggedIn" path="/login-show.do" type="com.quixiz.webturbo.toolbox.exceptions.NotLoggedInException" />
</global-exceptions>
<global-forwards>
<forward name="error" path="pages.generalError" />
<forward name="failure" path="pages.generalError" />
</global-forwards>
<action-mappings>
<action forward="pages.login" path="/login-show" roles="anonymous" />
<action path="/language-change" roles="anonymous" type="com.quixiz.webturbo.toolbox.actions.LanguageChangeAction">
<forward name="success" path="/home-show.do" redirect="true" />
</action>
<action path="/login-init" roles="anonymous" type="com.quixiz.webturbo.toolbox.actions.LoginInitAction">
<forward name="success" path="/login-show.do" redirect="true" />
</action>
<action input="pages.login" name="loginForm" parameter="be.cora.sample.business.SecurityFacade;userAuthenticate" path="/login-validate" roles="anonymous" scope="request" type="com.quixiz.webturbo.actions.unnavigable.FacadeCallAction">
<forward name="success" path="/home-show.do" redirect="true" />
</action>
<action forward="pages.welcome" path="/home-show" />
<action forward="popup.myProfile" path="/myprofile-show" />
<action path="/logout" type="com.quixiz.webturbo.toolbox.actions.LogoutAction" roles="anonymous">
<forward name="success" path="/login-init.do" />
</action>
<action path="/refresh" type="com.quixiz.webturbo.actions.RefreshAction" />
<action path="/backToList" type="com.quixiz.webturbo.actions.navigable.BackToListAction" />
<action path="/nextRecord" type="com.quixiz.webturbo.actions.navigable.NextRecordAction" />
<action path="/prevRecord" type="com.quixiz.webturbo.actions.navigable.PreviousRecordAction"/>
<action path="/quick-search" type="org.apache.struts.scaffold.RelayAction">
<forward contextRelative="true" name="OP" path="/demo/operation-relay.do?dispatch=details" />
<forward contextRelative="true" name="USR" path="/demo/user-relay.do?dispatch=details" />
<forward contextRelative="true" name="auto" path="must_parse_displayId" />
</action>
</action-mappings>
<controller bufferSize="4096" contentType="text/html" locale="true" maxFileSize="10M" nocache="false" processorClass="com.quixiz.webturbo.toolbox.RequestProcessor" />
<message-resources null="false" parameter="com.quixiz.webturbo.resources.ApplicationResources" />
<message-resources null="false" parameter="be.cora.sample.resources.ApplicationResources" key="BC"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="moduleAware" value="true" />
<set-property property="definitions-config" value="/WEB-INF/defs/tiles-pages.xml, /WEB-INF/defs/tiles-components.xml, /WEB-INF/conf/tiles-config.xml" />
</plug-in>
<plug-in className="be.cora.sample.plugin.HibernatePlugIn" />
<plug-in className="com.quixiz.webturbo.plugin.WebTurboPlugIn">
<set-property property="defaultDatasource" value="ORACLE" />
<set-property property="maxRows" value="5" />
<set-property property="maxResultsetSize" value="1000" />
</plug-in>
</struts-config>


i cant able to find the error, help me
 
Peter Laurinec
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you dont include all struts .jar files to the tomcat \WEB-INF\lib directory.
Try starting to rename struts-blank directory to your own name application, this should provide solid start for your own application
(all necessary .jar and .tld files are already where they should be)

have fun
 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi peter
yes i placed struts.jar and all .tld files now i am getting error as


Sep 16, 2004 5:52:25 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Sep 16, 2004 5:52:25 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Sep 16, 2004 5:52:27 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='com.quixiz.webturbo.resources.ApplicationResources', returnNull=true
Sep 16, 2004 5:52:27 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='be.cora.sample.resources.ApplicationResources', returnNull=true
Sep 16, 2004 5:52:27 PM org.apache.struts.tiles.xmlDefinition.XmlDefinition resolveInheritance
SEVERE: Error while resolving definition inheritance: child 'pages.welcome' can't find its ancestor 'templates.page.noPane'. Please check your description file.
Sep 16, 2004 5:52:27 PM org.apache.struts.tiles.TilesPlugin init
SEVERE: Can't create Tiles definition factory for module ''.


what can i do
 
Peter Laurinec
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Huhuu something is a mess in there.
Well basically as I told you, just put struts-blank.war to you tomcatroot\webapps directory (on unpack it and copy in there yourself)
name it on your own, it HAVE TO be working without any problem.

Thats basic and very easy way for any beginner to start
(Its even adviced to start your application this way)

I hope this helped
 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

can u able to give me the URI of the .war file. Where can i download this

thanks
 
Peter Laurinec
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sundar Murthi:
Peter,

can u able to give me the URI of the .war file. Where can i download this

thanks


Hey. Sure i put it up on my page for you.
You can download it directly

from my webapage HERE
 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter

i got it . I am excecuted my first struts sample.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic