How to use iText with JBoss 7 Java EE project?
I created a Java EE Project using JBoss Tools
Group Id: org.jboss.tools.example
Artifact Id: multi
I'm now trying to use iText to create a PDF from my Bean
<p:document xmlns:p="http://jboss.com/products/seam/pdf">
This only prints plaintext
</p:document>
According to JBoss Wiki (http://docs.jboss.org/seam/1.1.5.GA/reference/en/html/itext.html) I need jboss-seam-pdf.jar and the iText.jar - can I use Maven for this? The dependency I found broke my project.
If anyone could help me set up iText with JBoss 7 I'd highly appreciate it
can I use Maven for this? The dependency I found broke my project.
Maven is always appreciated as dependency management mechanism.
The example you see is a sample froject using the old Seam framework >= 2 which is useful for Java EE 5 (now we have CDI). To use the seam-pdf module you have to integrate the Seam2 framework but it's obsolete now. My recommendation is instead of using declarative way to build PDF, use the iText API and build a pdf yourself. iText documentation is quite good and there is a book and many examples over the internet.
If anyone could help me set up iText with JBoss 7 I'd highly appreciate it
After you have created the war project add iText as maven dependency to your .pom file and you are ready to go.
Related
I have a project that uses both frontend and backend instances, in java 7 runtime environment, using app engine (https://cloud.google.com/appengine/docs/standard/java/modules/converting)
We now want to migrate to java 8 runtime, however I can't find a way to migrate the backend module/services in this environment.
Because the EAR based structure is not supported in java 8 as mentioned in the first paragraph on the following link https://cloud.google.com/appengine/docs/standard/java/configuration-files
Please help me with finding a way to achieve backend services/module in app engine java 8 runtime.
Any reference material or samples which can guide me to the right direction?
The Cloud SDK-based plugin supports multiple services without requiring EAR packaging, and it is part of the process to migrate from Java7 to Java8, you will have to make some changes for Maven and the Gradle for Java8
For Maven, you will first need to add the new plugin on your pom.xml, and second, update your application.xml if you were using an EAR based multi service configuration
For Gradle, you will add the new plugin to your classpath under dependencies in your build.gradle file, and you will also have to update your run.services file so that you can point to your default, secondary services.
I am new to Vaadin, I would like to find easy to start Vaadin 7 examples with maven(I do not want to download jars manually). I have seen this github repositores, but had problem when trying to build project. github.com/nfrankel/More-Vaadin
Also are there a official examples from Vaadin.? I use IDEA as a ide.
Thanks.
You'll find the latest stable version of Vaadin at https://vaadin.com/download. Here you are also given the maven archetype so you can build a quickstart with the latest version, so you just run that command and don't have to download any jars.
The link to the wiki that Sean Connolly gave you is also good cause it has some starter tips on what to do when you built the archetype.
The following is also a tutorial for integrating GWT widgets: http://java.dzone.com/articles/using-gwt-widgets-vaadin-7
I have been trying to start a simple Spring project as a part of my study. From the tutorials (they are about a year old resources i am refering), it seems the Spring related libraries were easily available online then. But now; I was unable to get something like a "spring_ver_no.zip" from the spring source site. It is having options to download a tool suite which is about 350 MBs large.
Can you please guide me if that download is the way to setup a Spring development environment?If not what is the way to set up a simple Spring environment in eclipse.
Thanks
Angie
You should use a dependency management tool like Gradle or Maven, and let this tool download the libraries for you. See the quick start for how to include Spring in your dependencies. If you still want to download the jar files and add them manually to your project, then download them directly from the Maven central repository: http://search.maven.org/#search|ga|1|g%3A%22org.springframework%22
Spring is, for a long time, splitted in several modules. You have to download all the modules you need.
Spring is using Maven lately. You should use it too. Maven is a build tool and dependency manager that will ease your life.
Is there a way to easily add all (or most) useful JBoss 5.1.2 provided libraries API-s that are out of Java EE 5 spec?
For example: I know that JBoss provides me a possibility of using Log4J logging but I don't know what to put as a provided artifact to my maven project. I guess it is jboss-logging-something. I want it to provide me a logging API only.
Is there a list of maven artifacts for APIs that JBoss AS 5 provides (besides Java EE 5 spec)?
EDIT
It seems that adding this dependency is quite helpful:
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>5.1.0.GA</version>
</dependency>
But it causes maven load pretty whole Jboss AS server code. Any better ideas?
I think a better idea is to use the libraries provided by the JBOSS server you deploy on and not have those in your package. Link to the necessary libraries for compiling and running, but don't add them to your spec.
JBOSS has libraries in its /lib, deploy/lib, and the endorsed/lib folders.
The following quote is from the Installation Guide
For a full list of the JBoss and thirdparty libraries used with JBoss AS 5.0.0.GA check the pom.xml found in the component-matrix directory of the source code distribution. To see the maven dependency tree you can run 'mvn dependency:tree' from the thirdparty directory of the source code distro.
You can download the source from here:
http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/
and then checkout the pom as described above. Be warned it is a long list, but should provide you with the information that you are looking for.
We are creating a new project using jsf2.0, richfaces 4.0, jjdk 6 and tomcat 7.0
I want to know the standard way of creating project. I mean folder structure. Any sample application or book or link will be a great help to me.
Maven uses a best practice approach for project folders. Even when you do not plan to build with maven, have a look at their structures:
Maven: Introduction to the Standard Directory Layout
I participated once in a project, which had Spring 3.5, JSF 1.2 and ICEFaces 1.8, was running on JDK6 and everything was deployed to Tomcat 6.0 - similar situation to yours. We used Apache Maven as a project management tool.
Very flexible and comfortable. You could also consider using ICEFaces instead of RichFaces.