Skip to main content

Hi, I've been trying to use the semantic URL and the optional path input so that I can manage the browser history API, but the application just stopped loading the DSPs on the containers. 


Is there any additional coding or configuration I need to do?


Thanks

Hi, I've been trying to use the semantic URL and the optional path input so that I can manage the browser history API, but the application just stopped loading the DSPs on the containers. 


Is there any additional coding or configuration I need to do?


Thanks

Hi

I used with USPs instead of DSPs to build RESTful webservices. 

$webinfo("PATHINPUT") returns the semantic URL

The complete URL follows this structure: 

https://server:port/webapp/servlet/component.operation/path?querystring


Example

 https://your_server/greatapp/wrd/USP/country/Greece 

Then, the component named USP is executed and $webinfo("PATHINPUT") returns "country·;Greece"


Hope this helps


Hi, I've been trying to use the semantic URL and the optional path input so that I can manage the browser history API, but the application just stopped loading the DSPs on the containers. 


Is there any additional coding or configuration I need to do?


Thanks

Same than Luis here

Semantic URLs are usable when you use your web components directly (pure HTTP requests).

DSP operate differently when used in DSPContainers so I suppose the problem comes from there, although I have never tried anything like that.

So your problem is that you added pathinfo segments in the url of the main DSP (HTML page) and then contained DSPs don't load ?



Hi, I've been trying to use the semantic URL and the optional path input so that I can manage the browser history API, but the application just stopped loading the DSPs on the containers. 


Is there any additional coding or configuration I need to do?


Thanks

Basically what I needed to be able to manage the browser history with the load of the DSPs in the containers. 


So I managed to solve it by adding this script to my index DSP:

window.uniface = window.uniface || {};

window.uniface.wrdurl = '/';


Next I created an onpopstate function that calls an operation that loads the DSPs set in the history API.

And the last thing I did was to set in the Apache Tomcat a set of rewrite rules for the URL so that the "/context/servlet/" part won't show in the browser as you navigate through the web application.