janunme
06-29-2007, 05:35 PM
hi to all,
i am facing problem while developing struts based web application i am giving the setps what i followed:
1. created a folder with a name swapp and copied struts-balnk.war
2. extracted struts-blank.war
3. copy and pasted struts.jar and servlet-api.jar
4. i developed my own action calss and code as follows:
<code>
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class ActionOne extends Action
{
public ActionForward execute(ActionMapping mapping,HttpServletRequest req,HttpServletresponse res) throws Exception
{
//code to perform some action
return mapping.findForward("fone");
}
}
</code>
and i developed my jsp page as follows:
<code>
hi this is my jsp code
</code>
i compiled my action calss and copied it in to WEB-INF\classes folder
i edited struts-config.xml and added the following action code:
<action-mapping>
<action path="/aone" type="ActionOne">
<forward name="fone" path="/genop.jsp"/>
</action-mapping>
and i started my tomcat server and typed the following uti:http://localhost:8000/swapp/aone.do
but i am getting a blank page not jsp page output.
in the whole process i di not get any errors.
can any one tell me where i am going wrong
regards
i am facing problem while developing struts based web application i am giving the setps what i followed:
1. created a folder with a name swapp and copied struts-balnk.war
2. extracted struts-blank.war
3. copy and pasted struts.jar and servlet-api.jar
4. i developed my own action calss and code as follows:
<code>
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class ActionOne extends Action
{
public ActionForward execute(ActionMapping mapping,HttpServletRequest req,HttpServletresponse res) throws Exception
{
//code to perform some action
return mapping.findForward("fone");
}
}
</code>
and i developed my jsp page as follows:
<code>
hi this is my jsp code
</code>
i compiled my action calss and copied it in to WEB-INF\classes folder
i edited struts-config.xml and added the following action code:
<action-mapping>
<action path="/aone" type="ActionOne">
<forward name="fone" path="/genop.jsp"/>
</action-mapping>
and i started my tomcat server and typed the following uti:http://localhost:8000/swapp/aone.do
but i am getting a blank page not jsp page output.
in the whole process i di not get any errors.
can any one tell me where i am going wrong
regards