Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot find ActionMappings or ActionFormBeans collection

 
Magnus Kjellberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Ive looked everywhere for a solution to this problem, ive found numerous things but none have helped me. I have a really simple application, just trying to get it to work.

/submit.jsp


struts-config.xml:


And in /web-inf/classes/hansen/playground/ i have SubmitAction.class & SubmitForm.class

Would appreciate some help

Edit: Stupid smileys destroy my code ;)
[ December 20, 2005: Message edited by: Magnus Kjellberg ]
 
Mateus Hooker
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Either the <servlet> tags for the Struts action servlet or the <servlet-mapping> tags for the .do extension mapping or both are not present in the web.xml file.

Typos or spelling errors in the struts-config.xml can lead to this error message. For example, missing a slash ("/") on a closing tag can have this effect.

Another element that must be present in the web.xml file is the load-on-startup element. This can be either an empty tag or can have an integer specified that indicates the priority of executing the associated servlet. The higher the number in the load-on-startup tags, the lower its priority.

Another possibility, related to need to use load-on-startup tag, is that precompiling JSPs using Struts can lead to this message as well.

Hope this helps.
 
sumanth divvela
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u have entered code is here

but i hope the problem with
instead of this just try out this i hope it will work just try it
 
Aaron Ting
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,


I have no idea if this helps... but, you can try changing your tag form from <html> to <html:html>...

I think by doing so, it is trying to tell the program that the .jsp page is under the Struts framework.. isn't it.. ?

Hmm... i wonder..
 
Magnus Kjellberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive managed to solve that problem, some stupid configuration error. Bah.

But now ive got another problem, the form opens and displays with the pre-determined value as set in SubmitForm.java, but after i submit, submit.do is just empty, doesnt display the form or anything. Just an emtpy page

And by the way, it doesnt work if i put "/submit.do" instead of "/submit".

SubmitForm.java:

[ December 21, 2005: Message edited by: Magnus Kjellberg ]
 
Aaron Ting
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Magnus Kjellberg:
Ive managed to solve that problem, some stupid configuration error. Bah.

But now ive got another problem, the form opens and displays with the pre-determined value as set in SubmitForm.java, but after i submit, submit.do is just empty, doesnt display the form or anything. Just an emtpy page

And by the way, it doesnt work if i put "/submit.do" instead of "/submit".

SubmitForm.java:


[ December 21, 2005: Message edited by: Magnus Kjellberg ]



Greetings,


I use to have such problem too... don't know if its the same problem you are facing like i was..

Anyway, my problem was that the validation was having some problem.. and, i didn't really went to set the errorPage... so, you might want to look into this area..

Hope this helps..
 
Magnus Kjellberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But ive stated both the success and failure forwards to /submit.jsp.

Also when if i just enter "localhost/webapp/submit.do" it gives me a blank page.
 
pax smith
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just check the location of your web.xml and struts-config.xml
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic