File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes struts tags problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts tags problem" Watch "struts tags problem" New topic

struts tags problem

hani Ibrahim
Ranch Hand

Joined: Sep 06, 2006
Posts: 182
Dear all,
i have a strange problem that i use struts tags inside html:form this page send its parameters from selected menues values to the Action class.It is work perfectly in mozilla but with Internet explorer No data reach to Action class always null.
Even i call using javascript before submit to assure that we hvae data..but after submit in the server side reach null values.

here sample code from page:
<html:form action="/test" method="POST" styleId="testForm">
<html:select property="sectorIdLeve11" styleId="mainSector" size="1">
<html ption>A</html ption>
please help with any suggesstions,tips,best practices please please please...
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 471

Dear Hani,

First of all, I suggest that when you are posting code, please put it in a code tag so that it can be readable.

Secondly, regarding your problem, your option tag does not have a "value" attribute, which means that the value will be sent to the action as null.

Visit my blog:
Taciano Morais Silva

Joined: Mar 07, 2008
Posts: 1
I have the same problem here. Using get method, the form submits just fine. However, even assigning the value of a textfield (input type text), I get no data in the action only on Internet Explorer.

Where should I look?
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Is it this problem?

[How To Ask Questions On JavaRanch]
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Using the "Disable smilies in this post" option helps as well...

I don't know about your IE versus Mozilla issue. When you say "No data reach to Action class always null"...what exactly is null? What is the type of your sectorIdLeve11 property? Do you really want that property to end in two ones or is it supposed to be the letter L followed by a one? Why do you just have one htmlption that does not have the required value attribute?

- Brent
I agree. Here's the link:
subject: struts tags problem
It's not a secret anymore!