Custom web application is failing with error of Servlet org.apache.jsp.index_jsp is not available.

abhijit_k
User offline. Last seen 3 years 9 weeks ago. Offline
Joined: 11/12/2008
Points: 80

Hi

I developed a web application in webapps.  The web application was running absolutely fine.  Today suddenly I started getting an error when I browse index.jsp of the application.  The error reads - Http Status 404 Servlet org.apache.jsp.index_jsp is not available.  To check I tried creating another simillar application, it met the same fate.  What I do to create a web application is creating a app folder in webapps, create a WEB-INF folder in it, copying web.xml from Root folder to the WEB-INF folder and finally copying index.jsp in app folder.  This was working absolutely fine till yesterday.   I reset the Tomcat and repository server twice or thrice but with no use.   But surprisingly, the built in web applications of Wires, Mashboard, Mashlet Maker, I can run with accessing index.jsp page with no issue. 

I do not get any clue why the custom web application is failing.  Please guide me.

Thanks & Regards

Abhijit Kulkarni

0
Your rating: None
aishmishra
aishmishra's picture
User offline. Last seen 25 weeks 3 days ago. Offline
Joined: 09/24/2008
Points: 3

Can you take a look at the web.xml file that you are copying and see if there are any issues with that? Also please check the web.xml file in ROOT folder in webapps which is where you are copying the web.xml file from, I believe.

abhijit_k
User offline. Last seen 3 years 9 weeks ago. Offline
Joined: 11/12/2008
Points: 80

Hi

Today I am getting some escalated issue.  I am not able to access the presto mashup server itself.  I am using JackBe Presto ver 2.6.0.  I was getting error while launching presto app server 'prestomasterserver not initialized - 321'.  I saw solution for simillar kind of prestomasterserver error (with different error no.) to remove admin server from webapps.  This stopped the error but I am still not able to access http://localhost:8080/presto in firefox browser.  It gives error requested resource is not available.  But the folder is very much there. 

Further to this I observed one more thing.  When I tried to start the presto repository server, it starts and exits with sudden shutdown saying 'Database rdsdb.backup unexpected end of ZLIB file'.  To rectify this I decided to run setupDB.bat file.  But it stops when it is to run the jar file  and rc file using java saying that it can not get connection to localhost:9001 while creating a socket.  

I have Java Update [TM] ready to download which I did not run till now on my machine. 

Sorry, the scenerio case went into bigger size but I am sure the solution to be a quick fix.  Please assist me in resolving this issue urgently.

Thanks & Regards

Abhijit Kulkarni

 

girish
girish's picture
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 09/22/2008
Points: 70

Abhijit,

If you are getting connection error to repository, that means, your repository server is not running. Let's try this.

1. start presto repository

2. if repository fails to come up, that means, the HSQL DB files are corrupted. So remove the rdsdb.* files from <presto_home>/prestorepository/hsqldb directory (CAUTION: by removing these files, you are pretty much removing all the registered services, mashups, mashlets, etc. So proceed only if you are sure of doing it)

3. now, start the repository again and then, run "rebuildDB.bat"

4. go to <presto_home>/mashupserver direcrtory and run "startPresto.bat"

if there are any startup errors, please post the error/exception from catalina.out here.

 

- Girish@JackBe

abhijit_k
User offline. Last seen 3 years 9 weeks ago. Offline
Joined: 11/12/2008
Points: 80

Girish

Thanks for your post.   I had no option, so I reset the db and implemented all customizations I lost in process.   Now I am again back to the original position and things are working fine.   But that takes me back to my problem which I reported in my question.  When I run my custom web application hosted on presto app server, I get "http status 404 - Servlet org.apache.jsp.index_jsp is not available" and the index.jsp page failed to load.   Please help me with pointers to overcome this problem.

 

Thanks & Regards

Abhijit Kulkarni

 

girish
girish's picture
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 09/22/2008
Points: 70

Abhijit,

can you share your web.xml and index.jsp? it's quite possible that your index.jsp compilation is failing because of syntax errors or unsupported schema version.

thx

- Girish@JackBe

abhijit_k
User offline. Last seen 3 years 9 weeks ago. Offline
Joined: 11/12/2008
Points: 80

Girish

index.jsp

---------

Thanks & Regards

 

<html>

<head>

 

<script type="text/javascript"

src="http://localhost:8080/static/mashlet/js/mashlet-loader.js"></script>

 

<script type="text/javascript">

var serverUrl="http://localhost:8080";

Ema.load( {

serverUrl: serverUrl,

name: "Presto.EmployeeData.AdminData.Mashlet",

el: "mt1"

});

Ema.load( {

serverUrl: serverUrl,

name: "Presto.EmployeeData.FinanceData.Mashlet",

el: "mt2"

});

Ema.load( {

serverUrl: serverUrl,

name: "Presto.EmployeeData.AeonData.Mashlet",

el: "mt3"

});

Ema.load( {

serverUrl: serverUrl,

name: "Presto.EmployeeData.HrmsData.Mashlet",

el: "mt4"

});

 

</script>

</head>

<body>

<div id="msource"><p>Click a button to display a new mashlet:</p>

<ul>

<li><button id="bt1" onclick="javascript:chooseMashlet('Presto.EmployeeData.AdminData')">Admin</button></li>

<br/>

<li><button id="bt2" onclick="javascript:chooseMashlet('Presto.EmployeeData.FinanceData')">Finance</button></li>

<br/>

<li><button id="bt3" onclick="javascript:chooseMashlet('Presto.EmployeeData.AeonData')">Aeon</button></li>

<br/>

<li><button id="bt4" onclick="javascript:chooseMashlet('Presto.EmployeeData.HrmsData')">Hrms</button></li>

<br/>

</ul>

</div>

<div id="mt1" style="display:block;visibility:hidden"></div>

<div id="mt2" style="display:block;visibility:hidden"></div>

<div id="mt3" style="display:block:visibility:hidden"></div>

<div id="mt4" style="display:block:visibility:hidden"></div>

</body>

<script type="text/javascript">

function chooseMashlet(mashletnm)

{

 

var node1 = document.getElementById("mt1");

var node2 = document.getElementById("mt2");

var node3 = document.getElementById("mt3");

var node4 = document.getElementById("mt4");

switch(mashletnm)

{

 

 

case "Presto.EmployeeData.AdminData":

node1.style.visibility="visible";

node2.style.visibility="hidden";

node3.style.visibility="hidden";

node4.style.visibility="hidden";

break;

case "Presto.EmployeeData.FinanceData":

node1.style.visibility="hidden";

node2.style.visibility="visible";

node3.style.visibility="hidden";

node4.style.visibility="hidden";

 

break;

case "Presto.EmployeeData.AeonData":

node1.style.visibility="hidden";

node2.style.visibility="hidden";

node3.style.visibility="visible";

node4.style.visibility="hidden";

 

break;

case "Presto.EmployeeData.HrmsData":

node1.style.visibility="hidden";

node2.style.visibility="hidden";

node3.style.visibility="hidden";

node4.style.visibility="visible";

break;

}

}

 

</script>

</html>

 web.xml

---------

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  Copyright 2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

  <display-name>Welcome to Tomcat</display-name>
  <description>
     Welcome to Tomcat
  </description>

<!-- JSPC servlet mappings start -->

    <servlet>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <servlet-class>org.apache.jsp.index_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <url-pattern>/index.jsp</url-pattern>
    </servlet-mapping>

<!-- JSPC servlet mappings end -->

</web-app>
 

girish
girish's picture
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 09/22/2008
Points: 70

Abhijit,

in your web.xml file, *remove* <servlet> and <servlet-mapping> sections and *add* the following 3 lines:

       <welcome-file-list>
               <welcome-file>index.jsp</welcome-file>
          </welcome-file-list>

 

- Girish@JackBe

abhijit_k
User offline. Last seen 3 years 9 weeks ago. Offline
Joined: 11/12/2008
Points: 80

Girish

Thank you very much.  Your suggestion worked.  It resolved my problem.   I can see my custom application running on tomcat web server. 

Thanks & Regards

Abhijit Kulkarni

 

kall
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 02/07/2011
Points: 0

You should make sure this error doesn't come from your system since you say your application was fin until the day before. The issue could be caused from a dll file extension, from conflictual software or bad influx of data in your system. I that source code will help you fix the problem.