I want to make a website done in Java language. This is for my own learning purpose. Since I am doing things myself I tend to get confused.
If there is a Login Form wherein a huge number of people all around the world need to feed their login details and that data gets stored.
To achieve this, do we need to have a database hosting?
Can you please guide the exact steps for this?
I know Core Java and MySql Database Basic knowledge but I have not done both app connection procedure.
I only know to code in Java and SQL queries. I had done an earlier basic application that runs only on a system (This was done in VB.NET and MySQL).I did this a decade back. Now that I am back to programming after a decade, I am bit confused about how to make this connection in a way that the Login form stores the details from the website to the database. The database should be MySql or some data hosting site? I will be trying this out on Windows System in Eclipse Neon. Let me know if you need further details.
Now that you are well versed with Java and MySQL, you can learn about Apache Tomcat and Struts 2.
With these, you can make an application that serves your purpose.
At the front-end, you'll have jsps with the login form.
With struts, you can map actions (like button clicks) to java classes. In these Java classes, in the backend, you'll have the code to connect to DB and store data.
Hope this guides you make your web application. :)
You don't need a database hosting but you need a database server configured properly at your system for localhost development.There are many sites guiding you to make a full java app using jdbc and jsp step by step you can get there easily.They will guide you to configure your database server.
Related
I'm making a voting app in Java using Eclipse where the user votes for their favorite team. Right now I have a local MySQLite database that I am managing with the MySQLite Firefox extension. The votes are stored in the MySQLite database, then I have another java application that reads from the database and outputs the name of the team that got more votes. However, I would like to store this database online, so multiple people can vote at once, then the results are displayed. How can I go about doing this? I am guessing that I will need PHP, but I am having a hard time finding a tutorial on how to integrate a MySQLite database with PHP. I pretty much just need to store my database online. Everything is functional locally.
Maybe I'll need more details but I'm assuming you have wrote a Standalone Java app, which is connected to you local SQLite Database.
Also, I think you don't want to distribute that app for everyone who wants to vote (would be better if they could vote via a website, right?).
In this case, you have to write a web application to provide both front-end and back-end of your app. You can pick one among many existing languages and frameworks (PHP is one of them), such as Java itself with some web framework, Ruby on Rails or Python/Django (just to depict some of them). Plus, I'd recommend you to use some other database such as MySQL or PostgreSQL.
Here are basic tutorials to you follow for some of the previously mentioned languages/framework:
Java (JSP)
PHP
Ruby on Rails
To deploy you app (i.e. put it online, you'll need a server). Honestly I'd recommend you to use Heroku because the deploy process is really simple (just push your code using git) and you can run your app for free (if your app got really successful you may have to scale up the server and then you'll have to pay, but maybe that's not the case, right?).
So, pick up a language and framework, write your web app and deploy it to the server. Then you can have multiple access voting into the same database.
I need some advice. I'm new to Java EE technologies. Anyway, I would like to make my first JAVA EE project.
Imagine 2 client applications and server application.
1) Server. I picked up Google App Enginge technology to create server application. I would like to connect it to some easy database.
2) Client applications. I would like them to be desktop applications (or applications launched from the desktop) and these 2 apps also have to be connected to the same database as sever.
There was no problem to create this in Java SE environment - I had two clients applications with sockets staff and server application with socket staff. All worked locally.
But now I want to have server and database on the Internet and I want to make it in more professional way.
My problems are:
How to create free database from GAE? Is datastore the best option or something else? What's important - the client desktop application will also use this database. I'm looking for the easiest solution.
Maybe the solution is to create web client application instead of the desktop one - but make it look like it was desktop app (I would like to avoid using browser). I have no idea how to do this and if this is even possible.
Any help will be really appreciated. I'm stuck because my knowledge is too little to start. I have ma GAE app and I don't know what should I choose next.
Thank you in advance.
If you want make desktop application, you need to build backend application first.
check this out. You can use same concept with that. Build back end, and then create API to connect to your backend, and use that API in your desktop application.
Datastore is easiest way to store data. Check this out. Datastore have some limitation (such as didnt support join, many to many relationship, etc). Please consider wisely. Otherwise you can use Google Cloud SQL for your option, but AFAIK its not free.
currently we are developing a JAVA APP that runs on TOMCAT and uses POSTGREE SQL
And we have an introducting website (JOOMLA 2.5 based) that explains the app, and also have a register module, that runs on APACHE PHP, on a different server.
Our goal is that the clients enter direct to our website JOOMLA, register there and then they can go directly to the web-app.
Very like to www.tiendanube.com or shopify.
The java-app has a login as well as the joomla website.. We need to unify those process, we cannot find a form to achieve this.
The problem is also that Joomla cannot run in the same server as the web-app.
Is there any way to interconnect both the web-page and the app (which runs in differents server) to make then look as one ?
So we thinked that when the user register in the joomla it also has to be saved in the same POSTGREE SQL of the java app. Since the java app is running in a different server we cannot access postgree SQL of the java app
That can be a solution, still we are pretty sure it has to be a easy solution or a more powerful and better solution for this.
Also been the 2 services in differents servers, it seems that we are not able to mantain the same domain for both.
We will really appreciate some help
Thanks very much
Facundo
You have at least two ways to do it.
Use a LDAP, GMail authentication or equivalent. Easy, Joomla already have it
Do in a manual way with "Single Sign On across multiple domains". Will have to undestand how session cookies works and avoid avoid some problens.
Please read my recent answer on implementing SSO across subdomains in joomla
I'd like to ask for your opinion on local databases for a java application i'm developing.
Its veterinary application, meaning I'll need to store Customer, Pet and Medical History details for a start. I know how to use JDBC but I've only used it online in applets.
So, I really dont know much about local solutions and how those gonna work when I'll publish the application in a .jar, so please guide me. Would MySQL still work?
Thanks!
This is fairly general question and light on details and MySQL sounds like it would work here. If this is for local-only access and a typical client-server model is not needed then I'd encourage looking into a database engine that can be loaded directly in the JVM. One of the benefits is that there is no need to install any separate database components and the JARs for the entire database engine can be packaged in your application.
Below are a few of these:
Apache Derby
HyperSQL
H2
SQLite - Some Java wrappers around the C library are available but there are not any pure Java JDBC drivers available for this that I am aware of.
I realize that it is not difficult for developers to configure MySQL for local use but it could lead to a number of support issues for end users. It may be possible to script the installation to preconfigure a large amount of it but I am not sure of the details of that and it would be an additional item for you to work out when packaging the application.
Some general questions about utilizing MySQL for this are shown below. It may very well be the best way to go but these are just some things to consider. Most of these are not really specific to the development of the application and are more on the support side of things. Utilizing a database engine noted above can eliminate all or many of these.
Will multiple computers every have to connect simultaneously to the same database?
What MySQL password do you use?
Do you recommend that end users all use the same one which may not be good security?
Or do the end users need to create one in which case you may need to deal with forgotten passwords and the end user having to configure the password in your application?
Do your end users run antivirus software that may interfere with the database connection?
What if they have another program that uses MySQL that is already using the default port?
I am studying Information Technology at a local college. I am currently doing a Java project for one of my Modules. We are expected to make a Java application that communicates with a Microsoft Access database. I am working in a group, and all of us are assigned to code separate functions of the software. However, we need to share one database. We are currently using ODBC on our individual computers and are using JDBC to connect to the database on the local machine. What we have thought is to just work on separate Microsoft Access databases and then just combine them later on. But I think that's not the best way. Is there a way that will allow me and my group members to have a centralized database, to which all of us can connect and make our queries? Is this possible by hosting the Microsoft Access database somewhere online, and then connecting to it from inside the Java software. Please help me out, as I have no idea how to get a centralized Microsoft Access database.
If you want to get rid of this by using Microsoft Access is because that's the easiest way out for you and your group to solve this kind of problem but I'd rather suggest you to use the database using a database provided by Java Derby database, it's quite help you to short your code within the server. Maybe I will suggest you to use Netbeans as a GUI and the Derby to control the database.
So what's your core problem is that a programming side or configuration and control within the hosting ? Thanks