Implemented eclipse dynamic help with 3.x with static html files earlier(html files located in soruce folder)
Now the href for each topic has to be replaced with dynamic url, url
changes every day.So cannot map the url in context.xml.
How can we pass the dynamic URL for each topic on the fly.
earlier implementation is with below api :
PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp()
Related
I have a SpringBoot application that uses Swagger for the API doc and Swagger-UI for rendering it.
Before using the any of the endpoints from swagger-ui I need to retrieve a bearer token and for this a clientID and an authorize endpoint are used
I have 2 different environment where both the clientID and the authorize endpoint are different.
I'm using chef to handle the deployment of my app (which is a JAR started as java -jar myapi.jar) which builds a different application.properties for each environment but because the clientID and auth url are in the swagger-ui's index.html and that thee files are INSIDE the jar I don't know how to use chef to replace these values at deploy time.
Is there a way I can passed these values somehow? Or the only solution is to not have a JAR but an exploded jar ?
TLDR: I want to be able replace values in the index.html depending on the environement
I;m not aware of anything in springboot/swagger that let you pass values to the static files (aka ${clientId} from your index.html)
What you could do though is having chef template (a simple json file can be enough) containing
{
"clientID":..
"authUrl: ..
}
That you make chef write in the same directory where your index.html is. And in your index.html write some javascript to load that file.
I have a dynamic web project with maven, using technology as jquery, jsp pages and servlets. I have an example url in my application below:
www.mydomain.com/JohnSmith.html
(Above name "JohnSmith" is parametric, anybody can save any HTML with new name, it can be "SueBrown", "DemiMoore" etc. )
When user click to photos link in JohnSmith.html, I want to make URL like below:
www.mydomain.com/JohnSmith/photos/
And when user click to any photo in listed photos page, I want to make URL like this:
www.mydomain.com/JohnSmith/photos/545425 (--> id of image)
Which structure should I use? My project is running on Linux, Apache tomcat 7, and Apache web server 2.4. I looked into "Rewrite Cond" and "Rewrite Rule" on web server configuration, but it is very complex, I couldn't succeed to apply this scenario.
I've recently started looking into using Zombie.js + Mocha + Node.js as a unit testing framework for JavaScript files intended to be used client-side (e.g. in a browser).
Reading over the documentation though, I'm beginning to wonder if Zombie.js can be used for this purpose:
// Load the page from localhost
browser = new Browser();
browser.visit("http://localhost:3000/", function () { ... });
There doesn't seem to be any API for loading a static HTML file with Zombie.js. Can it be done? Can I just 'visit' a file:// URL and have it work? Or would I need to set up some sort of server on localhost for serving static HTML files? Is Zombie.js even a good choice for this sort of testing?
Yes. it supports loading static html files over file:// protocol. see change log:
https://github.com/assaf/zombie/blob/master/CHANGELOG.md#version-096--2011-07-28
In my Visual web part I'm using relative url like following and it's working fine . But I assume it will not work when I deploy my project in different site structure on another server. So my question is how to make links,urls dynamic which will work in all the scenarios.
../../something.aspx
Please note I have some JQuery files included in <script> tag I can't only rely on building dynamic url using code.
Rishi,
Are you using a document library to store the page? If so, you could use SPDocumentLibrary.DefaultViewURL. If you're trying to navigate to a different web, then you can get a web's URL from SPWeb.Url.
Best,
-Tony
I know that within Symfony2's configuration, there is no reference to the base url, as there is no request; the application could either run in cli or within a web server, and therefore we cannot rely on request. But still, I have configuration that asks for stylesheets or javascript base url (such as the JQueryHelperBundle, where you can set your jquery local path - being the local url). The thing is, is there a way to dynamically set a base url for the configuration, without having to change it so that:
The application can move from any directory under development, whether www/myproject or www/foo/myproject without having to change the settings
Production would work the same, except that rewriting the base url with apache would be detected (virtualhosting is common, where the baseurl is mapped to the web directory as '/').
Is there a way to get that base url information? Would using the difference between $_SERVER['DOCUMENT_ROOT'] minus the kernel root dir be a way to detect such base url? But what about virtualhost rebasing the url to / on the web directory? Hardcoding the base url completely couples the project to where it stands in development, and moving project around would require to change the base url everytime, which is annoying.
So, is there a way to dynamically detect the base url within Symfony2's configuration, according to the environment, without depending on the request?
I had to do that in a service, so I injected the router service in my own service and then:
$baseUrl = $router->getContext()->getHost();
But I considered it more as an hack that a real fixture of Symfony2 framework. For instance, in Controller you can generate absolute url easily (example from the symfony book):
$router->generate('blog_show', array('slug' => 'my-blog-post'), true);
And in the twig template, you have the {{ url }} function
I hope this help