struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Etingin, Eugene" <Eugene.Etin...@bnymellon.com>
Subject No action instance for path /welcomeAction could be created
Date Wed, 09 Apr 2014 16:24:55 GMT
Dear Struts Experts


Can somebody please help me with this problem? I am deploying war file on Weblogic. The application
is done with Struts,

struts-config

<action-mappings>
<action path="/welcomeAction" type="com.refdata.welcome.WelcomeAction">
<forward name="welcomePage" contextRelative="true" path="/resources/jsp/common/index.jsp"/>
</action>

WelcomAction.java

/**
* <p><component description>. 
* </p>
* <br><br>
* 
* Name Date Description 
* ----------------------------------------------------------<br> 
* 
*/

package com.refdata.welcome;

import com.refdata.common.Constants;
import com.refdata.common.RDMException;
import com.refdata.common.SessionInfo;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

public class WelcomeAction extends Action {
final Log log = LogFactory.getLog("com.refdata.welcome");



public WelcomeAction() {
}

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, 
HttpServletResponse response) throws IOException, 
ServletException {
System.out.println("I am in WelcomeAction");
SessionInfo sessionInfo = new SessionInfo();
HttpSession session = request.getSession(false);
// HttpSession session = null;
ActionErrors errors = new ActionErrors();
String returnPage = null;

try {
if (session.isNew()) {
session = request.getSession();
}

String userId = (request.getParameter("User_Id") == null ? "Guest" : request.getParameter("User_Id"));
//String userEdit = userId == "Guest"?"N":"Y";
String userEdit = (request.getParameter("user_edit") == null) ? "N" : request.getParameter("user_edit")
;
String sessionId = session.getId();
long currDateTime = System.currentTimeMillis();
Date myDate = new Date(currDateTime);
SimpleDateFormat dateFormat = new SimpleDateFormat(Constants.DATE_FORMAT);
sessionInfo.setUserId(userId);
sessionInfo.setUserEdit(userEdit);
sessionInfo.setStrSessionId(sessionId);

sessionInfo.setBusinessDate(dateFormat.format(myDa te));
session.setAttribute("SessionInfo", sessionInfo);
returnPage = "welcomePage";
}
catch (Exception e) {
RDMException rdmEx = new RDMException(e);
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionError("error.systemError.label1"));
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionError("error.systemError.label2", rdmEx.getMessage()));
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionError("error.systemError.label3", rdmEx.getExceptionTrail()));
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionError("error.commonMessage.label"));
saveErrors(request, errors);
returnPage = "errorPage";
}

return mapping.findForward(returnPage);
}
}

web.xml
<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/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Struts Action Servlet Mappings -->
<!-- Note that because Struts takes the *last* mapping here as the extension to add to
actions posted from forms, we must have *.do come after *.jpf. -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

URL

http ://localhost:7001/RDM/welcomeAction.do

I would greatly appreciate any help

Thank you

Eugene 


The information contained in this e-mail, and any attachment, is confidential and is intended
solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any
attachment, or any information contained therein, by any other person is not authorized. If
you are not the intended recipient please return the e-mail to the sender and delete it from
your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not
guarantee that either are virus-free and accept no liability for any damage sustained as a
result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to
European legal entities.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message