Problem: Deploying Struts App on iplanet Server 6.0


I'm having trouble deploying my app on iplanet server 6.0.  I used netbean3.6 (tomcat) for development and using struts in my app.  Everything works fine, but after I create the war file and deploy it on iplanet server 6.0 inside my solaris 8 box, it got the following error on my index.jsp page:

 Internal error: servlet service function had thrown ServletException (uri=/order-tracker/Index.do): javax.servlet.ServletException, stack: javax.servlet.ServletException   at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)   at _jsps._docroot._index._index_jsp._jspService(_index_jsp.java:463)   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)   at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)   at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)   at com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native Method)   at com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)   at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)   at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)   at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254)   at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)   at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:582)   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:260)   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)   at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)   at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)   , root cause: javax.servlet.jsp.JspException   at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)   at _jsps._docroot._index._index_jsp._jspService(_index_jsp.java:79)   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)   at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)   at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)   at com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native Method)   at com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)   at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)   at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)   at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254)   at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)   at org.apache.struts.action.RequestProcessor.processForward

PLEASE HELP
joeyoungkcAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

petmagdyCommented:
Hi joeyoungkc,
Yes I faced this before in ur web.xml change:

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

to be:

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

A slash before the struts config file path

Cheers!
0
joeyoungkcAuthor Commented:
it already have slash..
0
petmagdyCommented:
please post the following:
1- Web.xml Content
2- The definition of the mentioned action in the struts config
3- The part of jsp that invoke the action
4- where is the JSP located inside the WAR
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

joeyoungkcAuthor Commented:
Thanks for following up.

Reminder: It is working fine with tomcat 5.0 but not iplanet.
-------------------web.xml--------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
  <display-name>Sun Shared Credit Agreement</display-name>
  <!-- Action Servlet Configuration -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <!-- File Download Mapping -->
  <!-- CSV Download Mapping -->
  <!-- Session Config  -->
  <session-config>
    <session-timeout>
             60
     </session-timeout>
  </session-config>
  <!-- The Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <!-- Application Tag Library Descriptor -->
  <taglib>
    <taglib-uri>/WEB-INF/app.tld</taglib-uri>
    <taglib-location>/WEB-INF/app.tld</taglib-location>
  </taglib>
  <!-- Struts Tag Library Descriptors -->
  <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>
  <!-- For Tomcat - comment out for jboss -->
  <resource-ref>
    <description>Mysql Data Source</description>
    <res-ref-name>MySqlDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
  <resource-ref>
    <description>Oracle Data Source</description>
    <res-ref-name>MyOracleDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
</web-app>
-------------------END web.xml--------------------------------------


-------------------struts-config.xml--------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<!--
     This is the Struts configuration file for the example application,
     using the proposed new syntax.
-->


<struts-config>


  <!-- ========== Data Source Configuration =============================== -->
<!--
 <data-sources>
   <data-source>
     <set-property property="autoCommit"
                      value="false"/>
     <set-property property="description"
                      value="Example Data Source Configuration"/>
     <set-property property="driverClass"
                      value="org.postgresql.Driver"/>
     <set-property property="maxCount"
                      value="4"/>
     <set-property property="minCount"
                      value="2"/>
     <set-property property="password"
                      value="mypassword"/>
     <set-property property="url"
                      value="jdbc:postgresql://localhost/mydatabase"/>
     <set-property property="user"
                      value="myusername"/>
   </data-source>
 </data-sources>
-->
  <!-- ========== Form Bean Definitions =================================== -->
  <form-beans>
   
    <!-- Logon form bean -->
    <form-bean name="LoginForm" type="com.sunmicrosystems.oj.common.model.formbeans.LoginForm"></form-bean>
   
    <!-- List form bean -->
    <form-bean name="ListForm" type="com.sunmicrosystems.oj.common.model.formbeans.ListForm"></form-bean>  

    <!-- List form bean -->
    <form-bean name="OrderForm" type="com.sunmicrosystems.oj.common.model.formbeans.OrderForm"></form-bean>  
  </form-beans>


  <!-- ========== Global Forward Definitions ============================== -->
  <global-forwards>
    <forward name="login" path="/Index.do"/>
  </global-forwards>


  <!-- ========== Action Mapping Definitions ============================== -->
  <action-mappings>
 
    <action    path="/Index" forward="index.jsp" />


   
    <!-- ############LOGIN/LOGOUT MODULE###############-->  
    <action    path="/Login"
               type="com.sunmicrosystems.oj.common.model.login.LoginAction"
               name="LoginForm"              
               scope="request"
               validate="false">
      <forward name="default" path="/ListOrder.do"/>
      <forward name="view" path="/Load.do"/>
      <forward name="failure" path="/Index.do"/>
    </action>

 
    <action    path="/Logout"
               type="com.sunmicrosystems.oj.common.model.login.LogoutAction"
               validate="false">
      <forward name="failure" path="/Index.do"/>
    </action>    
.............
............
.........
------------------- END struts-config.xml--------------------------------------

------------------- PART OF index.jsp--------------------------------------
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<html:form action="/Login.do" onsubmit="return checkPost()">

 <html:hidden property="so" />
 <html:hidden property="event" />

 <table border="0" cellpadding="7" cellspacing="0" bgcolor="#ffffff" width="50%" align="center">
  <tr>
   <td align="center" colspan="2">
<logic:present name="msg"><logic:notEqual name="msg" value="" >   
<table border="0" cellpadding="1" cellspacing="0" BGCOLOR="#e3e3e3" width="98%" align="center">
    <tr><td>
    <table cellspacing="0" cellpadding="5" border="0" width="100%" align="center">
        <tr valign="middle">
            <td class="yellow1" align="center">
                <h1><bean:write name="msg" filter="false" /></h1>
            </td>
        </tr>
    </table>
    </td></tr>
</table>    
</logic:notEqual></logic:present>
   </td>
  </tr>
 </table>

 <table border="0" cellpadding="1" cellspacing="0" class="dkgrey1" align="center">
  <tr><td>
   <table BORDER="0" CELLPADDING="7" CELLSPACING="0" BGCOLOR="#FFFFFF" width="100%">
    <TR>
            <td class="tablecaption2" colspan="2"><b>LOG IN</b></td>
    </TR>
    <tr class="grey1">
        <td><b>Sun ID (Sun Badge #)</b></td>
        <td><html:text size="15" property="id"/></td>
    </tr>
    <tr class="grey1">
        <td><b>LDAP Password<sup><font color = "blue"><small>*</sup></small></font></b></td>
        <td><html:password size="15" property="password"/></td>
    </tr>
    <tr class="grey1">
        <td align="right" colspan="2">
            <html:submit property="submit" styleClass="buttonblue" > Login </html:submit><br /><br />
            <b><sup><small><font color = "blue">*</sup></small></font></b>To set your <a href="javascript:void(0);" onclick=" javascript:openWin('http://webhome.ebay/ldap/faq.html', 'ldaphelp', 640, 450,'scrollbars=yes');"><font COLOR="#594fbf">LDAP</font></a> password, use <a href="http://netadmin.central"><font COLOR="#594fbf">Netadmin</font></a>.        
        </td>
    </tr>
   </table>
  </td>
  </tr>
</table>
 
 
 
</html:form>
------------------- END PART OF index.jsp--------------------------------------

4)
jsp locate in:
<app-main-dir>/docroot/index/index.jsp
classes locate in:
<app-main-dir>/WEB-INF/classes/

THANKS A LOT.
0
petmagdyCommented:

>>   <action    path="/Index" forward="index.jsp" />
My comments is as following:
1- where is the Action class?
2- index.jsp should be "/docroot/index/index.jsp"

also please post the execption in Iplanet log files it will provide better information


0
joeyoungkcAuthor Commented:
The Exception in Iplanet log is the error stack that i post in my first post.
all my action class is int
/WEB-INF/classes/com/sunmicrosystems/oj/common/model/
example:
/WEB-INF/classes/com/sunmicrosystems/oj/common/model/login/LoginAction.class
2)
I have tiles-defs.xml:
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>



<definition name="index.jsp" path="/docroot/index/index.jsp">
        <put name="head" value="/docroot/wrapper/head.jsp"/>
        <put name="maintenance" value="/docroot/wrapper/maintenance.html"/>
        <put name="tail" value="/docroot/wrapper/tail.jsp"/>
</definition>

</tiles-definitions>


Thanks
0
petmagdyCommented:
nooo u didn't under stand me i mean:

 >> <action    path="/Index" forward="index.jsp" />
must be :
<action    path="/Index"  type="com.sunmicrosystems.oj.common.model.login.UrAction" forward="index.jsp" />



0
joeyoungkcAuthor Commented:
I changed it to:
<action    path="/Index" type="com.sunmicrosystems.oj.common.model.login.IndexAction">
      <forward name="success" path="index.jsp"/>
    </action>
and created IndexAction and simply return (mapping.findForward("success"));

it works on netbean 3.6 (tomcat 5) but still have same error in iplanet server...

--------------------
Internal error: servlet service function had thrown ServletException (uri=/order-tracker/Index.do): javax.servlet.ServletException, stack: javax.servlet.ServletException   at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)   at _jsps._docroot._index._index_jsp._jspService(_index_jsp.java:463)   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)  
.....
same as the first post.
0
petmagdyCommented:
please comment this temprary:

>> <action    path="/Index" forward="index.jsp" />

to see if it is the only action causing u problems or all actions has the same issue.

Please also make sure that IP 6.0 servlet engine specification version is complaint with ur Struts version Servlet engine version specification requriements
as ur struts requires Servlet specification 2.3 and ur IP 6.0 is still 2.2 for example
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.