Ce contenu n'est pas disponible dans la langue sélectionnée.
3.3. Creating a new action
You can create a simple web page with a stateless action method by typing:
seam new-action
Seam prompts for some information, and generates a new Facelets page and Seam component for your project.
Since we have added a new Seam component, it is necessary to restart the exploded directory deployment. You can do this by typing
seam restart
, or by running the restart
target in the generated project's build.xml
file from within Eclipse. Alternatively, you can edit the resources/META-INF/application.xml
file in Eclipse.
Note
You do not need to restart JBoss each time you change the application.
Now go to
http://localhost:8080/helloworld/ping.seam
and click the button. The code behind this action is in the project src
directory. Add a breakpoint to the ping()
method, and click the button again.
Finally, locate the
PingTest.xml
file in the test package, and run the integration tests with the TestNG plugin for Eclipse. You can also run the tests with seam test
or the test
target of the generated build.