Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

carrying WAR to another server  RSS feed

 
Steve Yu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a silly question, but I still want to confirm ---

class A imports and uses class B, class C is standalone. After successful compilation, I "jar -cvf A_and_C.war A.class C.class" where class B is missing. Then I move A_and_C.war to another servlet container, in that container, do I have to add "B.class" in the server's classpath ?
 
Richard Bradford
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, if Class B is a Class created by you or a third party (ie not part of java runtime) then you will need to move it to the new server environment also.
If it is included in a jar file then you can include it as part of your .war file in the WEB-INF\lib folder.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!