Heyy Can Anyone Help I am Not Getting the run on server option in Spring Tool Suite .. and My Server
180 Replies
⌛
This post has been reserved for your question.
Hey @Danix! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
What server are you using?
Also I think Spring Tools doesn't have a run on server option
you need to install that first
I think you'd need
Eclipse Java EE Developer Tools
for that
you should be able to find that in the Eclipse Marketplacei am using Tomcat Server
@dan1st | Daniel
i used the ecplise as well but whenever i put on my command in web i got 404 error
This is My Web.xml in ecplise
This is Dispatcher servlet on ecplise
this is my fist controller in ecplise
this is hi.jsp in ecplise
the error when hit any command
@dan1st | Daniel Please help if u can
?
i mean i also used the ecplise ide for the same project but got error instead of result thats why shifted from ecplise to spring tool
Can you show the deployment?
I think you are using the wrong URL
wdym
.
of what
I think there's a
Servers
view
Window > Show view > ServersCan you expand LoginPage there?
Can you try the URL http://localhost:8080/LoginPage
getting the same result
ph wait
you are using Spring 5
and Tomcat 9
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
Stack Overflow
Servlet returns "HTTP Status 404 The requested resource (/servlet) ...
I have an HTML form in a JSP file in my WebContent/jsps folder. I have a servlet class servlet.java in my default package in src folder. In my web.xml it is mapped as /servlet.
I have tried several...
yess
@dan1st | Daniel
actually Tomcat 9 is fine nvm
wdym
the server is not even going to the url bcz the print statement is not printing as well
can you change the
return "Hi";
to return "redirect:https://example.com";
for testing?yeh sure
ah ik yeah that's what I wanted to know
is thing right ?
if a print is not printed, that isn't necessary
still getting same
copying src/main/webapp/WEB-INF to src/main/resources/WEB-INF doesn't help either, right?
i didnot done it yet
You could try
http://localhost:8080/manager
but that would probably ask for a password10 days before every things were working fine but when i created a new project it giving the error
Can you show the pom.xml of the working project?
Yehh sure
@dan1st | Daniel
oh wait both projects are called LoginPage?
nope
i even closed the last projects to check that the error was coming from that or not
but both have the same name?
no
but?
what?
So what's the name of the working project?
LoginPage
Since that pom sais LoginPage
and the new project is also named LoginPage?
this pom.xml is of LoginPage Project
yeah but the project that doesn't work is also called LoginPage, right?
yeh
What are u actually asking ?
Check my Project Explorer i have 1 project named LoginPage and I even deleted the last project
Can you try removing the deployment from the servers tab and add it again?
preferably using the run on server thing
U mean I have to remove the server then add it again to the project
?
💤
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.
Bro u didn't answer my question I am still stuck on it please help if u can @dan1st | Daniel
I meant the deployment, not the server
but yeah doing that with the server probably also works
No i did it with server many times but it didn't work
Wdym by deployment I am not getting it
essentially you can have multiple applications in a server
an application "deployed" to a server is a "deployment"
So how to remove the deployment?
probably by right-clicking there
No bro I am still stuck at the sma problem @dan1st | Daniel 🥲
is there any another way to do it ?
is this dueto my servlet xml name dispatcher-servlet.xml
@dan1st | Daniel
Stack Overflow
Spring MVC - Getting 404 error and not able to configure Dispatcher...
I am new to Spring MVC and trying to create my first project in Spring MVC. Please help me to resolve the following error: -
Getting following error in console: -
Allocate exception for servlet [
Maybe that?
Did you do that?
This is how it looks like now is that ok ?
Also please try pressing Alt+F5 in Eclipse
then select your project and click ok
After you did these things I just said, right click on the deployment in Eclipse
(that thing)
and show me which options there are
Also do you have a web.xml somewhere?
If yes, can you show it?
And does your pom.xml contain anythign saying web xml?
When you click add and remove, what's there?
ah right, that was that thing
Can you add the following to your controller, just for testing?
In that menu, add LoginPage
and I guess SecondLoginPage is the old project?
without any command
@dan1st | Daniel
yeh
without any path
Then yeah, just add the new one in the add and remove thing
Can yoou show that dialog after adding that?
Yehh I added the new one and removed all the old ones
Which dialog ?
The deployment one ?
@dan1st | Daniel
.
@dan1st | Daniel are u there
I was doing moderation stuff
Ohh
yep
in the console i found this is that weird
Can you show the whole thing?
here it is
ok yeah ig it's ok
oh
now then bcz the problem is still there
does that due to the IDE ?
Did you do that?
yehh
like that right ?
Which page are you accessing in the browser?
i mean the Hi.jsp
So
localhost:8080/hi
?
Are there any other consoles?
i after opening the web page i found this
Does that do anything?
nope
the 404 error
Can you do that? https://stackoverflow.com/a/3518323/10871900
Stack Overflow
Where is the deployment directory in Eclipse?
I'm developing a web app in Eclipse. where is the deployment directory tree situated? In the Apache directory structure or some sub-directory tree structure in my Java workspace tree? I ask because I
essentially going to the
Servers
view and double-clicking on the deploymentthe structure is like that
ok that isn't what I expected to see
What did you double-click on?
yeah that's what I wanted to see
Now in the servers tab, if you double-click the deployment instead of the server, are you getting something different?
can u ellanborate ?
like the server tab ?
yes
like you double-clicked the thing above the arrow, right?
yehh
What happens when double-clicking the thing where the arrow points to?
To the General Overview of tomcat 9
?
Like double-clicking the
LoginPage
thing in the servers tabThe Login Page is Not Directing to anywhere instead the Tomcat 9 Server localHost is Directing To the General Overvirew
What happens when right-clicking the login page thing?
@dan1st | Daniel
ok that's kinda weird
what if you right click on the spring thing there?
@dan1st | Daniel Should I delete the IDE and then download
wouldn't help I think
I just installed Tomcat by myself
Can you try
localhost:8080/LoginPage-0.0.1-SNAPSHOT/
and localhost:8080/LoginPage-0.0.1-SNAPSHOT/hi
oh I found what I wanted to see
in that thing, select the modules thingOk i did it @dan1st | Daniel
ok then it should be
/LoginPage
interesting
Can you please share the code you have (especially XML files) with codeblocks?
So I can try it on my computerWait in your pom.xml you have version 6.2.0.Final of Hibernate validator
This should be 5.something
I think
5.5.4.Final
Also you might need jasper if you want to use JSPjasper
well we'll see about that
there is no dependency like this
everything is more than 6.0.0
@dan1st | Daniel did u find any error
I think so
you have these files in the lib directory
can you try moving them directly into WEB-INF?
With that, I get this error in the console which means it loaded something
wait i will move them to the web-inf
wait i got the same error when i moved them into the WEB-INF Folder Directly
and then in the web.xml, I have to change
<param-value>/WEB-INF/Login-servlet.xml</param-value>
to <param-value>/WEB-INF/dispatcherservlet.xml</param-value>
Still get the File not found Exception after doing
Can you show it?
because I got a different 404
like the error?
this is what I got - the description is different
whatever you got
and I also got that
both are ones that should be fixable
Can you show your dispatcherservlet.xml?
I got it working on my computer
I had to change
<property name="prefix" value="/WEB-INF/view/"></property>
to <property name="prefix" value="/WEB-INF/lib/view/"></property>
but I did not get your exception
So you will likely have to do that as well
Can you copy the whole stack trace in a code block?https://sourceb.in/sHrPFGuXaB
here it is @dan1st | Daniel
it sais
FileNotFoundException: Could not open ServletContext resource [/WEB-INF/dispatcherservlet.xml]Can you show what's in your webapp directory?
Opened The Lib Folder
you didn't spell dispatcherservlet correctly
in the file name
and after fixing it, watch
well thanks a lot broo i got it
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Now there's still something left
?
so you don't run into a specifc issue in the future
in the pom.xml
You have hibernate-core and hibernate-validator, right?
yeh
What are the versions of these?
Hibernate Validator : - 6.2.0.Final
Hibernate Core : - 5.5.4.Final
yeah
Your project is not compatible with Hibernate 6
it should be Hibernate 5
the validator ?
change the version of Hibernate validator to 5.5.4.Final
Does it still work?
yehh
ok
but the 5.5.4 final is giving error
oh?
nvm forget the thing about Hibernate validator
my fault
Can u summarize me like what was the actual mistakes i have done bcz i have changed and done a alot of things so just tell me the actual mistakes i have done bcz it will defintely help me in future
ok first of all, Jakarta EE expects the web.xml inside WEB-INF
not WEB-INF/lib
ok
in the web.xml, there is a
<param-value>
. That should point to the dispatcher servlet XML, not something nonexistingok
Then the dispatcherservlet.xml had a typo
hm
ok
and finally, the
prefix
<property>
in the dispatcherservlet XML had the wrong valuecan u tell me how to add dependencies in maven so our program will not crack anyhow ?
like how to confirm that this version is good for our project
you add them to the pom.xml
essentially if you want to add a dependency, you add another dependency section
for that, you need to know the group id, artifact id and version
oh
well thanks alot again u helped me alot
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
💤
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.