Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Action messages

 
syruss kumar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

I am a newbie to struts,to learn validation i have created a sample application which contain Login.jsp


and in my ActionForm i have written the validation logic



in my Action

in struts-config


while im trying to execute the application i got this error
java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null
at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:70)
at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


can anyone help to clear this issue ?
Thanks in advance
 
Gavi jadz Grandea
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi syruss,
I tried your code and it worked out fine.

It's just having errors when submitting without values, it says no input found for action /login

You should have an input like (input="/index.jsp") attribute in your <action> tag.
And make sure you have a form bean for your loginform.


Check the completeness of your application.

regard,
jadz
 
syruss kumar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Gavi jadz Grandea,

Thanks a lot for your reply i have corrected that issue with the help of your suggestion.

 
Gavi jadz Grandea
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
welcome
 
Zulfy Adhie
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Gavi,

I face the same problem. I'm using the tiles and dispatcher action. so if I add the validate="true" on the struts-config.xml it will error like this :
javax.servlet.ServletException: java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

and also if I added the input on the action tag, the tiles will not working correctly.. How do I fix this problem? Thanks before
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic