• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet action not available

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hiii all....

I am developing simple struts-database access using struts-config.xml file with MySql database. I have written code as

index.jsp


selectBook.jsp


SelectBookActionForm.java


SelectBookAction.java

Book.java


struts-config.xml


Also I have properly written web.xml file. I also have cerated table in mydb database in my system. But when I try to run this it displaying first page that is index.jsp but when I click begin button it is giving following error:

HTTP Status 404 - Servlet action is not available
ype Status report

message Servlet action is not available

description The requested resource (Servlet action is not available) is not available.
Apache Tomcat/5.5.17

I am not able to find where I am commiting mistake. Can anyone please help me.

Thanks & Regards,
Abhijit
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

In the index.jsp , where are you mapping that on click of begin link which action should be called ??
 
Abhijit Kangale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hiii Prakash...

For that I have written following action mapping in struts-config.xml file.



That is it has to go to selectBook.jsp and display the contents of table according to query written. Is there any thing wrong in that...?

Regards,
Abhijit
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought that Struts has deprecated data source support?
From How to Access a Database

The DataSource manager is being retained in Struts 1.x for backward compatibility but may not be retained in Struts 2.x or later.



I think that your problems are not database related, but a Struts issue.
If you want, I can move it to our Struts forum.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i hava a idea that can you try to change code segment in the page of index.jsp,such as the following codes:

<html:link action="/select">Begin</html:link>


it is just a suggest and i am not make sure that will be work correct.


Regards,
Abhijit
 
Abhijit Kangale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hiiii...

I have already tried this <html:link action="/select">Begin</html:link>

but it wont work....

you can move to struts forum jan no proble....

Regards,
Abhijit
 
Jan Cumps
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abhijit Kangale wrote:...you can move to struts forum jan no proble....

I moved it. Good luck with getting this resolved.
Regards, Jan
 
Abhijit Kangale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Jan.. I hope I get solution soon in new forum...
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The issue is happening long before you're getting to a page.

Check the log for startup errors.
 
Abhijit Kangale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry David...
i am not getting you... could you please ellobarate something...
 
Jan Cumps
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abhijit Kangale wrote:sorry David...
i am not getting you... could you please ellobarate something...

David asks you to check your Tomcat logs.

They most likely list startup errors related to your application.
The error you get is that "something" is not available. This is probably because your application did not initialize (startup) properly.
You will find these application initialization errors in your Tomcat log. They will show the real underlying error.

Regards, Jan
 
Abhijit Kangale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Jan for your valuable answer....
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic