Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

java.io.IOException: WEB-INF/web.xml error: load-on-startup is "0"

Posted on 2008-06-17
1
Medium Priority
?
1,048 Views
Last Modified: 2013-11-24
Currently I am using Blazix web server to run MVC struts
1- I save my war file in warDir
2- when I start the Blazix I got the following message on console window
Configuration file: C:\Blazix\web.ini
Initializing application context "default"
Initializing application context "Copy of HR"
java.io.IOException: WEB-INF/web.xml error: load-on-startup is "0", must be pos
tive integer
        at desisoft.server.servlets.Context.processServletDescription(Context.j
va:1186)
Initializing application context "HR"
java.io.IOException: WEB-INF/web.xml error: load-on-startup is "0", must be pos
tive integer
        at desisoft.server.servlets.Context.processServletDescription(Context.j
va:1186)
Initializing application context "StrutsLoginDemo"
java.io.IOException: WEB-INF/web.xml error: load-on-startup is "0", must be pos
tive integer
        at desisoft.server.servlets.Context.processServletDescription(Context.j
va:1186)
Automatic deployment: 3 WAR files
License Type: Basic
Maximum Threads: 5
Clustering: not available
Hostname: Programmer  IP Address: 192.168.0.204  Port: 9090
****************************************
web.ini
# The Web-server configuration file

server.port: 9090


admin.port: 3010
admin.password: KOOKOO12

ejb.nameServer1: Programmer:2050

license.file: C:\Blazix\license.dat
tempDir: C:\Blazix\temp
ionDir: C:\Blazix\iondir
warDir: C:\Blazix\warDir


application.default.dir: C:\Blazix\webfiles
application.default.jspDir: C:\Blazix\jspdir
application.default.dir: C:\Blazix\warDir


# Sample authentication
# Remove these lines to take out the authentication sample
# Change the authType to "Basic" to see basic authentication example
# and uncomment the "authRealm" line.

application.default.authType: Form
#application.default.authRealm: Sample
application.default.authLoginForm: /login.html
application.default.authErrorPage: /loginFailed.html
role.name: user
role.user.url: /AuthenticationTest.html

servlet.name: action
servlet.action.className: org.apache.struts.action.ActionServlet
servlet.action.url: /*.do


# A URL that can be used to reload classes.
# This is provided for convenience during development.
# It should be removed in production environments,
# and all live deployments/redeployments should be
# done via the server administration tool.

application.default.reloadUrl: /_reload

# To keep .java files generated for JSPs, uncomment the following
# jsp.keepGenerated: true

# Sample authentication file.
application.default.authParam.file: C:\Blazix\sampleAuth.txt
************************************************************************
web.xml for StrutsLoginDemo.war
<?xml version="1.0" ?>
<!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>
  <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>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>userLogin.jsp</welcome-file>
  </welcome-file-list>
</web-app>
************************************************
struts-config for StrutsLoginDemo.war
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
  <data-sources />
  <form-beans >
    <form-bean name="userLoginForm" type="com.yourcompany.struts.form.UserLoginForm" />

  </form-beans>

  <global-exceptions />


  <action-mappings >
    <action
      attribute="userLoginForm"
      input="/userLogin.jsp"
      name="userLoginForm"
      path="/userLogin"
      scope="request"
      type="com.yourcompany.struts.action.UserLoginAction">
      <forward name="success" path="/UserLoginSuccess.jsp" />
      <forward name="failure" path="/userLogin.jsp" />
    </action>

  </action-mappings>

  <message-resources parameter="com.yourcompany.struts.ApplicationResources" />
</struts-config>

*****************************************************
I think Blazix is looking for  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> in web.xml
I already add struts.jar to warDir and I setup the classpath

thx
Rafa

BlazixStrutsConfig.doc
0
Comment
Question by:Tom_wbi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 500 total points
ID: 21808532
This line
 
<load-on-startup>0</load-on-startup>
 
should be
 
 
<load-on-startup>1</load-on-startup>
 
Basically, it should be any positive number.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

705 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