I wanted to check if somebody has explored the option of deploying Kitura compiled project on TomCat? Basically, is it possible to deploy the build outside IBM cloud environment?
Please note that you can run Kitura instead of Tomcat. Kitura is an embedded web server, you do not need other web server to run a Kitura application. So you can build a Kitura application on macOS/Linux and run the compiled executable on macOS/Linux. It will listen to the port you specify, receive HTTP requests and route them to the request handling code of your application.
Related
We are building a project and will be using gwt 2.7 with rest ( spring) and weblogic server.
The problem which we face is that I want to run the gwt module on superdev mode (which runs on 8888 port by default) but the rest is deployed on 7001 port on weblogic server.
I cannot call the rest services from superdev mode as it gives a cross site scripting error.
How can get my super dev mode running so that I can test and develop UI and connect to rest services on different port.
I know there has been topic on use a different server for dev mode. But i don't see any examples.
Can some please suggest wat needs to be done. Even if it requires changing the project structure to get the dev mode working with rest.
This is a common problem for web-development. It can be solved by using:
CORS (at the REST server)
Using a proxy servlet (I use this approach, but with a handwritten servlet)
Disable the browser security (I would not do this)
did you try running GWT module on external server mode?
I am using eclipse to develop an oracle MAF application. I set up the environment but i need now to connect my app to the oracle database on the server and i don't know how to start. Do i have to use the local sqlite database then sync with the server or connect directly to the server and how to do it?
thank you!
It's not possible to make a direct database connection MAF. You will have to expose your data in a web service and consume it in your mobile app.
One option you can consider is to expose the data in the database as a REST Service which you can invoke from a MAF application.
See this presentation on how to use OEPE to build a MAF application that invokes REST services: https://www.youtube.com/watch?v=pRdLSOVslQg
Hope this helps. Thanks for your interest in OEPE.
-Raghu
Here is the simple tutorial which describes that how can you make a REST web service in Oracle MAF, deploy it to web logic server using Jdeveloper and access it from your browser. I hope it'll help you:
http://sanjeev-technology.blogspot.in/2014/09/rest-service-on-weblogic-1034.html
Pervasync just released a new version (6.0.2) of its sync framework that supports synchronization of Oracle MAF SQLite databases with central Oracle, MySQL, SQL Server and PostgreSQL databases.
You can try this sample tutorial which having the step by step explanation.
To make it work, you need to use JDeveloper 12c (download it from here). It will contain WebLogic server as well.
In additional you need to have Android SDK for emulator (or) you can make use of Android device to deploy and run the application.
For Android Device:
You can deploy the application into machine and configure the mobile client app using virtual IP of that machine. So that it can be accessed from outside of the network.
For Emulator:
you can run the webservice and client in same machine by configuring the webservice IP as 127.0.0.1 this will route your client app into local machine (P.S: localhost does't works here)
Building a Play 2.0 scala app and deploying it to the ROOT context on Tomcat (from what I understand, a Play app must be deployed to ROOT context). There are other web apps running on this server at different contexts, but with the Play app at root, it is intercepting every request and failing if it is a route it does not understand.
Is there any way to have Play ignore a route in order to have Tomcat continue dispatching it to a servlet that is registered for that context?
thanks,
brian
In fact the limitation you have seams to be linked to sub-context deploiement. The play2 war plugin does not support it until Play 2.1
It could be possible to trick with tomcat conf to do what you want. I don't know tomcat enough to give you the right conf.
You can still deploy your Play app as a standalone app (not embedded in Tomcat) and use a front-end HTTP server to handle reverse-proxy to the right HTTP server. You will have to define for each HTTP server the right port to run on and then configure your reverse-proxy to route the request depending on the domain/port to the right local port. I use Nginx for that. Maybe Tomcat can handle this also.
Actually, it turns out that this was not a problem after all. I had inadvertently not had the other apps deployed in the same tomcat server I was testing with (doh!). Once I deployed them properly, then the Play Framework app got the requests that were correctly bound for it and the other apps got the requests that were bound for them in the sub-contexts. So, false alarm.
In fact, I'm trying to see which would be the best approach to achieve play framework native support on openshift.
Play has it's own http server developed with netty. Right now you can deploy a play application to openshift, but you have to deploy it as a war, in which case play uses Servlet Container wrapper.
Being able to deploy it as a netty application would allow us to use some advanced features, like asynchronuos request.
Openshift uses jboss, so this question would also involve which would be the recommended approach to deploy a netty application on a jboss server, using netty instead of the servlet container provided by jboss.
Here is request for providing play framework native support on openshift There's more info there, and if you like it you can also add your vote ;-)
Start with creating 'raw-0.1' application.
SSH into the server and
cd $OPENSHIFT_DATA_DIR
download and install play into a directory here. $OPENSHIFT_DATA_DIR is supposed to survive redeploys of your application.
Now you can disconnect from SSH.
Clone the application repository. In the repository, there is a file .openshift/actions_hooks/start. It's task is to start the application using a framework of your choice. The file will need to contain at least (from what I know about Play)
cd $OPENSHIFT_REPO_DIR
$OPENSHIFT_DATA_DIR/play-directroy/play run --http.port=$OPENSHIFT_INTERNAL_PORT --some-other-parameters
Important
You have to bind to $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT. Trying to bind to different interface is not allowed, also most of the ports are blocked.
To create some sort of template, save the installation steps into .openshift/action_hooks/build file. Check if play is installed, if it is do nothing, if it's not, execute the installation process.
What things have to taken care for deploy a web appl ( war ) in glassfish v3.1.1 ( glassfish-3.1.1-web-windows.exe installer ) , the appl. is developed using netbeans 7.0.1. I am using postgresql database . Developement machine and Production machine is different and is not connected to each other. Any detailed step by step instruction ?
It all depends on what resources your application would need to run successfully on the application server.
e.g. If your application uses container managed persistence then you have to make sure that you create the required JDBC connection pool and resource on the server before you can deploy your application server. If you check the persistence.xml file you will see if your application uses some jta-datasource (the value provided there is actually the JNDI name of the JDBC resource created on the server). Here you might also have to supply the required JDBC driver to the server if it is not package within the application.
What you can do is install the same application server on your local machine and deploy the application there and see if it fails. If it fails then you can check the stacktrace to find out the reason for failure.