I have a dev machine, which deploys a java project to a local jboss server.
I have an IntelliJ maven project that has some html/js/jsp/servlets, etc. Is there a way to edit the code of the html/js files and then do a refresh of the webpage and see the updated changes without having to redeploy?
When doing just front end apps, I can accomplish this with a node server using gulp watch.
I'm hoping for something similar with my jboss server setup (intent is to simplify architecture and try to get the same front end development speed but have it all contained within a war). If I need to some how use gulp watch with maven, I'm good with that too, as long as I can make changes in the front end code (html/js, I assume changes to jsp/servlets would require a redeploy) and refresh the webpage and see the changes right away. I've also seen people write scripts to copy files from source into an exploded war before, but nothing that was automatic like gulp watch. My googles have failed me, anyone know how to accomplish this?
Related
I have eclipse installed on a local computer, and am working on a project by myself. No one else is collaborating on the coding, I am doing it all myself.
Sometimes, I get ambiguous error messages in my spring mvc app when I run it on tomcat server using eclipse's run as...run on server command. For example, there is sometimes NO stack trace. In those cases, I would like to at least be able to see when each file in the app was last saved, so that I can try to figure out what I changed since the last time the app ran successfully. Ideally, I would like to also be able to see what changes I made to specific files.
Can anyone show me how to accomplish this?
Eclipse has Local History feature: try Team > Show Local History from context menu.
But I recommend you to use some version control system (svn, git) even if you work on your project alone.
I have a question regarding updating a application on websphere application server. The application is already up and running and I just want to update the code which is packaged in a .ear file. Here is what I thought I should do:
stop the application server.
go to my enterprise application, select the one I am updating, and click update.
point to my .ear file in replace the entire application radio button option.
restart my application server.
After doing this and trying out my application, it is still running the old code, which makes me really confused. The only way I managed to get it to work is to use WinSCP, manually go to the cell directly/installedapps and replace the whole .ear folder. I dont think this a viable solution moving forward.
I solved it. After some intense digging it seems the binary files were expanded into dmgr profile but not my correct node. After finishing the update instead of clicking save I click review and there is a checkbox to synchronize the nodes, which then did the trick.
To update existing enterprise application we do not have to stop the application since WAS stops the application before updating the code .
Based on the update you gave i am assuming this is a network deployment manager setup , so possibly problem is with sync is not taking place after updating the app and save .
Are you explicitly invoking sync operation after application update ? If not , i would recommend that.
Still problem persists then most likely for what ever reason nodeagent process is not invoking app expansion into installedApps folder but you can take a quick look at nodeagent systemout.log file or ffdc files to see if there is any clue about expansion process.
As a work-around you can also use EARExapnder.sh/bat tool available /profile_home/bin directory to expand the application into installedApps when the app is really updated in config/cells/cell_name/applications but not under installedApps folder.
I hope this helps.
Thanks
VT
These opinions are my own.
I have a Google App Engine Application, and as part of that Application I have my standard HTML pages, Home, ContactUs, Testimonials, Pricing ETC ETC, when users click on "login" or go to a specific URL eg (www.diarybooker.com/demo) it loads the actual application.
All these standard HTML files are fairly static files though, with analytics and SEO etc in them, however in order to update these currently I need to release a new version of my application every time.
Can anyone offer any advice as to how I can JUST update the HTML without having to release a new version of my application (especially if I am in the middle of a development cycle and don't want to branch just to update a contact number or fix an SEO issue etc)
It is entirely possible that I am actually using the system incorrectly and that I should be re-wiring things better/differently, but I cant find any information about how this SHOULD be setup, and Im not even sure what to search for either, so if anyone can at least point me in the direction of some information on this, I would be very greatful!!
By way of an alternative example, I have a friend who is running www.wineathome.org.uk and if you click on "attend a tasting" it moves off into http://wineathomeuk.appspot.com. Clearly this is not very clean and is also not the way to make it work, I could embed the application in an iframe, but is that really the way to go?!
You have your application code in source control, right? I'd suggest that you create a deployment directory and clone into it the version of the application that you want to have running on AppEngine. Then, copy into the deployment directory the versions of the HTML files that you want updated. Deploy away.
That is the only strategy that's going to work for you. The GAE deployment tool only deals with your application as a whole.
Looks like you have a couple of issues going on.
On the first issue as #AdamCrossland states you can use source control. I use git and create branches for my application at different versions. If you do that you can merge your updated HTML back into an older branch then update your application from that branch. That way your only changing the HTML files and leaving the application in it's current state. App Engine deploy is intelligent and will only upload the modified files. Doing this from Eclipse is a bit more difficult than from the CLI IMO, but YMMV.
The other issue of a friend clicking on attend a tasting routing the url to appspot is a bit harder to deal with unless some code is provided. I would think it is because the code is doing a redirect to a hard coded URL. I have several application mapped to a domains and none of them route to appspot unless I forced it to in order to use some functionality like HTTPS which only works on appspot.com. I personally try to avoid iframes it opens up an avenue for exploits.
I'm developing using IntelliJ 11u on a spring mvc application using tomcat.
I tried the maven jetty plugin, but after a few builds I keep getting java permGen issues and then it just hangs. I was told this was because spring uses log4j and it has some sort of leaks?
Anyhow, I'm asking for tips to help fire up a server, tomcat, with my updated code so I can make quick updates and have tomcat reloaded.
Here are my current annoyances with tomcat:
Only code changes seem to get auto-reloaded, if I make changes to my view pages things don't get updated unless I redeploy. The maven jetty plugin seems to map to my view pages directly and I saw updates to my view pages instantly w/o it even redeploying.
if I have more than 1 thing running in intelliJ, like say I have a main program that I run, or a unit test, IntelliJ seems to re-order what gets run in the run drop down menu and also the shortcut keys get changed to the last thing I ran.
I use google chrome, for some reason when I start tomcat it brings firefox to the forefront and opens a new tab each and every time.
If someone can address any or all of the above issues that would be great as I hate this dance I have to go through just to update/redeploy my application. I wish it could just be a consitant method, using shortcuts or automatically without me having to close the tab created in firefox, and then minimizie it, or redploy for a simple view change etc.
You should configure IDEA to update classes and resources and enable a checkbox in the Run configuration to do it automatically on frame deactivation.
Browser can be changed in IDEA settings and you can disable opening browser at all in Tomcat Run/Debug configuration.
As for the Run panel tabs order, you can pin tabs using the tab right click menu, in this case they will remain in the Run or Debug panel in the order they were created.
Look at JRebel if you want an even more productive environment (It costs, but I find it is worth it). As you can see here, http://zeroturnaround.com/jrebel/features/, it increases the types of changes you can hot-swap (no waiting for a build). I am currently evaluating it myself and will probably pick up a full license.
BTW, if you develop in scala (it looks like you're not, but just in case) the plugin is free.
When I work in on an servlet application in Eclipse, I have to choose Clean Working Directory in the server tab of Eclipse for the changes to be visible in the browser. Is there any way to make sure that I only have to build my servlet and the changes are immediately visible?
Doubleclick the Tomcat entry in Servers view, go to the Publishing section and select Automatically publish when resources change.
It by the way won't happen that "immediately". It might take around 3 seconds, you should see this activity in server logs. Although a slow starter, but Glassfish publishes in a subsecond. You may consider it instead for fast development.
Honesty, i do not think this is possible.
It is like programming in javascript and there is no way to see the result without clearing the browsers cache and reloading the page.