Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean could not be loaded by jsp  RSS feed

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • 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
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!