Hi Daniel,
You need to place the variable before the init method, which should look
like this after you've done it:
private String realImageFilePath;
private static final String IMAGE_URL =
"/resources/image-file";
public void init() {
super.init();
}
Hope this helps.
--James
Daniel Kam wrote:
> I'm learning JSP with NetBeans and I like it.
> So, far all the tutorials are great, except for a couple of glitches.
> Nothing fancy, I'm just trying to follow the tutorial's instructions
> to the letter.
>
> I'm stuck on: "Uploading Files in NetBeans Visual Web JSF
> Applications."
http://www.netbeans.org/kb/60/web/fileupload.html>
>
> "Scroll up to the |init()| method and add the following two variables
> *before the method*.
>
> *Code Sample 1: Variables*
> *private String realImageFilePath;
> private static final String IMAGE_URL = "/resources/image-file";*
>
> "
>
> I'm not sure what "before the method" means. In other sections there
> is a graphic showing exactly where to paste the code. Where exactly do
> these lines go?
>
> I get errors because of this line: image1.setUrl(IMAGE_URL);
>
> The symbols cannot be found and the program won't build.
>
> Any help?
>
> ty
>