This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Regarding a browse button in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding a browse button in struts2" Watch "Regarding a browse button in struts2" New topic
Author

Regarding a browse button in struts2

manikanta annavarapu
Greenhorn

Joined: Oct 01, 2012
Posts: 1
HI All,

This is manikanta . I am working on Struts2+Hibernate project. In our project we are having a requirement like to upload a file . For that requriment while developing an JSP page we are using a <S:file> tag.
Below is the format of that tag.
<s:file id="fileUpload" name="fileUpload" label="Select a File to upload" size="40"></s:file>
by using this tab internally it will create a choose button .For that choose button internally it will take a CSSProperty like default color.
Our requirement is to change the color of that button to blue.

Please let me know any solutions fot that requirement.

Regards
A.Manikanta
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Maniknata,

there is a attribute called cssclass and cssstyle in file tag which you can use to apply css to apply css on Button you need to refer to the struts theme.
For more information refer struts documentation here

Regards
Jatan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Regarding a browse button in struts2
 
Similar Threads
Struts2: file upload not working
In struts2
Struts2 File Upload (Submit button)
Struts2 multiple file upload using single file TAG
struts2: how to edit uploaded files