WARNING: Someone is trying to access a secure resource : /WEB-INF/login.xhtml - eclipse

I am using Eclipse Indigo for developing my JSF 2.0 web application. I have created a dynamic web project with JSF 2.0 and JSTL 1.2 libraries. There are some Facelet files. The welcome file is login.xhtml.
After deploying the project, whenever I run login.xhtml in Tomcat 7.0.11, I get the following error in browser:
HTTP Status 404
type Status report
message
description The requested resource () is not available.
Apache Tomcat/7.0.11
In Eclipse's Tomcat console, I get the following error:
**Feb 14, 2012 1:08:59 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4693 ms
Feb 14, 2012 1:09:14 PM javax.faces.webapp.FacesServlet service
WARNING: Someone is trying to access a secure resource : /WEB-INF/login.xhtml
remote address is 0:0:0:0:0:0:0:1
remote host is 0:0:0:0:0:0:0:1
remote user is null
request URI is /Test/faces/WEB-INF/login.xhtml
web.xml is the default one generated by the Eclipse, however I have changed the welcome file name in that.
How is this error caused and how can I solve it?

Resources in /WEB-INF folder are not publicly accessible. That folder should be used exclusively for configuration files (like web.xml) and template/include files which you don't want the enduser to be able to download and view.
You need to move the login.xhtml file outside /WEB-INF folder and change the request URI to /Text/faces/login.xhtml.

Related

Tomcat 404 Error when deploying a WAR file of a REST web app

As part of a course in my CS undergrad degree I need to implement a RESTful web app using Struts2 framework. To do so I'm trying to first see an example of a working example of such a project.
I have downloaded such an example from the official Struts2 website in the following link under the title example applications - https://struts.apache.org/download.cgi.
after extracting the zip file, I saw the folder contained the relevant WAR file named struts2-rest-showcase.
Then, after installing Tomcat 10, I used Tomcat's Web Application Manager to deploy this WAR.
After deployment whenever I try starting the application I get HTTP Status 404 - Not Found error with the following error details:
Type - Status report
Message - The requested resource [/struts2-rest-showcase/] is not available
Description- The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
A similar error message occurred when I tried running another example, in the following link, using Tomcat through Eclipse IDE -
https://github.com/amolghotankar/struts2-rest-sample
I feel completely lost since the above examples are supposed to be working examples.

Too many redirects issue in local host (IIS,ColdFusion 2018)

I am setting up ColdFusion 2018 Application server with IIS 10. But getting too many redirects issue.
I have tried from square one.. Below are the things I did.
Installed CF 2018 developer
Configure IIS (Windows 10) with CF 2018 using wsconfig.
Created a simple “index.cfm” and tried to access. This page contains just cfset and cfoutput.
got 404 error.
updated “enable 32-bit applications” to false in IIS application pool
404 error resolved, but getting “Too Many redirects issue”
enabled developer tools in IE and checked.
getting 302 status code and it seems index.cfm is redirecting to itself.
Not sure what to do now? Is there anything I missed in setting up IIS with CF 2018 server?
You can resolve this error by making sure that the two required components of IIS are installed on your system. Namely:
ISAPI Extensions
IIS Metabase and IIS 6 configuration compatibility.
First, start the program called Windows Features. You will find Windows Features under Control Panel –> Programs and Features.
When the Windows Features starts, navigate through the features hierarchy under Internet Information Services and select the two features:
(a) ISAPI extensions and
(b) IIS Metabase and IIS 6 configuration compatibility.
Configuring IIS for ColdFusion:
You will have to run the Web Server Configuration Tool that comes with ColdFusion to configure IIS so that all .CFM files are mapped to be handled by ColdFusion.
The following text is directly from the ColdFusion installation guide:
1)Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 9 > Web Server Configuration Tool.
2)Click Add.
3)In the Server pop-up menu, select the host name and the server or cluster name to configure. In the ColdFusion server configuration, the server name is always coldfusion. Clustering support is not available on the server configuration.
Note: The server or cluster does not have to reside on the web server computer.
4)In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.
5)Select the Configure web server for ColdFusion applications option, and click OK.
Note: Omitting the previous step causes your web server to serve ColdFusion source code.
6)Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application’s CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.
if you face too many redirects then just enable 32-bit applications to true.
refer this link:
https://community.adobe.com/t5/coldfusion/strange-iis-redirect-issues-leads-to-jakarta-isapi-redirect-dll/td-p/4239297?page=1

Apache Tomcat server failed to run in localhost

I downloaded the tomcat version 9 in zip folder and added to eclipse. I am trying to run tomcat server version 9 in localhost . The server is able to run in eclipse but when I tried to access it in localhost , its showing following errors .
HTTP Status 404 – Not Found
Type Status Report
Message /
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.24
Here is screen shot in IDE that serve is running ..
Here is screen shot when I tried to access it http://localhost:8000/

The requested URL could not be retrieved error in eclipse

I'm trying to do some tutorials using Eclipse IDE. But every time I try to run a page on the server(Apache Tomcat v8.0) this error comes up.
ERROR The requested URL could not be retrieved
While trying to retrieve the URL: /test/test-tags.jsf
The following error was encountered:
Invalid URL Some aspect of the requested URL is incorrect. Possible
problems:
Missing or incorrect access protocol (should be `http://'' or similar)
Missing hostname Illegal double-escape in the URL-Path Illegal
character in hostname; underscores are not allowed
Web Project Info:
Target Runtime : Apache Tomcat v8.0
Dynamic Web Module Version : 3.0
Configuration : Java Server Faces v2.2
When developing web pages in Eclipse, do not use its builtin browser. Just start the server and open the page in a real browser like Chrome or Firefox.

Trouble configuring Apache Tomcat Server on Eclipse

I am having trouble configuring my Tomcat on Eclipse. I followed the steps to set up a local Apache Tomcat Server on my Mac, and I also set up an SSL on the Tomcat Server successfully. However, after following instructions in setting up my Apache Tomcat server in eclipse, I keep getting errors saying the following:
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
If it makes any difference, I removed the web project I was trying to make when creating my server. It also doesn't work when I try to boot it up on Terminal--I end up with the same message. Any help would be appreciated trying to decipher this error message! Thanks!
The "ROOT" folder of your tomcat seems to be empty. Either you did not add an application to your Tomact config ("Server" view) or you have to check your "Server location" settings, double click on your servers name in the same view.