Please anyone helps me how to run java code in resteasy automatically when deploy in jboss? - resteasy

I'm new here and new in resteasy. I have resteasy web application running on Jboss. I want to run specific code in my application once when JBoss starts or when this application is deployed. How can I do it? Thanks

Use a ServletContextListener.
Here is a simple tutorial:
http://www.mkyong.com/servlet/what-is-listener-servletcontextlistener-example/

Related

How to deploy to App Engine from web

I hope someone can help-me.
I'm trying to move my development workflow to the web, so I would not need to install anything locally.
To accomplish it I'm using codeanywhere and storing my code on bitbucket, which is connected with my project´s cloud platform.
Everything is working fine, I make a change on codeanywhere commit it on bitbucket and see the change on my project's source code (on the cloud plataform). But the changes are not reflected on my application (the actual source code running my application isn't updated).
I'm running out of alternatives, I tried to update it using the Cloud Platform's Cloud Shell but I couldn't even cd to the source code folder.
Does anyone know how to deploy the source code from the Cloud Plataform to App Engine?
I need a full online workflow.
Thank you in advance for your help
You can use source-repositories of GAE to keep source code and run application from shell for example running application gradle appengineRun & deploy application gradle gradleappengineUpdate using gradle
You can see this link for building, running and deploying application using maven.

converting dynamic web project with maven to a Google Web Application project

I have a dynamic web project which is also a maven project and I´d like to upload it to a cloud service. my teacher reccomended me the Google App Engine, but I´m finding it quite difficult to convert this maven dynamic web project into a Google Web Application Project. Does anyone have a tutorial that helps me or maybe give me a hint? I like to use eclipse for development.
I think this article is a great starting point.
It includes the way to install the App Engine plugin which you'll need for Eclipse, as well as importing a Maven project and some sample code to get started.
I hope this helps, let me know if you have any other questions.

Best way for deploy angular.js application made with yeoman?

I´m building application SPA using angular.js with yeoman which connect with a API RESTful made in Java using spring-MVC . i´m begginer for deploy web applications in angular and so i want to know some differents alternatives or best practice , for example deploy in http-server as apache, inside war using application-server as tomcat , or another option or suggestions .
Thanks a lot for help .
Then your frontend code is production-ready, just run $ grunt build
and serve static resources produced by Yeoman (Grunt in fact) by the very same server that is responsible for providing the backend of your app.
take a look at my answer to similar question, showing project structure and some necessary configuration for Yeoman & Spring-MVC.
In some more advanced deployments scenarios, there might be a need for introducing load-balancing and you might need separate servers for the frontend and backend, but we are talking about basic config here.

Deploying PlayFramework Application to Google App Engine

For my new project I am planning to use PlayFramework and Google App-Engine. I was trying to create a sample application in playframework and tried to deploy it to app-engine.
it says the application is deployed successfully, but when I hit the url of my application
it shows a message "Your application is ready", But does not show the home page of my application.
I am using Play Framework 1.2 and GAE-1.4 plugin. I tried to deploy the application using the plugin and also using "appcfg".
The application works fine in local development mode but as soon as I deploy it to app-engine, the home page is replaced by "Your application is ready" message.
Can u guys tell me if I am doing anything wrong with the deployment of play-framework? I tried searching if anybody faced similar kind of issues in both google and SO but was not able to find any help.
Also, I read some post that GAE plugin does not work with Play-Framework 2.0(Note : I am using Play 1.2 in the above example) . I would like to know How can I deploy a play2.0 application in appengine.
Thanks a lot in advance!!!
Did you add application name and version number in appengine-web.xml before deploy?

Deploying Jersey REST Webservice on Apache Web Server

I am a dot net developer but yesterday I was asked to develop a Restful Web service using Java, I googled a lot and finally I am able to develop, run a "hello world" example using Eclipse+Jersey+Tomcat.
But I wonder how can I be able to deploy it on Apache Webserver,
Please send me a step by step guide considering me a newbie. Thanks
An Apache webserver does not support the execution of servlets (as e.g. Tomcat does). What you can do is run a Tomcat server and connect it to Apache by using a JK connector.

Resources