ServletContext and ATG Dynamo Application Server

View: New views
1 Messages — Rating Filter:   Alert me  

ServletContext and ATG Dynamo Application Server

by Enrico Faccin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everybody.

I try to move a piece of J2EE code, which is successfully running on WAS 5.1/6.0/6.1, into ATG DAS 6.3, in which is currently running a Web Application made of JHTML pages and Java code.
I state I'm absolutely new to DAS architecture and framework.

What I have to move
I have a very simple web-appl, made of 1 servlet and 1 JSP page.
In the servlet, I put some data into the ServletContext, using the setAttribute method. In the JSP I retrieve that data with the following piece of code (Java scriplet inside the JSP page):
getServletContext().getAttribute("xxxx");

What problem I have
I "translated" the JSP page back to JHTML page (I know DAS supports JPS pages, but I have to do my code working inside a "legacy" JHTML application).
I manually deployed the servlet (as a jar file) and defined a .properties file to let DAS see it; I also put the servlet into the Initial.properties, as I have to do start it at the AS startup.
I see the servlet starts correctly (I could verify it looking at my log).
The problem is I'm not able to access the ServletConfig attributes from the JHTML page. Every attribute I seek it's null.
It seems like the Servlet and the JHTML page run inside two different contexts (and perhaps it's so, remember, I'm new to DAS).
Supporting this is the fact if I change the code in the JHTML page as follow, it works:
getServletContext().getContext("/").getAttribute("xxxx");


Any suggestion?
I miss something critic (likely it is)?
Does DAS act differently than WAS?

Thank you in advance for your support.

Enrico