| Author |
Setting Classpath
|
MI Mohammed
Ranch Hand
Joined: Feb 16, 2005
Posts: 146
|
|
Hi, Pls can someone help me out.Am i deep shit. Ok. I tried to use java bean in my Jsp page. But the problem is the container can't find the bean class. The steps i used is as follows. 1. created a package c:\musa. 2. Wrote a BeanDemo Class to return and set String. and package statement. package com.mimoh.bean; 3. Went to my enviromental variable( WinXp) and added .;C:\musa 4. from my source folder at C:\source i compiled the code as follow javac -d C:\musa BeanDemo.java and got a compiled code at C:\musa\com\mimoh\bean\BeanDemo.class 5. Now the problem. When i tried to import it into my jsp page. Just got classNotFoundException. To check the problem, created a main() in the BeanDemo class and ran it with java -classpath c:\musa TryBeanDemo.java( Just instatiated the BeanDemo class. But still got the same result. pls least i forget, when i dir in the folder, the class was there. Never say it, just do it n show it SCJP 1.4
|
SCJA(Beta) SCJP 1.4 SCWCD 1.4 SCBCD 1.3 SCBCD 5.0 beta <br />The more practice we get, the better we are at the exams and in life in general. Pls join me at My DEN.
|
 |
Sergey Tyulkin
Ranch Hand
Joined: May 10, 2005
Posts: 87
|
|
|
Why don't you put your class to the web application's WEB-INF/classes directory?
|
 |
 |
|
|
subject: Setting Classpath
|
|
|