简体   繁体   English

使用Weblogic JSPServlet查看JSP

[英]Viewing JSPs with Weblogic JSPServlet

We are currently migrating from OC4J to Weblogic. 我们目前正在从OC4J迁移到Weblogic。 We have an ANT script which builds the EAR file. 我们有一个ANT脚本来构建EAR文件。 The ANT also compiles and packs all the .jsp files into a jar. ANT还将所有.jsp文件编译并打包到jar中。 But when I tried to run the application on Weblogic it always returned 404 when trying to access .jsps. 但是当我尝试在Weblogic上运行应用程序时,它总是在尝试访问.jsps时返回404。 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. 所以我尝试在web.xml中添加weblogic.servlet.JSPServlet的映射以获取URL模式* .jsp,但是当我尝试访问.jsps时仍然得到404。

What could be the problem? 可能是什么问题呢?

Thanks. 谢谢。

Your EAR file structure needs to be correct. 您的EAR文件结构必须正确。

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. 如果您要使用WLS,则可以单独部署EAR或WAR,但是如果选择EAR文件,则必须在WAR文件中包含JSP。 You should only need to specify servlet and resource mapping within the web and context xml files. 您应该只需要在Web和上下文xml文件中指定servlet和资源映射。

You must also make sure that you have your .jar files in the library. 您还必须确保库中包含.jar文件。 Otherwise you can run into problems. 否则你可能会遇到问题。

Let me know if you need more info. 如果您需要更多信息,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM