• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Bean could not be loaded by jsp

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i am using ant to create my war file and her is the syntax for the same.
<war destfile="${dest_home}/${warFileName}.war" webxml = "${warpath}/WEB-INF/web.xml">
<webinf dir="${warpath}/WEB-INF/">
<patternset id="wls" >
<include name="weblogic.xml"/>
</patternset>
</webinf>
<fileset dir="${warpath}/jsps/"/>
<fileset dir="${warpath}/WEB-INF/classes/"/>
<fileset dir="${warpath}/WEB-INF/lib/"/>
</war>
jsps folder --contains all jsp's
classes folder - all classes required.
War file is also deployed properly. but when i am hitting my first jsp i am getting this error.
class 'hello.sahil.hellobean' could not be loaded.
Need Help !
thanx
 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Questions:
1. Can you please show the code in your JSP?
2. Is your bean inside a package?
3. Are the class files being jarred?
 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx faisal for the reply..
but i have solved the problem..
problem was in the build.xml
i was not using the correct tags to create the war..
now i have it to this....
<war destfile="${dest_home}/${warFileName}.war" webxml = "${warpath}/WEB-INF/web.xml">
<webinf dir="${warpath}/WEB-INF/">
<patternset id="wls" >
<include name="weblogic.xml"/>
</patternset>
</webinf>
<fileset dir="${warpath}/jsps/"/>
<classes dir="${warpath}/WEB-INF/classes/"/>
<lib dir="${warpath}/WEB-INF/lib/"/>
</war>
and now it works fine.
 
I will suppress my every urge. But not this shameless plug:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic