I'm working on tomcat7 project on Eclipse (only the manager part). I get the project here. This is the first time I'm working on this kind of project, and when I turn on the server and look at my page, nothing has changed (It was only a test changing some string in java/org/catalina/manager/LocalStrings_fr.properties).
I guess the startup.bat is not updated or something like that. Nothing about it on Google (else the build of the project with Linux command line, but I'm working on Windows).
Does anyone knows what have to be done?
Edit: It seems that my question is not easyly understandable, so I put some pictures to explain:
I work on Tomcat7 in my workspace:
I try to change the file (just to test, I need to work on servlets too).
When I change the language file as:
htmlManagerServlet.title=Gestionnaire d''applications WEB Tomcat TEST
instead of
htmlManagerServlet.title=Gestionnaire d''applications WEB Tomcat
I get nothing after re-run the server:
I hope it's more easy to understand.
Thanks
Related
My team is working on a Java application that runs on Jboss WildFly, using Maven to resolve dependencies and Primefaces.
We're using Eclipse to build, deploy and run the server. Eclipse does most of the work, building the WAR file, deploying it to server and running it.
Now we need to create an script that performs all those steps because it has to run on remote server.
.
The steps would be something like this...
1 Run Maven:
$M2_HOME/bin/mvn clean install
2 Build project to a war file
3 Deploy war file into the WildFly deployment folder
$WILDFLY_HOME/bin/jboss-cli.sh --connect --command="deploy --force [PATH_TO_WAR]"
4 Start server
$WILDFLY_HOME/bin/standalone.sh
.
I can perform every step but once the server is running it don't seem to be any changes in the application. I think this is because the WAR file has to be built optimizing it for JBoss. Eclipse has a way to do this when exporting the project. I need to know how to do that from command.
EDIT:
The real problem is that Jboss is not updating the published project when i run it from bash script. I thought it was because i had to build it on a specific way. I was wrong. The build is fine, just running Maven the deploy is done. The thing is that even if i rebuild project and redeploy it, server doesn't seem to notice at all.
I've tried deleting tmp, lib and data folders from standalone folder, and nothing happens. I also deleted standalone/deployed sub files and folders and got the same result.
The only way i achieve the result i'm expecting is getting into Eclipse, go to Servers tab, right click on JBoss Wildfly and click on 'Clean...'. This options seems to clean cache, rebuild and re publish the application in a right way that i don't know. I didn't find any answers on google.
eclipse server clean option
Give a look on Eclipse war export: optimize for a specific server runtime.
Quoting from #Konstantin Komissarchik's answer :
Eclipse itself doesn't do anything with that option. What happens is
dependent on a particular server adapter. Many of the adapters don't
do anything with this option either, but they might in the future.
If a server adapter does support export optimization, it has the
option of displaying custom options beneath that pop-up list of
runtimes, so that's a good cue to use to see if something will
actually happen.
So taking in consideration that in your provided image there is no custom options below Wildfly 9 selection, I am pretty sure that this option does not perform any optimization at your exported war so you can totally omit it in your new build-deploy process.
How can i build the war file from command, knowing it will have to run on Wildfly?
We are also deploying applications for a long time on several versions of Widlfy with the same approach as you are planning to, without the optimization thing. I can ensure you that we have not faced any performance issue.
It uses tomcat to deploy. It used to run perfectly fine and when I pressed "Run" it opened a index.jsp in my web-browser which I used as starting navigation point.
But after I decided to try and run it without IDE, by copying contents into tomcat/webapps, something changed, although I'm not sure if it's connected. Now when I press "Run" inside project it just opens up a although absolutely nothing from my project got changed. And if you go into manager from there there are no applications running aside from manager itself, not even ones in /webapps in tomcat directory.
What exactly happened and how can I change it back?
UPDATE it's started working somehow. No idea why and what happened
Tomcat has a web.xml file where you can define your <welcome-file-list>
Please take a look at this
Also you can compile your webApp as a .war to deploy it on your Tomcat server.
Follow the instructions in this link if you need help.
I just updated to MyEclipse 2016, and I am having some issues getting my code to debug.
I wrote some changes in a java file and am trying to debug them on my websphere application server, but I noticed the debugger wasn't following the code at all. After a little investigation it turns out that I'm on V5 of the code, but the debugger is running V4 of the code.
I've tried going into the menu at
Run -> Debug Configurations... -> (Select My Server) -> Source
and changing the sources listed in here to just the workspace projects, but the debugger still goes through the old version of the code.
I'm at a loss and don't know what to do to get the debugger to pick up the right code. Does anybody have any suggestions I could try to get my debugger to pick up the new version of my code?
Edit: Forgot to include, Project --> Build Automatically is checked in the menus, and I have tried manually cleaning this a few times myself as well.
From your last comment, this means that the V4 code is actually executing on the server. The debugger is not executing anything; it is the server that is executing the code. So you have the wrong version deployed, somehow. Try a clean on the server, to remove any deployments and then re-deploy your project.
Given what everybody had said I checked into the deployment to the server. Looks like I had a WAR deployed to my server, when there is actually an EAR I can deploy to the server which includes the WAR I had deployed. Apparently doing just the WAR broke things, but deploying the EAR seemed to fix it all. Thank you all for the input though, definitely helped me get to the root of the issue!
I've been working on a web app that and here's me configuration before I get started telling my story.
Configuration: IntelliJ IDEA 11 + Java 7 + (Maven + Jetty 8.0.1).
When I clean and build my app on intelliJ, everything works as expected and nothing goes wrong; pages load, rendering are perfectly fine. Then I use -mvn clean package command to build my project so I'll test my app on Tomcat 7.
However, when I deploy my application to Tomcat, some pages aren't as I saw on my maven build: renderings doesn't work properly, styling is a little bit deprecated and so on...
Even some pages doesn't load fully when I check on firebug.
I wish someone encountered a similar issue; this thing is making me crazy... If you need any logs or anything just name it.
Thank you.
Apperently, there's always nuances that you miss sometimes and browsers keep extensive data of the pages you browser. I've just cleared all of my browsers caches and now everything works perfectly!.. So if you encounter something similar, be sure to clear your browser cache.
I am getting an error when I try to build my project in NetBeans. I am using JBoss 5.1.0 server and have attached that to my project. The error is -
The following error occurred while executing this line:
.../myPath/build-impl.xml:176: The Java EE server classpath is not correctly set up - server home directory is missing.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
ant -Dj2ee.server.home=<app_server_installation_directory>
I am using Mac OS X Lion.
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
I do have Weblogic Server set up under /home (on a Linux machine).
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
(where wlserver = the server name)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
This worked for me.
Right click on the Project -> Properties -> Run
And Change the server Setting from the current server to another sever and click OK.
Wait for any background scanning to finish.
Repeat the processes 1 to 3 again this time selecting the actual server you want to run the code on.
Then try Re-Running your application.
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
I solved it like this, I added in the ANT properties field
"j2ee.server.home=http://localhost/"
tolls>options>java>Ant
this in linux netbeans
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.