How to Create Java Web Project in NetBeans
Vložit
- čas přidán 7. 09. 2024
- Learn how to develop a basic Java web project using Apache NetBeans from scratch for beginners, with the following details:
- Create Java Web project with Maven
- Download & install Apache Tomcat server
- Create Java Servlet & JavaServer Page (JSP)
- Run Java Web App on Tomcat inside NetBeans
- Deploy Java Web App on Tomcat outside NetBeans
Thanks for making this! Very clearly explained
As of November 2021, Apache Tomcat v.10 doesn't play nice with Java EE 7. Save yourself a headache, use v.9 like is recommended in the video :D
Glad it helped! And thanks for your update about Tomcat 10.
Precisely demonstrated the concepts. Helped a lot to learn the Netbeans IDE and Web app development. thank you
You're welcome. Glad it helped.
hi do you know how to solve this
The requested resource [/unitConverter/convert] is not available
I always get this message
Is that 404 error? If so, check URL mapping of the servlet - be sure no typos.
@@CodeJava yes 404 error. Already checked it multiple times 😢
Nghe giọng biết ngay người Việt !
Thanks for this.
you're welcome :)
Thought he was french😅😅😅😅😅
Thank you for your videos. It helped me a lot. But, I'm using IDE 15, and Java 18.0.2. I was trying to follow along with you starting with the simple web Maven application, but it fails and do not run. It gives me this error: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1 I tried to find a solution, but nothing is working. I'm not sure what I need to do to resolve it. Would you please advise me.
can you share the full error?
watching from Kerala,India
Got it. Thanks for watching :)
Hey, when I'm doing clean and build, it's showing an error:
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project Prac3: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
Can you help me with this, please?
me too!
Hey, i got a error. It said "FAIL - Failed to deploy application at context path [/WebApplication1]
C:\Users\Admin\Documents\NetBeansProjects\WebApplication1
bproject\build-impl.xml:1030: The module has not been deployed." Can you help me fix it ?
I have no idea why.
i got the same error, its most likely connected to incompatible versions.
I use jdk-21 tomcat 9 and selected java-EE 8, ill try to re-do this with the exact versions from the tutorial and then see if it works
@@darthalzmaul have you tried?
@@omkarkambire6965 I have not tried. As far as I remember I fixed it somehow but ran into a lot more problems afterwards, I switched to vs code and springboot web which worked a lot better.
It works. And I understand, how does it work. Thannk you!
glad it helped.
Thanks for Tutorial, thats is helpfull
You're welcome
When I'm trying to run the application at around 8:15, the build is successful but I get this error message at the top:
FAIL - Failed to deploy application at context path [/webApp]
Nevermind, I fixed the issue. I had two instances of TomCat running at once
Hey, do you know how to create Servlets in this?
thanks for this superb run through
Glad you enjoyed it
i get an error 404 when i enter a value and click the button to convert. how do i fix this
check servlet URL mapping - it should match the action of the form. Also refer to this video for solution: czcams.com/video/t7VuQBHXXrM/video.html
ive solved it.. thanks
how did you resolve?
Thank you so much for this video 🤗🤗
Most welcome 😊
Hi there, can anyone recommend a tutorial like this one in American English?
ERROR Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project mavenproject1: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
Hmm... I have no idea why.
Did you fixed it? I have the same problem but don't know how to deal ;(
@@fer8091 Yes , unistall all and intall (Reinstall all)
Thanks for the video, but Legends would help me a lot,
No problem 👍 you mean the captions or suggested chapters?
I mean to enable "Subtitles/Close Captions" in English. Thanks very much.
Thank u for teaching
It's my pleasure
Thanks very much 💘
You're welcome 😊
I have an error here: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project LAB_WEB: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
Please help :((
Hmm, I have no idea why.
At around 22:22 RequestDispatcher is mentioned but its not defined anywhere in the code and mine throws the "cannot find symbol" error at me, why is this?
Edit: I could not get RequestDispatcher so I got rid of that and just ran that line (request.getRequestDispatcher(resultPage)) and did the .forward to that
you mean the problem was solved?
I suppose it could be interpreted that way. I would say I solved it. I just jumped around the problem and made it work for just my case. Guess I could've said I solved it too.
Hi ,Very well nice ! thank ..
Glad it helped.
Why did *Jakarta EE 8 WEB* disappear after you installed _Tomcat 9_ ?
Sorry, I don't know.
hi am not getting the result printed...simply shows$(miles)=$(km)=kilometres
so what did you get?
Thank you so much
You're most welcome
How can i make a java aplication execute with the web services?
you need to run your java app in a web server like Apache Tomcat. Check this video: czcams.com/video/N1UzS9ojuUY/video.html
@@CodeJava glassfish is useful for this task to?
yes, but GlassFish is heavier than Tomcat@@deusexeugenics
Thank you soo much ❤❤❤❤❤❤❤❤❤❤❤❤🙌🙌🙌🙌🙌🙌🙌
You're welcome 😊
Nice video 🥰
Thanks 🤗
it takes too long to run the project
and what's the différence between create java project with Maven and java with Ant and choose java web / java web application ?
Maven and Ant are two different software project management and build tools.
@@CodeJava please when i run the project, an error message : Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project : Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.1.1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Cannot access defaults field of Properties.
i googled and i tried all solutions but the same error. this is the first time i work with netbeans and maven project
@@nahlakechroud4010 change maven-war-plugin version from 2.1.1 to 3.2.2, it works for me
Hi,code java
when i am creating this and run my project file running sucessfully but when creating servlet and hit to convert button this show me http status 404 UnitConverter/Convert not found i think servlet not found how can i remove this errror plz guide thanks u
Check typos in action URL of the form, it should be action="convert"
@@CodeJava action="convert" i can follow your turtorial but still http 404
@@ayeshaazad5872 then how you can solve this error ???
@@ayeshaazad5872 hence prove LHS=RHS😂
@@ayeshaazad5872 which university and
Smester?
Hi when I run the code after creating the servlet class I get this error
COMPILATION ERROR :
-------------------------------------------------------------
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
Any ideas how I can solve this thank you great video :-)
That means Java version 1.6 is no longer supported. You must configure the java compiler version to 1.7 or newer in the project properties dialog (press F4).
When i put in the numbers it says HTTP status 404 - not found
check the URLs specified in the action attribute of the form, for links. Also check suggested solutions in this video: czcams.com/video/t7VuQBHXXrM/video.html
Thank you.
Welcome!
Hey, thanks for this, but can you show me how to create Servlets in this?
kindly watch from the minute 12:36
@@CodeJava, I followed each and every step you've mentioned in the video, but still it's not working
Sir how to add jar file
Right-click on the project name in the Projects tab.
Select Properties.
Select Libraries.
Click the Add Jar/Folder button.
Tks bác :v
giọng anh này giống ng việt ghê
because I'm Vietnamese.
Tiếng anh dễ nghe khả năng cao là người việt =)))
đúng rồi đó bạn.
really nice video but would have helped a lot if there were time lapse.
okay, thanks.