Suresh Kumar Mutyala

Greenhorn
+ Follow
since Sep 14, 2009
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suresh Kumar Mutyala

Yes you were correct, my understanding about the execute method's returned value was incorrect. The boolean value returned by the execute method would be false even if the insert was successfull, it will be true only if any records are returned by the query which got executed. Thank you all for your response.
I am not getting any exception. Simply getting false.
I have tried that as well, even it didn't work. Problem is the method execute() returns a boolean value true if insert executed successfully and false if it failed to insert, similarly executeUpdate() retruns the count of records impacted or 0(zero) if no records got updated. But i am unable to find why didn't any records got inserted when teh insert query is correct. So is there any way i can find out the reason why the insert didn't succeed.
Hi,

I am facing an issue where my insert query is failing to be inserted in db, Below is teh query i am using,



I am using a PreparedStatement to execute the above query like below,

If i excute the same query from SQL Developer the record is getting inserted without any issues.

Since the execute() is returning a boolean i am unable to know the reason why the query execution failed. Is there any way that i can figure out why the query execution failed.

Appreciate your help and efforts in advace.

Thanks,
Suresh

[Added code tags - see UseCodeTags]

David Newton wrote:How is that not making search-engine friendly links?!

Right now you have a JSp that accepts GET params (which, by the way, is a pretty suspicious practice--it's not a good idea to submit to a JSP). So switch it to a servlet mapped to /products/*. The servlet pulls apart the rest of the URL to get the "parameters", now embedded in the URL. That's a search-engine friendly link. How you expose those links to search engines is a different issue.



Thanks David, my requirement can be satisfied by using the Struts 2.1.8 framework. Once i am done with it i shall let you know. Thanks a lot.
14 years ago

David Newton wrote:How is that not making search-engine friendly links?!

Right now you have a JSp that accepts GET params (which, by the way, is a pretty suspicious practice--it's not a good idea to submit to a JSP). So switch it to a servlet mapped to /products/*. The servlet pulls apart the rest of the URL to get the "parameters", now embedded in the URL. That's a search-engine friendly link. How you expose those links to search engines is a different issue.


Thanks David, I am trying it with Ruby on Rails, I shall let you know once i am done with it. Thanks a lot.
14 years ago

David Newton wrote:Make search-engine friendly links.

This isn't JIG, either, since it has nothing to do with Java, and everything to do with URLs and whatever framework you're using.



Thanks David, but "Make search-engine friendly links" is not probably answer to my requirement. Actually I am developing a site that has a lot of postings in it, users can come to my site and search for their requirements. Since my site is not that popular and most of the people for any requirement search in google, so i want google to come to my site and search for the request of users in my site and place a link to my site in its search results.

And i already mentioned, to help this problem there is a concept called URLRouting for .NET developers which exactly fulfills my requirement but i couldn't find a solution for development in Java/Servlets/Struts or etc., So i need help to find out using which framework can sort my problem. Thank You.
14 years ago



I opened Google and typed Bharat Matrimony Address and pressed enter.
Google lists some links, I found yellow pages link (sulekha or whatever) and clicked on it.
The link displays a page containing values retrieved from database.

Suppose……….
The link appears to be something like this,
Eg1, http://mysite.com/products/drinks/vizag (Google creates this link and displays it)
This link is showing all contents in db matching with drinks and vizag.
When I try to retrieve the same directly from my website not from google the url generated looks like.,
Eg2, http://mysite.com/products.jsp?item=drinks&loc=vizag
How can my site help google to create a link like Eg1 in JAVA?
The same can be done in .Net by using a concept called URLRouting.
14 years ago