package javax.faces.context does not exist

i get the following errors when trying to compile my class

package javax.faces.context does not exist

package javax.faces.component does not exist

package javax.faces.validator does not exist

i'm really new to this and i do not know what this means

i hope someone can help me

this is my really simple code

package ourdemo;

import javax.faces.context.*;

import javax.faces.component.*;

import javax.faces.validator.*;

publicclass player

{

String firstname;

String lastname;

publicvoid setfirstname(String a)

{ firstname=a;}

public String getfirstname()

{return firstname;}

publicvoid setlastname(String b)

{ lastname=b;}

public String getlastname()

{return lastname;}

publicvoid changeName()

{ lastname = firstname+" "+lastname;}

}

[1864 byte] By [shuinia] at [2007-10-3 9:11:21]
# 1
Please check whether you have all jsf jars in your classpath
geesasia at 2007-7-15 4:23:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hello,

nornaly this kind of errors happens, when the compiler isn't able to find the classes which it needs to compile your sourcecode. What you have to do is to say the compiler where it can find the sourcecodes. This means you have to put the jars into you classpath. you find the jars in the lib-directory of the jsf-directory which you downloaded. after unzipping the jsf-directory you will see it.

if you use eclipse you go with you mouse to your workingdirectory, click with the right

button on that directory ,choose properties then on the left you choose " java build path" and than on the right the libraries. Here you choose " add external jars" so you will have to direct to the jars. your are done.

But if you don't use eclipse, you have to put those jars in your classpath, in the environment of windows.

bye hamid

hamidagaa at 2007-7-15 4:23:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
thanksi just copied the jsf jars to the java folder/jre/lib/extbut thanks for pointing me to the right direction.thanks
shuinia at 2007-7-15 4:23:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...