Quantcast
Channel: SCN : All Content - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3285

Why does HelloWorld xsjs service from Learning hub course fail with error 500?

$
0
0

Hi,

I've reached page 423 of the online course and when I try to execute the given xsjs HelloWorld exercise, I get an error 500. I am using a trial account in SAP HCP with an MDC database. I searched online but found nothing helpful. I was unable to add a "developer_mode" parameter to the httpserver section of xsengine.ini as suggested on http://help.sap.com/saphelp_hanaplatform/helpdata/en/a2/acd502e9544de298c3959f250127f5/content.htm?frameset=/en/d0/24177cfc5e49369cc6c4fe87d2faa7/frameset.htm&current_toc=/en/34/29fc63a1de4cd6876ea211dc86ee54/plain.htm&node_id=309&show_children=false

No error, just nothing. Very unhelpful.

 

This is what my code looks like:

 

$.response.status = $.net.http.OK;

$.response.contentType = "text/html";

var sOutput = "<!DOCTYPE html>"+

    "<html>"+

        "<head>"+

            "<title>Hello, World!</title>"+

        "</head>"+

        "<body>"+

            "<h1>Hello, World!</h1>"+

            "<p>Current server time:"+Date()+"</p>"+

            "<p>Current User:"+$.session.getUserName()+"</p>"+

        "</body>"+

    "</html>";

$.response.setBody(sOutput);

 

...and this is what my .xsaccess file looks like:

 

{

     "exposed" : true, 

                 

     "authentication" :                                           

            {

               "method": "Form"  

            },

 

     "cache_control" : "must-revalidate",

 

     "cors" :                     

            {

             "enabled" : false

            },

                    

     "enable_etags" : false,

 

     "force_ssl" : false,

    

     "prevent_xsrf" : true

}

 

Is anybody able to assist?

Regards,

Johan


Viewing all articles
Browse latest Browse all 3285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>