• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet action not available

 
Abhijit Kangale
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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
 
prakash pawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • 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: 39
  • Mark post as helpful
  • send pies
  • 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
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.
 
wang lei
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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: 39
  • Mark post as helpful
  • send pies
  • 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: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Jan.. I hope I get solution soon in new forum...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry David...
i am not getting you... could you please ellobarate something...
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Jan for your valuable answer....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic