小编use*_*755的帖子

将应用程序从Eclipse部署到GlassFish

我正在尝试从Eclipse部署应用程序到GlassFish 4服务器,但是我收到此错误:

cannot Deploy elearning
deploy is failing=Application with name [elearning] is not deployed
Run Code Online (Sandbox Code Playgroud)

在glassfish日志文件中没有错误,也没有关于部署的信息.但是在eclipse日志中,存在以下错误:

!ENTRY oracle.eclipse.tools.glassfish 1 1 2014-11-17 16:30:51.474
!MESSAGE GlassFish: Deploy direcotry C:\glassfish4\glassfish\domains\domain1\eclipseApps\elearning

!ENTRY oracle.eclipse.tools.glassfish 4 1 2014-11-17 16:30:51.599
!MESSAGE GlassFish: deploy is failing=
!STACK 0
java.lang.Exception: deploy is failing=Application with name [elearning] is not deployed
    at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate.publishDeployedDirectory(GlassfishServerBehaviourDelegate.java:612)
    at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModuleForGlassFishV3(GlassfishV4ServerBehavior.java:96)
    at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModule(GlassfishV4ServerBehavior.java:56)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:987)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
    at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157)
    at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY oracle.eclipse.tools.glassfish 4 0 2014-11-17 16:30:51.599
!MESSAGE cannot Deploy elearning
!STACK …
Run Code Online (Sandbox Code Playgroud)

eclipse glassfish deploying glassfish-4

10
推荐指数
2
解决办法
1万
查看次数

更改f:validateRegex的默认消息



我有电子邮件输入:

<h:inputText value="#{registrationBean.email}" id="email" label="#{msgs.email}">
                        <f:validateLength minimum="5" maximum="50" />
                        <f:validateRegex
                                pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
                    </h:inputText>
                    <h:message for="email"/>
Run Code Online (Sandbox Code Playgroud)

那么,当validateRegex不匹配时,我如何更改消息?现在的消息是:

Regex pattern of '^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$' not matched
Run Code Online (Sandbox Code Playgroud)

但我想要"不正确的电子邮件......"
谢谢.

validation jsf message

3
推荐指数
1
解决办法
1万
查看次数

JSF URL 重写

我尝试在我的 JSF 应用程序中使用 \xe2\x80\x98rewrite\xe2\x80\x99 ( http://ocpsoft.org/rewrite/ )。

\n\n

一切都很好,我已经创建了规则:

\n\n
.addRule(Join.path("/profile/{pagename}-{id}/").to("/profile/{pagename}.xhtml?id={id}"))\n
Run Code Online (Sandbox Code Playgroud)\n\n

一切正常,例如,当我转到 /profile/viewpoll-101/ 时,我看到带有 id = 101 的 poll 的正确页面。所以,现在我想在 h:link jsf 元素中获取用户友好的链接。我正在尝试这个:

\n\n
<h:link outcome="/profile/viewpoll-#{poll.id}/">\n    #{poll.title}\n</h:link>\n
Run Code Online (Sandbox Code Playgroud)\n\n

但链接未激活...

\n\n

那么,如何在 h:link 中获得用户友好的链接呢?

\n\n

谢谢!

\n

jsf url-rewriting

3
推荐指数
1
解决办法
3345
查看次数

使用Apache POI打开xls和xlsx

我想用Apache POI打开我的excel文件.

我不知道文件是xls还是xlsx.我只有这样的东西:

InputStream myExcelFile = new ByteArrayInputStream(file.getData());
Run Code Online (Sandbox Code Playgroud)

这样我可以打开xls文件:

HSSFWorkbook hsf = new HSSFWorkbook(myxls);
Run Code Online (Sandbox Code Playgroud)

这样我可以打开xlsx文件:

XSSFWorkbook xsf = new XSSFWorkbook(myxls);
Run Code Online (Sandbox Code Playgroud)

如果我不知道格式,如何打开这两种类型的文件?

java excel xls xlsx apache-poi

1
推荐指数
1
解决办法
4911
查看次数

Oracle - Where子句中的Case

我正在尝试在Oracle数据库中执行查询.该查询在where子句中有case构造.

where
    sale.op = 2 and
        case when (:stat = -11) then (sale.type_id = 27 or sale.type_id = 28 or sale.type_id = 29)
    else
    (sale.type_id = 27)
    end
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

ORA-00907:缺少右括号.

在Derby SQL中这是有效的.有人可以帮帮我吗?谢谢.

sql oracle case where

0
推荐指数
1
解决办法
266
查看次数

关闭腻子窗口后如何保持weblogic运行

我已经通过腻子开始了weblogic的工作:

./startWebLogic.sh
Run Code Online (Sandbox Code Playgroud)

之后,服务器成功启动。

但是当我关闭腻子窗口时,服务器停止工作

关闭腻子窗口后如何保持weblogic的运行?

谢谢!

putty weblogic startup

0
推荐指数
1
解决办法
3546
查看次数