tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabien R <theedge...@free.fr>
Subject jsp handling between catalina.sh and eclipse
Date Mon, 01 Aug 2016 11:08:23 GMT
Hello,

I'm encountering a very strange problem when running my webapp (servlet 
2.5).
If I use eclipse (run as -> run on server) to deploy the app and start 
tomee plus 1.7.4, the jsp page is displayed with the data from postgreSQL.
If I use catalina.sh, the jsp page is displayed without any data.

Both configurations are similar in each server.xml:
<!-- eclipse.sh conf -->
<Host name="myHost"  appBase="wtpwebapps"
      unpackWARs="false" autoDeploy="false" deployOnStartup="false" >
	<Alias>myHost.com</Alias>
	<!-- deploy myapp.war by copying the file into mpapps -->
	<Context docBase="myapp" path="" reloadable="false" />
</Host>
<!-- catalina.sh conf -->
<Host name="myHost"  appBase="mpapps"
      unpackWARs="false" autoDeploy="false" deployOnStartup="false" >
	<Alias>myHost.com</Alias>
	<!-- deploy myapp.war by copying the file into mpapps -->
	<Context docBase="myapp" path="" reloadable="false" />
</Host>


The debug info on both configuration are similar. I see on record for 
LATEST_PROPOSAL_LIST and POPULAR_PROPOSAL_LIST:
DEBUG [http-apr-8443-exec-1] (AbstractView.java:206) - Rendering view 
with name 'latestProjectsView with 
model={{LATEST_PROPOSAL_LIST=[com.myapp.tier.business.Proposal@6211a266], 
POPULAR_PROPOSAL_LIST=[com.myapp.tier.business.Proposal@73bd08d6], 
latestProjectsData=com.myapp.tier.web.LatestProjectData@7f8f54f6}} and 
static attributes={{}}

The last debug info I see in my framework is:
DEBUG [http-apr-8443-exec-1] (InternalResourceView.java:95) - Showing 
debug information, and including JSP with url '/jsp/index.jsp' in 
InternalResourceView with name 'latestProjectsView'

And the next instructions are:		 
request.getRequestDispatcher("/jsp/index.jsp").include(request, response);
request.getRequestDispatcher("/jsp/debug/trace.jsp").include(request, 
response);

I had no servlet entry for jsp in my web.xml but adding this one did not 
change anything:
  <servlet>
     <servlet-name>jsp</servlet-name>
     <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
     <init-param>
         <param-name>development</param-name>
         <param-value>true</param-value>
     </init-param>
     <load-on-startup>3</load-on-startup>
   </servlet>

The model data are displayed with:
<c:forEach var="pro" items="${LATEST_PROPOSAL_LIST}">
   <tbody>
     <tr>
	<td>${pro.title}</td>
    </tr>
   </tbody>
</c:forEach>

How can I check if this instruction is executed when using catalina.sh ?
Are there differences in the libs used to handle JSP between eclipse and 
the script ?
May it be due to security settings ?

I'm a bit lost.
--
Fabien

Mime
View raw message