This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

The requested resource () is not available

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When exactly are you getting the error..? Do you have a Welcome.jsp?
 
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try http://localhost:8080/Struts/login.action !
 
Ankit Garg
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know whats wrong..

Is there any alternative to tomcat/eclipse???

Can I learn Struts 2 by some other way???


Thanks
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
crispy bacon. crispy tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic