Nitesh Patel

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

Recent posts by Nitesh Patel

Hi All,

Thanks for your reply. I also understand most of time reboot solve problem when we have slow responsive application. But in this case situation is different as I had rebooted it couple of times, try to repair disk permission (n rebooted) but no. There is also no indexing (spotlight) problem. When I tried to compile 1 java file with settings JAVA_HOME to jdk1.6 (which is under /System/Library...) it taking 1 minutes 20 seconds but if I run same javac command with sudo then it run instantly. Also, if I don't set JAVA_HOME and use default (which is jdk1.7 under /Library/Java/) run instantly.

Is there any way I can find it out why it taking long time with jdk1.6 ?

Kind regards,
Nitesh
10 years ago
Hi All,

I already try to reboot and repair disk permission but no luck. I also tried to set to jdk1.6 but still no luck. If I use sudo then it executes normally (instantly). Is there any way I can find out root cause ?

Kind regards,
Nitesh
10 years ago
Hi All,

Recently my macbook was crash and our support team had reformat and update it. While this, they had updated java 7 but as my current project required java 6, I tried to set JAVA_HOME pointing to java 6 jdk and try to compile my source code. But it seems that it taking ages to compile with java6. When I investigate and try to compile one 1 java file, it takes 1 minutes 20 seconds. Surprisingly, but if I do it using sudo then it run instantly(same like java7),


I have verified the file permission and its as expected,


This is my java version

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)



Can someone please help me ?

regards,
Nitesh
10 years ago
Hi All,
I come to a scenario where I need to update my test cases to test Cookies logic. I am unable to find out how can I do this in JMock ? Below is my code,


I am already doing unit test for "header" same way I need to do for Cookies. Can someone please guide me ?
Regards,
Nitesh
12 years ago
Hi Babu,

Please change your request mapping as below and then try,


Regards,
Nitesh
12 years ago
Hi Bill,

After setting responseType, I will get feed response as com.sun.syndication.feed.atom.Feed, how can I use to convert to other XML form using XSLT. Currently I am using DOMSource as responseType, use java transform mechanism to transform it to other XML format using .xsl file.

Is there any documentation/tutorial available for this ?


Thanks & Regards,
Nitesh
12 years ago
Hi Bin,
Thanks for the reply. Can you please tell me how can I use AtomFeedHttpMessageConverter? Is it only replacing SourceHttpMessageConverter with AtomFeedHttpMessageConverter

What should be my responseType ?

Thanks,
Nitesh
12 years ago
Hi All,
I am bit confuse regarding best way to read the ATOM feed using spring "Rest Template". Right now, I am passing the respective url and parameter to and get the response as Source.class. Though I am getting the response correct (same as when I invoke same url in browser) is it right way to read the ATOM feed ?

Below is my spring context configuration for RestTemplate,


Regards,
Nitesh
12 years ago
Hi All,
I come across an issue during XSL transformation. We need to convert one xml format to another format to pass on third-party system. We have following sample XML input,


Below is our XSL code to convert it,


Below is our current output,

but somehow, existing

tag is missing from final output ( which should be around This should be headline). Can anyone please help me ?

Regards,
Nitesh

Hi All,
Finally (somehow) i am able to resolve it using below configuration,


Thanks to all for your guidance/help.
Regards,
Nitesh Patel
12 years ago
Hi Peter,
Thanks for the reply. Yes, during mvn jetty:run I can see my static resources (like JS, images) under target/XXX/resources/ location but somehow when I tried to access the same in respective JSP, it can not find them (sounds stupid but it is),



Regards,
Nitesh
12 years ago
Hi All,
I am trying to develop simple web application with maven & jetty. So far everything was fine but when I tried include the static resource like images, javascript i come to an issue. How can we configure static resource into jetty plug-in so we can reference it. While searching on google I came across these tags webAppSourceDirectory & resourceBase but its not working. Below is my current jetty plug-in configuration,


I have my js files under /src/main/webapp/resoruces/js folder. Can anybody please guide me, how can I configure static resources ?

Regards,
Nitesh
12 years ago
Hi All,
In Spring MVC 3.0, we can pass several types of parameters to controller method like HttpServletRequest, Model, ModelMap, BindingResult etc. I have use them as well but I am bit confuse when to use which type of parameters, specifically between below parameters,
  • Model
  • ModelMap
  • @ModelAttribute
  • BindingResult :- user when we have to validate form object and return error messages


  • Can someone please guide me about these parameters ?

    regards,
    Nitesh
    12 years ago
    Hi Manish,
    Thanks for the reply. I figure it out using "0 1 0 1-7 * MON" expression (which ensure it only run for 1st 7 days of month - first week of month). But definitely I will try your expression as well.

    Thanks,
    Nitesh
    12 years ago
    Hi All,
    I am trying to create Junit test case for simple Spring MVC 3.0 controller. I have simple controller as below,


    I am trying to create unit test for this controller as below,


    But I could not find out how can I create testing object for Model. I can pass null for current test but in future I might need it (not null object). Can someone please guide me ?

    Regards,
    Nitesh
    12 years ago