Glassfish我在哪里将classloader委托选项设置为false [英] Glassfish where do I set classloader delegate option to false

查看:139
本文介绍了Glassfish我在哪里将classloader委托选项设置为false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序(在glassfisch 3.1.2上运行),在其中遇到了ClassCastException.我想尝试通过将classloader委托设置为false来解决它们. 我不知道要在哪里(哪个文件)插入以下xml标记

I have a web application (running on glassfisch 3.1.2) where I'm facing ClassCastException. I would like to try to solve them by setting the classloader delegate to false. I'm not able to figure out where (what file) to insert following xml tag

<class-loader delegate="false" />

Google说要把它放到glassfish-web.xml中,但是我的项目(Netbeans 8.0.1)和服务器安装中都没有这样的文件. 可以指导我吗?

Google says to put that to glassfish-web.xml but I haven't got any such a file in my project (Netbeans 8.0.1) nor on server installation... Can some direct me?

谢谢

推荐答案

该文件必须位于WEB-INF文件夹中.

The file has to be in the WEB-INF folder.

在NetBeans中,您可以右键单击WEB-INF文件夹,选择NewGlassfish Descriptor.这应该会自动创建正确的文件.

In NetBeans you can right-click the WEB-INF folder, choose New and Glassfish Descriptor. This should automatically create the correct file.

如果这不起作用,则可以在此文件夹中创建一个新的xml文件.它必须看起来类似于:

If this doesn't work, you can just create a new xml file in this folder. It has to look similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
  <class-loader delegate="false"/>
</glassfish-web-app>

这篇关于Glassfish我在哪里将classloader委托选项设置为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆