3

We are currently migrating from OC4J to Weblogic. We have an ANT script which builds the EAR file. The ANT also compiles and packs all the .jsp files into a jar. But when I tried to run the application on Weblogic it always returned 404 when trying to access .jsps. So I tried to add a mapping in web.xml for weblogic.servlet.JSPServlet for the URL pattern *.jsp, but I still get 404 when I try to access .jsps.

What could be the problem?

Thanks.

Bennyz
  • 623
  • 2
  • 18
  • 36
  • The following question might help. Make sure your WebLogic server supports Servlet 3.0. Else, JSPs must be in the war, not in a jar. http://stackoverflow.com/questions/5013917/can-i-serve-jsps-from-inside-a-jar-in-lib-or-is-there-a-workaround – JB Nizet Nov 17 '12 at 09:33
  • I checked with Google, and we're using Weblogic 10.3.* so it's Servlet 2.5. Anyway, the method I described in my original post worked for someone else, but we weren't able to determine why it wouldn't work for my application – Bennyz Nov 17 '12 at 12:48

1 Answers1

0

Your EAR file structure needs to be correct.

If you are deplying to WLS, you can deploy either an EAR or WAR seperately, however if you choose EAR file, you must have the the JSP's within the WAR file. You should only need to specify servlet and resource mapping within the web and context xml files.

You must also make sure that you have your .jar files in the library. Otherwise you can run into problems.

Let me know if you need more info.

Rhys
  • 2,807
  • 8
  • 46
  • 68