0 Followers · 332 Posts

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

Question Rajath Muthappa · Nov 9, 2016

Hi all, Basically i have 2 queries..

  1. Is there any simple way to fetch the data directly from the database (using the URL and credentials) from the csp file without creating a link table for that particular Table...?? If there is, could you please share the syntax of using them ..?

  2. Can we have an object return type from the below mentioned method to a javascript function.. ???

<script language="cache" method="methodName" arguments="argument1" returntype= "Not sure of the return type"> QUIT object </script>
9
0 853
Question Uri Shmueli · Nov 10, 2016

Hi all,

We've found that in most cases when we open a new CSP session the CGI varaiable %CGIEVAR("HTTP_COOKIE") contains the client name.

It looks like that : "state=SYSADM%3A0; Username=Urish; CSPWSERVERID=Cache for Windows (x86-64) 2013.1.1 (Build 501_1_13062) Sun Aug 11..."
In some other cases this CGI only contains  $zv - like "CSPWSERVERID=Cache for Windows (x86-64) 2013.1.1 (Build 501_1_13062) Sun Aug 11 2013 23:20:33 EDT"

2
0 472
Question Rajath Muthappa · Nov 8, 2016

Hi,

Currently i am building a CSP application using Intersystems cache to automate few tasks in Ensemble. Basically, I have 2 .csp class files, file1.CSP and file2.CSP in namespaces namespace1 and namespace2 respectively. On satisfaction of a condition I forward the request from file1.csp to file2.csp. while forwarding it prompts me to enter the log-in credentials again as the second .csp file is in a different namespace. Is there any way i can bypass the login screen while forwarding the request from 1 csp to another (as i am using the same credentials for both the namespaces) ?

3
0 435
Question Rajath Muthappa · Nov 8, 2016

Hi,

I am using the &sql () tag to retrieve the value from the Cache DB.

below is the piece of code i am using:

script language="cache" method="retrieveDetail" arguments="pVariable" returntype="%String" &sql( select columnA, into :tempVariable1 from TABLE where COLUMNC = pVariable

quit tempVariable1

i have to return the ColumnA value back to the calling procedure.

can i know how it can be done ? since i am getting an javascript error.

4
0 479
Article Alexander Koblov · Oct 12, 2016 1m read

Interesting anecdote I want to share. Not 100% Caché related, but I hope it would be useful.

When CSP Gateway is configured on IIS, opening CSP Gateway Configuration page is prohibited by default -- as IIS blocks URLs with '/bin' in it.

In our documentation we advise to add <remove segment="bin" /> to applicationHost.config file. That is correct.

Recently I had problem when manual editing file Windows\System32\inetsrv\config\applicationHost.config has absolutely no effect on IIS.

Turned out (http://serverfault.com/a/599865) IIS was 64-bit and notepad++ that I used for editing was 32-bit.

0
0 1047
Question Chris Stewart · Oct 7, 2016

Hi


I have been working on changing a web application from using %FileBinaryStream to storing and serving the file content from a %Stream.GlobalBinary property, stored in a new database.  I have managed to migrate the data across, and have also been able to redirect the stream so that it is being served through the web link.  However, the previous method set attributes on the File stream to have the stream be rendered as the original file type through MIME, using this code

do stream.SetAttribute("ContentDisposition","inline; filename="_filecvt)

2
0 1098
Question sansa stark · Sep 20, 2016

Hi all,

         In CSP page we get data from Class via Query method.

         <TD valign=top>#(DEOBJ.Get("Comments").Read())#</TD>

         The problem is we couldn't get the stream property value.

        (Property Comments As %Stream.GlobalBinary)

Thanks,

sansa.

         

2
0 380
Question sansa stark · Sep 14, 2016

Hi,

  I was set one session in user namespce (%session.Data("sup")="login User ").but i couldn't get this session(%session.Data("sup")) in  another namespace.

Cache version:cache 16

but i can acces in cache 5.02.

4
0 1117
Question Jose Antonio Cañizares · Sep 9, 2016

Hi all,

Do anyone know how to force to close the CSP connection used before redirecting to a different page so a new connection ( and therefore a new session id) is generated?

The idea is to generate new CSP session once we log off our application so the session identifiers are different.

Best Regards

4
0 582
Question sansa stark · Sep 8, 2016

Hi ,

We upgraded cache 5.02 to cache 16.In this version it is having problem with "$$$" macros.

These are the error's eating my time. i tried to figure it out but there is no exact solution .

MPP5610 : Referenced macro not defined: 'CSPSessionTimeout'
MPP5610 : Referenced macro not defined: 'CacheError'

I checked the check list also "These macros will be the only ones displayed by StudioAssist when the sequence, “$$$”, is recognized during program input. The full set of macros and their definition can be displayed via the $SYSTEM.OBJ.ShowMacros method"
3
0 300
Question Laura Cavanaugh · Sep 1, 2016

I've noticed that Management portal somehow manages to allow a single user to be in different namespaces in different tabs in the same application (i.e. Management Portal).  I've looked at my Processes, however, and see that all of my processes using MgmtPortal think I'm in %SYS, even though 2 of them are looking at globals in two different namespaces; NamespaceA and NamespaceB.  

I can even fool MgmtPortal because the first time I try to look at a global in NamespaceA it thinks I'm in %SYS!  After a refresh, however, I can see the global in NamespaceA.  

8
0 811
Question sansa stark · Aug 26, 2016

Hi ,

           i need to configure the CSP for IIS 8.5 .

          Server:windows 2012 R2 64 bit

          Cache version :5.02

         We followed the document "http://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls?                       KEY=GCGI_win#GCGI_iisv7".

         We  got error 

HTTP Error 404.17 - Not Found

The requested content appears to be script and will not be served by the static file handler.

 please help...

1
0 891
Question Tamara Lebedeva · Aug 22, 2016

Hi, all. I have CSP application and it needs to get and process data from ajax request with json-content. JSON can be very big. In this case: TRY { Set RequestObj = ##class(%Object).$fromJSON(%request.Content.Read()) } CATCH(Exception) { Set Status=Exception.AsStatus() } I get just part of getting JSON and validate error in $fromJSON. If I try to read it all in cycle: TRY { While (%request.Content.AtEnd = 0) { Set Data=Data_%request.Content.Read() } Set RequestObj = ##class(%Object).$fromJSON(Data) } CATCH(Exception) { Set Status=Exception.AsStatus() } I get <MAXSTRING> error. Increasing of

6
0 1650
Question Ponnumani Gurusamy · Aug 12, 2016

How to get a user input in cache . Below this program run in browser but displayed the error of "

Caché Server Pages Version 2016.1.1.108.0

Error Condition      The processing of the request was interrupted

CSP application closed the connection before sending a complete response"

<html>
<head>
<title>User input </title>
</head>
<body>
<script language="Cache" runat="server">
"enter 1ST num",x
"Enter 2ND num",y
= x+y
z
</script>
</body>
</html>
 

1
0 685
Question Renee Cannon · Jul 20, 2016

I am building a SOAP service using Caché 2016.1.  

If I set %session.Preserve=1 in OnPreWebMethod and I set a variable in my service method, why don't I see the variable in the CSP session processes' variables after I call the method?  

The documentation says "The original motivation for the provision of a state-aware mode of operation was to make it relatively easy to migrate legacy application code from a fixed client-server environment (e.g. terminal applications) to the web. Support for transactions that spanned several HTTP requests was also a consideration in its introduction."

1
0 437
Question Yongfeng Hou · Jul 1, 2016

在Aix7.1上安装使用root用户安装cache2016.1.1.107,且在安装过程中创建cacheusr用户;更改操作系统上的cacheusr的umask后,通过数据库修改编译后的文件(如,js,csp等)在小机上查看权限不变(-rwxrw-r--  cacheusr cacheusr test.js)。

目的:通过数据库编译后的文件的other用户有读写权限。

3
0 1069
Question Chip Gore · Apr 20, 2016

Hi -

After having seen how Atelier is working, I've decided to start learning/using Atelier for an existing project.

I've installed, and after a bit of poking around, I've managed to get a project that includes my classes, and they compile and such (these were all from an existing export), but I see that NONE of my .csp files came along despite being in the export file.

6
0 829
Question Amir Samary · May 24, 2016

Hi everyone!

     I am helping a partner to develop a new application and one of the things we are facing is that this WEB application will be used on different time zones.

     My first recommendation is that all timestamps should be drawn from $ZTimeStamp instead of $Horolog. That would allow the system to be draw the correct sequence of events even when they are generated on different timezones. 

1
0 851
Question Jenna Makin · Feb 24, 2016

Hi-

I'm curious to know what InterSystems clients are using for csp based web development methodology.

Are you doing tag based development, or class based development?

If you are using tag based development, what tools are you using to create the look and feel of your web pages?  Are you using tools like Adobe Dreamweaver, or do your developers sit down and code HTML using plain editors like Notepad and Notepad++

Are you doing prototyping of web pages and then adding CSP tags, or are you just developing the finished csp page with no prototype?

Thanks
Ken

2
0 476