alve da premettere che sono un neofita,vorrei un aiutino in merito al mio problema. ho trovato il seguente codice e il file giā compilato,ora vorrei fare delle modifiche,uso come editor NetBeans 4.1 qaundo scrivo il seguente codice
code
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class CntCurriculum extends HttpServlet {
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
RequestDispatcher rd =null;
String path=getServletContext().getRealPath(""); //recupera il path assoluto --rende cosė
path=path+"/"; //l'applicazione indipendent dal file System locale
// del container che la esegue --
// ********* individua l'azione da eseguire ************/
String pre=request.getParameter("pre");
String pdf=request.getParameter("pdf");
String xml=request.getParameter("xml");
String fwd="";
// ********** recupero dati del form.... ***************/
String[] dati_p=new String[14];
dati_p[0]=request.getParameter("nome-cognome");
dati_p[1]=request.getParameter("data-luogo");
dati_p[1]=request.getParameter("codice-fiscale");
dati_p[1]=request.getParameter("via");
dati_p[1]=request.getParameter("numero-civico");
dati_p[1]=request.getParameter("cap");
dati_p[1]=request.getParameter("comune");
dati_p[1]=request.getParameter("provincia");
dati_p[1]=request.getParameter("telefono");
dati_p[1]=request.getParameter("cellulare");
dati_p[1]=request.getParameter("e-mail");
dati_p[2]=request.getParameter("username");
dati_p[3]=request.getParameter("passsword");
dati_p[4]=request.getParameter("conferma-passsword");
// ********** creazione del file XML *******************/
WriteXML fox =new WriteXML();
// esegue l'azione richiesta dall' utente ****************************/
// if prewiew
if(pdf==null && xml==null)
fwd ="/registrazione.xml";
//if xml
else if ( pdf == null && pre == null )
{
request.setAttribute("p",path);
System.out.println("AAAAAAAAH"+path);
fwd ="/xml.jsp";
//ViewXml vvv=new ViewXml(path);
}
//if pdf
else
{
fwd ="/registrazione.pdf";
try {
File xmlfile = new File (path+"registrazione.xml");
File xsltfile = new File (path+"registrazione.xsl");
File pdffile = new File (path+"registrazione.pdf");
System.out.println("Input: XML (" + xmlfile + ")");
System.out.println("Stylesheet: " + xsltfile);
System.out.println("Output PDF" + pdffile + ")");
System.out.println();
System.out.println("Transforming...");
Xml2Pdf app = new Xml2Pdf();
app.convertXML2PDF(xmlfile, xsltfile, pdffile);
System.out.println("Success!");
}
catch(Exception e){System.err.println ("errore: "+e);
}
}
rd=request.getRequestDispatcher(fwd);
rd.forward(request, response);
}
}
fine code
mi dice che symbol :
constructor WriteXML()
location: class curr.WriteXML
WriteXML fox =new WriteXML();
dove sbaglio? grazie in anticipo.