Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

ganesh narayana

+ Follow
since Sep 10, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ganesh narayana


i am applying simple theme for my struts 2 page, when the theme is default it could read values from resource bundle, but when changed theme to simple, it is not able to read the values from the resource bundle.

<s:form action="SimpleAction" method="post" theme="simple">
<s:label key="app.indexheader" />

This is how i am creating the form. am i missing any thing? please help me.
12 years ago
Hi All,

i am using struts 2 for our current project, to implement field level security. I have to extend the Struts general componet Tags to implement additional features. I dont know where to start. Can you please provide me with an example to do this would help me lot.

For Eg. I have a text box it should be displayed as Read Only for certain users, Editable for certain users and label for some users. So i am planning to pass role as input parameter, which will decide to dispaly the field accordingly.

Thanks in Advance.
12 years ago
i mean, selective hiding or locking fields based on user roles. for few roles i want to hide few columns, for few roles i want to display fields as readonly!! can you suggest please.

Thanks in advance
12 years ago

my project,we already have roles based page level security implemented, now we have a requirement of developing field level security. we used struts for our project.

can any one suggest the better approach for implementing the field level security?
12 years ago

it is very simple to do so, when you click on download to excel button, you submit this request to some jsp or servlet. in that server page set content type to application/, then the generated output will be opened with an excel file.
i am giving code for a servlet


public void doPost(HttpServletRequest req,HttpServletResponse res)
PrintWriter out=res.getWriter();
out.println("<tr bgcolor=lightblue><td>Hello </td><td>James</td></tr>");

what ever you are giving in td will be a cell content.

so solve your problem easily and keep smiling.

13 years ago
i have nearly 500 records in a resultset, which is generaged by a servelt, now i want to display all this 500 records using a jsp.

please tell me how to pass this data to a jsp, and how to receive information in jsp.

14 years ago
Dear Friend,

only the driver and URL differes from one type to second type.


driver : sun.jdbc.odbc.JdbcOdbcDriver
url : jdbc dbc:<<dsn name>>

type 2 for oracle

driver : oracle.jdbc.driver.OracleDriver
url : jdbc racle ci8:@

type 4 for oracle

driver : oracle.jdbc.driver.OracleDriver
url : jdbc racle:thin:@localhost:1521:<<oracle SID>>

then use Class.forName(driver name)
Connection con=DriverManager.getConnection(url,username,password)

for example :

Connection con=DriverManager.getConnection("jdbc racle:thin:@localhost:1521:<<oracle SID>>","scott","tiger");

to connect to the specific database.