I am working on a maven project with spring boot and angularjs.
Today I changed some simple html tags and noticed it wont change when testing in localhost.(odd because on Friday it did)
How i route my HTML with angular:
app.config([ '$routeProvider', function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "./html/homePage.html",
controller : "some-controller"
})
So when changing something in on of my pages it wont change in localhost.(Not hidden or something.Its just my structure from Friday)
I tested and changed homePage.html in homePage1.html. Started again and ofc it wont render anything because the file doesnt exists.
When I moved the somePage.html from my HTML folder and started the project again it rendered the page(but again the page from Friday). Again its rendered a File which isn't even in the folder.
When calling the page static via localhost/html/somePage.html it always shows the old page from last week. (with and without the edited file in path)
What I tried:
Restart Eclipse
restart whole pc
cleaned proejct(via eclipse)
cleaned and reinstalled with maven
updated project via maven
Does someone have a solution? (before i become insane)
I think the problem comes from the cache. Free the cache of the browser and test it again.
Ok Got it.
The error was a mix of eclipse cache and a Plugin.
Noticed that Egit, which wont worked with Spring Boot Suite, magically fixed itself and activated itself.
After resetting the Head of Git and deleting the cache in eclipse the changes are rendered again.
Related
SvelteKit does a great job to avoid full page reloads where possible. However, this can be an issue when the pages should be reloaded, for example when developers uploaded a new version of files.
SvelteKit addresses exactly this via pollInterval. Documentation is here.
However, I don't see any effect setting pollInterval.
(1) As vite updates my local files during development, I visited my production ready test site with a browser (avoiding the effects of vite).
(2) Then I changed the configuration by setting pollInterval to 3000 ms in svelte.config.js like this:
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter()
version: {
pollInterval: 3000
}
}
};
(3) Additionally I changed content on some pages.
(4) Finally I uploaded it all (effectively overwriting the old files).
Result:
The client browser did only see the old (previous) content when browsing the routes, not the new content. Reloading the URLs did not help either. Only after restarting nodejs on the production test site the new content was present in the client's browser.
What am I missing? An example is appreciated.
I'm using latest version of Swagger in my ASPNetCore 3.1 project and debugging on latest version of Chrome. When I try to enter swagger page it sometimes not loading and i see an empty page. It looks like totally random. It solves after I refresh the page.
I saw these errors on console.
GET https://localhost:44389/swagger/swagger-ui-bundle.js net::ERR_HTTP2_PROTOCOL_ERROR
index.html:95 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (index.html:95)
File in the error is random. Its sometimes a js file, sometimes a .css file. It changes.
If I publish this project on IIS and disable Http/2 support I never encounter this error.
Why?
You can try the following:
1.Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
2.In your configure function to ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
3.Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
4.If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.
I encountered the same problem, SwaggerUIBundle is not defined, and the problem is not on the web app that I'm developing but on my network. The problem was resolved after I switch to another network.
I created a template for a uib modal like so
var instance = $uibModal.open({
templateUrl: 'someDir/someTemplate.html',
controller: 'someController'
});
someTemplate.html does not get served when I check the "sources" tab in chrome's developers tool.
I test my server using Intellij and all the files seem to be served properly. But when I start my server with a jar I built with Intellij, it doesn't seem to serve the HTML template file even though I see it in the jar.
Nevermind, I had the file typed out incorrectly. Its weird it works within Intellij though, even with the incorrect file name.
I just finished my app in my development laptop, and now I am trying to deploy to an ubuntu server. I installed everything and ran rails s to try the development environment there. It works, but it never loads the css or js, I precompiled them and double checked that they are in the public assets folder.
The problem is that it never asks for them. For example, my application layout view it like the usual (just as an idea, not the actual code, but it is not needed to explain):
<html>
<head>
----rails calls to application.js and css
</head>
<body>
<%= yield %>
</body>
</html>
But when I load the login page, there is no css. I check the page source, and it only shows the <%= yield %> part, no html, body, or head tags, and of course no references to css or js. I login, and navigate the app correctly, but never is there any css or js files used.
Why is this happening? Nothing changed in the code, just a different machine. I've tried it in different machines, just copying the folder with all my code, and running bundle install then rails s, and it works great, in 3 different machines. Why doesn't it work on the ubuntu server?
I finally got it working.
For whatever reason, rails lost the default value of what view to render in the application controller.
I added the following line to the application controller and it worked:
layout "application.html.erb"
No idea why this is needed, since it is the default.
I have recently installed the blogengine.net application on both my local test server and my live web server. They are both Windows Server 2003 with IIS6. The application works fine on my local test server but it works partially on the live server. When I try to access the dashboard in the settings section, instead of loading the page, the browser tries to download the page. And when I click on themes (another cshtml page) I get a lot of strange text starting with #using BlogEngine.Core.Packaging #{ Page.Title = Resources.labels.themes;.....etc
I have been googling a lot but most answers seem to focus on IIS7 and the ones that seemed to apply for IIS6 did not seem to apply since they mentioned checking for missing DLLs (which isn't the case since the bin folder contains the exact same files as the one in the working server).
Things I have tried:
1) Resintalling the blog engine
2) Install MVC 3
3) Adding a mime type "text/html" to the ".cshtml" extension under the HTTP Headers tab in the web site properties (in IIS6)
4) Adding a dedicated application pool for the website
Some of the suggestions I found suggested that I should set the application pool to use .Net 4, but I don't know how to set that in IIS6 (unlike IIS7.5) and I set the asp.net setting in the website properties to 4.
Any help or pointers would be greatly appreciated.
Thanks!
OK. It appears that the problem has now been solved. For the benefit of other people having the same problem, here is how to do it:
1) In IIS Manager, go to website > properties > Home Directory > Configuration
2) Add two application extensions for .cshtml and .cshtm, setting both to:
executable = c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll
limit to = GET,HEAD,POST,DEBUG
Note that after doing this I was still having the problems with the browser trying to download the files rather then loading the pages. This was solved by clearing the browser cache (was using Chrome).