aspose file tools*
The moose likes Struts and the fly likes Requested resource not available --in servlet and struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Requested resource not available --in servlet and struts application" Watch "Requested resource not available --in servlet and struts application" New topic
Author

Requested resource not available --in servlet and struts application

Nilesh cl.
Greenhorn

Joined: Feb 04, 2009
Posts: 1
Respected members
I'm trying to develope jsp servlet struts appl. in which PilotHome.jsp calls FlightPlanController servlet extended from action servlet
Im getting /pilot/flightplan resource unavailable.
Application structure
ATC
|--WEB-INF
| |_classes
| | |_pilot
| | | |_FlightPlanController.class
| | |_strutsbean
| | |_FlightPlan.class
| |
| |_lib contains struts jars
| |_web.xml
| |_struts-config.xml
|
|__pilot
| |_PilotHome.jsp

web.xml as follows

<servlet>
<description></description>
<display-name>FlightPlanController</display-name>
<servlet-name>FlightPlanController</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>

</servlet>
<servlet-mapping>
<servlet-name>FlightPlanController</servlet-name>
<url-pattern>/pilot/flightplan</url-pattern>
</servlet-mapping>
</web-app>

struts-config.xml as follows
<struts-config>
<form-beans>
<form-bean name="flightPlan"
type="strutsbean.FlightPlan"/>
</form-beans>
<action-mappings>
<action path="/pilot/flightplan"
type="pilot.FlightPlanController"
name="flightPlan"
scope="request">

</action>
</action-mappings>
</struts-config>

Calling jsp page PilotHome.jsp
<form action="/pilot/flightplan" METHOD="POST">


so jsp page calling FlightPlanController servlet

Please help me to correct this error and any improvement in code
Thanks
nilesh
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

"na cl", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

Also, please be sure to post Struts questions in the Struts forum. I have moved this post there for you.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think you need to spend some time with a Struts 1 tutorial or look at the sample applications that come with it--there are several misconceptions that they'll answer. There are also a plethora of example applications on the web.
 
Consider Paul's rocket mass heater.
 
subject: Requested resource not available --in servlet and struts application