Dan Field

Greenhorn
+ Follow
since Mar 13, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dan Field

The taglib is called Wall.

When I say browser, in this case I'm talking about mobile phone browsers. Mobile phones tend to have different browsers, but the taglib wall should handle this.

I've found that in this case wall actually does something I didn't know about. I tried calling confirmSP.jsp from a standard browser that I can check the source code with, and wall is populating the form action.

So I now think that this problem is to do with the wall taglib not dealing correctly with the mobile phone browser type.

Initially when I said at the start of this thread that the code had action="", this was incorrect as I didn't realise the wall taglib was changing it. Or possibly it was correct and because wall was failing the action was being left empty...

Thank you for the help Vishal and Rosco. I think I need to start looking at whats going wrong with the wall taglib as the error is more likely to lie there.
I tried adding confirmSP.do as the action.

Doing that led to a problem with the formBackingObject. The data that is meant to be set in formBackingObject (in the confirmSPFormController class) for the ConfirmForm object is all null.

So with a newer browser and action="" this isn't a problem, but with an older browser when setting action="confirmSP.do" the formBackingObject is broken.

I hope this makes sense, I'm learning about this all as I look into this code.
I tried removing the action, but this caused an exception as an action is mandatory.

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/prodwcb2].[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /confirmSP.jsp(40,0) According to the TLD or the tag file, attribute action is mandatory for tag form
Hi Vishal,

The formView is set as confirmSP.jsp. There is no successView that I could find.

I tried adding that as the action, but then the hidden information in the form doesn't seem to be passed correctly.

The hidden information needs to be available for the onSubmit function. So a user will simply click on the submit button and the information is passed.

The handler mapping is:



The onSubmit function is in the confirmSPFormController.java.

David Newton wrote:It'd be quicker to just post to the correct forum...

Looking at the imports should be enough to provide a hint as to the framework you're using.



Yes you are right, I've re-posted this in the correct forum now.
15 years ago
I am very inexperienced MVC and Java in general, and I am struggling with a form problem.

The problem is that the form call below works, but not in all cases. It seems some browsers don't like the empty actions.



I have the class Confirm in a file called Confirm.java that should populate each field.




And I have another class called ModelAndView onSubmit which handles the request.



But what should I call for the action when I can't leave it empty?
Sorry, possibly I'm not...

Really am new to this so I would appreciate it if a Moderator could move this to the correct forum.

Thanks for the reply!
15 years ago
I am very inexperienced with Struts and Java in general, and I am struggling with a form problem.

The problem is that the form call below works, but not in all cases. It seems some browsers don't like the empty actions.



I have the class Confirm in a file called Confirm.java that should populate each field.




And I have another class called ModelAndView onSubmit which handles the request.



But what should I call for the action when I can't leave it empty?
15 years ago