tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Http Session Null issue
Date Fri, 03 Jul 2009 23:22:27 GMT
> HttpSession session = request.getSession();

Is the request a legit one (that is, the one that is being served by
Tomcat now)?

Requests are recycled immediately after their processing is done,
and it can result in null being returned by that method (though throwing
an IllegalStateException would be better).




2009/7/3 Achal Patel <patel.achal@gmail.com>:
> Its basically below:
>
> HttpSession session = request.getSession();
> Settings settings = (Settings) session.getAttribute(ATTR_NAME);
>
> I debugged it and got to know that session is getting null and again
> invoking the same resource from UI serves fine.
> The same is working fine on Weblogic.
>
> Regards,
> Achal.
>
> On Fri, Jul 3, 2009 at 7:06 PM, Pid <p@pidster.com> wrote:
>
>> On 3/7/09 14:25, Achal Patel wrote:
>>
>>> Hi,
>>>
>>> I am facing strange issue with Tomcat 6 Jsp deployment.
>>> I have JSP pages deployed which internally performs operations and
>>> generates
>>> XML response which will be parsed using XSL and then finally displayed on
>>> the UI.
>>> Now when I invoke JSP pages from UI, session is getting null between the
>>> requests and this works perfectly fine on other Weblogic/Websphere App
>>> servers.
>>> We do use taglibs in xsl and JSPs.
>>>
>>> JDK version : 1.5.13
>>> Tomcat Ver: 6.0.18
>>>
>>> This error is again random but comes frequently even for the same page 2
>>> times out of 5 clicks.
>>> Any help on this will be useful, thanks.
>>>
>>> Posting the error message here for more info:
>>>
>>> org.apache.jasper.JasperException: java.lang.NullPointerException
>>>
>>>  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
>>>
>>>  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
>>>
>>>
>>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>
>>> *root cause*
>>>
>>> java.lang.NullPointerException
>>>        com.teradata.x2.context.Settings.getSettings(Settings.java:102)
>>>
>>>  com.teradata.x2.context.ServletProcessContext.getSettings(ServletProcessContext.java:38)
>>>
>>
>> It's probably not that random.
>>
>> What is at Settings.java, line 102?
>>
>> p
>>
>>
>>
>>>  com.teradata.ui.web.common.HTMLComponent.getSettings(HTMLComponent.java:76)
>>>
>>>  com.teradata.ui.web.common.StyleSheetLink.doInline(StyleSheetLink.java:237)
>>>
>>>  com.teradata.ui.web.common.StyleSheetLink.prepareHTMLString(StyleSheetLink.java:170)
>>>
>>>
>>>  com.teradata.ui.web.common.HTMLComponent.toHTMLString(HTMLComponent.java:91)
>>>
>>>  com.teradata.ui.web.taglib.BodyTagBase.doEndTag(BodyTagBase.java:65)
>>>
>>>  org.apache.jsp.bcm.framework.tableeditor.tableeditor_jsp._jspx_meth_td_005fstylesheet_005f0(tableeditor_jsp.java:201)
>>>
>>>
>>>  org.apache.jsp.bcm.framework.tableeditor.tableeditor_jsp._jspService(tableeditor_jsp.java:99)
>>>        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>
>>>
>>>  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
>>>
>>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>>>
>>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>
>>> Regards,
>>> Achal.
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> --
> Regards,
> Achal Patel.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message