| Author |
The requested resource () is not available
|
Irtiza Ali
Greenhorn
Joined: Nov 27, 2009
Posts: 21
|
|
Hello folks
I am trying to learn Struts 2 & I am getting this error in my first learning example.
web.xml
struts.xml
Login.jsp
LoginAction.java
I hava Tomcat 6 in Eclipse Galileo
Thanks
Irtiza
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
|
When exactly are you getting the error..? Do you have a Welcome.jsp?
|
OCJP 6 (93%)
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
What was the URL that you entered in the browser?? Did you include all the struts libraries (jars) in your project?? Did you check the tomcat logs to see if there were any error/exception related to this in them??
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
Irtiza Ali
Greenhorn
Joined: Nov 27, 2009
Posts: 21
|
|
Yes I have a welcome.jsp but its not even reading the Login.jsp
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h2>Howdy, <s:property value="username" />...!</h2>
</body>
</html>
this is the URL which comes in the eclipse browser
http://localhost:8080/Struts/
even If I add Login.jsp by myself its still not opening the page. http://localhost:8080/Struts/Login.jsp
I have added all the necessary lib/jar files. & I am not getting any syntax errors. this eclipse tomcat is running other projects of jsps & servlets but not this one. don't understand why?
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
|
Try http://localhost:8080/Struts/login.action !
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
So your application is deployed on the /Struts context path (its case sensitive)??
I am not getting any syntax errors
I'm not talking about syntax errors, were there any deployment errors when the application was deployed. You can check this in the tomcat logs. Or you can go to http://localhost:8080/manager/html and see if the application is running or not...
|
 |
Irtiza Ali
Greenhorn
Joined: Nov 27, 2009
Posts: 21
|
|
Guys
I just don't understand why its not running. I know its not a big error its some deployment issue but strange thing is that my other projects in the same workspace is running perfectly but this one is not.
http://localhost:8080/Struts/login.action <---Not working same error
So your application is deployed on the /Struts context path (its case sensitive)??
yes its deployed. I mean its in my Eclipse Workspace folder like other folders. My project name is "Struts".
Thanks
Regards
Irtiza
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
Did you do what I said?? Did you check the tomcat logs (for any deployment errors) and the tomcat manager (http://localhost:8080/manager/html) to see if the application is running?? Also I've not used eclipse much so I don't know if your project name becomes the context path of your application or not...
|
 |
Irtiza Ali
Greenhorn
Joined: Nov 27, 2009
Posts: 21
|
|
Yes I am getting this message when I open your given link.
type Status report
message /manager/html
description The requested resource (/manager/html) is not available.
& the weird part is my all other projects are running on the same configuration. i.e. Eclipse with Apache Tomcat 6.
Thanks
Irtiza
|
 |
sarada bokka
Ranch Hand
Joined: Jan 13, 2010
Posts: 80
|
|
It's seems everything is fine.
I have face same issue long back. I just removed the depolyed one from tomcat and ran the same application once again it worked fine for me.(I guess this might me eclipse/tomcat issue while deploying)
|
 |
Irtiza Ali
Greenhorn
Joined: Nov 27, 2009
Posts: 21
|
|
I don't know whats wrong..
Is there any alternative to tomcat/eclipse???
Can I learn Struts 2 by some other way???
Thanks
|
 |
Simmi Chatterjee
Greenhorn
Joined: May 11, 2012
Posts: 2
|
|
Hi
Unfortunately I am facing the same problem ,the same 404 Error( The requested resource() is not avaialable)!! I have tried all the above suggested solutions in this post , but to no avail and am going crazy.
Please help me if anyone has a solution ... Thanks in advance
|
 |
Saravanan Devadass
Greenhorn
Joined: Jul 09, 2008
Posts: 4
|
|
Try to use the following web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Struts 2</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
|
 |
 |
|
|
subject: The requested resource () is not available
|
|
|