Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Method print(boolean) in JspWriter is not applicable for arguments (void)

807607Jan 25 2007 — edited Jan 25 2007
I have tested my code as java file, it works fine. However, when I try to use that as java beans, I am having this error message:
"An error occurred at line: 49 in the jsp file: /delete.jsp
Generated servlet error:
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)"
I have tried deleting (tmp and work folder) files for _jsp, same error message once the application server(JBoss) compiles the jsp files.
I have also tried using the code as servelet but it then shows me messages related to import statements I am using in the code. (I am using "File" class of java to delete certain files from a folder). The bean I am using is:
package formjavabean ;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Delete
{
public void deletion() //throws IOException
{

int i = 0 ;
String hold[] = {"ftn03", "ftn07", "ftn09"} ;

while (i < 3)
{
String fileName = "c:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\" + hold ;
File f = new File(fileName) ;
f.delete() ;
i++ ;
}

}
}
Then I am creating an instance of this(converted to byte code .class) in my jsp page as
<jsp:useBean class = "formjavabean.Delete" id = "DeleteId" scope = "session" /> in the head section of html tags, and then i am calling the method in the body tag of html as:
<%= DeleteId.deletion() %>
When I run the application, I get the error message listed above, and once again here as :
An error occurred at line: 49 in the jsp file: /delete.jsp
Generated servlet error:
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
thanks in advance for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2007
Added on Jan 25 2007
2 comments
1,395 views