Hello I have this..
I have a Scrip with name MiScript.jsp and code....
<%@ include file="Func.jsp" %>
<jsp:include page="Func.jsp"/>
<%
String Mipath = "C:\\";
String Mifile = "File.Ext";
if(mifuncion(Mipath , Mifile )) {
out.println("OK!!!");
} else{
out.println("ERROR!");
}
%>
And I have the other Script Func.jsp with a Method....
<%@ page import="java.lang.*" %>
<%@ page import="java.io.*" %>
<%@ page language="java" %>
<%! boolean mifuncion(String Arg1, String Arg2){
try {
FileOutputStream fileOut = new FileOutputStream(Arg1+Arg2);
fileOut.write("hola");
fileOut.flush();
fileOut.close();
return true;
} catch (FileNotFoundException fnfe) {
out.write(fnfe.toString());
} catch (EOFException eofe) {
out.println(eofe.toString());
} catch (IOException ioe) {
out.println(ioe.toString());
}
return false;
%>
I have error using out.write and/Or out.println