Where does glassfish save your class/project after deployment on Windows? - windows

I am using Glassfish3.1 on Windows XP. After deploy a web service project using Netbeans, it works fine. But when i go to
install-path\glassfish-3.1\glassfish\domains\domain1\applications
I don't see my application.
under install\glassfish-3.1\glassfish\domains\domain1\applications\__internal, there's a folder with the same name as my project. But that folder is empty.
But if i deploy a project on linux, i can find my application and classes under application folder.
So where are they on windows?

When you use netbeans, the default deployment dir is the build/web subdir of your netbeans project folder. E.g. when your project is called myProject, the deployment dir is myProject/build/web.
It's of course a bit irritating since it is usually outside the glassfish install dir. But you can configure your webapp to be based in any dir of your harddrive.
In general you can find the location of any of your glassfish webapps in the domain.xml file of your domain, e.g. glassfish/domains/domain1/config/domain.xml
Each webapp has an <application> element with an attribute location, e.g. for one of my projects:
<application context-root="/MyFirstWebService"
location="file:/C:/.../NetBeansProjects/MyFirstWebService/build/web/"
directory-deployed="true" name="MyFirstWebService" object-type="user">

you can see path of application where it was deployed through glashfish admin console
eg.
http://localhost:4848/
or
http://yourhost_name:4848/
Common Tasks -> Applications -> you_application -> general -> Location:

Try going to install-path\glassfish-3.1\glassfish\domains\domain1\autodeploy

The location of your deployed project is dependent on the IDE you use.
To detect the location. Do the following:
Launch your Glassfish or Payara server from this location: http://localhost:4848 or any other location of your configuration for glassfish or payara server.
Location the sidebar "Common Tasks"
Click on Applications. List of deployed application will drop down
Select you application from the list. Information about your app will display on the right hand side. Check for the Label "Location". e.g : Location:
file:/C:/Users/Abode/Documents/NetBeansProjects/ImageJavapoint/build/web/
Then you will find where your app is being deployed.

Related

Application server libraries not found in IntelliJ

I am learning Spring MVC and trying to connect IntelliJ IDEA to Tomcat Server. So far I have downloaded the Tomcat 10 tar.gz package from the Tomcat website, extracted and put it at the following location: /Users/roxhens/Tomcat10.
Then, I create a new Spring MVC project and go to:
Add Configuration... > Click + > Tomcat Server > Local and then click Configure and provide the path above.
When I click OK, the following error in the picture shows up: Cannot Save Settings.
Where can I find these Application server libraries?
IntelliJ IDEA 2019.3.x doesn't support Tomcat 10 yet.
Use the supported Tomcat version (9).
If you are on Windows and you installed Tomcat on the primary hard drive of your System, you need to run IntelliJ IDEA as Administrator to be able to add the Tomcat server.
you have to point it to $Path/tomcat#9/9.0.45/libexec

Changes not reflecting on EAR in WebSphere Application Server after syncNode?

We needed to test a functionality on WebSphere.
While the dmgr had the updated code, we needed the old code.
So we stopped auto synchronization, restored the old EAR from backup and copied the EAR to the profiles/installedApps/cell/ directory while all the while having backup of the new EAR in the same directory (with a different name like EAR_bkp).
After the testing was done, we enabled auto synch again and ran a syncNode command to manually sync the EAR, but we are unable to see the new changes. We see the EAR file imported to nodeagents/cells/applications directory but changes are not reflecting on the profiles/installedApps/cell/ directory.
What could be the issue? Please suggest.
WebSphere ND has management tools for handling a variety of application updates without having to tinker in the directories on the dmgr or nodes directly, Applications > Application Types > WebSphere enterprise applications, then select the app, then click Update. There are several options described in the attached link. Also look at the Rollout Update option mentioned on the same page.
Application update from console

Copy file during Team City Build

I've got an MVC 5 project stored in Git. I've installed TeamCity 9.1.7 (build 37573) on our build server and I've set it up to successfully perform a build when a developer checks in code to Git. My goal is to deploy the MVC application using MS Web Deploy if the build is successful. I've seen a number of tutorials that suggest using a web deploy package, but these tutorials are six or more years old. Is this still the preferred method for deploying a successful TeamCity build to IIS?
Further, we've added the web.config file to gitignore for a number of reasons. Git houses as Web.config.base that developers will copy to their own web.config file as a starting point. A developer will copy the web.config.base file to web.config when they first pull down the project. I've tried to set up a command line task in TeamCity to xcopy the web.config.base file to web.config
Working Directory: (left blank)
Command: xcopy MyMVCProject\Web.config.base MyMVCProject\Web.config
This build step fails with exit code 4 at all times. I've set the TeamCity build agent service to run as a local administrator. I've tried this as straight command text as above, as a cmd or bat file, and with a variety of different path styles, going so far as to use the TeamCity working directory variable, excluding the MyMVCProject from the path, including the MyMVCSolution in the path, etc. Any ideas as to why the xcopy would fail?
This is the same problem I was facing.
But at last, we put the master web.config file on the server where TeamCity is installed.
Then once the Project gets deployed , I replaced the web.config file with the web.config file which is alreay present on server.
So there will be no conflict in the web.cofig file
You just need to add one more build step after the Web deploy step.
In that you can use Xcopy and you can replaced you web.config file
Hope this will work
WebDeploy is still a great option for deploying ASP.NET web applications. Its even used with the brand new ASP.NET Core framework. We don't use TC but do you WebDeploy/MSDeploy extensively at work to deploy 50+ applications.
Regarding your config setup, I've never seen this approach. We use Parameterization to handle config changes per environment (local dev included). If you're worried about security of the config values, you could secure your SetParameter files which have the sensitive info and include the web.config in source control with default or placeholder values.
http://www.dotnetcatch.com/2014/09/08/parameterizationpreview-visual-studio-extension/

How to remove out-of-sync, deleted autodeployed apps from Weblogic

being new to Weblogic, I followed some readme files to deploy apps to Weblogic, by copying the war files to the autodeploy folder. They automatically showed in the Weblogic console, so far so good.
Later, I deleted some of these apps from the autodeploy folder, expecting them to also disappear from the Deployments page. To my surprise, once I started the server, they were still there, and I couldn't remove them either: Weblogic was saying that I needed to delete the wars from the autodeploy folder (!).
Of course, I should have read the documentation first, that states the following:
Auto-Deploying, Redeploying, and Undeploying Archived Applications
To auto-deploy an archived application, copy its archive file to the
/autodeploy directory. WebLogic Server automatically sets the
application’s deployment mode to stage mode.
A deployment unit that was auto-deployed can be dynamically redeployed
while the server is running. To dynamically redeploy, copy the new
version of the archive file over the existing file in the /autodeploy
directory.
To undeploy an archived deployment unit that was auto-deployed, delete
the application from the /autodeploy directory. WebLogic Server stops
the application and removes it from the configuration. Note: If
you delete an application from the /autodeploy directory when the
server is not active, WebLogic Server will not detect that the
application was deleted even when the server is again in an active
state. In order to prevent an out-of-sync domain tree, BEA recommends
that you only remove applications from the /autodeploy directory when
the server is in an active state.
Since I've deleted the files while the server was down, they still show up there. What is not in this particular documentation is how to fix it once it's out-of-sync.
The answer is quite simple.
Navigate to your Weblogic's domain folder using a File Manager (Windows Explorer or Nautilus, for instance).
Open the config.xml file in the config folder;
Find the apps you've deleted between the <app-deployment> tags.
Remove them from the xml file;
Restart your server.

IntelliJ Tomcat deployment with large resources

I'm developing a web application using IntelliJ 13 Ultimate and want to run it on a tomcat (7.0.50).
Everything works as it should, but now I need to include a huge amount of images (500k / 3,5 GB) and as I am writing this, my IntelliJ is still copying the files. I am not sure weather it really takes this long or it just died and doesn't tell me. All it says is: "Building artifact ':war exploded': copying files..."
Is there a way to link the resources so that they will not be copied on server startup?
Don't let IntelliJ build the artifact prior deployment. In the "Server Run Configuration" there is a configuration "Before Launch". Remove the build task and just build the artifact prior launching your application, using Maven or whatever.
Also, is it really necessary to include so many images within your application? Are these images really a part of your app or just part of the data you create/collect with your app. If the later shouldn't these be stored in an seperate folder you app has access too?

Resources