NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Java Applet shows form and components but no data from db

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
panoss



Joined: 13 Jan 2015
Posts: 8

PostPosted: Mon Jul 25, 2016 11:50 am    Post subject: Java Applet shows form and components but no data from db Reply with quote

I 'm trying to create an application that will be included in a site 's page.
That means an applet, right?

I 'm following the instructions from here (up to "Build and run the applet source file").


It runs fine when I right click the Form.java->Run file.
(this class extends the JApplet)

BUT when I 'm trying in the localhost (http://localhost/joomla351/images/pgclassifieds/JavaApplets/LoansCalculator/build/Form.html), It shows the form with the components, but no data from the database.
Like if MySQL is not running.
What am I doing wrong? Shouldn't it display the data?

My folder-file structure is this:



LoanCalculatorFileStructure.png
 Description:
 Filesize:  12.1 KB
 Viewed:  3663 Time(s)

LoanCalculatorFileStructure.png


Back to top
cp7781



Joined: 12 Jul 2016
Posts: 143

PostPosted: Wed Jul 27, 2016 11:11 am    Post subject: Reply with quote

Maybe the applet isn't allowed to connect to the database. I don't know. If I remember correctly, there is a security manager class, which can be configured with a policy file, and it required a secure signature, and blah. But all this stuff was really awkward, and not easy to manage or understand.

Applets never offered a multimedia experience, like Flash did. So, the underlying technology branch is pretty much dead for good reason.
Back to top
panoss



Joined: 13 Jan 2015
Posts: 8

PostPosted: Wed Jul 27, 2016 2:19 pm    Post subject: Reply with quote

The reason I want to make a web app with Java is that I 'm making a student 's work. The professor decided for Java + db + web.
If it were for me to decide, I would definitely not choose Java!
It's 3 days now I'm struggling and haven't managed to make it show the data in the browser! Shocked

Thanks anyway!
Back to top
cp7781



Joined: 12 Jul 2016
Posts: 143

PostPosted: Wed Jul 27, 2016 2:46 pm    Post subject: Reply with quote

Well, Java on the server side can be a nice decision. It has a clean syntax and offers good hints for finding errors. The necessary technology is called Java Enterprise Edition (JEE), which is somewhat different to an applet.

But beware of the complexity.

It has basically the same capabilities like any easy PHP or Perl script. Which, as a fact of its own, is absolutely awesome. Read the official tutorials, and the busy authors will quickly jump over that fact, to get their tense work done. You will surely miss the sweet spot. Because, on top of that, it offers so much more, that you can easily invest months, if not years, to get a practical grip on it. So, in the end, Java EE sucks and succeeds, depending on your very own approach on it.
Back to top
Simon, Charles X. -ND
Posted via mailing list.





PostPosted: Thu Jul 28, 2016 2:33 pm    Post subject: Java Applet shows form and components but no data from db Reply with quote

Sounds like you want to build what is called a CRUD application. You want to start with a maven Web app and add in JPA (Java Persistence API) for the database access.
The JPA functionality allows you to map to existing tables or to create the tables based on a Java class definitions.

Find a good JPA tutorial and you should be all set.

-----Original Message-----
From: panoss [mailto:address-removed]
Sent: Wednesday, July 27, 2016 10:20 AM
To: address-removed
Subject: [nbj2ee] Java Applet shows form and components but no data from db

The reason I want to make a web app with Java is that I 'm making a student 's work. The professor decided for Java + db + web.
If it were for me to decide, I would definitely not choose Java!
It's 3 days now I'm struggling and haven't managed to make it show the data in the browser! [Shocked]

Thanks anyway!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo