Web application security in J2EE7 - wildfly-8

I'm migrating a seam 2.2 application to the Java EE 7 platform.
I'm looking for an alternative for the #Restrict annotations.
I'm using Wildfly 8.2 as an application platform and I found some references from seam3 to the PicketLink project and annotations like #LoggedIn and #RolesAllowed.
However I don't find these annotations in the packaged version of picketlink. Can anyone point me in the direction on how to get these working in a CDI environment? e.g. maven dependencies?

Found the solution
My maven dependency was on picketlink-api and not picketlink.

Related

Show Vaadin Framework Version

Having installed Vaadin as an Eclipse Plugin several months ago, how do I find out which version of the Vaadin Framework is currently installed on my machine?
First of all we need to differentiate between the 2 key concepts at hand:
Vaadin framework: a set of libraries (or dependencies, or jars) that are used to develop rich internet applications. They'll be packaged with your application and deployed in a web server
Vaadin Eclipse plugin: a utility designed specifically for Eclipse to help you develop using the Vaadin framework
So, while it is true that the plugin can help you get started with developing a Vaadin application, eg creating a maven project from a prototype, it has almost nothing to do with the Vaadin version (almost because probably a certain version of the plugin will be compatible with a limited range of framework versions).
On the other hand, each project that uses the Vaadin framework, will include these dependencies somehow.
if you chose to manually download the zipped files and place the jars in your project, they should contain the version in their name eg vaadin-server-8.0.6.jar. And even if they've been renamed, you can open the jar (they're just zip files) and inside the META-INF folder you'll see a MANIFEST.MF file which you can open with your favourite text editor and check the version, eg:
if you're using some dependency management mechanism such as maven (or ivy, gradle, etc) then you can look in the specific build file for the referenced version, eg:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>8.0.6</version>
</dependency>
In conclusion, a Vaadin version is not exactly installed on your PC (you can have multiple versions downloaded in your local maven repo), but rather a certain version is used in a project, and you should look inside that project to figure out which one exactly is being used.

Grails 3.0 support in NetBeans

I was running Grails 2.2.0 in NetBeans and it was working fine. I tried to upgrade the project to Grails 3.0 but after creating the project NetBeans is not able to open the project.
Does anyone know which plugins to install in NetBeans (if available) to make Grails 3.0 work?
Just wanted to let you know that I've added initial support for grails 3 in NetBeans.
https://netbeans.org/bugzilla/show_bug.cgi?id=254405
At the moment you can get these with the latest NetBeans nightly: http://bits.netbeans.org/download/trunk/nightly/latest/
This will allow NetBeans to recognise/create projects, and the create controller/domain/etc actions working.
One important thing still missing is adding support for the gradle build files (no syntax highlighting or helpers for the gradle files), but in the meantime you may try it and report problems/improvements.

Unable to add struts 2 support to netbeans 7.4

this plugin requires plugin Editor Library to be installed.
The plugin Editor Library is requested in version >= 2.10.1.10.2 (release version 2) but only 3.46.1.22.43 (of release version different from 2) was found.
The following plugin is affected:       Struts2 Support
Now i have resolved another plugin for Struts 2 support. This plugin is called Netbeans Struts2 Plug-in and its a re-pack for the plugin i was trying to install. Though this plugin in not certified but it is working good. The developers have tested it on netbeans 7.4 but i'm using it not netbeans8 and i have not suffered any issues.
I have found another way, that is using maven. That is also a good way but i would not recommend it if you have slow internet connection.

How to install Grails in Eclipse Kepler 4.3 and how to run Grails applications using it?

I am unable to deploy Grails into Eclipse Kepler 4.3. I would like to know whether it is possible to deploy Grails into Eclipse Kepler 4.3 version. If yes, then how to develop applications using it. If no, then what is the alternative?
If by deploying Grails you mean to create an environment for building Groovy and Grails application, then you need to install:
Groovy/Grails Tool Suite (GGTS)
Most likely there is an installation for Eclipse Kepler (4.3).
After that it's a matter of creating new Grails/Groovy application. Make sure you follow Grails documentations. They are my best friends in terms of learning API.

IntelliJ 11 - Grails SDK is not configured

I have recently upgraded my IntelliJ 10 to the latest 11.0.1 version. I am writing grails app and until I was using the older version of IntelliJ everything was fine, however 11 doesn't allow me to successfully add Grails SDK (2.0.0) - I was trying to add the framework support, this however doesn't seem to be persisted (after adding Groovy and then choosing Grails - nothing happens). I have tried to follow those steps as well: IntelliJ IDEA 9.0 - unable to select project SDK for Grails application
I would be grateful if someone would be able to point me how to configure Grails SDK - or what could be wrong in my configuration.
Thanks,
This is exactly the way that I have my global library defined and still I was having exactly the same issue.
I followed OverZealous advice and created a new Grails project named exactly the same as the original one and boom everything is fine now! Thanks for help.
You don't need both Groovy and Grails for Grails project, just use Grails SDK. When creating a new Grails project there is an option to add new SDK, select the home path of your Grails installation and it will be configured automatically as a Global Library and this library will be added as a dependency to your module.
Grails library configuration contains all the jars from GRAILS_HOME\dist and GRAILS_HOME\lib, plus all the jars from the src directory.
In other words, it's not configured as a framework, it's just a library with all the jars from Grails distribution added to the module dependencies.
Each time I restart IntelliJ, version 13.1.2, it loses the SDK configuration. If I right-click on the project and "Add Framework Support" I can choose the SDK that is already configured and it will begin functioning properly. When it loses this setting, it won't allow me to compile or launch the app with grails. I reject the ideas to recreate the project, (been there/done that) as I have many dependent modules I have to verify and I lose all my run configurations that I've setup manually.
I'm posting the "Add framework support" step here so it might help someone else; hopefully a more permanent solution for you, but its temporary in my situation

Resources