I've written a javabean that connects to a database, downloads a file, and one of the getter methods returns the complete file path to the file.
The problem I have is: when the JSP runs and gets to the part where it gets the file path to pass to the taglib, I get an error message that is typical of a reference to a nonstatic variable. This concerns me as I thout getter methods in javabeans would inherently returns values that are valid instance variables in a JSP.
I will paste my getter method below, the JSP call to that method and the error message below: any guidance is welcome. Thank you:
Getter method in jsvabean (javabean compiles fine):
public String getTempFilePath() { this.downloadedfilename= tempFilePath; return this.downloadedfilename;
An error occurred at line: 97 in the jsp file: /web/radtickets/ticket_email_response/ticket_email_response_dispatcher_page.jsp Cannot make a static reference to the non-static method getTempFilePath() from the type RadTicketsFileDownloadForEmailAttachmentBean 94: 95: 96: <%-- /RadTicketsFileDownloadForEmailAttachment?attachmentId=${all_attachments_for_this_ticket_row.id}&fileName=${all_attachments_for_this_ticket_row.attachment_name} --%> 97: <mt:attach type="application/octet-stream" 98: name="${all_attachments_for_this_ticket_row.attachment_name}" 99: filename="<%= RadTicketsFileDownloadForEmailAttachmentBean.getTempFilePath() %>" /> 100: