Spring MVC issue

Actually I am Trying to add The XML of Spring MVC but failed to Add It Bcz I am Adding this
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <!-- bean definitions here -->



</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <!-- bean definitions here -->



</beans>
And My Eclipse IDE Giving Me Error that
Downloading external resources is disabled.
Downloading external resources is disabled.
Can Anyone Help
37 Replies
JavaBot
JavaBot9mo ago
This post has been reserved for your question.
Hey @Danix! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
szatkus
szatkus9mo ago
Why XML?
dan1st
dan1st9mo ago
probably because of not using Spring Boot Where exactly does the error appear?
szatkus
szatkus9mo ago
You don't need Spring Boot to use annotations.
dan1st
dan1st9mo ago
yes but it's still common to have a beans.xml in Spring projects without Spring Boot AFAIK
szatkus
szatkus9mo ago
In legacy projects that no one in a company wants to touch. No Spring Boot, XML, Eclipse, all that smells like some old tutorial.
Danix
DanixOP9mo ago
So What U think i have to use
dan1st
dan1st9mo ago
I didn't doubt that
Danix
DanixOP9mo ago
So According To U i have to Use Spring Boot and XML Based Configurations..
dan1st
dan1st9mo ago
no you can use Spring Boot and not use XML configs for most things in fact, that's what I do in my projects
Danix
DanixOP9mo ago
ohh
dan1st
dan1st9mo ago
But I still don't know where you are facing the above error (assuming you still want to use XML configuration)
Danix
DanixOP9mo ago
Actually I was Going to learn Spring Boot But My Spring MVC Basics were not Clear Thats Why i am learning it rn..
dan1st
dan1st9mo ago
Out of curiosity: Which site are you using for learning here?
Danix
DanixOP9mo ago
what do u mean i didnot get it ?
dan1st
dan1st9mo ago
?
Danix
DanixOP9mo ago
..
dan1st
dan1st9mo ago
I just want to know which site people use that teach Spring in that way/without using Spring Boot
Danix
DanixOP9mo ago
I am learning Spring MVC from Youtube videos
dan1st
dan1st9mo ago
ah I see
Danix
DanixOP9mo ago
I am getting Class Not Found Exception In my Spring MVC Project I dont Know why its Coming can u help @dan1st | Daniel
dan1st
dan1st9mo ago
Can you show the stack trace?
Danix
DanixOP9mo ago
Danix
DanixOP9mo ago
No description
No description
No description
szatkus
szatkus9mo ago
Which version of Tomcat are you using?
Danix
DanixOP9mo ago
10.1
dan1st
dan1st9mo ago
Can you show your pom.xml?
Danix
DanixOP9mo ago
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>StartedWithMvc</groupId>
<artifactId>StartedWithMvc</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>StartedWithMvc</name>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.18</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.13</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.13</version> <!-- or the latest version -->
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
</plugin>
</plugins>
</build>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>StartedWithMvc</groupId>
<artifactId>StartedWithMvc</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>StartedWithMvc</name>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.18</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.13</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.13</version> <!-- or the latest version -->
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
</plugin>
</plugins>
</build>
</project>
dan1st
dan1st9mo ago
Stack Overflow
How to avoid compatibility issues between Java EE and Jakarta EE?
After Oracle donated Java EE to the Eclipse Foundation, it was renamed to Jakarta EE. With that, the javax namespace was changed to jakarta. What does one need to take care about in order to avoid
dan1st
dan1st9mo ago
use Tomcat 9
Danix
DanixOP9mo ago
So now i have to download tomcat 9 ?
szatkus
szatkus9mo ago
Yes
dan1st
dan1st9mo ago
well you also need to run it on Tomcat 9
szatkus
szatkus9mo ago
Spring 6 comes with support for Jakarta, but if you want to stay with Java EE you need to use a compatible application server.. Which is Tomcat 9 in that case.
Danix
DanixOP9mo ago
what if i want to use spring 6 then what to do
dan1st
dan1st9mo ago
oh affiliation Disclaimer: I wrote that
JavaBot
JavaBot9mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server