• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to specify codebase for an applet running on a servlet page

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, here is the scenario I have.
I have a J2EE app. The url is: http://localhost/dnsmanager/report.screen. In the web/WEB-INF/web.xml, *.screen is mapped to TemplateServlet, and TemplateServlet is mapped to com.mycompany.j2ee.web.template.Template class which is resided in web/WEB-INF/classes folder. In the Template class, report.screen is forwarded to a physical JSP page web/docroot/report.jsp.
In the jsp page, I need display an applet ReportChart, the class of which is com.mycompany.j2ee.web.chart.ReportChart class which is resided in web/WEB-INF/classes folder. For the applet tag, I need specify the code base.
<applet code="com.mycompany.j2ee.web.chart.ReportChart.class" CODEBASE="???" width=460 height=300>
</applet>
What should I put for the codebase value? The applet specifies the codebase should be the diff dir between jsp page and applet class. I tried:
CODEBASE="" (no codebase)
CODEBASE="dnsmanager/web/WEB-INF/classes" (relative to web server root dir)
CODEBASE="../../../../../" (relative to Template file)
CODEBASE="../WEB-INF/classes" (relative to JSP file dir)
But none of them worked out -- always class not found error.
Urgent help is greatly appreciated.
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to put your applet class outside web-inf, and then give the appropriate codebase path.
HTH,
- Manish
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic