Link to home
Start Free TrialLog in
Avatar of bublathejuggla
bublathejuggla

asked on

HOW DO I SET THE PATH TO MY JAVABEANS VIA MY JSPs???

Hi All.
i am having a problem getting the server i am using (Brunhilde) to recognise where my javabeans are, resulting in an error due to it looking in the wrong place.

My JSPs are in the Tomcat directory and my javabeans are in the directory /tomcat/WEB-INF/classes/project1/

i have been advised to keep the javabeans as part of a package (called project1 in this case) and that the directory the javabeans go in must have the same name as the package.

The tag i am using to call the javabeans is:

<jsp:useBean id="mp3convert" class="project1.Mp3Encoder" scope="page"/>

The problem is, the server running under another directory ( /usr/jakarta-tomcat or something along these lines) is searching for the javabean files relative to itself rather than my user tomcat folder. how do i get it to refer to the files in my web directory rather than searching for a file elsewhere that doesnt exist?

please help
ASKER CERTIFIED SOLUTION
Avatar of polmint
polmint

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of polmint
polmint

Hi bublathejuggla,

After you write the useBean  tag are u setting the property for the Bean id?

If not set the property as below.

<jsp:useBean id="mp3convert" class="project1.Mp3Encoder" scope="page"/>
<jsp:setProperty name="mp3convert" property="*"/>

Hope this should solve your problem.

If it doesnt solve - kindly let me know how your are physically storing files in what directories on the tomcat server.

Thanks
hi bublathejuggla,

you havent come back on your query. Could u solve it.

Thanks,