*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts tags problem" Watch "struts tags problem" New topic
Author

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>
</html:select>
please help with any suggesstions,tips,best practices please please please...
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
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: http://jnassef.blogspot.com/
Taciano Morais Silva
Greenhorn

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
Bartender

Joined: Oct 29, 2001
Posts: 8834
    
    7

Is it this problem?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[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: http://aspose.com/file-tools
 
subject: struts tags problem
 
Similar Threads
document.Form1 has no properties error
selecting a value in drop down box
Getting selected values from Struts combo box
Struts HTML Taglib Issue
javascript issue in struts for onchange event