测试本地时清单不匹配的代码库属性 [英] Codebase attribute in manifest mismatch when testing local

查看:159
本文介绍了测试本地时清单不匹配的代码库属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Java 1.7u25,您应该将 Codebase 属性添加到清单中,我已经完成了。

As per Java 1.7u25 you should add the Codebase attribute to your manifest and I have done that.

但现在我可以'在本地测试它,因为属性值与我的本地JNLP不匹配,由Netbeans生成,没有代码库值。

But now I can't test it locally as the the attribute value does not match my local JNLP, generated by Netbeans, wich have no codebase value.

清单应该有什么价值对于它的Codebase和/或我在jnlp中作为代码库有什么能让它在本地工作?

推荐答案

有几种方法可以解决这个问题:

There's a few ways to approach this:


  1. 使用多个代码库属性:

您可以为 Codebase 属性提供多个值,从而允许您添加本地地址。

You can supply multiple values to the Codebase attributes, thus allowing you to add local addresses as well.

例如:代码库:myproductiondomain.com localhost 127.0.0.1

使用通配符:

您还可以在代码库属性中使用通配符属性,哪个可以多种形式:

You can also use a wildcard attribute in the Codebase attribute, which can have multiple forms:


  • 例如。 代码库:127.0.0.1 (注意,这不允许你使用 localhost !!)

  • 例如一个更宽松的代码库:*

  • e.g. Codebase: 127.0.0.1 (beware, that doesn't allow you to use localhost!!)
  • e.g. a much more lenient Codebase: *

构建更改:

但更有可能的是,您应修改构建系统以使用不同的代码库生成测试和生产版本属性以防止滥用。

But more likely, you should modify your build system to produce a test and a production version using different Codebase attributes to prevent abuse.

您需要的一切都在防止RIA重新调整用途

支付对于 127.0.0.1 条目,对于 127.0.0.1 条目,请注意那个有趣的花絮:

Pay extra attention to that fun tidbit in the table of accepted wildcard saying, for the 127.0.0.1 entry:


不匹配 [...] http:// localhost

这篇关于测试本地时清单不匹配的代码库属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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