hi guys... i m making a simple application which consists of a bean,servlet and jsp. i have make bean objects in servlet class and my first jsp calls that servlet just to initiate the servlet then the servlet will make beans and forward htem to another jsp.Thats all abt it. Now the problem is that when i tries to compile servlet it fails and he error says that "can not resolve symbol" ...on MyBean. this means servlet cant find the bean class. I have make a test folder in c drive and he hierarchy is as follows: C:\test\WEB-INF\classes\test\ in this test folder in classes folder i have placed MyServlet.java and MyBean.java and MyBean.class
I dont know wat the problem is.. plz help me asap.. thanx
Hi By the information you have provide I feel problem would be in setting the classpath. Make sure you have set the root folder (C:\test\WEB-INF\classes\test\) where the class file are created is in the classpath. Hope this tip help you. -Arun
Thanx Arun... now i have changed the over all class' layout.. I have put servlet in Tomcat 4\webpapps\examples\web-inf\classes\MyServlet.java and the bean iin Tomcat 4\webpapps\examples\web-inf\classes\Bean\MyBean.class and MyBean.java both are here.
no other changes in classpath..i think tomcat 4 sets its classpath by default so nothing added in autoexec.bat by me.
At compile time it is important that the mode(command line or some IDE) in which you are compiling have the relevent classpath set. Ofcouse your webserver (tomcat in your case)would look for this path when it is excuting your compiled source code. -Arun
ok thanx Arun i got it solved.. but now i want to call the servlet from jsp..infact forward control to servlet but it says no servlet class found..i have kept jsp in jsp foleder while servlet n bean are in testbean packge. pzl help