GWT Deployment to JBoss - eclipse

I am currently working on a project which has a GWT frontend and a seperate Java module with servlets and a REST interface on the backend. The project when deployed runs on a single JBoss server.
I am running into difficulties though as when I run the GWT app in hosted mode (in eclipse) the jetty server does not have a deployed Java module to interact with.
My idea was to setup a JBoss server which eclipse could deploy into for development purposes, the problem with this is that the installer for the product sets up a JBoss server with a GWT app already embedded in it, so redeploying into this JBoss instance might cause problems?
My other idea would be to create a second JBoss server to host the GWT app, with some sort of url redirect for the rest calls which would redirect to the first JBoss instance. Is this possible?
EDIT: Can I do this with the built in jetty server in eclipse and not have to worry about using a seperate JBoss server. In other words can I somehow get the jetty server in eclipse to redirect particular requests to a different URL?

Related

What's the differences between JBoss Web Server and JBoss EAP for running Redhat Decision Manager?

I'm researching how to deploy RedHat Decision Manger right now, there are two options for running enviroment, JBoss Web Server and JBoss EAP. But I'm new for JBoss and don't know what's the differences between them and which one is more suitable with Decision Manager for production enviroment?
JBoss web server is a server used to deploy web applications, whereas EAP is an application server which can be used also to deploy Java EE compatible applications. EAP gives many more features like messaging, RMI, EJB etc. apart from features provided by Web server.
Which one is better will depend on your use case.
To get more details about the difference between web server and application server refer below post
Difference between a Web server and application server

Standalone Jetty Server Proxy is not working

We have developed a SAP UI5 web app using eclipse. In this app some cross domain ajax calls are there. That's why we are trying to use Jetty proxy.
While testing the app inside Eclipse(which actually uses inbuilt Jetty server) its running fine. But Whenever we are deploying the war file to Standalone Jetty server its not able to forward messages to target.
Can you please help how to configure Jetty proxy?
Below is the screenshot of web.xml inside my webapp.

How do i deploy my wicket project?

i am new to web development and i created a wicket app on my local computer. i have a server running apache 2.0, maven and open jdk. Its an ubuntu server with only command line.
Any help would be wonderful.
Thank you
You cannot run the wicket app by itself; like any java servlet it has to be run on a servlet container.
There are many containers to choose from, the ones I most commonly come across are
Tomcat
GlassFish
Jetty
You need to install one of containers like that to convert the HTTP requests into java. Once you have one of them installed and running, you can deploy your wicket web-app in it.

Applet Web service client, with Eclipse Indigo using Apache CXF,

I'm trying to consume a web service within an applet.
For that objective i've tried Apache and Apache2, both with good results
but the problem is that the jar dependencies are far too fat for my application
(the jar for axis or axis2 are over 1.5MB, and the applet is less than 200KB)
So i will try consuming the web service with Apache CXF, hoping that the jars
are at least a bit smaller.
Using eclipse one creates an empty project and in the main classes implements
the applet and blah blah, but to create the web service one must use the web service
wizard.
I've used this wizard before, to consume the web service using Axis, but the moment i choose other options i get this message:
****The Apache CXF 2.x Web service runtime in Tomcat v7.0 Server does not support the client project****
What i´m missing?
I've already installed, CXF 2.x runtime, and the Tomcat 7 Server, and of course the Eclipse Web Tools.
This question How to generate web service client with Apache CXF in Eclipse Helios?
shows a very hard solution and it´s one year old!
is there any other way to consume webservices within an applet?
ksoap2 has no documentation on complex webservices, and ksoap2-android
neither
Sorry for a boring question, but any help is greatly apreciated
Apache CXF 2-x Web service runtime Tomcat Server not support client
The Apache CXF 2.x Web service runtime in Tomcat v7.0 Server does not support the client project
Answer: If you see above error during creating web service client in eclipse using Apache CXF means you are using java project to generate the client from WSDL. Latest version of JAX-WS supports Dynamic Web Module v2.5 and up. So create client using apache CXF first you need to create Dynamic web project.
Once dynamic project created then open web service client wizard to create client from WSDL and issue should be resolved.

how to run the servlet in eclipse?

I want to run a servlet in Eclipse. For this I have created a dynamic web project and I have deployed my servlet.java file under the WEB-INF folder. I have also added the servlet.jar file. How can I run the file as a java application?
Servlets run in a servletcontainer. Servlets are not "plain vanilla" java applications. See, they do not have a main() method! Servlets listens on HTTP requests and returns HTTP responses through the network. Running the sole servlet class as a plain vanilla Java application doesn't automagically make them to listen and react on HTTP requests.
Apache Tomcat is a popular servletcontainer. Just download and unzip it. Then in Eclipse (I assume that you already have downloaded the Eclipse Java EE version, else drop it all together and redownload the right version), go to Servers view and add the newly installed Tomcat instance. Then create a Dynamic Web Project wherein you pick the newly integrated server instance from the list. Eclipse will then automatically take the Servlet API libraries in the classpath/buildpath (thus, you do NOT need to download a random "servlet.jar file" separately yourself! this is only receipt for major trouble). Then create a Servlet class and register it in web.xml. Then deploy the project to the newly integrated server and start it. Then in your favourite webbrowser go to http://hostname:port/contextname which is usually http://localhost:8080/webprojectname.
To learn more about servlets (and Eclipse and Tomcat) I strongly recommend you to go through those tutorials. You can also search on youtube for video tutorials using the obvious keywords.
Servlets run in servlet/JSP engines, like Tomcat or Resin or Jetty. You normally don't run them outside a container.
You can certainly deploy your app to a servlet/JSP engine and start in from Eclipse. But it's the app server that you run, which then acts as the home for your servlet.
Servlets cannot be run directly as an Java app.
I recommend two approaches:
Refactor your servlet and put your "java" code (what ever generic code you want to call) in another jar that you call from both the servlet and the Java application.
Run the servlet in a container in Eclipse. See http://www.eclipse.org/jetty/
Communicate with the servlet through HttpRequest's and HttpResponse's