I'm new to Java web framework, I googled to find that spring is one of the most popular framework. I tried to install tools and searched a tutorial to run spring framework on my mac.
step 1 - Tomcat installation
Following this site, I could install Tomcat on my mac. I'm using :8080 port for Tomcat.
step 2 - spring tool suite installation
From this site, I could install Spring Tool Suite.
step 3 - making an example following tutorial
I found a tutorial on using Spring Tool Suite. Following the procedure, I could build manolitomvc app.
step 4.1 - deployment <-- issue 1
Finally, I'd like to access the web app at http://localhost:8080/manolitomvc.
I clicked the green arrow to see the error message.
step 4.2 - deployment <-- issue 2
I opened overview page, and I guessed that I could set server location and deploy path to make spring web app available.
However, I have no idea how to set the server location (Tomcat server location that I installed in step1).
I tried to copy the manolitomvc directory into Tomcat main document directory(/Library/Tomcat/webapps), but it doesn't work.
How can I deploy the web app so that I can access the spring web app at http://localhost:8080/manolitomvc?
Could you recommend any other practical tutorial that I can follow to setup and use spring framework?
Thanks to Ralph's help, I could make Tomcat server working Spring Tool Suite.
Step1. Stop the tomcat server
cd /Library/Tomcat/bin and execute sudo sh shutdown.sh.
Step2. Create server
From Servers, New > Other ...
Select server/Server
Select Apache/Tomcat
Select web application
Step3. Execution and test
Execute the server
You can access the app through localhost:8080/manolitomvc.
Try not to use "VMware TC" try to start with a "normal" Tomcat.
Open the Context Menu in the "Servers" tab: New/Server
Select Apache/Tomcat v? -> Next
Select The Tomcat Intallation Directory, or click on "Download and Install.."
Related
I am using Windows 10, jdk 1.8.0, Eclipse Neon 3.0, wildfly 10 downloaded from camunda website, which includes Camunda BPM as part of WildFly 10.
My porblem: Camunda cockpit doesn't start in browser and gives 404 error! I'd like to know how to start make it appear. I was using Tomcat server and it worked, but now that I am using wildfly the cockpit doesn't start.
What I have done is as follows:
I have designed a BPMN model. Then by following the instruction in the following link:
https://docs.camunda.org/get-started/javaee6/
I have saved my BPMN model in src>main>resources, made the java classes in a maven project, add dependencies to pom.xml. Successfully built the project. Right click on the pom.xml, run as maven clean, run as maven isntall. After .war file is created in target folder copy it in camunda-bpm-wildfly10-7.7.0 > server > wildfly-10.1.0.Final > standalone > deployments, run start-camunda.bat. At this moment a page in browser opens with "404 - Not Found" error.
The cannot send the error I am getting at cmd.exe-standalone.bat because stackoverflow detects links in it and I can't use more than 2 links, but I can see my deployed file (myFile.war.deployed) in deployments!
I appreciate appreciate your help.
.5 (Final)
Using Netbeans, I develop sites with Tomcat as the local server to manage it.
In Netbeans it was "Install, write hit Run and it works"
How do I pull the same thing off in IntelliJ?
I can't find step-by-step instructions for this.
NOTE: Community Edition doesn't support JEE.
First, you will need to install a local Tomcat server. It sounds like you may have already done this.
Next, on the toolbar at the top of IntelliJ, click the down arrow just to the left of the Run and Debug icons. There will be an option to Edit Configurations. In the resulting popup, click the Add icon, then click Tomcat and Local.
From that dialog, you will need to click the Configure... button next to Application Server to tell IntelliJ where Tomcat is installed.
Here is step-by-step instruction for Tomcat configuration in IntellijIdea:
1) Create IntellijIdea project via WebApplication template. Idea should be Ultimate version, not Community edition
2) Go to Run-Edit configutaion and set up Tomcat location folder, so Idea will know about your tomcat server
3) Go to Deployment tab and select Artifact. Apply
4) In src folder put your servlet (you can try my example for testing purpose)
5) Go to web.xml file and link your's servlet like this
6) In web folder put your's .jsp files (for example hey.jsp)
7) Now you can start you app via IntellijIdea. Run(Shift+F10) and enjoy your app in browser:
- to jsp files: http://localhost:8080/hey.jsp (or index.jsp by default)
- to servlets via virtual link you set in web.xml : http://localhost:8080/st
Which version of IntelliJ are you using? Note that since last year, IntelliJ exists in two versions:
Ultimate Edition, which is the complete IDE
Community Edition, which is free but does not support JavaEE developments.
(see differences here)
In case you are using the Community Edition, you will not be able to manage a Tomcat installation.
In case you are using the Ultimate Edition, you can have a look at:
The FAQ for Netbeans users (see question How do I configure a web framework for my project?).
IntelliJ Ultimate edition "Help": Run/Debug Configuration: Tomcat Server
You can also debug tomcat using the community edition (Unlike what is said above).
Start tomcat in debug mode, for example like this:
.\catalina.bat jpda run
In intellij:
Run > Edit Configurations > +
Select "Remote"
Name the connection: "somename"
Set "Port:" 8000 (default 5005)
Select Run > Debug "somename"
Please verify that the required plug-ins are enabled in Settings | Plugins, most likely you've disabled several of them, that's why you don't see all the facet options.
For the step by step tutorial, see: Creating a simple Web application and deploying it to Tomcat.
The problem I had was due to the fact that I was unknowingly editing the default values and not a new Tomcat instance at all. Click the plus sign at the top left part of the Run window and select Tomcat | Local from there.
In Netbeans you can right click on the project and run it, but in IntelliJ IDEA you have to select the index.jsp file or the welcome file to run the project.
this is because Netbeans generate the following tag in web.xml and IntelliJ do not.
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
I have a simple Fusion Web Application program that I could run my simple application on the weblogic server before, but now when I try to run the JSF page I get these errors:
Deployment cancelled.
---- Deployment incomplete ----.
Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
#### Cannot run application MyFirstApplication due to error deploying to IntegratedWebLogicServer.
How can I fix this problem?
The following worked for me:
Close Jdeveloper application.
Delete systemXX.x.x.x.x directory.
Restart Jdeveloper and integrated weblogic server.
I also faced the same issue but after deleting system directory, my server started successfully.
the steps of running an application on weblogic server (or any other java server) consists of the following 4 steps:
Compilation and building
Starting the server
Deploying the fusion web application
Running the application
Errors could happen in any of the steps, and would cause obstacles to move to the next steps.
Your problem seems to be in the deployment phase, so the next step which is the running of the application is stopped from being executed.
It is worth to mention that your savior is the logs.
So you need to look into the deployment logs where it would clearly show the fault and the exception from not being deployed.
I resolved it.
Please Follow These Steps :
Right Click On The Model ;
Project Properties...
Select In Left Page; "JAVA EE Application"
Insert In Java Web Application Name: XXXApplication-XXXModel-webapp (XXX is Name Of Project )
Insert Into Java EE Webcontent Root : XXXApplication-XXXModel-context-root
I'm on JDeveloper 11g Release 2.
The following worked for me:
At the application menu bar - click on Run option.
Click on Start Server Instance - IntegratedWebLogicServer (in my case)
Wait for Server to fully start.
Locate Projects box/section/tree structure, locate your project name. Right Click.
Select Deploy, (create a deployment profile if required), to open the deployment wizard.
In the deployment wizard, select Deploy to Application Server, click Next.
In my case, I saw the IntegratedWebLogicServer instance in the following list, I selected it, and continue/finish with the deployment.
I strongly believe this is related to permissions.
I was able to run and deploy my applications to the default Web Logic server until I had more restrictions in my Windows machine - for example I was no longer a local administrator.
Hope this helps.
I'am looking since some days ago to the right way to deploy my ADF Secure Web project with maven to Weblogic server(WLS)
My problem is this file jazn-data.xml which contains informations about users/groups(roles)/grants. During the deploy process to WLS the jazn-data.xml muss be merged into system-jazn-data.xml. The system-jazn-data.xml is used by WLS to know about the securities settings of an application.
I add this to my weblogic-application.xml which is supposed to merge jazn-data.xml into system-jazn-data.xml but nothing
<listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationStateListener</listener-class>
Does somebody already do this with success? Thanks for all informations
Which version are you using, because if you are using 12c it should come out of the box with JDeveloper!
Or else try to use OEPE(Oracle Enterprise Pack for Eclipse) as it packages the application without OJDeploy, you can use that and create your Maven script to take the generated war file and resume from there.
#Festus sorry for being late, you can download the project from here, I created one role and have one page in this simple application, I packaged the application using mvn package and installed it in weblogic using Weblogic Console.
One problem I had is my Model connection, I remove the database connection from connections.xml and pointed the model to a weblogic datasource and the application installed successfully.
Did you try doing what's in this picture before deploying to maven, also remove users and groups!
This window can be accessed from Application properties
I would like to develop updater app. Lets say I've got:
- Running Tomcat
- Running Updater App on the Tomcat
- Running old version of the app on the same Tomcat
I would like to
- Stop old app
- Undeploy old app
- Deploy new version of app (lets assume that I've got new app war file somewere in Updater app resourcess.
Is it possible to do such remote deployment on Tomcat from another app at all?
To deploy a project to your Tomcat Server from another app you need to:
Add a library into your project “catalina-ant.jar” from the folder: {TOMCAT_PATH}\lib
And in your project to deploy a war file you need to only do:
org.apache.catalina.ant.DeployTask task = new org.apache.catalina.ant.DeployTask();
task.setUrl("http://localhost:8084/manager");
task.setUsername("managerLogin");
task.setPassword("managerPassword");
task.setPath("/UrlToYourDeploadingProject");
task.setWar(new File("c:/Project.war").getAbsolutePath());
task.execute();
Thanks to this solution I'm able to develop project that can update automatically my apps.
Yes. There's a set of tools (well, a .jar) released with Tomcat that's usually used by ant but that can be used by anyone willing to call the code. There are tasks for starting and stopping applications, deploying, undeploying, listing applications and so forth; essentially it's an API that wraps the functionality of the manager servlet.
One moment while I try to dig up the name or a link for you...
Here's Apache's information on this stuff: http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Executing Manager Commands With Ant
... and here's a user, elsewhere, describing in detail how he uses these tasks: http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks
You may object that you're not ant. That's true, but there's nothing magic about ant, it's just calling code inside the jar. That code can be called from anywhere else that follows the API.
Here's a tutorial on writing ant tasks: http://ant.apache.org/manual/tutorial-writing-tasks.html
Not quite the same, but it should give you an idea of how the API works.
I see no reason why you shouldn't be able to call this API from within a servlet if you want to.
Alternatively, you could run the manager servlet in your Tomcat and simply access the manager application like a Web service: Use your browser or WireShark to snoop on the traffic between your browser and Tomcat when you deploy an app, and then duplicate that to remote control manager. Me, I think using the tools jar is simpler.
If you use a "project lifecycle" tool, this undeploy/deploy can be automatized in the development cycle.
Saying that, I think about Maven2 and his "maven-deploy" plugin :
mvn compile : java compilation
mvn package : creation of the war file (for a webbapp project)
mvn deploy : stop, undeploy the old application, deploy and start the new version !
After, you can couple this automatization with a continous integration server (like Hudson).