-
1. Re: Load index.jsp as welcome file
jaikiran Sep 4, 2008 8:24 AM (in response to pepelara)Post the contents of your web.xml.
While posting the xml content or code or logs, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted -
2. Re: Load index.jsp as welcome file
pepelara Sep 4, 2008 8:59 AM (in response to pepelara)This is my web.xml file,
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>ServletEntrada</servlet-name> <servlet-class>es.deusto.servlet.ServletEntrada</servlet-class> </servlet> <servlet-mapping> <servlet-name>ServletEntrada</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <mime-mapping> <extension>doc</extension> <mime-type>application/msword</mime-type> </mime-mapping> <mime-mapping> <extension>xls</extension> <mime-type>application/vnd.ms-excel</mime-type> </mime-mapping> <mime-mapping> <extension>ppt</extension> <mime-type>application/vnd.ms-powerpoint</mime-type> </mime-mapping> <mime-mapping> <extension>pdf</extension> <mime-type>application/pdf</mime-type> </mime-mapping> <mime-mapping> <extension>zip</extension> <mime-type>application/zip</mime-type> </mime-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
And this is my application.xml file,<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'> <application> <display-name>Entrada</display-name> <description>This is the implementaion of the EntradasUsuario application</description> <module> <ejb>entrada-ejb.jar</ejb> </module> <module> <web> <web-uri>entrada-web.war</web-uri> <context-root>/entrada</context-root> </web> </module> </application>
-
3. Re: Load index.jsp as welcome file
francis17101970 Sep 4, 2008 10:45 AM (in response to pepelara)Hello,
not sure if I have understood clearly, but why do you have your
servlet mapped as "/*" ?<servlet-mapping> <servlet-name>ServletEntrada</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
I think it will intercept all requests this way.....
shouldn't you rather define an endpoint "/myservlet" and recall it from the jsp action ? -
4. Re: Load index.jsp as welcome file
pepelara Sep 4, 2008 12:57 PM (in response to pepelara)Thank you Francis,
You have had a good idea.
Now my application works ok.
Thank you again,
pepelara -
5. Re: Load index.jsp as welcome file
pepelara Sep 7, 2008 8:03 AM (in response to pepelara)Hi,
Following with my application UserEntries I have took out the connection to my DB from the Entity EJB and I leave it alone in a package es.deusto.dbaccessor with my connection class DBConnection.class.
My problem is that when I create my ear, it seems as if the application does not find up this class. When I call this class, on the first line of code, the server return me a NullPointerException.
I think that I am not building right my ear because when I deploy it on JBoss 4.2.2 GA
appears on the console my ejb.jar, my servlet.war, but nothing about dbaccessor-client.jar
Thanking in advance,
pepelara