Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!

Devendra Bhati

Greenhorn
+ Follow
since Dec 27, 2012
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Devendra Bhati

I am unable to get where i'm missing. This below query execute well in SQL but not in HQL.
ERROR: org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ON near line 1, column 148 [SELECT op.username, op.email, orders.p_id, orders.o_id, product.listed_price FROM com.model.Orders orders INNER JOIN orders.OrderProcessing as op ON op.u_id = orders.u_id INNER JOIN orders.Product as product ON product.p_id = orders.p_id WHERE product.p_id = '208' ORDER BY op.username]

Dear friend,

Why you hard coded value of radio control in java code. The best practice says, you need to get the value of input controls dynamically. So try to fetch the values of radio buttons from javaScript/jQuery and then request to server to GET/POST method.

I'm not sure but might getParameter() method will accept radio name instead of value. So please check out this.

All the Best. :)
8 years ago
JSP
Here is Solution of above problem :)


8 years ago
JSP
I am unable to iterate the select options. Code execute once and not showing all users. Might be i'm unable to iterate the all values. Please send me code snippets. To filter UserNames by Ascending/Descending options in my drop down list, so every time i select an option (ASC/DESC), usernames will sort respectively in that order.





Below code I have created an object of StringBuffer class to append all values and displaying.

8 years ago
JSP
Hello All,

I got my solution, there was an syntax error inline var xmlDoc = xmlHttp.responseXML.documentElement;
Thanks.
8 years ago
JSP
Hi Kartic,
I'm doing the same problem ..also posted to forum for getting help in my code so if possible can you send me your code..i'll go through that and learn.

8 years ago
I want filter USER table (from mysql) by username to retrieve record after selecting drop down (User Name) menu.







8 years ago
JSP
Hello Bibeault ,

Thanks for suggesting me method to do. I done client side ajax call by jQuery to get data but server side couldn't get watevere i need to get responce in JSON...?


Below my Java View and Controller codes.



I am unable to know how orderList get city property (even i tried with request.getParameter("city")). P{lease help me next.
8 years ago
JSP
Hello All,

I want to design a page in JSP with "Filter option for city and post back when option changes".
Radio button indicates respective cities and clicking on a city option will display/sort city records from database.

Currently i've no idea. I have heard about ajax postback.
8 years ago
JSP
Okay! Please let me explain, i have no idea about it.
"Filter option for city and post back when option changes"

4 radio buttons showing respective cities and on selecting a particular radio button (city) it'll sort my records city wise from database.

At least give me a link or explanation, i'll very thankful to you.
8 years ago
JSP
Thanks Bibeault,
Will you please give me a sample code for my problem.
8 years ago
JSP
Akhilesh, Hello.
I know this. This proble related to Struts 2 framwork also JSP implementation. I appreciate if you can help me.
8 years ago
Dear Ulf Dittmer,

I was not trying. I have a code with the same logic but i was trying in struts framwork.

Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/shipping_order", "root", "root");
Statement statement = connection.createStatement();

String city = request.getParameter("city");

ResultSet rs = statement.executeQuery("select * from USER where city= '" + city + "'") ;

while(rs.next( )){
out.println("Sorry, could not find that city. ");
%>

<TABLE BORDER="1">
<TR>
<TH>User ID</TH>
<TH>City</TH>


</TR>


<TR>
<TD> User ID : <%= resultset.getString(1) %> </TD>
<TD> City : <%= resultset.getString(2) %> </TD>

</TR>

</TABLE>
<BR>
<%
}
}
%>
8 years ago
JSP
Hello Friends,
In JSP page I select a City by Radio controls. I want this radio selection will retrieve/fetch all the records from DB table where particular city has been selected.
Lets an example, If i select a city as Bangalore using radio button named "Bangalore", then it post back All records with Bangalore in DB table.

I am using Struts 2 and Hibernate.

Thanks in advance to help me.
8 years ago
Hello Friends,
I am new to JSP. I am having 4 cities as Radio buttons, I wants to fetch record of particular city by selecting radio button.
(ex. if i select Bangalore as city, then i will get all records from DB where city is Bangalore.)

I appreciate your active contribution. Please suggest me code or at least link to get things done. Thanks in Advance.
8 years ago
JSP