Himalay Majumdar

Ranch Hand
+ Follow
since Sep 28, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Himalay Majumdar

I happened to be in this old thread by doing a google search of my name. To answer you question I looked back into my app code, but thats changed now.

I remember doing it using a css container just outside h:form or may be as an element of the h:form, where I declared the s:decorate, or ui:define tags.

hope it helps a little.


9 years ago

We use hibernate as our JPA implementation provider. I am reading a resultset list using the query below from the database. I would like to cache this data and keep it in session scope, so I dont need to make a call to the database every time I need this data. Please suggest nice way to do this.

Below is my persistence.xml

Here is how I create..

Please suggest.
Ok Figured it out..

I override the value set in the java.lang.System.initProperties method by using the -D command-line option when launching JVM,

java -Duser.timezone=EST5EDT

and now new Date() returns correct offset to calculate EDT..


Thanks Mike and Paul for looking.

9 years ago

DST never applies in the GMT time zone.

Any GMT to EDT/EST conversion is done using an offset value. EDT=GMT-4, EST=GMT-5

I set the date field of a Java User object which is mapped to a database table 'User' as

This sets the time in GMT ofcourse, but when I try to retrieve it back and convert to appropriate timezone using the below faces tag, it converts it to EST (since the GMT date above was not set properly or with wrong/no offset).

EDT is extended by a week this year (From Nov1 to Nov7). And its from Nov1st like the last year we started seeing the date in EST. It should ideally be showing the date in EST after a week.

Any idea on how to set the date which is in GMT with correct offset so that I can retrieve the time correctly in EDT.

Thanks for looking.

9 years ago
I am on EDT(Eastern Daylight time), it will be EST here on Nov 7th , 2011. The dates in our system were being shown in EST since last Sunda, whereas its still EDT here.
So today I was examining new Date() parameters in Java.

I saw the following.

cdate= 2010-11-03T20:24:01.248Z
zoneinfo = sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]

useDaylight must be true if I understand, does that mean Java5 is updating to EST earlier than required.

Please suggest.

9 years ago
I am having issue while logging in to my application intermittently.Sometimes when I click on the login but, it goes to a blank page.
Here is the error stack. I have also attached the Happy path at the bottom. Any suggestions will be very helpful. Thank you.

10:03:52,037 INFO [NewSessionFilter] session invalidated on /csa/login.seam
10:03:52,058 INFO [LoginAction] Bypass Aspect: true
10:03:52,058 INFO [LoginAction] Logging in user kermit into application
10:03:52,373 SEVERE [lifecycle] JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@6733eb]
10:03:52,374 INFO [TimingLogger] start[1285855432367] time[7] tag[HTTP.Failure] message[/csa/login.seam]
10:03:52,374 ERROR [CachedConnectionValve] Application error: Faces Servlet did not complete its transaction

Submit the URL and relogin
10:03:52,496 INFO [PostAuthenticationHandler] doPostAuthenticate() started
10:03:52,810 INFO [PostAuthenticationHandler] Added user com.billmelater.csa.security.CsaIdentity@eb7d83 to SessionContext.
10:03:52,848 INFO [WscClientBase] SOAP request from user [1][kermit] at ip [] has been assigned trackingNumber [00000gepp4hw00]
10:03:52,898 INFO [TimingLogger] start[1285855432037] time[861] tag[HTTP.Success] message[/csa/login.seam]
10:07:43,947 ERROR [[/csa]] Session event listener threw exception
at org.apache.catalina.connector.Request.removeAttribute(Request.java:1373)
at org.apache.catalina.connector.RequestFacade.removeAttribute(RequestFacade.java:514)
at javax.servlet.ServletRequestWrapper.removeAttribute(ServletRequestWrapper.java:295)
at com.sun.faces.context.RequestMap.remove(ExternalContextImpl.java:1096)
at org.jboss.seam.contexts.BasicContext.remove(BasicContext.java:73)
at org.jboss.seam.Component.newInstance(Component.java:2141)
at org.jboss.seam.Component.getInstance(Component.java:2021)
at org.jboss.seam.Component.getInstance(Component.java:2000)
at org.jboss.seam.Component.getInstance(Component.java:1994)
at org.jboss.seam.Component.getInstance(Component.java:1967)
at org.jboss.seam.Component.getInstance(Component.java:1962)
at org.jboss.seam.core.Events.instance(Events.java:157)
at org.jboss.seam.core.Events.exists(Events.java:152)
at org.jboss.seam.contexts.BasicContext.remove(BasicContext.java:72)
at org.jboss.seam.Component.newInstance(Component.java:2141)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:233)
at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:155)
at org.jboss.seam.servlet.SeamListener.sessionCreated(SeamListener.java:46)
at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:397)
at org.apache.catalina.session.StandardSession.setId(StandardSession.java:369)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:829)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2367)
at org.apache.catalina.connector.Request.getSession(Request.java:2094)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
at org.jboss.seam.web.IdentityRequestWrapper.<init>(IdentityRequestWrapper.java:23)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)


10:08:16,737 INFO [NewSessionFilter] session invalidated on /csa/login.seam
10:08:16,762 INFO [LoginAction] Bypass Aspect: true
10:08:16,762 INFO [LoginAction] Logging in user kermit into application
10:08:16,883 INFO [PostAuthenticationHandler] doPostAuthenticate() started
10:08:17,201 INFO [PostAuthenticationHandler] Added user com.billmelater.csa.security.CsaIdentity@ae3881 to SessionContext.
10:08:17,220 INFO [WscClientBase] SOAP request from user [1][kermit] at ip [] has been assigned trackingNumber [00000geppa5vo0]
10:08:17,267 INFO [TimingLogger] start[1285855696737] time[530] tag[HTTP.Success] message[/csa/login.seam]
10:08:17,439 INFO [[/csa]] placeCallModalTabs: tab panel has no enabled or rendered tabs!
10:08:17,504 INFO [TimingLogger] start[1285855697334] time[170] tag[HTTP.Success] message[/csa/home.seam]

10:08:26,374 INFO [WscClientBase] SOAP request from user [1][kermit] at ip [] has been assigned trackingNumber [00000geppacxy0]
10:08:26,409 INFO [WscClientBase] SOAP request from user [1][null] at ip [] has been assigned trackingNumber [00000geppacyx0]
10:08:26,431 INFO [SupportSessionManager] Destroying SupportSessionManager
10:08:26,431 INFO [AspectContext] Stopping telephony background thread for agent null
10:08:26,431 WARN [AspectContext] Illegal attempt to stop stop telephony background thread when thread not active for agent null
10:08:26,432 INFO [TimingLogger] start[1285855706362] time[70] tag[HTTP.Success] message[/csa/home.seam]
10:08:26,547 INFO [TimingLogger] start[1285855706499] time[48] tag[HTTP.Success] message[/csa/login.seam]
9 years ago
The format 'mmm' I mentioned for simplicity. Its actually 'mmm dd' so the list can have [Apr 16, Jan 21, May 05].
Can you please elaborate with some code, running on a short deadline.

I need to find a way to Sort List from a specific date given as input. Let say the date given is Feb, I need to sort the list as [Feb, Apr, Jan]

Any clean way of doing this, do I need modify comparator.

Never mind. IntelliJ imported java.awt.event.ActionEvent for me by default.
Changing it to import javax.faces.event.ActionEvent solved it.
9 years ago
I am trying to get ActionEvent work in my code but keep getting Method Not Found Exceptions. Please let me know if there is anything wrong with the code.

javax.el.MethodNotFoundException: /html/payment/PaymentList.xhtml @271,132 actionListener="#{reimbursementAction.clearForm}": Method not found: com.csa.action.payment.ReimbursementActionBean@74d909.clearForm(javax.faces.event.ActionEvent)

Thank you,
9 years ago
ok lasttime..anyone?
9 years ago
The code below is for handling session-timeout issues in our application. The problem is session.isNew() always returns true. I am doing a .getSession(false) and still a new session gets created all the time and so it treats it as timeout all the time. Anyone who can help me understand this. Thank you.

9 years ago
Values in the h:inputText are being cached for me, here is the descriptions.

1. I click a link "reimburse" --> modal popsup -> I enter the value in text-box --> click Submit/Process
2. I click another link "update/cancel" -->same modal popsup --> I see the value in the text box (This is fine and if I reload the page and click the link again, the modal appears with values intact)
3. I click another link "reimburse" --> same modal popsup --> I see the value in the text cached(this time I want the values not to be cached in the text box) -- If I reload the page, the values go away though.

I have tried clearing the bean when the links are clicked, but still the values appear. Did lot of googling, dint help. Please advise. Below is the code. Thanks.




9 years ago