Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Servlet action not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Servlet action not available" Watch "Servlet action not available" New topic
Author

Servlet action not available

Abhijit Kangale
Ranch Hand

Joined: Sep 17, 2009
Posts: 39
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
prakash pawar
Ranch Hand

Joined: Mar 11, 2010
Posts: 42
Hi ,

In the index.jsp , where are you mapping that on click of begin link which action should be called ??

Regards,
Prakash Pawar.
Abhijit Kangale
Ranch Hand

Joined: Sep 17, 2009
Posts: 39
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
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

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.


OCUP UML fundamental and ITIL foundation
youtube channel
wang lei
Greenhorn

Joined: Mar 09, 2010
Posts: 12
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

Joined: Sep 17, 2009
Posts: 39
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

Joined: Dec 20, 2006
Posts: 2497
    
    8

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

Joined: Sep 17, 2009
Posts: 39
thanks Jan.. I hope I get solution soon in new forum...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The issue is happening long before you're getting to a page.

Check the log for startup errors.
Abhijit Kangale
Ranch Hand

Joined: Sep 17, 2009
Posts: 39
sorry David...
i am not getting you... could you please ellobarate something...
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

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

Joined: Sep 17, 2009
Posts: 39
thanks Jan for your valuable answer....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet action not available