简体   繁体   English

使用netbeans在wicket用户指南Wicket 8.x中导入和启动示例代码

[英]importing and starting example code in wicket userguide Wicket 8.x with netbeans

I am totally new to wicket. 我完全不熟悉检票口。 So I am following the userguide and try to run the example code. 因此,我正在遵循用户指南并尝试运行示例代码。 ( wicket tutorial examples ) wicket教程示例

I am running the code in Netbeans 8.2 on ubuntu linux and have maven installed. 我在ubuntu linux上的Netbeans 8.2中运行代码,并安装了maven。 When I import the example code it is recognized as a maven project but somehow it is not recognized as a Wicket app. 当我导入示例代码时,它被认为是Maven项目,但由于某种原因它未被认为是Wicket应用程序。 It cannot run the project, saying that it can't find the main method. 它无法运行该项目,表示找不到主要方法。

When I create a Maven project via wicket quickstart everything works fine, when I open the folder in Netbeans it is recognized as Wicket and when I run the project I can see the homepage of the app. 当我通过wicket quickstart创建一个Maven项目时,一切正常,当我在Netbeans中打开文件夹时,它被识别为Wicket,当我运行该项目时,我可以看到该应用程序的主页。

Can you help me? 你能帮助我吗? How can I make the examples from the Wicket userguide run from within Netbeans? 如何从Wicket用户指南中的示例在Netbeans中运行?

Martijn 马丁

Just found the problem.In Netbeans I changed the packaging from 'jar' to 'war' 刚发现问题。在Netbeans中,我将包装从``罐子''更改为``战争''

(on project right-click -> properties -> general -> Packaging) (在项目上单击鼠标右键->属性->常规->包装)

Now I can run the project within Netbeans and see the app in the browser 现在,我可以在Netbeans中运行该项目,并在浏览器中查看该应用程序

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

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