eclipse associate a dynamic web app with tomcat server - java

I followed the instruction on this page to create a simple maven web app:
However, when on step 11: Right click on project -> run as -> run on server, there is no "tomcat" and i got an error message: the selection did not contain any resources that can run on a server.
image
Also as the picture shown, I have successfully added tomcat in servers view and the app is also shown in the server list unfer tomcat 8.0. In the property->runtimes window, tomcat is in the list and checked. but 'make it primary" is disabled and in the "runtime composition" panel the message is <no runtime selected>.
localhost:8080/mavenWebApp got 404 error.
What could be the problem?

Related

Netbeans default browser doesn't start in Netbeans?

Scenario:
OS: Linux Debian 11
Kernel: 5.1.21
Browser: Mozilla Firefox 102.8.0esr
IDE: Netbeans 16
JDK: JAVA SE 19
Tomcat 10 (configured in netbeans)
In this scenario servlets run fine on tomcat writing URL on address bar. Trying to open the same URL with Browser in Netbeans fails because Browser doesn't come-up.
I perform following steps:
Single click on left button upon tomcat icon, then a Drop list come down with my Servlets
Right click Button on a Servlet (or tomcat main page), a second drop-list come down
Selecting "open in a Browser"
Browser doesn't start
Message info come-uo "Browser cannot Run): This message appears below in IDE netbeans and after few second vanished
I have also tried to compile index.html and as usual browser is expected to run, but in my case no! compiling process return no message error.
Looking for IDE Browser Configuration (TOOL>OPTION>GENERAL>EDIT) give me this set-up:
External Browser
Others browsers showed in the image above doesn't work. More-over next image shows IDE DEFAULT BROWSER without configuration. I tried to edit blank field but data were not saved after OK button click:
IDE DEFAULT BROWSER
I tried to edit blank field but data were not saved after OK button click. I have to admit that this last trouble is my fault because I blanked them and now re-edit it again is impossible.

Eclipse - Could not publish server configuration for Tomcat8.0 server at localhost

I have created some example web service methods and trying to publish in my localhost with Tomcat v8.0. I use Eclipse Java EE IDE for Web Developers with Mars version 4.5.0.
I configured the server Tomcat v8.0. I got the configured server in Eclipe's Servers list. I Start the server. But Eclipse prompts saying
Publishing to tomcat v8.0 Server at localhost..." has encountered a problem.
And the error details shows that Multiple context have a path for /HelloWorldServlet and /com.vogeila.jersy.first. These are the servlet projects I created in my workspace.
You can refer this screen shot:
I followed this answer.
"Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal
But It didn't work for my case.
Share your ideas.
The prompted message helped me. The Server.xml file under Servers has multiple entries of <Context> tag. I deleted everything by leaving only one entry. It worked for me. 
Delete Existing tomcat server...
Then add new server.. its work for me

Getting error in running apache tomcat server

When I try to run a servlet program in NetBeans, I get the following error in build-impl.xml at line 1045, which is not allowing Tomcat server to start.
And, apache server log is giving message as IP is not recognized as an internal or external command,operable program or batch file.
I do not know where I did it wrong, or where I configured the environment variables, provided in servlet mapping.
Any help is welcome.
I think, there is some issue in tomcat which comes with netbeans or permission issue in Windows.
Follow below steps to resolve :
1) Remove your current tomcat. (Tools --> servers --> select tomcat --> remove)
2) Download latest tomcat from here
3) Extract it (Not in system drive)
4) Go to Tools --> servers --> click on add server
5) From Server list choose Apache Tomcat or TomEE element.
6) Choose server location by clicking the Browse button.
7) Click on Finish.
8) Start tomcat.
Hope this will resolve your issue.

Tomcat7 (localhost:8080): 404 error

I am running tomcat7 within Eclipse. When I set Tomcat/Properties/Location: /Servers/Tomcat v7.0 Server at localhost.server, I CAN reach localhost:8080, but gets 404 error on my sites (localhost:8080/mysite/user/adduser). When I set Location: [workspace metabase], I get 404 error on both localhost:8080 and localhost:8080/mysite/user/adduser.
What did I do wrong?
Make sure your Web Module is added to Tomcat and has the expected path. To do so:
Open the Servers tab (Window -> Show View -> Servers).
Double-click the Tomcat Server (a new window will open)
On this window, check the Modules tabs.

server not starting [duplicate]

This question already has answers here:
Tomcat started in Eclipse but unable to connect to http://localhost:8085/
(6 answers)
Closed 9 years ago.
i am trying to create application in struts2 so i have downloaded apache-tomcat7.0,eclipse juno and i am trying to use this server in eclipse juno , i have configure it properly in eclipse and it is starting in eclipse fine ,but when i am typing localhost:8080 in my web browser after my server started in eclipse then it is me showing error
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
Apache Tomcat/7.0.35
You have to select the correct server location. Please follow bellow steps.
Select Window => Show view => Servers
Then add the server if you want. If already added skip this step
Double click on the server which you have added
Then the Server overview will open. From there click on Server Locations.
Then select second option(Use Tomcat Installation).
Then save and restart the server.
Now you should be able to access your server.
Note: By default selecttion is Use workspace meta data. This does not modify the tomcat installation. But with this selection you can run the web application in the eclipse internal browser.

Categories