Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

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
0
bublathejuggla
Asked:
bublathejuggla
  • 3
1 Solution
 
polmintCommented:
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
0
 
polmintCommented:
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
0
 
polmintCommented:
hi bublathejuggla,

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

Thanks,
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now