I've started a job that uses Glassfish 2.1.1 app server and noticed there's a java-web-start directory under the domain1 folder. In That folder there are empty directories which correspond 1:1 with ear (and other files) files deployed under ....\domain1\applications\j2ee-apps.
What is the purpose of the java-web-start folder and why does it have those empty directories in it?
New to Glassfish.
TIA
Glassfish allows the user to launch a local client which can access the application inside Glassfish directly. The launching happens with Java WebStart.
See http://java.sun.com/developer/technicalArticles/J2EE/jws-glassfish/ for an introduction.
Related
I have created an application in Java EE, I have learned how to deploy it in the tomcat server using the manager app or by copying the war file to the webapps folder. Now I can start the tomcat server only from the Netbeans IDE.
I want to know how to start the apache tomcat server without using the IDE and run my web application from the war file deployed. If I'm headed in the wrong direction please correct me. I'm asking this to gain knowledge of how to deploy the .war file in another server system without using the IDE only the tomcat server.
The shell scripts located in "CATALINA_HOME/bin" are the most bare-bones way of getting Tomcat up and running. The two scripts capable of starting Tomcat in this directory are named "catalina" and "startup", with extensions that vary by platform.
In your tomcat installation directory, there would be a startup.bat/sh file which will start the server for you. Moreover you can see the conf folder as well if you want to change any configurations. Whatever war you copy to the webapps folder will be automatically deployed
I am using tomcat manager commands to deploy and undeploy web applications on a tomcat server. The problem is when I try to undeploy a web application, it does remove the .war file from the webapps directory but the exploded directory doesn't get removed (the WEB-INF/lib folder), neither from the List Applications in the tomcat mananger.
I am on Windows and I am using Tomcat 6.0.20.
Note: When I tried to delete the directory manually it gave me an error saying that the file is being used by another program.
I found the solution, just put this in your context.xml file in your_tomcat_home_directory/Config:
<Context antiJARLocking="true" antiResourceLocking="true">
Everything works fine.
Try to stop your Tomcatserver(-service), then you can manually delete the exploded directory, then restart it agian.
I was on Windows using cygwin. Even after shutting down tomcat, I could not delete the web application folder - the command kept on returning "Device or resource busy". I noticed that the java process was still running even after I had shut down tomcat so I decided to kill it, and was able to manually delete the web application folder.
I am not familiar with build processes on Eclipse with javascript (HTML5) and Java resources. But recently I got a war file from someone who asked me put it on tomcat (since the server where I used to access the project from is down). I tried putting it under C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps... and then I restarted the tomcat which I have mounted on eclipse... and then I thought I will be able to access the project using localhost
http://localhost:8080/<warprojectfilename>
But I get 404...
Could someone let me know how could I deploy it on tomcat and access it using localhost like a website.
Thanks
it looks like you have got some other Tomcat (or other server using port 8080)running on your machine... please check which tomcat instance is running and stop it, or stop any other server running service that you mentioned is working fine...
You can stop tomcat server by going in to tomcat/bin
and execute
sh shutdown.sh
or
shutdown.bat
in windows
and to deploy war file to Tomcat server :
1) go to your Tomcat path
2) open webapps directory
3) paste your war file here
4) restart tomcat
5) now you should be able to access your app
File -> import ->Web-War file this will import your .war as a web project.
goto Servers->tomcat->web modules-> add the imported web project. restart tomcat. you should be good
Since it was all static resource (javascript files)... I decided to extract the whole thing in a static web project on eclipse and it worked.
I have a java web application which I can debug using IntelliJ or Eclipse through a local machine tomcat 7 configuration (localhost:8080/javaapp)
I was hoping to be able to reference static content not part of the java application - installed locally at /staticapp. However, IntelliJ launches tomcat with only the java application available, the other application is not launched or serving the files.
Is there a way to configure tomcat so that either:
- the /staticapp is also started when the /javaapp is launched so it may be accessed from /javapp pages
- tomcat will always serve the static content from the /staticapp folder while running... the staticapp folder tree is not a real "web application", it only contains folders with javascript/css/images
Thanks
In eclipse, open you Tomcat server settings and go to the "Server Locations" option. Choose "Use Tomcat installation".
Next, change the deploy path to Tomcat's (original) /webapps folder, instead of the eclipse setting wtpwebapps.
Add your static app manually (folder or .war file) or though eclipse to the webapps folder, then when you publish your "javaapp" Tomcat should start each web application in its deploy path.
I have multiple (8) WAR files and 1 EAR file that I want to deploy to Glassfish without having to redeploy each application through the Admin Console.
Previously in Tomcat the WAR files could just be dropped into the webapps directory, is there something similar for Glassfish? Using the asadmin command to grab a bunch of apps to dpeloy? Preferably for WAR and EAR files?
Yep - take a look at /domains/domain1/autodeply - you can drop things straight in there.
(substitute domain1 with your domain if you're working in a custom environment)
(sorry if the folder is off - it's coming from memory at this point)