Hai, can anybody help me to solve the problem javax.servlet.jsp.JspException:
Cannot retrieve mapping for action /pro.
if i replace the content in struts-config-product.xml to struts-config.xml.
it work. any idea???

web.xml

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/product</param-name>
<param-value>/WEB-INF/product/struts-config-product.xml</param-value>
</init-param>

struts-config-product.xml (product folder)

<?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>

<!-- Data Sources -->
<data-sources>
</data-sources>

<!-- Form Beans -->
<form-beans>
<form-bean name="productForm" type="app.ProductForm"/>
</form-beans>

<!-- Global Exceptions -->
<global-exceptions>
</global-exceptions>

<!-- Global Forwards -->
<global-forwards>
</global-forwards>

<!-- Action Mappings -->
<action-mappings>
<action path="/pro"
type="app.ProductAction"
name="productForm"
scope="request">
<forward name="success" path="/success.html"/>
</action>
</action-mappings>

</struts-config>

ProductForm.java

package app;

import org.apache.struts.action.ActionForm;

public class ProductForm extends ActionForm{
private int id;

public int getId(){
return id;
}

public void setId(int id){
this.id=id;
}
}

ProductAction.java

package app;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class ProductAction extends Action{
public ActionForward perform(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response){
ProductForm product=(ProductForm)form;
int iProduct=product.getId();
HttpSession session=request.getSession();
session.setAttribute("product",form);
return mapping.findForward("success");
}
}

thank you.
-- 
View this message in context: 
http://www.nabble.com/Create-multiple-struts-configuration-file-problem-tp18747180p18747180.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to