You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jason H. Kim" <ja...@qett.com> on 2001/02/19 19:25:18 UTC
version 1.0 ActionMapping error
I have used Struts 0.5 for more than 6 months now without any problem, so we
decided to go with version 1.0 for our next project. However, I can't get
this 1.0 site to work. Following is the servlet.log error message when I
tried to execute a login servlet.
Context log path="" :action: Processing a GET for /login.do
Context log path="" :action: Looking for Action instance for class
com.qett.time.servlet.AutoLoginAction
Context log path="" :action: Double checking for Action instance already
there
Context log path="" :action: Creating new Action instance
Context log path="" :action: Error creating Action instance for path
'/login.do', class name 'com.qett.time.servlet.AutoLoginAction'
and following is the part of struts-confid.xml where the /login.do mapping
is defined.
<action-mappings>
<action path="/input/login.do"
type="com.qett.time.servlet.AutoLoginAction">
<forward name="success" path="/timesheet.jsp"/>
</action>
<action path="/hour.do"
type="com.qett.time.servlet.HourInputAction"
name="timeBean"
scope="request"
input="index.jsp"
validate="true">
<forward name="success" path="/html-multibox.jsp"/>
</action>
</action-mappings>
</struts-config>
I am aware of the /*/*.do error from the bugzilla site, but from looking at
the servlet.log file, I am pretty sure that struts framwork knew that it
should execute *.time.servlet.AutoLoginAction..
Following is the part of JSP code which called the mapping.
<logic:present parameter="user_auth" scope="request" >
<logic:redirect forward="autologinaction" />
<!-- ABOVE LINE IS THE CALL TO THE MAPPING -->
</logic:present>
<logic:notPresent parameter="user_auth" scope="request" >
<logic:redirect forward="error" />
</logic:notPresent>
in struts-config.xml, there's global forward mapping for "autologinaction",
which is mapped to /input/login.do
I have tried to map it to login.do, and login, but those didn't work.
I would like to know what I am missing and how I can make it properly create
an instance of the action class.
Thank you very much in advance!!!