?
Solved

Problem: Deploying Struts App on iplanet Server 6.0

Posted on 2004-11-10
9
Medium Priority
?
548 Views
Last Modified: 2010-08-05

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
0
Comment
Question by:joeyoungkc
  • 5
  • 4
9 Comments
 
LVL 13

Expert Comment

by:petmagdy
ID: 12545224
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
 

Author Comment

by:joeyoungkc
ID: 12545356
it already have slash..
0
 
LVL 13

Expert Comment

by:petmagdy
ID: 12545461
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:joeyoungkc
ID: 12545839
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
 
LVL 13

Expert Comment

by:petmagdy
ID: 12546943

>>   <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
 

Author Comment

by:joeyoungkc
ID: 12547262
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
 
LVL 13

Expert Comment

by:petmagdy
ID: 12547348
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
 

Author Comment

by:joeyoungkc
ID: 12547926
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
 
LVL 13

Accepted Solution

by:
petmagdy earned 1000 total points
ID: 12548201
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tech giants such as Amazon and Google have sold Alexa and Echo to such an extent that they have become household names. And soon they are expected to be used by commoners in their homes, ordering takeout, picking out a song, answering trivia questio…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question