Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can applet use the jar file in the WEB-INF/lib

 
Kidd He
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My applet is in the root of my application-----myapp/
But it will call a class in another package which will also be imported by the classes in the WEB-INF/classes.So I make that package into a jar file and put tha jar in the WEB-INF/lib.
When I run myapp, the applet can't work correctly,but the class in the WEB-INF/classes work well.Why?
If the applet can't call the classes in the WEB-INF/lib or WEB-INF/classes, how can I achieve the following function: the applet and the class in the WEB-INF/classes can call a class file together?
Thank you!!!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. See my post in this similar thread.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking why a file running on a client machine can't access a file running on the server?

An applet runs on the client JVM. Servlets and related code run on the Server. Those are two totally different JVMs. That's a big problem.

-Cameron McKenzie
 
Kidd He
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks you all!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic