How to load a java web app in the terminal? - java

I have a java web app developed on Struts and deployed on a Tomcat server. I want to run commands and use the functions of the app using the console - something like in 'rails console' such that even if the server was not running, the entire app environment is loaded and the app is usable from the terminal itself.
I have tried Grails (Groovy) but couldn't figure out how to interface the java app with it as 'grails console' works for app developed on Grails.
How to go about doing this?

Related

FX7500 Embedded Java Application Start/Stop

We have deployed a Java application to the FX7500 RFID reader and can manually execute the program through a ssh session, but we are looking into how the application will auto-start when the reader boots. It looks like the FX7500 SDK comes with some sample scripts to start and stop the application, but I don't see how those scripts get executed (other than through an ssh session). I see the "Applications" page in the FX7500 web interface is used for uploading C and C++ packages, and that provides start/stop/auto-start options for those types of applications.
Is there anyway to setup a Java application on the FX7500 RFID reader so the application can be started and stopped from the web interface and start automatically when the reader is powered on?
Thanks
The Zebra SDK for embedded FX7500 development includes the tools to create debian packages for Java applications. The end result is a .deb file that contains your application that can be installed on the reader and configured for auto-start.

How do i publish my Java code to localhost using Tomcat 6?

I'm very new to programming and i'm too lost.
I wrote a simple Java code on Eclipse (2 Classes) without any GUI and i want to access this simple Java App from any device in my LAN using a browser.
According to what i found on Google and Stack Overflow, Tomcat might help me.
Tomcat 7 didn't work on my Eclipse, so i'm using version 6 of it.
How can i make a GUI for my app?
And what do I need to be able to publish it using Tomcat?
Any help will be appreciated.
Thanks Everyone in Advance.
Tomcat is an application server. It means that you can write an application and then deploy it to a server (for example Tomcat). Then this application will be accessible on the server by some URL (for example http://localhost:8080/AwesomeApplication).
It only makes sense for web applications that handle some requests. You can't deploy an application with GUI, or simple console application to Tomcat or any other app server.
In language of final file representing your app - it must be a WAR file.

Java Code in Azure cloud service

I have java code (that generates jasper reports) and I couldn't convert it to .net and I want to run it on a "Cloud Services" how can I run java code into cloud service ?
any help will be appreciated
#Dhana provided a link to a tutorial for pushing a Java app to Azure in Cloud Services (worker role). You could also push to a Web role but it makes less sense since IIS runs in a Web role, and you'll probably want Jetty, Tomcat, or JBoss for your web server.
If you're running a console app, that's fine too - just launch it from a startup script or the OnStart() in your workerrole.cs.
You'll need to install the tooling into Eclipse. At this point, you'll be able to build Azure deployment packages, in a similar way to Visual Studio (The Azure plugin for Eclipse only works on Windows though). Part of the packaging sets up links to the appropriate JVM and web server package, as well as your own jar files.
If, say, you have a console app that listens on a port, you'll just need to make sure you have an input endpoint set up for the port you want to expose.

Start Java WebStart with procrun

I'm trying to launch a Java WebStart application as a Windows Service using procrun. In order to do this, I created a small Java application which only launches the Java WebStart using ProcessBuilder. If I run this application directly, I don't have any problems and the Java WebStart is started too. If I run this application configured as Windows service using procrun, nothing happened. The procrun logs show me that nothing bad happened but the Java WebStart is not launched (no UI seen and no request on the servers from JavaWS).
I'm wondering if it is possible to do what I'm trying to achieve and if there is alternative ways to do it?
My goal is to launch a small Java application which uses JMS and somes Swing UI using JavaWS and start it as a Windows Service (it must be always started in the system).

What are the Steps for Debugging Java Web Application?

I joined a project which has been already developed and its an Web Application deployed on Tomcat Server.
I have configured the Web Application on my local Tomcat Server and it is running fine. I want to start debugging the Application but I am not sure where to start from and how to debug an Java Web Application from Eclipse and so my question is
Q: How to Debug Java Web Application which is running on Tomcat Server on Local Machine in Eclipse Environment {Pointers to useful resources or other steps would be highly appreciated}?
There are at least a couple of ways to do this:
A quick search turned up a tutorial to use remote debugging in eclipse with tomcat to connect eclipse to the java process running tomcat.
If you create your project as a Dynamic Web Project using eclipses Web Tools Platform plugin then you can deploy to and debug tomcat from within eclipse easily.
Just stop your server from normal start mode and click on debug mode. Soon, after the server shows debugging,synchronised, continue using the web apps as you do normally. But before that, you must provide breakpoints and you can see the results that you need.
Works for me.
I have had to do this a few times. Often it is not convenient to create a Dynamic web project to debug a web application in tomcat. This technique is fairly simple but requires some configuration in tomcat and then using Elcipse (or netbeans) to attach to tomcat when its running.
http://wiki.apache.org/tomcat/FAQ/Developing, in particular
How do I configure Tomcat to support remote debugging? and
How do I remotely debug Tomcat using Eclipse?
First get the Java EE edition of Eclipse
You then need to have the Eclipse project containing the WEB-INF folder be a Dynamic Web Project. Then the full tooling becomes available and allow you to work with your projects inside any server including Tomcat. The trick is to locate the Server view pane, and right click to add a new Tomcat server adapter.

Categories