Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Mahesh Bamane

Ranch Hand
+ Follow
since Mar 12, 2008
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 Mahesh Bamane

Hi,
I want to create AutoFilters at multiple places in an excel sheet using Apache POI. I'm somehow not able to do it.

(sheet is HSSFSheet)

sheet.setAutoFilter(new CellRangeAddress(16, 19, 3, 10));
sheet.setAutoFilter(new CellRangeAddress(4, 9, 3, 10));

I've been adding it like mentioned above but second filter is overriding the first one and when excel sheet is created I can see only one.
Any suggestions, tutorials are welcome.

Thanks,
Mahesh
Thanks for your reply.

But somehow "redirect:PATH" doesn't work in IE 8.0.7600.16385.
Any specific reason behind that if anyone knows.

Also apart from Post-Redirect-Get pattern is there any other way to handle double submission of form(normal which happens when user refreshes page using F5 or clicking refresh button).

Thanks,
Mahesh
7 years ago
Hi Bill,

Thanks for your reply.

Well, I've a report page getUserDetails.jsp which has form fields such as username, startdate and enddate, producttype.
User fill all these fields clicks on submit. Application displays a report to the user accordingly which is displayed using jqGrid. Therefore I'm passing JSONString to jsp page.
Code looks something like this:



Well, what are the various ways using which we can avoid double form submission in spring mvc 3.0??
7 years ago
Hi,

Any suggestions on how to handle form re-submission in Spring MVC 3 with annotations.
I tried implementing Post-Rediect-Get design pattern but it doesnt work in IE and once Get request crosses it's no. of character in request string it stops working in mozilla as well.
Any tutorial or Blog Or suggestion please.

Thanks,
Mahesh
7 years ago
Thanks for assistance Mark, issue is resolved now.
Root cause was I'd written a filter which was calling doFilter twice.

Thanks again,
Mahesh
7 years ago
Well, controller is calling every mapping twice it's not for a particular mapping that it's happening. So I've doubt whether it is something related to configuration.
I've two kind of url mappings so one is for /admin and one for /user.

Therefore I'm having two servlet-config files one is for /admin and /user and two servlets have been configured as follows.

<servlet>
<servlet-name>mvc-admin</servlet-name>
<servlet-class>com.myapp.servlets.AdminServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>mvc-user</servlet-name>
<servlet-class>com.myapp.servlets.userServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

and have two controller one is adminController and other is userController.

and have mappings as follows:
in adminController:
@RequestMapping("/selectUser")
public ModelAndView admin(){
return new ModelAndView("/admin/getapplist","list", Application.getApplicationList());
}
in userController:
@RequestMapping("/showlist")
public ModelAndView user(UserForm form, ServletRequest request) {
ModelAndView modelAndView = new ModelAndView("/user/showlist");
modelAndView.addObject("list", Application.getApplicationList());

return modelAndView;
}
Thanks.
7 years ago
Hi Mark,

Thanks for your interest.

As far as I remember there nothing which changed drastically except an addition of one mapping.

Really know way to understand why controller is calling every mapping twice.
Is is something already faced in spring? I saw few posts on spring-forum n there it was happening because of empty img tag like .
I checked all my jsp pages n didn't find such an occurrence.

Thanks,
Mahesh
7 years ago
anyone to help on this please, something urgent and I'm not able to resolve. so..
7 years ago
Hi,

I've been facing following issue in my project:
Controller is calling every action twice; therefore form is getting submitted twice.

I'm using spring mvc 3.

I's quite strange till yesterday code was running fine and suddenly I've started facing this issue.

Any suggestions/corrections are welcome.

Thanks.
7 years ago
Thanks for your reply guys. It was just a radom question came into my mind. So we can say static means strictly "class level".
If static methods are allowed inside a static inner class then why static varibles are not allowed inside static method?
Thanks for your reply.

If only one object is created then why super is called? (might be a stupid doubt)
I mean doesn't super() creates super class object? What is the benefit of calling super()?
If I put S.O.P in class A, B anc C's countructor and create on C's object i.e. C c = new C(), all three are printed. Doesn't that mean 3 objects are created?
Hi Winston, sure you can do that. Thanks.