Associating a custom preview URL with a .cfm file in ColdFusion Builder (Eclipse) - eclipse

In my usual ColdFusion directory layout all files are accessed via a controller called r.cfm that uses an include to pull in the actual .cfm file, so a file called "salaries.cfm" would be invoked via http://servername.com/r.cfm?name=salaries
In Eclipse with the ColdFusion extensions I could set the file properties so the default url for salaries.cfm would be http://localhost/r.cfm?name=salaries - when I ran the debugger that url would launch, not http://localhost/salaries.cfm - how do I set that up in the ColdFusion Bulder beta, the debug configuration is always non editable per file.
I have played around with server prefixes but that does not seem to do it.
Thanks for any tips

I don't think this is currently possible in CFBuilder -- as you said, this setting is not per-file. You could put in an Enhancement Request, though, if you wanted: https://bugbase.adobe.com

Related

Keycloak CSS is not updating in browser

I am upgrading Keycloak from 9.x to 12.x in a development environment. I initially copied some custom themes forward, and found that the styling was badly broken (no surprise). I reviewed my FTL files, copied some of the core changes into my theme, and things are much better - just some minor issues to adjust.
Now the problem. I've made the changes to my login.css file, but those changes aren't showing up in the browser. It continues to fetch an old version of my custom CSS file.
What I have tried (multiple times for most of these):
Clear browser cache
Restart Keycloak
Check ownership/permissions of theme files
Restart entire server
Load CSS file directly
Load CSS file directly with meaningless parameter added (trying to bypass any possible middleman caching)
Confirm new version of Keycloak is the one running
Load page in other browsers
I've also now grepped the entire Keycloak directory for some of the CSS rules I've removed, and I can't find any copies of the "old" css file anywhere that might be getting referenced by accident.
Also, there are no messages in the Keycloak log when loading the CSS file.
I want to figure out how to get Keycloak to deliver the updated CSS to the browser.
Blind guess, so please don't blame me if it doesn't work. (question should include minimal reproducible example):
Edit /opt/jboss/keycloak/standalone/configuration/standalone-ha.xml and update it as follows:
<theme>
<staticMaxAge>-1</staticMaxAge>
<cacheThemes>false</cacheThemes>
<cacheTemplates>false</cacheTemplates>
...
</theme>
For me it worked when changed this file
standalone.xml
like below way
<cacheThemes>false</cacheThemes>
<cacheTemplates>false</cacheTemplates>
I think it is because I am using single instance mode instead cluster ha mode.
Apart from disabling cache, as described above, you can also adjust the theme resource URLs, breaking the client-side cache. It's a bit of a hack, but you can directly modify the resource tag portion of the URL by adjusting the database migration_model.id value.
references:
https://github.com/keycloak/keycloak/blob/main/model/jpa/src/main/java/org/keycloak/models/jpa/MigrationModelAdapter.java
https://medium.com/#hokumski/how-to-drop-keycloak-theme-cache-without-clearing-browser-data-aebb499ae83b
You must delete the path keycloak-server\standalone\tmp\kc-gzip-cache\sbgwq or otherelse folder... and test in a browser in incognit mode.

SAPUI5 load file in the workspace

I need to upload files in the Workspace:
I dont know which URL i should give as parameter to my file Uploader. Considering that i working with the SAP WebIDE personal Edition and my file are located in the following path:
file:///C:/SAPWebIDE/eclipse/serverworkspace/Al/ALine/OrionContent/testApp/webapp/model/
What should i please set as Url here?
var oFileUploader2 = new sap.ui.commons.FileUploader({
name: "upload2",
uploadOnChange: false,
uploadUrl: "???"
});
I think you have misunderstood how the FileUploader works.
The "uploadUrl" parameter should be used to specify a path on the "web server" (e.g. application server, web container) on which your application is hosted. UI5 is a web user interface framework, it does not know how to handle (server-side) upload requests. This means that the server (backend) itself should have some implementation for handing the file upload.
After you select the file and trigger the upload, a POST HTTP request is made to the path specified in this "uploadUrl" parameter. If you have no web server to know to handle it, then it will invariably give back an error HTTP response.
Based on the title of your question, I understand that you would want to upload the file inside your workspace. IMO, this does not really make sense (as you are mixing in the design time environment with your run-time environment (i.e. your application should never depend on the IDE).
Nevertheless, you can try and import a file via the import menu (right click on package, import, from file system) and see what URL is the request triggered against (using the dev console). I looked around a little and roughly this is the request URL: http://localhost:[Web IDE Port]/xfer/import/[User Name]-OrionContent/[Project Name]. In the Slug header you would have the file name. You might not be able to make a POST request towards this URL directly (because of XSS / CSS limitations), so you might need to create a route mapping for it.

is it possible to replace a javascript file in the network or sources tab of chrome

If an webapp I am running did a GET on a javascript file but I wanted to intercept that GET and provide a different javascript file could I do that?
What would be the easiest method?
To give a frame of a reference I am writing a meteor application and the server database got torched. My only hope seems to be to take a cached version of the application.js and inject it because I believe mostly everything can be rebuilt from that.
You can edit the existing JavaScript code.
Not sure how to replace the JavaScript file.
Press F12 it bring the developer tools at bottom of your page .
Go to resource and select your JavaScript file
It will open inside editor(right side) there you can modify your script.

Tomcat java servlet redirecting to wrong URL

I have a login servlet that is supposed to send a redirect to a specified url but instead I seem to be getting sent to an older version. I am using Tomcat 7 in eclipse and thinking it must be somewhere in the meta data that is screwie.
response.sendRedirect("../xyz/home.jsp");
but instead of going to xyz/home.jsp I am going to xyz1/home.jsp.
I had an old project called xyz1 which I then did a refracter to change the name to xyz. Now it seems that the login servlet keeps referring to xyz1/home.jsp. My other links are fine since I am using href and relative paths. I did a search through the meta-data to see if there was any older references to xyz1 and there were so I changed them and I also did a search in the server configuration files which I had also fixed. Not sure what other options there are.
Thanks,
-Tommy
Also the debugger is kind of useless since it goes through .class files that cant be read ...
I renamed xyz to be xyz1 and then just made a blank project called xyz. Only moved my source files and let the metadata fill in itself. I also made a new server just to be safe.

viewing autocomplete.do files

i was trying to reverse engineer a website ("www.asklaila.com") to find out how their yahoo UI AutoComplete Widget is working. Upon finding the view source of it, i saw it is refering to a file called "/autocomplete.do", i wanted to know what does this autocomplete.do file mean and can i download and open it locally on my machine?
Hope my requisite is legitimate and ethical.
As explained by FileInfo.com, the .do extension represents a server side Java code file that runs on the server and outputs HTML to the response.
Therefore, you cannot download it and view its contents. Any requests to the file will either return the same HTML or an HTTP error if it requires parameters/form fields.