Is it possible to either pack only html, css and JS files in jar (no java binaries) which would then be packed into war for deployment to Tomcat?
or
Can I pack html, css, js files (no java classes) into a zip and pack it into a war for deployment to Tomcat? With this option, would Tomcat unpack the zip as needed?
If you are deploying to Tomcat (and there is presumably some java or JSP code associated with this) then you should use a .war file.
To incorporate purely web assets into the building of a .war, then you need to use an "overlay". There are various Maven plugins and Ant tools which do specifically this.
However, one other possible consideration, is to deploy your web assets directly to your HTTP server (ie. Apache) and then configure it to serve /css/*, /js/*, etc, from there, and every other request can be forwarded to Tomcat.
Related
My web application will be deployed to Weblogic application servers on Windows and Linux/Unix in different environments. The log file location, appenders and log levels will vary between the different deployments and we would like to be able to change the logging configuration during runtime (by exchanging the config file), so I cannot embed a log4j2.xml (or whatever other config file) into my deployment. And since I'm running on Application servers I cannot control, I've got no chance to add environment variables to point to another configuration Location.
Currently, my log4j2.xml resides in the classpath of my application and is being packaged into my war file. Is there any way to tell Log4J2 to use a configuration file e. g. relative to the application root (like Log4J's configureAndWatch(fileLocation) method)?
I found lots of examples of how to configure Log4J2, but everything I found about the config file location points to the applications class path.
I finally found a solution for my problem. I added a file named
log4j2.component.properties
to my project (in src/main/resources). This file contains a property pointing to the location of my log4j2 configuration file:
log4j.configurationFile=.//path//on//my//application//server//someLog4j2ConfigFile.xml
This causes log4j2 to read that file and configure itself from it's content.
I have a non-asp, not asp, not .NET, not ASP.NET website (Web Site, not Web Application). I am indeed using a Visual Studio Solution, but it is empty and I have added an "Existing Website". There are no DLL's or anything involved. The only purpose of the Solution is so it can load in Visual Studio and be Source Controlled in certain manners.
When I deployed the site to Azure, using Deployment Options, I received the error:
Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Again, This is not MVC. This is a regular HTML Website.
Somebody had accidentally sync'd the wrong repository to Azure previously, an ASP.NET Website. In that case, the slot believes the site is an ASP.NET Site no matter what, and tries to build it as such. So what I had to do is open up the console in Azure, cd to the "site" directory, and I did rmdir for the four folders there... wwwroot, deployments, repository... and some other one. Azure automagically re-added wwwroot and deployments. I disconnected the deployment source and re-added the correct one. After that, it didn't try to build it like a .NET Application.
I'm quite confused as to how to create a deployment in SSIS 2008 that I can use throughout the various sites we are going to deploy to. I'm using the deployment utility to deploy my ETL packages which are file based and executed using a SQL job.
When I rebuild my solution, the deployment files are created along with their configuration files which I bind my connection strings to. I've discovered that each of the packages are still referencing the configuration files in my project folder, rather than the configuration files in the deployment folder. I thought that when I created a deployment, the paths referencing the configuration files would be relative paths.
Ideally, what I would have liked to have been able to do would be to copy the contents of the deployment folder to a flash drive, plug it in at the site I'm deploying to and edit the configuration file per the customer site, execute the deployment manifest file in the folder and expect everything to work. But this doesn't seem to be the case.
I also notice that the SQL job has an option to specify the configuration files for the packages, but this doesn't seem to have an effect either. I must clearly be doing something wrong here, please could someone assist.
Seems like you are encountering these two issues with SSIS deployment and execution:
Configuration file references are stored with absolute paths (meaning the concrete path used in the development environment when the configuration file reference was created, and in production this is the same path that will be used).
Specifying a different configuration file at runtime in SSIS 2008 cannot override values specified at design time (see Understanding How SSIS Package Configurations Are Applied at Run Time).
To deploy your packages with a simple file copy the way you describe, you must change your packages to use a relative reference to your configuration files:
Right click the package file and select View Source to open the XML view of the package source. Search for your configuration file, which will include the path, and remove the path; keeping only the filename portion. Alternatively, change the absolute path to a relative path to the configuration file. Save and close the XML view of the package.
Now when you deploy the package and the configuration file together, ensuring they have the same relative location to each other, the package will find the config file by the relative path, and work the way you expect.
Note: from this point forward you will need to open the BIDS IDE by double-clicking on the project or solution file. If you launch Visual Studio, and then open the project or solution from within the IDE, the IDE will not be able to find the configuration file when you execute the package (the current directory will be Windows\System32, not your package folder).
One easy way of installing projects in pharo is by using a Configuration Browser.
How can a developer make his project appear in this browser?
To make your configuration appear in the Configuration Browser, you have to copy your configuration package into a corresponding repository. For Pharo 3 it is:
http://www.smalltalkhub.com/#!/~Pharo/MetaRepoForPharo30
My web application uses MyBatis ORM. As a part of this, I have the typical mybatis.xml config file along with mappers for my SQL. When running the Play! server, the directory with these resources is not picked up and added to the classes directory.
Is there a way to configure Play! to include this directory in it's load/deploy process?
With Play 1.x the simplest way to do this is to put your files in the conf directory which is in the classpath