Hi,
i have written a servlet application as follows :

import javax.servlet.HTTP.HttpServletRequest;
import javax.servlet.HTTP.HttpServletResponse;

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

public class SubmitAction extends Action
{
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
    {
        return mapping.findForward("success");
    }
}

But when I compile this file, the packages http, org.apache are not found.

Can any one please suggest me what to do to compile this file?

You are using parts of the Struts framework.
Either (and that's what I prefer as I don't like it one bit) ditch it or change your classpath to include the necessary jar file (which you should have if you installed Struts).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.