Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 9th, 2014, 12:57 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default No action instance for path /welcomeAction could be created

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
absolute path vs relative path for substitution group elements ptn77 XSLT 3 June 16th, 2011 10:04 AM
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 03:57 AM
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
Implementing the all-path shortest path problem bitwords XSLT 1 December 6th, 2006 10:37 AM
No action instance for path /UserActivator could b du-it JSP Basics 0 June 3rd, 2003 02:51 PM



All times are GMT -4. The time now is 11:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.