Dhaval J. Patel

Ranch Hand
+ Follow
since Mar 10, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dhaval J. Patel

Hi all,

I have a design question for filtering for rest api. I am new to using rest api and I would love to hear opinions from all the experienced folks.
So the api we have allows users to get info on different entities that we have in our databases. These are simple get requests. We also allow consumers to pass filter parameters for eg. /abc?a=1&b=2 etc. and the results would be filtered based on what is being passed. Now the new requirement is to provide users with possible filtering options. So that query would return possible filtering values for all the fields in an entity. Like possible values for field 'a' is 1,2 and 3, for b is 2,4,5 etc.
We could do labour work there and write code to find out distinct values from the database and write code that gets possible filtering values for each field. But then thats hard to maintain. Every time we add a field we need to update the filtering code as well as the metadata code.
If we decide to write a framework to do the entire filtering, the issue is that those fields could be different datatypes. So we couldnt really just fetch distinct values from the database.
We use jersey and ibatis for orm.

I was wondering if anyone has run into similar problem and thought of a clean solution for it.

Thanks.
11 years ago
req.getSession(true) does not create a new session. It will create a new session only if there is no existing session. So in your case when you do req.getSession(true) it will return a reference to the same session you had before. If you invalidate that session and then try to do stuff with the same session, it wont work. It might be a different reference to the session, but still it is pointing the session that was just invalidated.
12 years ago
First off you shouldnt be using scriptlets in jsp, makes it messy really.
Second, you are missing the value attribute in your option tag.
Third, you should post more information on what happens when you run the code.
12 years ago
JSP
Tomcat is web container. Google web server vs web container vs app server and you will find dozens of articles on it.
12 years ago
Float.parseFloat(String)

A quick google search would have given you the answer really.
12 years ago
I am not sure if you took this into consideration but https uses port 443
12 years ago
The best thing to do would be try it yourself. Would give you a better insight by playing around with different possibilities instead of reading an answer that someone wrote.
12 years ago
Hi Alan

Personally I would suggest getting a solid idea on why frameworks are used. Once you have a good idea on that you will understand how it makes your life easy. Then see what framework you want to learn. If you feel you get more control using base technologies, I guess it wont be a choice once you start working for a company that uses frameworks. It all depends on what you are working on and what the implementation needs. Yes, I agree that using trusty old stuff gives you more control, but its a matter of whether you need that control or not. If you do not need that control then it ends up being an overhead. I am not a framework fanatic, I came through the same path you came (learning base first). But I do feel that learning framework is a definite plus. If you do not learn one now, I guarantee you will end up learning and working with one anyways.

All the best
12 years ago
Its going good mate. Still in my probation period though. But I think I'll get through it with ease.
12 years ago
Hello everyone,

Our company recently setup bamboo. When I look at the build summary, there is a code change tab that lists all the files with code changes. Is there any way I can look at the code differences between current and previous version ? Is there a specific setting for it ? Or a plugin ?

Thanks,
Dhaval Patel.
Hello everyone,

My problem is a little unique and I couldnt find the solution by googling it.

The first time I setup development environment on my machine, I did not use svn plugin in eclipse. I did an svn checkout under C directory. The files that get checked out have a lot of stuff (which are not specifically projects). However there are three projects somewhere inside the checkout (two are java projects and one is a web projects). I opened those three directories as projects in eclipse. Works perfectly fine. And I used to check in code by going to the directory and using check in option.

Now I installed the svn plugin and I want to link the eclipse projects directly to svn. I read at a few places that it can be done by Team->Share project. But I am afraid it might check-in the eclipse specific files (which might get me into trouble). Also there was a suggestion that if you uncheck "use default location" when creating a new project it will detect that the project is versioned. But the issue here is that the .svn hidden folder is only in the base directory of the checkout and not in every subdirectories. Hence that eclipse wont detect svn settings because the projects that I need to use are somewhere inside the folder structure of the entire checkout.

Not sure how to go around this. Please suggest a solution to this.

Thanks,
Dhaval Patel.

Got something solid to work now ! But yeah, I really need to stop slacking. Theres a lot of stuff that I should learn ..
12 years ago
Howdy folks,

Have you ever felt blank and low at work because you have nothing to do. Its worse when you are in your probation period, where you feel that guilt for sitting idle. Worst feeling ever, watching the clock ticking ..... Its even worse when you have a soar throat and didnt sleep well last night. Need a mind cleanse
12 years ago
Thanks !! I managed to setup Sonar and it looks fantastic !!
12 years ago
Hello everyone,

Can anyone share their experiences with SONAR. I am new to code analysis/testing stuff and I havent used anything other than junit. From what I have seen it looks like Sonar just provides a dashboard which contains reports from different tools, some of them which are shipped with Sonar itself and others which you integrate .. Does sonar have any code analysing functionality of its own ? I am not sure if I am understanding it correctly. I tried going through their website, but couldnt figure out what it actually is (maybe because of lack of experience in these things).

Any insights into Sonar would be appreciated.

Thanks
12 years ago