adding vaadin ui to existing java web app - java

I am working to create a UI using Vaadin, now I want to add this to an existing java web app.
Do I simply need to add the Vaadin jar file, and the java files of vaadin to that web app?
Or is there some procedure to follow, when doing this?

You also need to ensure that the Vaadin ApplicationServlet is being called, and is being sent the right requests. The VAADIN directory has theme information; you need to ensure it is being served as well, or is being served from the code base directly.
See the Book of Vaadin for details on how to configure your web.xml to ensure the right things happen.

Just add the vaadin.jar file to your WEB-INF/lib directory and you're good to go.
edit: see Ross Judson's answer.

Related

How to create a documentation module in OpenXava?

I need a documentation module in my OpenXava application. Basically it's to allow the user consult the manual in case of doubt.
I think in HTML format.
I saw in the OpenXava documentation the possibility of creating a documentation module:
https://openxava.org/OpenXavaDoc/docs/application_en.html#Application-Documentation%20module
But it only works with Liferay or WebSphere Portal.
Is there a way to do it wihout Liferay or WebSphere Portal?
It is true that the documentation modules are only available within a portal, however the help system works without portal and I think it's just what you're looking for. It can be activated configuring some properties in xava.properties.
Note the Help part in the following doc:
https://openxava.org/OpenXavaDoc/docs/customizing_en.html#Customizing-Xava%20Properties%20Settings
Something like this in xava.properties could work for you:
helpAvailable=true
helpPrefix=help/
If the help is a folder called 'help' inside your application.
Also you can put the help in another server:
helpPrefix=https://www.example.com/help
If it ends with underscore it can have multilanguage support, thus:
helpPrefix=https://www.example.com/myapplication/help_
Where it looks for help_en.html, help_es.html or help_fr.html, depending on the browser language.

Create Project Java Web without maven and Ide

I am trying to create an application for creating java web projects in a personalized, automated way, without maven, without IDE, but so far I have not seen anything on the internet that would suit me. Could someone guide me or tell me how I can do it?
I consider your question differently that you want to create an application which when run can automatically create web projects !! If that is correct you need to write set of programs which would make files necessary for your web project like generate java files, Jsp files, XML, properties etc depending on complexity of your web projects, also if customized with parameters it can make different kinds of projects. Then you will need to make war file which is going to be the final deploy-able component with these files. This is all that you would do manually through IDE and maven would be the jar files you would need if any. Let me know if you need any more help.
Please accept and like if you appreciate my gesture to help with my ideas n experience.

How to convert EAR as executable file?

I have no idea about converting EAR file into exe(Executable file), Where are i am working with jboss and i developing webservices. I want to give my product as executable file . Can anybody has idea about this.
Thank you
Gobi, you've already posted a question regarding this on 15th March, to which you've got no response. I guess you've just rephrased that same question here.
Might I suggest asking your customer/client how she would like the web service 'ear' delivered? I'm also guessing you might have database scripts, properties/config files etc. I'd put my money on 'a zip containing the ear, database scripts (if any) with related documentation'
There is no way a customer would want to 'double click' your ear and have it installed directly onto a server. If you read your Java EE spec correctly, you'd find a 'deployer' role in there. Its not there for fun. Its a very serious role whose responsibilities include 'configuring' your application.
Think about it.
You mean you want customers/users/whatever to just be able to double-click on your file, and there's a web server up and running? While that would be possible, it's not really the way most people want to run web services. They're very likely to want to run your web service within an existing container, configuring it alongside other services.
An EAR file is already designed to be pretty much droppable within a container, so that's fine. You could also supply a zip file (or an installer) with a sample container setup using any of the free container implementations - either preconfigured with some reasonable default values (e.g. for the port) or running through an installer wizard. I wouldn't spend too much time on it though - I'd assume that most people who want to run a web service will already have some experience of setting up a container, or will have specific requirements you couldn't easily capture in a wizard without a lot of work.
I don't know about making EAR as executable.
There is a editor which converts your project into setup file or installer for windows .
Hope this helps.
I used NSIS editor and recommend it and it only creates installer for windows.
HM NSIS Editor.
you may also have look at izpack

Minimal project that simply gathers request form values and stores to db, what java framework?

I simply want to expose a URL in a web application, and then I will post information to that url and take the form data and save it do a database.
That's basically all I need to do.
I'm newish to java frameworks, what do I need for a project like this? I don't really need the spring framework which I am "familiar" with.
Can someone direct me to what I need to setup a project library wise etc.
BTW, does java have any tools for pushing code to tomcat? Something like how the ruby world uses capistrano?
This minimal project will need a minimal servlet to be deployed into a servlet container (Tomcat, Jetty, etc).
There is a lot written about to start with servlets. Maybe start with this one:
http://tutorials.jenkov.com/java-servlets/index.html .
For database access you may start with the java.sql package: http://download.oracle.com/javase/tutorial/jdbc/index.html
If it really is as minimal as you say it is, you don't really need a framework--just use the plain old Servlet API that comes with Java EE and JDBC.
As for pushing code to Tomcat, all you need to do is get the .war file into the webapps directory. You could probably write a basic shell script to do something like
cp myapp.war $TOMCAT_HOME/webapps/myapp.war

Gwt and jsp in same project

i was looking for similar title here but i didn't find much info, so if anyone can provide some example or url or any approach how to do it.
For example: is it possible to call a jsp from a gwt widget?
or communication (server - jsp) in gwt project and so on..
Is there any limitation is using jsp in gwt project?
Thanks :-)
GWT compiles down to html+javascript (static files), while JSPs are internally compiled and behave like servlets. You can configure URLs to point to both (via your server config and/or web.xml).
Both GWT and JSP allow you to go to a new URL. In GWT you can use Window.Location.assign(url) (this will load new URL and close current GWT app).
Additionally GWT allows you to load data by making XHR calls to URLs: http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html
So:
Yes you can goto JSP pages from GWT app.
Yes you can load data provided by JSPs into your GWT app.
In any jsp applications actions lead to URLs. The URL can point to a GWT module.
You will find applications which offer a back-end for the administrator in GWT, while the front-end runs in Struts2. Konakart e-shop is such an example.
My impression is that GWT will replace the other frameworks on the long run. Everybody will want Rich Internet Applications very soon.
On the other hand in the early 80's i was thinking that in very few years everybody would be using Unix, which never happened, but Unix did quite well after all...

Categories