Creating a web application with java - java

I have been trying for the past week or so to wrap my head around how I would go about creating a web application using java. I have looked into many services such as Vaadin, GWT, and CUBA, but because I don't really know which I need I haven't had much luck. Here is what I need:
Web application framework in java (I don't know HTML or Javascript)
Ability to use polymer elements
I would also prefer a minimized use of XML files, but I could work with them if need be.

The Java framework for web development is J2EE. It provides a Web Container to run web application (.war file) as well as other stuff.
Web application can be servlet, JSP etc.
If you are not familiar with Java Web Application, you may want to start with using Eclipse. The following video shows how to use eclipse to build a project for web application
https://www.youtube.com/watch?v=Av6zh817QEc

Since one criteria is to use Polymer I recommend having a look at
gwtmaterialdesign
there are already a few tutorials how to get started and also ready to use templates.
Anyway I believe that you've to dig a little into GWT ...

Related

Conversion of existing Java dynamic web project

I have existing Java dynamic web project which contains applet and servlets, since applet and servlets are no longer supported, so is there any way to convert my existing code to any other web technology which will work on any browser.
Look into Web Start, which browsers still seem to support. I wouldn't recommend it though as it still has random issues, and I can't even get Oracle's own runnable tutorial examples to work.
I fear the only future-proof option is to go fully web page or app mode (perhaps with help of JavaFX which translates to web pages nicely).

Swing, Java GWT, Servlets (Web Application)

I am in a serious confusion since this morning after the project meeting .. I am very much new to java, I have worked as Application Supporter before, but java seriously ruffled my mind.
My Question: I am developing a web based application using Servelts/MYSQL, and my boss wants me to develop another application which was already developed before and he has lost the code, I have to develop that app again, But I don't want to use servlets for my 2nd project.. I think I can do that application using Swing or GWT, or AJAX, now that problem is have to integrate my application with my first application. How to covert Swing application to Servlet app, I am worried a bit. Your help and suggestions will be appreciated.
You can't convert a Swing application to a web application, at least not in an easy way.
An option would be to create your 2nd application as an Applet, that way you could use Swing and you could integrate it fairly easily into your web application.
There is another option:
Deploy and run Java Swing applications in browser by automatically converting them to HTML/JavaScript.
This is however not a free service/solution and I can't give further advice on this.
But since you have to rewrite the 2nd app from start (which you wanted to do using Swing), you'd better do that as a webapp as well, and then you will have no problem integrating it into your first application.
GWT is already very similar to Swing (you can create GWT apps mostly using Java code, it uses components called widgets, panels, events and event handlers) so if you create your webapp using Google GWT, it will be easy to do your 2nd app too.

Building my first Java Web Application

I have to build a java web application and I'm not sure where to start.
I have a good amount of experience with java but I would like to know if anybody can point me to a good example of how to integrate java into a web page?
I searched google without much luck. Is there a decent example on how to do this? Is it similar to adding a flash object with an object tag? Thanks
You can start creating sample web application based on html and servlets, This site will guide you in doing so.
http://www.servletworld.com/servlet-tutorials/simple-servlet-example.html
You will need
JDK
Apache Tomcat(jars will be in tomcat so no need to download separatly)
There's an app for that.
http://www.appfuse.org
AppFuse is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently. It was originally developed to eliminate the ramp-up time found when building new web applications for customers. At its core, AppFuse is a project skeleton, similar to the one that's created by your IDE when you click through a wizard to create a new web project.
You ahould start searching about :
Servlets (and Apache Tomcat)
JSP
Java Faces (and Apache MyFaces)
Existing web frameworks
I think the easiest is to download Netbeans for Java EE with Glassfish, install it and use a wizard to create your first Hello World web application.
Then I recommend learning Spring MVC - I think it is the easiest to start with and very flexible so you can add more and more functionalities later. For templating, I recommend FreeMarker or Velocity.

A Groovy Web Console in a Java webapp?

I've been looking at Groovy a little lately, and I love the idea of the Groovy Web Console.
I'm idly wondering whether there's a way to embed a simple web control to write and run scripts from in a web app I might put together myself.
Is there a plugin-style solution to embed a control like this?
Are there any resources or guidance out there to help in persisting source code?
The Grails web framework has the Grails console which is basically a Groovy console that has access to your web app's state. More specifically, in the Grails console there are a bunch of predefined variables which you can use to access/change the web app at runtime. For example ctx is a predefined variable that provides access to the application's Spring beans (AKA ApplicationContext).
Normally the grails console runs as a desktop app, but there's a plugin available that will let you include it as part of the application itself, and therefore use it via a web browser.

How to start a web application with eclipse

I love eclipse and java. And i want to code my entire web application using eclipse .. right from designing html files to servlets.. I have zero experience in developing web apps .. So How to to setup eclipse for web apps and How do i get started ???
Google even autocompletes this question so you know it's a popular query!
There is very little information that you are providing, and there are actually tutorials for creating web applications with Eclipse and Java. You will want the JavaEE version of Eclipse as a starting point.
If you want to try using a web framework that works with Java I recommend Struts, although this may be too big if you're wanting to develop small web applications (and it's not exactly the easiest thing to start with).
I also recommend installing Apache Tomcat as your server because it's free and easy to use. Here's a good starting tutorial:
http://www.xwt.org/tutorial/eclipse/
Firstly, make sure you've got the Java EE eclipse binary : http://www.eclipse.org/downloads/
As has been mentioned, there are various google-able tutorials on how to set up, deploy and manage web applications under eclipse.

Categories

Resources