Undefined route brings list of avalaible routes in production env - production

I realized my first WebApp with Vaadin 14 and deployed it to Tomcat 9 on the production server.
So far everything is working great, but when I'm using a non-existing route in the client browser the system responds with a plain text list of all available routes and shows even the following line on the bottom:
"This detailed message is only shown when running in development mode."
I have created the WAR-file with "-pProduction" and the startup-log of Tomcat does not show any dev-mode-message.
Any ideas what happens here? Thanks for reading my first question on this platform!
I worked my way through the Vaadin docs and tried the following entry in application.properties:
vaadin.productionMode=true
But nothing changed?

This is a known vulnetability CVE-2021-31413 in Vaadin 14.6.1 and older versions. The resolution is to update the Vaadin version to 14.6.2. The latest version is 14.9.1 as of writing this. Naturally I recommend that.
https://vaadin.com/security/cve-2021-31412

Related

Webstorm 11 build-in server returns 404

My default port for build-in server is 63342:
Also I've got JetBrains browser plugin installed
I just added Javascript debug configuration:
But getting this 404 error in borwser:
How to fix that?
p.s
Also I probably should point that I am trying to debug angular2 application it it makes any difference.
Just 1 idea - I can see that your actual project path (ng2-intro-my) differs from the one in URL (ng2intro). This may be the issue

After Successful completion of deployment status in Openshift through Eclipse, 404 error page is shown

After Successful completion of deployment status of my Java EE application (Spring ) in Openshift through Eclipse, 404 error page is shown on launching "http://closerbyapp-closerbyonline.rhcloud.com/closerbyapp" url.
Any help to Sort out this problem is highly appreciated.
Did you actually deploy an application at the closerbyapp context? the root context (/) of your application is working and showing the default index.html page that comes with the java cartridges. You should double-check how/where you put your code, and that you added it to git, and what url it should show up at. Maybe provide some of the code you used or steps that you took to deploy the code so we can help troubleshoot it? Along with any logs for your application that might be helpful.

parse.com cloud code set version?

I am new to parse and I am trying to figure out how to handle the version number.
I have been deploying some cloud code a bunch of times. So when I last deployed it gave me this message:
Uploading source files
Finished uploading files
New release is named v18 (using Parse JavaScript SDK v1.2.19)
So I thought I could go and hit:
https://api.parse.com/18/functions/someFunctionIWrote
So there I tried to use version 18 because of what I saw after deploying. That does not work and it returns a 404.
So, then I tried to hit:
https://api.parse.com/1/functions/someFunctionIWrote
this works and return the JSON I wanted.
So, what am I missing here?
I thought that every time I deploy the version would match. Do I need to specifically go in and change the current version somehow?
Can somebody help understand how to think about this correctly?
Thank you
If you ran a "parse deploy" it put v18 up there for you the URL stays the same.
The version in cloud can be verified in the terminal by typing: "parse releases"

Grails message.properties changes not taking effect in deployed application

I have a really annoying problem with a deployed Grails application on tomcat 7
I created a tool in my website that basically allows the site admin to edit message.properties files so that he can change the messages for a certain language as he desire.
All the changes are saved successfully to the file he edited.
In development, while running the website from STS (Soring Source Tools Suite; somethng like eclips) I just refresh the website in the browser and I see the changes instantly, all the changes that made to the message.properties file for the selected language is taking effect correctly.
But in the deployed application (same code same config no errors) the admin do the same thing, edit the resources in the same way as before, the message.properties file is saved with the new values correctly, but, I dont see the changes in the browser, unless I restarted tomcat, or after number of hours!
I've disabled the tomcat 7 caching, and I still face the same problem.
I've spent more than 4 days googling, but all the results are not related to my problem, and most of them are related to hibernate caching.
So, my question simply is as follows:
I want to go to a message.properties file in my deployed grails application, lets say message_en.properties, change lets say default.welcome.message=Welcome to default.welcome.message=Hello, World!
And then open any browser, and see Hello, World! instead of Welcome
Thanks in advance for any help =')
As they say, some big questions have a very simple answer!
Depending on a post I found, in my resources editor tool, I added this code in my action with other few changes in the bootstarp (see link at the end of the answer):
def messageSource
def saveMessageResources={
.
.
.
//my action logic
.
.
.
messageSource.clearCache()
}
and it worked :)
References: http://jira.grails.org/browse/GPAPPENGINE-44
Deployed application will not pick up changes until you restart it. Changes are reloaded on-thy-fly only in development mode for your convenience. It is called "hot-deployment" because only parts that are changed (messages.properties in your case) are applied.
If you want to edit messages in deployed application you can apply alternative solution - localisation plugin that keeps your messages in database.

Spring security login error

I just implemented a simple login functionality using spring it how ever worked with the eclipse in built browser but gives the following error in chrome and firefox.
HTTP Status 404 - /SpringLogin/welcome.jsp;jsessionid=8332D4F3D4709DCA37C87F30F1EA03D5
The requested resource (/SpringLogin/welcome.jsp;jsessionid=BEE789093FF79CB6B67F8DA368E8B3E4) is not available.
can you please tell me why it is happening?
PS: I have two projects SpringLogin and both of them had same project names and both had similar packages. Then neither of the projects worked properly and gave the above error. How ever after I created another project with a different name and using different package names, it worked like magic. I am guessing here that it may have been the problem. But what is the logical answer that'll explain what happened there?
you don't have being calling the correct URL
it seems that the context /SpringLogin/ does not exists anymore.
Try /welcome.jsp or if you changed the name of application - try /newappname/welcome.jsp

Resources