Deploying Java Application in Tomcat/Glassfish - java

I have an issue and I cannot solve it, even if I know that Maven deals with it. I have been looking for a solution for a long time and I cannot find it anywhere. I even tried to find some Maven tutorials but I haven't found anything yet.
So the problem appears when I want to deploy my application to Tomcat. Everything goes smooth until I want to modify something in it. It has a lot of images, files, video files, because it's a small portal. Every time I want to modify something I have to backup all this stuff in my computer and only after that i can run the undeploy process so that I can upload the new .WAR and it gets very unconfortable as the data grows. I would be very thankful if someone has a solution to this problem. My projects are performed in Struts/Struts2+Spring+Hibernate. Thank you

Consider using a content repository for images and external resources; look at LifeRay or Alfresco or Sling, or Communique for solutions in this space, or look at JackRabbit for implementing the client of a repository yourself. It's actually pretty easy, and very scalable.

Related

Create Project Java Web without maven and Ide

I am trying to create an application for creating java web projects in a personalized, automated way, without maven, without IDE, but so far I have not seen anything on the internet that would suit me. Could someone guide me or tell me how I can do it?
I consider your question differently that you want to create an application which when run can automatically create web projects !! If that is correct you need to write set of programs which would make files necessary for your web project like generate java files, Jsp files, XML, properties etc depending on complexity of your web projects, also if customized with parameters it can make different kinds of projects. Then you will need to make war file which is going to be the final deploy-able component with these files. This is all that you would do manually through IDE and maven would be the jar files you would need if any. Let me know if you need any more help.
Please accept and like if you appreciate my gesture to help with my ideas n experience.

Spring+Hibernate+MySQL CRUD not working

I wanted to learn how to make a simple Spring+Hibernate+MySQL CRUD.
I found a tutorial. I wanted to run it on my PC first(to check if it's working and then learn what particular lines do). I downloaded the zip file and changed couple of things like name of the package or name of the database, the Spring/Hibernate version and so on.
Unfortunately the program is not working.
Of course there is a possibility that the tutorial is somewhere wrong but I bet that it's me not the tutorial that screwed something up.
If anybody have some free time I will really appreciate any help :)
This is a link to a github repo where I put code.
I use Eclipse and Tomcat 9.
Thank you in advance!
There is a lot easier way to get started with Spring completly from a scratch.
It's called Spring Boot and it is composed of an embedded servlet engine (Tomcat) and takes care of configuration of almost everything.
It doesn't require XML configuration which is a blessing and makes you feel like 2017, not 2000.
I found this video tutorial a very useful one and I can recommend it to you:
https://www.youtube.com/watch?v=vgPkUVF862g
Also, this series of video tutorials is excellent and explains everything about Spring MVC and Spring Boot, but it seems that first video is missing..
https://www.youtube.com/watch?v=C3ZrOj4unss

How to set up a system that reads PMML files which I create using R?

For the past few days I'm stuck at trying to pass a PMML file with .xml extension that I created using R and pmml package. After creating a iris.xml PMML file I have no where to go, actually I don't know what to look for. And then I saw Alex Guazzelli's video here, where he tells us to use ADAPA from Zementis to run the PMML files that are created from R.
What I took away from the video is,
I want to do something similar as shown, like uploading my PMML file at some place and input my test files frequently to get the corresponding predicted values.
ADAPA looks great, but looks like it also costs some money. So I would like to look for an alternative, which might not be as user friendly as ADAPA.
Then I found this page where the author says,
So the first step was to get the engine running. I experienced some small problems but Scott fixed them very fast and offered a new war file ready for deployment inside tomcat. It can be obtained under http://code.google.com/p/openscoring/. If you still encounter some problems you could also try my war file. It was built with java version “1.6.0_26” and tested under tomcat 7. After installing the war file using the management console, you could test it by sending a POST request in XML like the following to ‘http://localhost:8080/OpenScoring/Scoring’
Then I found jpmml. The problem here is the package names are very confusing, I don't know which one to install. In fact I don't know how to install each of them. I have basic knowledge of Java, apparently it isn't helpful in the current scenario.
Desperately looking forward for any kind of help.
How do the data flows in your application look like? Zementis' ADAPA is a standalone web service, which lets you do scoring in a request/response fashion. This works for web applications, but is clearly sub-optimal if you're looking to score larger amounts of data.
The JPMML project provides "PMML runtimes" for most popular big data frameworks. For example, if your application is tied to Apache Spark, then you would go for the JPMML-Spark project, if tied to Apache Hive/Pig, then for the JPMML-Pig project, etc. For a simple REST web service you should check out the Openscoring project, which is functionally identical to Zementis' ADAPA.
All JPMML projects can be built from their source checkout using Apache Maven by issuing the following command:
mvn clean install
Some JPMML projects also have their binaries distributed via the Maven Central repository. If you're looking for the Openscoring WAR file, then you need to search for "openscoring-webapp" and on the results page click the "download WAR" link (at the time of writing this, you would get openscoring-webapp-1.2.12.war). This is a standard WAR file that can be dropped to the auto deploy folder of your favourite Java web server (Tomcat?) as it is. The REST API of the web service is fully documented in the README file of the Openscoring project.

Exactly which JOGL files to use for windows

I don't know Exaclty wich file I should get. I think I finally found the site but there like a list of 500 different types of files on there.
I'm using NetBeans IDE for my programming, so that's Java code and I would like a step by step (Clear to understand) tutorial on exactly which files I should currently download(Include exact link if need be), How to set it up(the jars if there are any because I tend to see a lot of zip files w/ no jars in them), and how to set it up in Netbeans.
If anyone has an Idea, write the solution down below.
The instructions to setup JOGL for Netbeans IDE with some screen captures and some detailed explanations are on our wiki:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#NetBeans_IDE
It's a lot better than tinkering our JARs on Maven Central with the risk of using the wrong files.
Ok, so after more in depth digging, I found not only the JOGL jars, but every single jar out there in one site. To top it off, more than 75% of the jars had a modified date in 2015, so there all up to date here's the website,
http://search.maven.org/#search|ga|1|jogamp
Caution Be sure to really read what your downloading b/c cause on potential mismatch and you could potentially screw up your computer!

From Matlab to the web

I have big project in Matlab with some pretty complicated GUI. I'd like to put it on my apache server. The idea is: people should've access to it without downloading anything (I mean something like Java applet or web app). I've managed to create a .jar file by using the deploytool but I'm not sure it's the right way. I've read mathworks tutorial, but in the example: http://www.mathworks.com/help/toolbox/javabuilder/ug/bsqrikz-26.html they're using some piece of JavaCode which I don't really know where they got it from. In the end I've created a .war file but the apache sees it only as an archive, not as an application, so clearly I did something wrong.
So, could someone tell what I have to do step-by-step to create a web application from my Matlab code, please?
Thx!
There are a number of webinars by MathWorks showing how. Here is the most recent one I could find:
Application Deployment with MATLAB
For reference, there is a page listing all the options for deploying MATLAB on the web.

Categories