• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Requested resource not available --in servlet and struts application

 
Nilesh cl.
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"na cl", please check your private messages for an important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please be sure to post Struts questions in the Struts forum. I have moved this post there for you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic