# How to get data from database in html page created in web dev module

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098>\
**Category:** General Discussion\
**Created:** [February 10, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098 "2020-02-10T15:41:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 10, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/1 "2020-02-10T15:41:36Z")

</div>

I just started using Ignition so i don’t have much idea about how things work in this. I created a page using html and bootstrap in the web dev module. So what i am trying to do is, I want to show some data from my database in html table I created. I tried using php code but it doesn’t worked and I figured ignition doesn’t support php. So is there any other way that I can pull data from my database and show inside my html table?

Thank You.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 10, 2020, 3:49pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/2 "2020-02-10T15:49:03Z")

</div>

Ignition uses jython for all scripting. Create a GET routine with jython that queries the database using Ignition’s standard functions. **Programmatically construct** the HTML you need, incorporating the database query results. Consider adding some python templating libraries to your gateway to help with the HTML generation.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 10, 2020, 3:50pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/3 "2020-02-10T15:50:59Z")

</div>

> [@ptchanchal](#):
>
> I just started using Ignition so i don’t have much idea about how things work

Consider going through the [free online training](https://www.inductiveuniversity.com/) so you'll get an overview of what's possible and how things work.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 10, 2020, 6:01pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/5 "2020-02-10T18:01:00Z")

</div>

We have developed a **[RWS (Web Services)](https://youtu.be/NFS0RCjzg2Qrestful)** module for Ignition, that allows you to pull any data from Ignition server using WebDev module in an HTML page in JSON format. Once you have the data source available in the HTML page , you can use it to drive any HTML/DOM component. We can easily modify it to get Data from a Database as a json object. We are coming out with the next version 1.5 to have this request/response feature soon. Present version 1.4 is available on EXCHANGE portal at [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/1954/overview)

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 10, 2020, 8:09pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/6 "2020-02-10T20:09:30Z")

</div>

I did as given in the github instructions(“[GitHub - PRAMANJ/ARSCADA-1.4: ARSCADA version 1.4 repository](https://github.com/PRAMANJ/ARSCADA-1.4)”) but I am getting 404 error

 ![Screenshot%20(17)](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/61647de01febc9eb565e5ffd491b3303200d4e92.png)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 3:49am UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/7 "2020-02-11T03:49:24Z")

</div>

sorry for the late response, it was midnight when I signed off yesterday. The download and instructions are also available on Exchange portal [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/1954/installation). On step 13, you need to replace the host name **pramanj** to your server's host name in the URL http: // **pramanj** :8088/main/system/webdev/ars/ARS/rws/rws1.html. Sorry I forgot to mention it here, though I have mentioned it in ARSCADA instructions in step 10 on this page. To get your host name type hostname and press enter on command prompt.

I will upload the revised version 1.5 soon with request/response structure so that you can get database values as well on the HTML client.

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 11, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/8 "2020-02-11T13:54:17Z")

</div>

No problem for the late response and thank you for your time. I tried as you told but still getting the same error 404. I also tried calling postjson file in the web dev and its working but when try calling ARS/systemlist.html its giving 404 error.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 2:38pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/9 "2020-02-11T14:38:35Z")

</div>

Strange! try following things:

1. The default project name "ars" (lower case) in URL http: //pramanj:8088/main/system/webdev/ **ars** /ARS/systemlist.html is case sensitive.Have you named your project as ARS or ars? Change the project name or URL accordingly.
2. The project name in **c:\ARS\viewer\embedhost.js** is also case sensitive. Ensure its in line with your project name given.
3. Hope you have saved the project after importing the appropriate demo project , depending upon the Ignition version your are trying with.(b.t.w which version of Ignition are your trying with? 7.9 or 8?).
4. Hope you have imported the tags.xml file in default tag provider in the ars project.
5. Just make sure the file C:\ARS\systemlist.html exists in the path.

Let me know if it works with these changes

regards:

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 11, 2020, 3:01pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/10 "2020-02-11T15:01:37Z")

</div>

1. My project name is “ars”
2. The project name in c:\ARS\viewer\embedhost.js is also “ars”
3. I saved my project after importing and my ignition version is 8.0.7
4. Imported Tags too
5. C:\ARS\systemlist.html it exists in the path and i tried opening it outside of ignition and it was opening.  
And I used Host name after checking the hostname in cmd  
In the URL instead of pramanj I tried using hostname then its showing " This site can’t be reached" and I changed it with localhost ip then getting 404 error page not found.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 3:15pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/11 "2020-02-11T15:15:20Z")

</div>

I will install version 8.0.7 and try . I have an older version

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 3:33pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/12 "2020-02-11T15:33:14Z")

</div>

> [@prafull\_j](#):
>
> http: //pramanj:8088/main/system/webdev/ **ars** /ARS/systemlist.html

Hope a file resource with path C:\ARS is mounted on your webdev node on project browser? If not then right click in webdev and mount folder and select path. Also use hostname instead of localhost in the URL.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6a740fe503e2e127752c5ef669532d56b1ddf07d.png)

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 11, 2020, 4:07pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/13 "2020-02-11T16:07:05Z")

</div>

Yep, I have C:\ARS is mounted on my webdev node. And when I use hostname its giving an error " This site can’t be reached"

 ![Screenshot%20(19)](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f8bba16bda7a733c318ca1f0c09e010cc4760bc2.png)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 4:33pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/14 "2020-02-11T16:33:49Z")

</div>

Any ignition webdev experts may like to throw some light, what could be going wrong ? I have enabled CORS

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 11, 2020, 5:09pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/15 "2020-02-11T17:09:19Z")

</div>

> [@ptchanchal](#):
>
> This site can’t be reached

Could be some proxy setting issue? Which browser are you using? Chrome? Some google search may give the solution perhaps!

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 11, 2020, 6:38pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/16 "2020-02-11T18:38:30Z")

</div>

I am using chrome.

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 11, 2020, 6:40pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/17 "2020-02-11T18:40:07Z")

</div>

Is it working for you after installing ignition 8.0.7?

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 12, 2020, 6:42am UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/18 "2020-02-12T06:42:28Z")

</div>

I just upgraded my Ignition trial version to 8.0.7 (it upgraded smoothly!) and my ARS module is running like a champ! I think its got something to do with your proxy setting! Do a google search for "This site can’t be reached" you may get a lot of tips for the likely cause. Being on the local machine, I think it can only be a proxy setting issue, it can't be a network issue.

Try to open the URL in a different browser like IE or Edge or firefox?

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 12, 2020, 6:45am UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/19 "2020-02-12T06:45:25Z")

</div>

See the main page for the URL

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f38fc0621beb595f2b5e7b809989dc75e9d01893.png)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [February 13, 2020, 3:27am UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/20 "2020-02-13T03:27:08Z")

</div>

As mentioned earlier , yes it’s working fine on 8.0.7. Did you try on different browser or proxy settings? Will appreciate your feedback . I am coming out with slightly revised version 1.5 of ARSCADA soon

---

<div class="post-metadata">

**Author:** ![ptchanchal](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@ptchanchal](https://forum.inductiveautomation.com/u/ptchanchal)\
**Post date:** [February 13, 2020, 3:43pm UTC](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098/21 "2020-02-13T15:43:18Z")

</div>

I tried with google chrome and edge still it didn’t work.

[Next page](https://forum.inductiveautomation.com/t/how-to-get-data-from-database-in-html-page-created-in-web-dev-module/32098.md?page=2)
