Vijaya Ragavan

Greenhorn
+ Follow
since Dec 02, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vijaya Ragavan

I'm getting values from Mysql table using some jdbc code in the action class.

The returned values are to be populated in the result jsp page which has a table where each column stores particular column values returned from the Db through the code.

I can update one row of a table by setting the value of a columns using <s:property> tag. How can i list all the values in the Db? i.e to have multiple rows as in mysql table.
10 years ago
ya sure Thank you so much pal...
10 years ago
Is there any way to use Pl/Sql code in Mysql database operations? Any conversions to be done?
10 years ago
It works fine today pal.
I don't find why it didn't the other day. Strange. But i had a similar case once. Can't even guess where the problem could be.!
10 years ago
I found the problem to be with the jdbc code. But i don't find anything wrong in that. Is there anything that i left in it?
10 years ago
In the statement.executeUpdate(query) line.

This line has the this.getRegname and this.getPass values.

Those are the values i entered in the corresponding text fields.
10 years ago

In my Application, there is a Register form in a Jsp. The values entered in it are then stored to mysql Db.

The action class (Register.java) for inserting values to mysql Db is:



The Jsp:



Struts.xml:



Tried in 2 Dbs but the same result. (The code in comments (in Register.java) are for the Db in Mysql workbench 6.0) What do i miss?
10 years ago

<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="upper"></interceptor-ref>



When i have the first interceptor 'defaultStack', it works fine and if i don't include it, the Custom Interceptor gets Null Pointer Exception.

What is actually happening behind? Why do i need to include the defaultStack interceptor before the custom interceptor?

Also, What is the function of the line ActionInvocation object.getStack() function?
10 years ago
I have a Jsp (CreateBlogPage.jsp) which has a text field name="name".

The form on submission triggers the action as: <s:form action="/bloggingns/PublishBlogPost">

The PublishBlogPost Action class gets the value of the property "name" by means of getters and setters and inserts it into a Db.

Now i wrote a Custom Interceptor that before the Action class, converts the name string to UpperCase. The code is.



The Struts.xml has:

And on execution, the action class don't get the converted String (in UpperCase). Instead it is the same as entered. What do i miss here?
10 years ago
HI all,

I have a jsp where i have a form to input data to a db. The form is in a Div tag.

I just include a button which fetches data from the db and display it below the form in another div tag.

How to get that displayed in the same jsp without reloading the whole page? Also the onclick event should fetch the data from the db so that the updated data from the db is got.

Some say using jquery. I don't find related tutorials. Please help.
10 years ago
This is kind of an explanation which i needed pal. Thanks a lot..!
10 years ago
JSF
Hi,

Is there any alternative for the reset attribute of the struts form ?

Also, What is the difference between the action and onsubmit attributes?
10 years ago
Thank you bear...
10 years ago
Its not following a particular order of files it seemed to me when i tried. Sometimes index.html is called and on restarting, index.jsp is called. Is there any server-cache related things do this? because i noticed that even on restart of the server, the file which was invoked before is invoked again.

So, you say the best practise will be to invoke the action directly. How to do it?
10 years ago
Hi,

1.What if we have all the files in the <welcome-file-list> in web.xml? Which will be displayed on the start of the application? Is there any rule for it?

2. If we want to have an action as the welcome page, the methods which i found were

i. Include some code in index.jsp for redirecting to the action.
ii. Directly refer the action name as the welcome file in web.xml.
Is there any other ways too? And which is the best practice?
10 years ago