Postgres db connection through servlet

Questions and answers regarding general SQL and backend databases

Postgres db connection through servlet

Postby jtaillie » Wed Feb 11, 2015 4:27 am

Hi,

I am new to Servoy and I am trying to connect to a postgres db by means of a servlet. However, when I load the servlet I get the following error:
Screen Shot 2015-02-10 at 8.11.07 PM.png
Screen Shot 2015-02-10 at 8.11.07 PM.png (297.42 KiB) Viewed 2882 times


The code I used to establish the db connection is as follows
Screen Shot 2015-02-10 at 10.22.35 PM.png
Screen Shot 2015-02-10 at 10.22.35 PM.png (66.25 KiB) Viewed 2882 times


Any thoughts on how I could make this happen to work is highly appreciated!
Thanks in advance...
jtaillie
 
Posts: 2
Joined: Tue Jan 27, 2015 10:48 pm

Re: Postgres db connection through servlet

Postby omar » Thu Feb 12, 2015 10:14 am

Hi,

Can you explain why you want to make a connection from a servlet? Since you are new to Servoy did you read this section in the documentation? https://wiki.servoy.com/display/Serv7/Managing+Database+Connections
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: Postgres db connection through servlet

Postby jtaillie » Thu Feb 12, 2015 4:09 pm

Hi, thanks for your reply.
The servlet is a connector for some client side JS Dhtml components, which works fine for me , in Servoy. However, on the server side the servlet should load and update the data, against the client side dhtml component, which I cannot manage to get it working, is this possible at all in Servoy?

Thanks.
jtaillie
 
Posts: 2
Joined: Tue Jan 27, 2015 10:48 pm

Re: Postgres db connection through servlet

Postby mboegem » Thu Feb 12, 2015 6:25 pm

jtaillie wrote:on the server side the servlet should load and update the data, against the client side dhtml component, which I cannot manage to get it working, is this possible at all in Servoy?


This is not the way to go, Servoy-clients are not aware of any data changes you do directly on the DB.
I think you're far better of setting up a RESTful web service and consume these from clients.

Have a look here: https://wiki.servoy.com/display/DOCS/RE ... b+Services
or here: https://www.servoyforge.net/projects/ve ... /WebClient

These are ready to go (free) components (first one is shipped by default, 2nd is easy install)

Hope this helps.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 5 guests