How to find the Struts version being used in a Web Application project in Eclipse?
My struts-config.xml says
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
Thanks.
Open struts jar and read version in MANIFEST file, inside META-INF folder.
We can find out the struts version by observing the doctype of the Struts-config file.
For Example if your struts config file contains the below DTD then we can say that it is Struts 1.1 version.
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/**struts-config_1_1.dtd**">
On a Windows system:
Open file explorer, search for struts*.jar
Open struts-core.jar with a unzip tool (e.g. IZArc2Go)
Open META-INF folder and open MANIFEST.MF file with a text editor
There you will find Specification-Version: with the version number
Some additional release info:
Latest Struts 2 version is 2.5.2
Struts 1 is EOL with version 1.3.10 in December 2008
and the property to look at in manifest.mf is 'Specification-Version'
Dont refer to the Manifest-version. instead you refer to the "Specification-Version"
Eg:
Specification-Version: 1.2.4
That means the struts verison is 1.2.4
Related
I am migrating my project from Struts 2.3.28.1 to 2.5 and could not find the below 3 jar files in Struts 2.5 bundle , which were present in Struts 2.3.28.1 bundle release.Can anyone let me know if Struts 2.5 still supports these 3 jars and if not, then any possible solution----xwork-core-2.3.28.1 , oro-2.0.8 , commons-validator-1.3.1.
xwork-core has been folded into struts2-core, thus there will no artifact for it with version 2.5.x.
XWork source was merged into Struts Core source, it means that there be no more xwork artifact nor dedicated jar
Check the release notes here
Today I created a new Maven multi-module project from scratch with IntelliJ 2016.2 and archetypes pom-root and apache-struts2-starter. I have been working on several Struts 2 projects with tiles now so I know about the struts 2 file sets, the auto detection of frameworks, etc.
Strange thing now with this new project: IntelliJ doesn't detect anything. I was waiting for this little pop up which says "Struts 2 detected, configure" where I can create a fileset with all struts xml files, but nothing happens. Also I can't create a fileset myself in the facet window in the settings. If I try, no files to add are shown.
On the other hand, IntelliJ does show me the Struts 2 facet, but I can't manage to configure it properly in IntelliJ. I don't understand why it works for another project, but not for this new one. So I'm not able to jump from one tiles result to its definition, or from a JSP with struts:action to its action definition in struts.xml...
I can build and run the project perfectly, but why does IntelliJ not configure it?
It seems that the problem had to do with the doctype (more exact: the dtd) in my struts.xml. Usually it is something like
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
But, because I selected the newest Struts-2-Version for this new project, I thought it had the be
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
corresponding to the struts-version 2.5.2 (general question: how do I know which doctype i have to use??). It seems that the Ijntellij-Struts-Plugin doesn't "recognize" this DTD-Version (although it does exist, see http://struts.apache.org/dtds/). If I change it to 2.3 or 2.1, the small popup "No file sets configured" immediately appears. Very strange.
I am creating a Vaadin (version 7) portlet, my development environment is eclipse 4.3.1 + tomcat-7.0.27+Liferay-portal-6.1.1-ce-ga2, I am checking the stuff on tomcat and the portlet runs fine there.
Now my deployment environment is Glassfish-3.1.2+Liferay-portal-6.1.1-ce-ga2, the same portlet and the log message is: "sampleApp was successfully deployed", the Portlet error is "Failed to load the bootstrap javascript: ./../../VAADIN/vaadinBootstrap.js".
Please help me solve this.
From Book of Vaadin:
Liferay 6.1, [...], comes bundled with an older Vaadin 6 version. If you want to use Vaadin 7, you need to remove the bundled version and install the newer one manually as described in this chapter.
In these instructions, we assume that you use Liferay bundled with Apache Tomcat, although you can use almost any other application server with Liferay just as well.
12.5.1. Removing the Bundled Installation
Before installing a new Vaadin version, you need to remove the version bundled with Liferay. You need to remove the Vaadin library JAR from the library directory of the portal and the VAADIN directory from under the root context. For example, with Tomcat, they are usually located as follows:
tomcat-x.x.x/webapps/ROOT/html/VAADIN
tomcat-x.x.x/webapps/ROOT/WEB-INF/lib/vaadin.jar
12.5.2. Installing Vaadin
Get the Vaadin installation package from the Vaadin download page
Extract the following Vaadin JARs from the installation package:
vaadin-server.jar,
vaadin-shared.jar,
as well as the vaadin-shared-deps.jar and jsoup.jar dependencies from the lib folder
Rename the JAR files as they were listed above, without the version number
Put the libraries in tomcat-x.x.x/webapps/ROOT/WEB-INF/lib/
Extract the VAADIN folders from vaadin-server.jar, vaadin-themes.jar, and vaadin-client-compiled.jar and copy their contents to tomcat-x.x.x/webapps/ROOT/html/VAADIN.
$ cd tomcat-x.x.x/webapps/ROOT/html
$ unzip path-to/vaadin-server-7.1.0.jar 'VAADIN/*'
$ unzip path-to/vaadin-themes-7.1.0.jar 'VAADIN/*'
$ unzip path-to/vaadin-client-compiled-7.1.0.jar 'VAADIN/*'
You need to define the widget set, the theme, and the JAR in the portal-ext.properties configuration file for Liferay, as described earlier. The file should normally be placed in the Liferay installation directory. See Liferay documentation for details on the configuration file.
Below is an example of a portal-ext.properties file:
# Path under which the VAADIN directory is located.
# (/html is the default so it is not needed.)
# vaadin.resources.path=/html
# Portal-wide widget set
vaadin.widgetset=com.vaadin.portal.gwt.PortalDefaultWidgetSet
# Theme to use
vaadin.theme=liferay
Alright, this is a little bit wierd. I've checkout apache-poi version 3.9 source code from
http://archive.apache.org/dist/poi/release/src/
But I can not find the source code for poi-xml-schemas. I have been googling but to no avail. Where is the code repository for these project? Is it a separate project from the poi source code or it is from some other project used as a library, but where is the code repository?
This is covered in the Apache POI FAQ (#14), from which I quote:
14. I can't seem to find the source for the OOXML CT.. classes, where do they come from?
The OOXML support in Apache POI is built on top of the file format XML Schemas, as compiled into Java using XMLBeans. Currently, the compilation is done with XMLBeans 2.3, for maximum compatibility with installations. (You can use the resulting classes on the XMLBeans 2.3 runtime, or any later version of XMLBeans. If you are currently using XMLBeans 2.2 or earlier, you will unfortunately have to upgrade, but this isn't common any more).
All of the org.openxmlformats.schemas.spreadsheetml.x2006 CT... classes are auto-generated by XMLBeans. The resulting generated Java goes in the ooxml-schemas-src jar, and the compiled version into the ooxml-schemas jar.
The full ooxml-schemas jar is distributed with Apache POI, along with the cut-down poi-ooxml-schemas jar containing just the common parts. The source jar isn't normally distributed with POI. It is, however, available from Maven Central - ask your favourite Maven mirror for the ooxml-schemas-src jar. Alternately, if you download the POI source distribution (or checkout from SVN) and build, Ant will automatically download the specification XML Schema, and compile it for you to generate the source and binary ooxml-schemas jars.
https://repo1.maven.org/maven2/org/apache/poi/ooxml-schemas/1.0/
has the ooxml schema ----- CTArray jar files.
I am using Axway server which runs on jre 1.5 . So it accepts all classed builded below 1.6 . But problem is I read THIS LINK and I got this line as guide
Environment:
* Java Developer Kit (JDK) 1.4.x or greater for deployment and 1.5.x (Java 5) for compiling/building. As of AMQ 5.5.0 you need JDK 1.6.0 to**
Which says I can use ActiveMQs below version 5.5 for jre 1.5.
when I use ActiveMQ 5.4.3 am getting bad class version error.Please help me.
This is the line where am getting this error
Object o = Class.forName("org.apache.activemq.ActiveMQConnectionFactory",
true,ConnFactory.class.getClassLoader())
.newInstance();
You could extract the jar as a zip file, and then look inside the folder and check inside the META-INF directory. The MANIFEST.MF file will tell you what version of the jvm the jar was compiled with. I just grabbed the 5.4.3 version of the activemq jar and it said this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: chirino
**Build-Jdk: 1.6.0_26**
Specification-Title: ActiveMQ :: Jar Bundle
Specification-Version: 5.4.3
Specification-Vendor: The Apache Software Foundation
Implementation-Title: ActiveMQ :: Jar Bundle
Implementation-Version: 5.4.3
Implementation-Vendor-Id: org.apache.activemq
Implementation-Vendor: The Apache Software Foundation
which clearly shows that it was built with the 1.6 jvm. Might need to download the source and build it on 1.5 manually.
In maven repository the last version of activemq built on jdk 1.5 is 5.4.2.
Problem is due to the jvm config file entry for jar newly added.
I don't know and I am not responsible and I don't have permission to do any Admin related privileges.
I put the jar in CLASSPATH exactly.So its ok for all the classes to access that.
But problem is in JVM config file I have to put the entry, I mean I have to give name of the jar with CLASSPATH in jvm.config file of axway.Though I put my jar in class path without put entry in jvm.config, it is worthless.Because while jvm get initialized it checks the config file first to add jar with it.