2

I use the jstl library in my project, but as an external jar. After exporting my project to a .war file, these libraries are not included and I'm getting errors. How do I make sure the library is included in my war file?

Also, an unrelated question, if an ear file would have only one war module, is there a point to making it an .ear instead of .war

joseph
  • 767
  • 3
  • 8
  • 16
  • Please refer to this: [How to build an executable jar with external jar][1] [1]: http://stackoverflow.com/questions/502960/eclipse-how-to-build-an-executable-jar-with-external-jar Hope this helps you. – user883769 Aug 09 '11 at 06:26

1 Answers1

1

If you have put the jstl jars inside WebContent directory they will be packed in your WAR file. But if you are loading them from somewhere else make sure that you have them in your export list (Project Properties -> Java Build Path -> Order and Export).

If you have an EAR file you can make some extra settings in your application.xml file, or even some container specific ones.

n0rm1e
  • 3,796
  • 2
  • 28
  • 37
  • I put them in WebContent but I couldn't add them to the project; they wouldn't show up when I clicked Add Jars. Export list didn't fix it either... – joseph Aug 09 '11 at 06:39
  • I fixed that, they are added in lib, but I am still getting an error. I am at my wit's end right now: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application – joseph Aug 09 '11 at 07:03