I am not sure where should I start from as I have to deploy a web application on JBoss via install4j installer.
I have created the Dynamic Web Apllication and I want to deploy this application on JBoss but deploy a war file and configure JBoss on client machine is not a good idea thus I want to create a installer file (.exe) file which will take care of following things:
Installation of JBoss server on client machine
Deploy my application on JBoss server
so that I just have to give that installer file to client and on single click the installer will do all the things for me and as I am new to install4j tool, I am not able to do this with install4j tool.Anyone can provide simple steps to create .exe file using install4j or any other tools
EDIT
what I tried so far
General Settings
1.1 Application Info
Specify all The information like full name,Short name,version...
1.2 Java version
min version=1.4
max version=1.7
*NOTE: Confuse about the Environment variables JAVA_HOME,JDK_HOME*
1.3 Languages
English-en
1.4 Media File Options
Media File Output Directory:*/home/shekhar/*
Media file Pattern
name:${compiler:sys.shortName}_${compiler:sys.platform}_${compiler:sys.version}
Use LZMA compression
Note: Rest of options are unchanged
Files
2.1 Distribution Files
Add Files and Directories:specify the path where application exists
Note: Rest of options are unchanged
Launchers
3.1 Generated Launcher
add a new Launcher
Installer
Unchanged
Media
Installer
create a new installer by default
build
6.1 Start Build
Preparing configuration
Creating media file 'Unix Installer':
Collecting files:
Compiling launchers:
Compiling launcher 'connector':
Generating launcher script file
Generating VM options file connector.vmoptions.
Creating media file:
Generating launcher script file
Zipping custom code & resources JAR file
Identifying components
Shrinking runtime
Compressing files
Applying LZMA compression
Moving media files to media directory /home/shekhar/Desktop
The name of the media file is she_unix_1_0_0.sh (click to execute)
The size of the media file is 1.7 MB
Writing md5sums.
Writing updates.xml.
To check your settings, you can generate a project report
Build was completed in 13.9 seconds.
I have run this exe but it has created application folder structure but where is JBoss Configuration and how can i deploy this apllication on JBoss
Deploying a web application locally involves copying a WAR file to a specific directory which in the case of JBoss is the standalone\deployments directory. in install4j, you can use a "Copy file or directory" action to copy a war file from a distribution tree to an arbitrary directory.
Related
I try to convert work from appengine-web.xml file to work with app.yaml file in google app engine project, so I created app.yaml file and put it in main folder of project.
when I try to deploy my project with "gcloud app deploy" command
I get error
INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime
if I run "gcloud app deploy path/appengine-web.xml" command
the deploy is work fine
what i need to to convert to work with app.yaml file?
additions info
my project write in java8
my project write in eclipse
thank you
One Java Application that will be deployed in App Engine must have a file named appengine-web.xml in its WAR, in the directory WEB-INF/.
I verified the gcloud app deploy command documentation and it seems that for Java 8 you need to run :
gcloud app deploy ~/my_app/WEB-INF/appengine-web.xml
That is the one that you are running.
On the other hand, I found this documentation (for Flexible ) that mentions how to organize your files in case that you want to use the app.yaml for java 8
As the documetnatyion indicated that,for Java8 Standard apps, you must add the path to the appengine-web.xml file inside the WEB-INF directory. gcloud app deploy skips files specified in the .gcloudignore file see gcloud topic gcloudignore for more information.
I am trying to do the spring security tutorial at this link.
In the section entitled "Running the Tutorial application without Spring Security", I took the following steps (adjusted for differences between the current version and the version that was in use when the tutorial was written):
1.) I downloaded the latest release of the Spring Security Distribution,
2.) found and unzipped a war file in the dist directory called spring-security-samples-tutorial-3.1.2.RELEASE.war
3.) Renamed the resulting folder spring-security-tutorial
4.) Created a general project in eclipse called spring-security-tutorial
5.) Imported all of the contents of the unzipped spring-security-samples-tutorial-3.1.2.RELEASE.war
6.) Right clicked on the project in eclipse and selected configure...convert to maven project
7.) Then right clicked on the project and clicked run as...
But there was no "run on server" option. (I had chosen a general project instead of a Dynamic Web Project in hopes of preserving the file structure of the application to be imported)
I then started to repeat the process, but creating a Dynamic Web Project instead of a general project, and eclipse wants me to select the "src folders on build path". The file structure of the web application has 8 .class files in subfolders of WEB-INF, and I am not able to locate any .java files.
What steps can I take in order to download this and run it in eclipse on the server? With the ability to edit the classes?
I have read that I can select a .class file in eclipse and it will open the bytecode in the editor, so I imagine I can convert the class files to java files easily enough. But doing that within a general project triggers the error message that the class is not part of the classpath, so we need to get it in a working web project that can be run on the tomcat server from within eclipse first, I think.
A war file is a Web application ARchive (basically a zip). It is meant to contain a web application's compiled class files and resources (properties files, jsps, css, html, js, etc.). It a package that can be used by an application server (or servlet container) like Tomcat. Except through a Decompiler, you will not have access to the source code from the compiled .class files.
I doubt you can run this on Eclipse's Tomcat instances. Instead go to your Tomcat installation. Mine is at C:\apache-tomcat-7.0.22. Rename the war to something simple like security.war and place it inside the webapps folder, ie. C:\apache-tomcat-7.0.22\webapps\security.war. Go to C:\apache-tomcat-7.0.22\bin and execute the startup.bat Windows batch file. This script sets up the classpath and launches a Java application containing all the applications in webapps. You can see the startup logs in C:\apache-tomcat-7.0.22\logs\catalina.out (as you would normally in Eclipse console).
You can then go to localhost:8080/security to hit the application. Replace 8080 with whatever port you're configured on. security is the same name as the war file. When Tomcat starts (based on a config parameter) it will extract the war into a package directory under webapps with the same name.
You can play around with configuration settings. Some of the important ones are here.
You can shutdown Tomcat by running the C:\apache-tomcat-7.0.22\bin\shutdown.bat Batch file script. You'll have to do this and restart if you change something in the application (ex. the web.xml or a properties file).
I think the tutorial you linked was meant more for trying security settings than actually changing the source code. I'm sure there are other samples online for Spring security, I just don't know them.
Is there a way to specify if the java source files are included in the WAR file when deploying through eclipse?
Please consider the following scenarios:
Using export to war: This is simple and straight forward. If you check the check box marked "Export source files", then the source files are included in the WAR.
Publishing to the local Tomcat server: The source files are never included in the wtpwebapps directory and there is no WAR file. Again, simple.
Publishing to Elastic Beanstalk through the eclipse AWS toolkit on a Windows machine: The source files are ALWAYS included with the WAR file (which is exploded into the git folder and then deployed as a Zip file).
Publishing to Elastic Beanstalk through the eclipse AWS toolkit on a Linux (Ubuntu) machine: The source files are NEVER included with the WAR file which is eventually deployed.
I have not found a way to stop the source files from being included in 3 or include them in 4. This may well NOT be an OS issue, but a simple setting in some configuration file that is set differently on the two machines. Or it could be the way the plug-ins were written for the two Operating Systems (are plug-ins OS specific?). Even if that's the case, is there a setting where it can be changed?
I tried playing with the Web Deployment Assembly settings, but couldn't figure out how to make that work as far as source is concerned.
Any insight you may have into this will help.
how to deploy a web app java project which depends on tomcat and Sql Server Compact Edition (SqlCE) ?
so that the final user can only install the .jar (I don't know if it can be an .exe or not) and the setup takes care of installing tomcat (portable edition?) and SqlCE
I guess you have two options:
Use components written in java (for instance: embedded jetty as a web server, HSQLDB as a database). Then you can ship your whole application as a JAR archive (or few JARS) and create batch script which will run it (.bat under Windows, .sh under Linux or even .exe installator of some sort). This, however, might require some additional work.
Use some sort of EXE instalator wizard which will: 1. Install Tomcat into specified directory, 2. Install your desired DB, 3. Copy your webapp WAR inside newly created Tomcat installation
I would go for 1, since it will work on every OS.
(Tomcat version 5.5, in case it matters.)
I have a library in one of my web applications that needs to be configured with a machine-specific license before use. I don't want to put this library in shared/lib because at some point I may want to run multiple web applications with different versions of the library.
Right now the .jar files are stored in WEB-INF/lib. Thus, when I build the .war file and upload it to the server, the .jar file would still be the one bound to my PC. I would like to put a bash script somewhere in the webapp that Tomcat would automatically run when deploying the .war file - this script would then run the configuration script and bind the server's license file to the .jar. Is this possible? Is there a nicer way of doing what I want?
You could create a ServletContextListener to do that in the contextInitialized() method. And from that listener you can run the "configuration script" directly, no other script required.