Hi,
I have made a small application having three pages,
1.intake.jsp ( it takes in a login name and a password )
2.access.jsp ( supposed to access a stateful session bean and set a value )
3.display.jsp ( supposed to display the value set in the previous page,access.jsp )
My Question :
I made an ear and ran the application and it is just unable to access my stateful session bean.
Steps that i followed are as follows :
a.Make a war.( Its contents are the three jsp pages and WEB-INF( containing web.xml ).
web.xml has entry :
<web-app>
<display-name>Tester Web Application</display-name>
<description>This application is a test application.</description>
<welcome-file-list>
<welcome-file>intake.jsp</
welcome-fi
le>
</welcome-file-list>
<ejb-ref>
<ejb-ref-name>Tester</ejb-
ref-name>
<ejb-ref-type>Session</ejb
-ref-type>
<home>testing.TesterHome</
home>
<remote>testing.TesterRemo
te</remote
>
</ejb-ref>
</web-app>
b. Made a jar for the ejbs, jar contained ejbs with package and META-INF ( cotaining ejb-jar.xml )
<ejb-jar>
<description></description
>
<enterprise-beans>
<session>
<display-name>Tester</disp
lay-name>
<ejb-name>Tester</ejb-name
>
<home>testing.TesterHome</
home>
<remote>testing.TesterRemo
te</remote
>
<ejb-class>testing.Tester<
/ejb-class
>
<session-type>Stateful</se
ssion-type
>
<transaction-type>Containe
r</transac
tion-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description></description
>
<role-name>*</role-name>
</security-role>
<method-permission>
<role-name>*</role-name>
<method>
<ejb-name>Tester</ejb-name
>
<method-name>*</method-nam
e>
</method>
</method-permission>
</assembly-descriptor>
</ejb-jar>
finally i have a META-INF containing application.xml
<application>
<display-name>Tester</disp
lay-name>
<module>
<ejb>Tester.jar</ejb>
</module>
<module>
<web>
<web-uri>Tester.war</web-u
ri>
<context-root>Tester</cont
ext-root>
</web>
</module>
</application>
I made the following entries in config of the server
application.xml :
<web-module id="Tester" path="../../home/applicati
ons/Tester
.war" />
<library path="../../home/applicati
ons/Tester
.jar" />
server.xml :
<application name="Tester" path="../applications/Test
er.ear" />
and http-web-site :
<web-app application="default" name="Tester" root="/Tester" />
Where am i falling short ?? What am i missing.
Please answer asap.
Thanks in advance,
Start Free Trial