This question already has answers here:
Servlet returns "HTTP Status 404 The requested resource (/servlet) is not available"
(19 answers)
Closed 2 months ago.
I know that there are previous questions that ask the same but I still couldn't find the right solution. I am getting: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. I am using a Tomcat server.
Could someone please help me, the following is my project structure:
.
I was stuck into this problem for a month.
Finally, I figured out that in Eclipse, "Build Automatically" was not set, and I was trying to run my servlet.java file without any servlet.class file, since I wasn't building my project.
The thing which worked for me is to
first build the project => restart the server => run the server on
servlet.
Hope it helps!!
I was running into a similar problem, where my package name was wrong. I fixed the package name and fixed the problem.
Please check your configuration snippet in the web.xml file.
Also, for a cleaner structure, you can create a new folder "jsps" under WEB_INF and move the .jsp files into the same.
The following scenario is explained with the name of the project as abcd, and the port as 8080. The folder WebContent will be inside folder abcd.
In application.properties, add your path
upload.path=C:/.........../abcd/WebContent/
If the last slash after WebContent is ignored, then uploaded files are saved at abcd and not in WebContent (which is inside abcd).
Now, say, there is 1.JPG inside WebContent. If I have to access it, then in my browser ,I have to put URL as http://localhost:8080/abcd/1.JPG
Having the URL as
http://localhost:8080/abcd/1.jpg wont work (note the small case alphabets of .jpg)
Also make sure that the file 1.JPG is visible inside WebContent in abcd in IDE (in my case, it was Spring Tool Suite). Else refresh the project from the IDE.
Now, if the file 1.JPG is inside abcd/WebContent/new/1.JPG, then the URL will be http://localhost:8080/abcd/new/1.JPG
I faced this issue once when there was a runtime exception in the code block of ContextLoaderListener.
public class YourApplicationContenxtLoaderListener extends ContextLoaderListener{
#Override
public void contextInitialized(ServletContextEvent event){
/* There should not be any exception/error in this block , as it would impact the context initialization by tomcat server for respective war file. */
}
}
I encountered this problem on an Azure WebApp running on Java 11 and Tomcat 9.0.
I changed the Java Web Server version from Apache Tomcat 9.0 (auto update) to Apache Tomcat 9.0.20, and then the server worked.
here is the solution for your query,
Simply follow these steps:
go to project properties settings
type demployment and assembly settings
then click on add folder then and add the webcontent folder to your project,
click apply and close then run the project
I hope your problem will be solved.
I try to add frontend (angular) in my backend project to deploy it on GCP.
When I try in local with: mvn appengine:run no problem, but when I want to deploy it with mvn package appengine:deploy I get this error:
ERROR: (gcloud.app.deploy) Cannot upload file [/Users/.../project/target/appengine-staging/static/front/node/node], which has size [41783856] (greater than maximum allowed size of [33554432]). Please delete the file or add to the skip_files entry in your application .yaml file and try again.
I didn't have a file: app.yaml.
I try to add .gcloudignore file but didn't work.
I don't know what I can do to fix this issue.
There's a 32MB static file limit with App Engine and this corresponds to the error you're receiving.
Evidently, you're including a file /Users/.../project/target/appengine-staging/static/front/node/node (possibly a NodeJS binary?) in your upload to App Engine and this is being rejected.
You should only include your Java-related sources and the static content (HTML|JavaScript) that forms the Angular app.
If you're unable to streamline the directory that's being deployed, you can use .gcloudignore to exclude content from the upload.
I need some help i am working on backup and restoring sqlite.db file , In this process i store a copy of db file in my device storage and restore it from there which is working perfectly fine. But when i send this file through any email server like gmail and download it into my storage it add timestamp to its name i handled that in code but it says file not found exception ,i guess gmail is not downloading it properly in storage or not giving access to other apps .
Whenever i rename that file just replacing any alphabet from that name than i can restore that file please help me out i am stuck here ,Thanks in advance
I have found the solution :
My problem was when a file is downloaded from gmail or any other server when we try to get its path it does not give its actual path it give path like /downloads/#2386
so when i try to open it, it shows file not found exception so to overcome this problem i have to get actual file path from that path, after getting that path and try to open it, it works perfectly fine.
I am using Editable Email Notification in Jenkins. How do we get dynamic(report file name changed in work-space after every build) .Pdf files attached in e-mail from work-space.
Example: Root/TestResults/*.pdf
Above will give all pdf attachments
Example: Root/TestResults/Final_Report_2015_11_07_06_47.pdf
Above path is giving same file when exist.
But file name is getting changed dynamically, i.e. Final_Report_XXXX_XX_XX_XX_XX.pdf.
Is there any way to get latest file based one dynamic report file name check.
You can use 'Filesystem List Parameter' Plug-in in Jenkins, which can be useful for your question. refer to link for reference
https://wiki.jenkins.io/display/JENKINS/Filesystem+List+Parameter+Plug-in
you can sort and send the first one
i am using the lobo browser, and when i run the example code, i keep getting the following exception:
java.lang.IllegalStateException: No clientlets found for response: ClientletResponseImpl[url=http://www.google.com,method=GET,mimeType=text/html,fromCache=false,requestType=PROGRAMMATIC'.
anyone have any idea?
I had the same problem when i was trying to embed the FramePanel in my java application.
I think there is a dependency in the code that there will be a directory with name "ext" and the extension jars are present in that directory. "ext" directory should be at the same level as lobo.jar file. This solved my problem.