hi all

when iam executing tthis code iam getting error plzzzzzz help me urgent





package com.vl.hr.resume.action;



import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.io.OutputStream;

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

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

import org.apache.log4j.Logger;


import com.vl.hr.util.common.CommonExceptionHandler;

import com.vl.hr.myprofile.values.EmployeePrimaryInformation ;
import com.vl.hr.myprofile.values.EmployeeGeneralInformation;
import com.vl.hr.myprofile.values.EmployeePersonalInformation;
import com.vl.hr.myprofile.values.EmployeeProfInformation;
import com.vl.hr.myprofile.values.EmployeeEducationInformation;
import com.vl.hr.myprofile.values.EmployeePreExperienceInformation;
import com.vl.hr.myprofile.values.EmployeeProfile;
import com.vl.hr.myprofile.values.EmployeeSkillsInformation;
import com.vl.hr.myprofile.values.EmployeeAwardsInformation;
import com.vl.hr.myprofile.values.EmployeeProjectHistory;

import org.apache.poi.hwpf.HWPFDocument;




public final class GenerateWordfile extends HWPFDocument {


   private static Logger log = Logger.getLogger(GenerateWordfile.class);

   public ActionForward execute(ActionMapping mapping,
                           ActionForm form,
                           HttpServletRequest request,
                           HttpServletResponse response)
   throws IOException, ServletException {
       HttpSession session=request.getSession(false);

        try  {

                       if(session!=null) {

                             PrintWriter out = response.getWriter();



                              /*
                               * to display the values in MS WORD format
                               */
                             response.setContentType("application/msword");



                             /*
                               * creating an object for  HWPF Document  {
HWPF_doccument_obj }
                               */
                            HWPFDocument  HWPF_doccument_obj = new
HWPFDocument();









                             EmployeeProfile
emp_profile=(EmployeeProfile)session.getAttribute("data");

                               if(emp_profile.emp_primary_info!=null)
                                       {
                                           EmployeePrimaryInformation
epi=emp_profile.emp_primary_info;

                                           String name=epi.firstname;

                                           OutputStream output_stream_obj =
new DataOutputStream(name);


HWPF_doccument_obj.write(output_stream_obj);
                                           //out.println(epi.firstname);
                                       }
                               return mapping.findForward("success");

                        }
                        else {
                           log.warn("session failed");
                           return mapping.findForward("SessionFailure");
                        }

           } catch(Exception e) {
                     return CommonExceptionHandler.getExceptionAction
("GenerateWordfile",mapping,request,e,null,"images/report_l.jpg");
              }


   }
}


error is :




C:\Tomcat files\hraccess\build\build.xml:45: Compile failed; see the
compiler er
ror output for details.

Total time: 3 seconds
C:\Tomcat files\hraccess\build>ant package
Buildfile: build.xml

init:

compile:
  [delete] Deleting: C:\Tomcat
files\hraccess\src\properties\properties\Structu
re.xml
    [copy] Copying 1 file to C:\Tomcat
files\hraccess\src\properties\properties

   [javac] Compiling 7 source files to C:\Tomcat
files\hraccess\dist\classes
   [javac] C:\Tomcat
files\hraccess\src\java\com\vl\hr\resume\action\GenerateWo
rdfile.java:71: cannot resolve symbol
   [javac] symbol  : constructor HWPFDocument ()
   [javac] location: class org.apache.poi.hwpf.HWPFDocument
   [javac]                              HWPFDocument  HWPF_doccument_obj =
new
HWPFDocument();
   [javac]
^
   [javac] C:\Tomcat
files\hraccess\src\java\com\vl\hr\resume\action\GenerateWo
rdfile.java:89: cannot resolve symbol
   [javac] symbol  : class DataOutputStream
   [javac] location: class com.vl.hr.resume.action.GenerateWordfile
   [javac]
               OutputStream output_stream_obj = new DataOutputStream(name);
   [javac]
                                                        ^
   [javac] 2 errors

Reply via email to