Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8819655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:24:56+00:00 2026-06-14T05:24:56+00:00

The following jsp file fragment using struts2 tags doesn’t show the textfield label. How

  • 0

The following jsp file fragment using struts2 tags doesn’t show the textfield label. How can I fix this? Is it possible to have the label displayed by using only struts2 tags?

<s:form action="voucher" theme="simple">
    <table  width=50% border="5"> 
      <tr>
          <td>
         <s:textfield label="Enter the voucher hrn"  name="voucher.SN" />
          </td>
          <td>
         <s:submit value="Check state" />
          </td>
      </tr>
      <tr>
          <td>
         <s:radio  list="#{'used': 'Mark as used', 'available': 'Mark as available'}" name="selections" value="%{'used'}"></s:radio>
          </td>
          <td>
         <s:submit value="Update state" />
          </td>
      </tr>
        </table>
</s:form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:24:57+00:00Added an answer on June 14, 2026 at 5:24 am

    It is because you are using simple theme in your form. Remove theme="simple" from <s:form> tag then Struts2 will do table layout as well field errors and labels for you.
    BTW if you really need to use your custom layout then use <s:label> tags for labels.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following in jsp: <form action=/ucReady2/uploadservlet method=post enctype=multipart/form-data> <label for=filename_1>File: </label> <input
In a web project using jsp, I have following requirement Upload a file (say
I've got the following jsp page and I'm using struts2-jquery-plugin-3.1.1 <script type=text/javascript> function openDialog()
I have a jsp file where I send two parameters using the following url.
Inorder to use Spring Form Tags in JSP file following is taglib element I
I'm receiving this error on my jsp file - 'Can not find the tag
The following situation works fine (JSP file): <p class=FormInputElement> <label for=description>Description</label> <input type=text class=description
Given the following preview of my JSP file in my project : <%@ page
I am displaying ActionMessage s through a JSP file by the following command: <logic:messagesPresent
I have the following form in a Struts2 JSP that contains some radio buttons.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.