4 Followers · 339 Posts

Caché Server Pages (CSP) is both an architecture and toolset used to build an interactive web applications with the InterSystems Data Platform.

Question Chip Gore · Sep 20, 2022

Hi -

I'm looking for some help in getting an OS level application on my server to startup from a csp page and I'm just missing something.

I have a routine (and I've tried the same code from an instance method, with the same results) that will launch an application at the OS level using the $zf(-100,keywords,program,parms) from a terminal session, but it won't/doesn't seem to work when I call the code from a #server() call from my webpage. I don't know if there is some combination of keywords or perhaps a different version of the $zf() call that should/would work.

7
1 406
Question Cacio Watt · Aug 28, 2022

Hi,

Over time I have created an house-automation solution based on IRIS:
90% of my code is pure ObjectScript, with the most recent 10% being the use of Python libraries for specific tasks.
All of the above being terminal based up to now.
I would like to expose some configuration options / parameters via a very simple web page, to be serviced with the IRIS private web service (so I don't want to use an external Webserver just for this..)

7
0 671
Question Michael Davidovich · Jul 29, 2022

What are other's thoughts, opinions and experiences going from CSP to RESTful services, specifically when it comes to reusing code in CSP files?

One could define a method in CSP as follows:

<script language="cache" method="SubmitSomethingAwesome" arguments="aswesomeId:%Numeric"> 

And it's generated in csp.mycsppage.cls ascsp.mycsppage.SubmitSomethingAwesome(awesomeId as %Numeric).

Have people had success defining there rest call by calling the generated CSP classmethod?

Things that work well I've found:

3
0 538
Article Oliver Wilms · Jul 10, 2022 1m read

As I was thinking what I could develop for InterSystems Full Stack Contest, I saw this post:

https://community.intersystems.com/post/how-access-production-items-through-objectscript

I developed ProductionManager.csp. It displays items in the active production. It also displays the Class in use and the date and time of last message. I believe these data points can help you make decisions which items to remove from the production.

0
0 291
Question Oliver Wilms · Jul 10, 2022

I am still working on iris-for-money app: https://github.com/oliverwilms/iris-for-money

Account.csp posts a rest call with _SYSTEM username and the password.

xhttp.open("POST", "/restapi/sql/" + query, true,"_SYSTEM","SYS");
xhttp.send();

/restapi web application has Password Authentication Method enabled.

SYS is the correct password for _SYSTEM user.

I do not understand why I see login failure in Audit database.

1
0 381
Article Fabio Goncalves · Dec 12, 2016 3m read

Suppose you have developed your own web app with InterSystems technologies stack and now want to perform a captcha validation on the client side in order to determine whether or not the user is human and make it safer. There are some modern frameworks to address the captcha issue, however most part of them needs internet access to generate codes and sometimes are complex to implement. Take this as basic example considering that image recognition has gotten too good. That's why you nowadays you tend to see more pattern recognition captchas than mere reading ones. (I.e. click all the images with

9
1 1676
Question Jordan Everett · Jun 4, 2022

Hi all!

I'm currently trying to find out how to have one Web Gateway route to multiple servers Management Portal. The only thing that I have come up with so far is to potentially make different routes per server?

I have a development, test, and production server and I want to use the same Gateway server using IIS to do SSL/TLS encryption for the CSP pages.

Any ideas or recommendations to pull this off?

4
0 558
InterSystems Official Raj Singh · May 2, 2022

This month I announce the release of version 1.8.0 of the VS Code extension, which contains the following enhancements and bug fixes.

The big news is support for server-side project files as some of you old-timers will remember from Studio. If you work client-side, VS Code already has great project management features. You can simply use a folder as a project, or use multi-root workspaces. But if you work server-side, you might appreciate some better artifact management capabilities, and that's what this feature is about. Read more in this new Projects chapter of the documentation.

3
1 513
Question Michael Davidovich · Jun 6, 2022

Hi there,

I'm passing a JSON object to the server as such:

{"key":"value","key":"value","key":"value"}

From the client:

- Build object

object=JSON.stringify(object)

-pass to server side method as %String

On the server:

s object={}.FromJSON(object)

Instead of getting something like

object=<OBJECT REFERENCE>[2@%Library.DynamicObject]

I get

object="991@%Library.DynamicObject"

I can't access that object using %Get as if says invalid OREF.

5
0 486
Article Muhammad Waseem · May 30, 2022 3m read

Hi Community,

This post is a introduction of my open exchange iris-fhir-client application.

 iris-fhir-client can connect to any open FHIR Server by using embedded python with the help of fhirpy Library.
Get Resource information by terminal and by using CSP web application.

2
0 1024
Question Steve Riddle · Nov 1, 2021

Hi,

Has anyone experienced any issues when using Cloudflare in front of a csp application?
I keep getting 502 errors when Cloudflare is active?

Strangely, the SMP works but only if I remove the trailing question mark from the url but it doesn't resolve the issue when I try any other csp application URL's.

3
0 319
Question Michael Davidovich · May 13, 2022

We are experience this with our own web app and even the demo/template here: intersystems-community/iris-fullstack-template: This template shows you how to build, test and deploy a simple full-stack application using InterSystems IRIS REST API (github.com)

When changes are made to CSS or HTML files, we can see the changes are saved to file in the Docker container by visiting the command line.  However, after refreshing, clearing cache, etc. the changes don't appear on the web application in the browser.  Viewing the source css in the browser, we see it's the old file.  

7
0 321
Question Timothy Leavitt · Apr 25, 2022

I have a .woff2 file I'm trying to serve over CSP.

If I set:
^%SYS("CSP","DefaultFileCharset")="UTF8"

Then it "just works" - but I'd rather not do something so heavy-handed/instance-wide, on principle. (This is for something that will ultimately be published on the Open Exchange.)

A more granular option, it seems, is described in the %CSP.StreamServer class reference:

if you need to define settings per extension (in uppercase) you can use ^%SYS("CSP","MimeFileClassify",$zcvt(ext,"U"))=$listbuild(type,bin,charset) where:

2
0 366
Question Michael Davidovich · Apr 22, 2022

I am referencing the documentation here: https://docs.intersystems.com/ens201815/csp/docbook/DocBook.UI.Page.cls…

I have embedded html within a <script language="cache" runat="server"> block.  Within that I'm defining and using a macro, but it doesn't display at all. Something like:

<script language="cache" runat="server"> 
s stringData=obj.data 
#Define displayString stringData 
&html< 
<p>$$$displayString</p> 
> 
</script>
2
0 359
Question Chip Gore · Sep 22, 2020

Hi -

I'm trying to get my VS Code instance that is connected to an AWS IRIS instance to edit/save/compile .csp files, but it's failing to work and I'm not sure why. The ".csp" is associated with the objectscript-csp code, and the server is connected, but things just don't act like they are enabled.

Should this work? and if so, what might I have missed in configuring things?

5
0 1035
Question Michael Davidovich · Apr 5, 2022

The documentation suggests this method for calling server side methods via SUBMIT: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Following that, the form I'm submitting needs to validate the dates entered (the startDate isn't past the endDate).  

Trying to keep everything in the .CSP file, I add a tag:

<script language="Cache" method="Validate" arguments="startDate:%Date,endDate:%Date">

I'm able to validate the dates here, but not matter what I do (quit, return false, redirect) the code that runs on the SUBMIT goes:

8
0 394
Announcement Raj Singh · Mar 21, 2022

I'm pleased to announce the release of version 1.4.4 of the VS Code extension, which contains the following enhancements and bug fixes. Links will take you to the GitHub issue being addressed. As always, if you already have the extension installed, VS Code should automatically update your extension. If you're a new user, use these instructions to get started. 

Change Log

0
0 338
Question David Hockenbroch · Feb 28, 2022

Is there a way, for testing purposes at least, to change a CSP session over to a different user? We have a lot of things in our system that are allowed or restricted based on the user login, so it would be useful for me to be able to occasionally run as a different user to see how things look and work for them. I've tried using the %CSP.Session.Login function, but that still shows the CSP session as being from the original user, not the one I've switched to.

3
0 444
Question Manikandasubramani S · Jan 26, 2019

Hi,

I have been trying to implement SPA using routing between two components in a CSP page. 

If i use the line which i commented the page views and gets data from the vue instance (when not using the <route-view> and other 2 vue route functions below).

since i need to implement routing i am using as below, now the property "selectedYear" is not getting data from vue instane and i am getting the below error as well.

I dont know whether i am going down the right path.

please see my code below and help me

1
1 1994
Article Alex Kogan · Jan 22, 2021 2m read

This concept may be known to some, but I just found it very useful and I would like to share as it may help someone else.

If you are working with CSP or Zen you sometimes come across the need to use embedded JavaScript. Suppose you are working with some loops, which use < or > as shown in example below:

&js< 

               var test = document.getElementById('seTest');

               for (var i = 0; i < test.options.length; i++) {

                              // Do Something here with my test.options[i]...

               }             

>

2
5 581