Problem with running multiple servlet in same webapplication with tomcat 3

Hi all,
I am using Tomcat 3.0 as webserver with jdk1.3, Servlet 2.0,
Templates for html file and oracle 8i on UNIX platform.
I have problem with multiple servlet running same webapplication.
There are two servlet used in my application. 1) GenServlet.class
               and 2) ServletForPrinting.class
All of my pages go through GenServlet.class which reads some property files
and add header and footer in all pages.
I want reports without header & footer that is not possible through GenServlet in my application.
So I have used another servlet called ServletForPrinting --- just for reading html file.
It is as follow:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ServletForPrinting extends HttpServlet {
public void service (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
// set content-type header before accessing the Writer
response.setContentType("text/html");
PrintWriter out = response.getWriter();
File f1 = null;
String report = null;
String path = request.getPathInfo();
try{
String p = "/var/home/latif/proj/webapps/WEB-INF/classes" + path;
System.out.println(p);
f1 = new File(p);
p = null;
if (f1.exists()) {
FileReader fr = new FileReader(f1);
BufferedReader br = new BufferedReader(fr);
report = new String();
while ((report = br.readLine()) != null) {
out.println(report);
}catch(Exception e) {
out.close();
report = null;
path = null;
f1 = null;
} // end class
It works fine and display report properly.
But now Problem is that if report is refreshed many times subsequently,
WebServer will not take any new change in any of java file used in web-application.
It works with the previous class only and not with updated one.
Then I need to touch it. As soon as I touch it, webserver will take updated class file.
Anybody has any idea regarding these situation?
Is there any bug in my ServletForPrinting.java ?
Any solution ????? Please suggest me.
Suggestion from all are invited. That will help me a lot.
Thanks in advance
Deepalee.

Llisas wrote:
I solved the problem, I just had to wire the blocks in a sequential way (I still don't know why, but it works).
Feel free to delete this topic.
I would strongly suggest at least reading this tutorial to give you an idea of why your fix worked (or maybe only appeared to work).  Myself, I never just throw up my hands and say, "Whatever," and wash my hands of the situation without trying my best to understand just what fixed it.  Guranteed you'll run into the same/similar problem and this time your fix won't work.
Please do yourself a favor and try to understand why it is working now, and save yourself (or more likely, the next poor dev to work on this project) some heartache.
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Similar Messages

  • Running multiple instances from same oracle home

    Hi Gurus,
    I am preparing for OCA 11g examination. I had a question about running multiple instances from same oracle home. While reading the book I came across a statement about database control which says "If there are several database instances running off the same Oracle home, then each will have its own Database Control instance".
    Now I assume that this statement implies multiple instances accessing the same physical database (which as per my knowledge can happen only in case of a RAC).
    I am not able to understand how exactly can you have multiple database instances in a single oracle home. I have installed Oracle 11g on my computer whose oracle home is +"D:\oracle\product\10.2.0\db_1"+; now this directory houses all the binaries (executables and folders like admin,bin, etc) for the oracle instance that I have installed (the instance name is ocp1). Now if I am to install or create another Oracle Instance (say ocp2) in the same home, wont there be a conflict of binaries of the two instances in the same home ?
    Basically,it makes sense if db_1 folder is further split into multiple folders, one for each instance (for example, one for ocp1 & one for ocp2); each of these folders will then contain the binary files, libraries,etc for its own instance; but, this is not the case, here db_1 houses all the binaries directly under it ...
    The other question which stems from the statement I mentioned above is that if having multiple instances running from same oracle home accessing the same physical database, can this arrangement be called RAC at all; or does RAC dictate that you cannot have multiple instances that are accessing the same database have to be installed on physically separate machines and so you cannot have two RAC instances (accessing same physical database) installed on the same computer ??
    I hope my questions are not too much confusing ... !!
    Cheers,
    Sudripta

    Hello,
    "If there are several database instances running off the same Oracle home, then each will have its own Database Control instance".This is true, and also means each instance will have its separate database (i.e. dbf files etc.) & separate DB Control. Usually in this case you create several instances on the same node.
    Now I assume that this statement implies multiple instances accessing the same physical database (which as per my knowledge can happen only in case of a RAC).You are correct about RAC where several instances (usually running on separate nodes) access the RAC.
    More info:
    1 Oracle Home - 1 Database - 1 SID is possible.
    1 Oracle Home - Many Databases - Many SID is possible.
    1 Oracle HOme - 1 Database - Multiple SID is possible and this is called RAC.

  • Running multiple instances of same servlet

    I am trying to run multiple webapps off of the same weblogic5.1 instance.
              I have setup the webapps and they work individually, but I need one servlet
              to load at startup.
              I have only been able to do that by including it by name in
              weblogic.properties
              #webApp named
              weblogic.httpd.webApp.demand=d:/stat_forecast/
              #register servlet so it runs on startup
              weblogic.httpd.register.AppInitServlet=com.ai.servlets.AppInitServlet
              weblogic.httpd.initArgs.AppInitServlet=AppConfigFilename=d:/stat_forecast/pr
              operties/forecast.properties
              weblogic.system.startupClass.aiservlet=weblogic.servlet.utils.ServletStartup
              weblogic.system.startupArgs.aiservlet=servlet=AppInitServlet
              This works until I try to add another instance of AppInitServlet for a
              different webApp
              #webApp named
              weblogic.httpd.webApp.supply=d:/supply/
              #register servlet so it runs on startup
              weblogic.httpd.register.AppInitServletS=com.ai.servlets.AppInitServlet
              weblogic.httpd.initArgs.AppInitServletS=AppConfigFilename=d:/supply/supply.p
              roperties
              weblogic.system.startupClass.aiservletS=weblogic.servlet.utils.ServletStartu
              p
              weblogic.system.startupArgs.aiservletS=servlet=AppInitServletS
              The servlet does not run a second time.
              Is there a way to move the AppInitservlet to inside the webApp and maybe use
              the web.xml to start each one individually?
              Thank you for any insight
              John Norton
              Indent Inc
              John Norton
              Indent Inc.
              (Innovative decision technologies, inc.)
              [email protected]
              

    Replying to myself to try and clarify.
              We are trying to run 2 or more webapps, each webapp tryes to call the
              servlet AppInitServlet.
              The servlet will not allow more than one instance to be in a context.
              In tomcat the servlet works to give a separate instance for each app.
              "JohnNorton" <[email protected]> wrote in message
              news:[email protected]...
              > I have sp8 on one version and that does work for the load on startup. One
              > problem solved, thank you.
              > Second part of same problem
              > In tomcat where we were developing, we could have multiple instances
              of
              > the AppInitservlet (for different Apps) and it kept them all separate.
              > In WL51 it starts the first correctly, but does not keep them
              separate,
              > so the second instance does not happen. It is designed so that
              multiple
              > calls do not instantiate (this would normally be within one instance of
              one
              > App).
              > I had thought that if the servlet was load-on-startup from the webApp
              > web.xml file that they would be separate. Any more ideas or clues?
              >
              > Thank you
              >
              > John Norton
              >
              > "Dimitri Rakitine" <[email protected]> wrote in message
              > news:[email protected]...
              > > Try it with the latest service pack - load-on-startup in web.xml was not
              > > supported until sp8 or so.
              > >
              > > JohnNorton <[email protected]> wrote:
              > > > I am trying to run multiple webapps off of the same weblogic5.1
              > instance.
              > > > I have setup the webapps and they work individually, but I need one
              > servlet
              > > > to load at startup.
              > > > I have only been able to do that by including it by name in
              > > > weblogic.properties
              > >
              > > > --------------
              > > > #webApp named
              > > > weblogic.httpd.webApp.demand=d:/stat_forecast/
              > >
              > > > #register servlet so it runs on startup
              > > > weblogic.httpd.register.AppInitServlet=com.ai.servlets.AppInitServlet
              > > >
              >
              weblogic.httpd.initArgs.AppInitServlet=AppConfigFilename=d:/stat_forecast/pr
              > > > operties/forecast.properties
              > > >
              >
              weblogic.system.startupClass.aiservlet=weblogic.servlet.utils.ServletStartup
              > > > weblogic.system.startupArgs.aiservlet=servlet=AppInitServlet
              > > > ---------------
              > > > This works until I try to add another instance of AppInitServlet for a
              > > > different webApp
              > > > #webApp named
              > > > weblogic.httpd.webApp.supply=d:/supply/
              > >
              > > > #register servlet so it runs on startup
              > > > weblogic.httpd.register.AppInitServletS=com.ai.servlets.AppInitServlet
              > > >
              >
              weblogic.httpd.initArgs.AppInitServletS=AppConfigFilename=d:/supply/supply.p
              > > > roperties
              > > >
              >
              weblogic.system.startupClass.aiservletS=weblogic.servlet.utils.ServletStartu
              > > > p
              > > > weblogic.system.startupArgs.aiservletS=servlet=AppInitServletS
              > >
              > >
              > > > The servlet does not run a second time.
              > > > Is there a way to move the AppInitservlet to inside the webApp and
              maybe
              > use
              > > > the web.xml to start each one individually?
              > > > Thank you for any insight
              > >
              > > > John Norton
              > > > Indent Inc
              > > > --
              > > > *************************************************
              > > > John Norton
              > > > Indent Inc.
              > > > (Innovative decision technologies, inc.)
              > > > [email protected]
              > >
              > > > *************************************************
              > >
              > >
              > >
              > >
              > > --
              > > Dimitri
              >
              >
              >
              

  • Adding multiple servlets under same application

    Hi,
    We are trying to add multiple servlets (2 to be precise) to an Application.
    We are using j2ee1.3 server and deploytool for deploying the same.
    Is it possible to have a single context root in which i'll be able to place both servlets with different aliases to access them?
    The moment I specify same contextRoot in Web context tab of Application, i get an error saying Deployment failed because "mycontextroot" already exists.
    When I assign two different context roots to each servlet, they can function, but then the URL for each changes inspite of being in the same application.
    Any suggestions are welcomed.
    Thank you,
    Manish.

    Hi,
    I did not quite follow the solution and I am wondering if it will solve a problem I am having.
    I wish to define multple jax-rpc endpoints, but I want the classes servicing those endpoints to be able to communicate with one another. I tried placing them both in the same war and entering two endpoints in the jaxrpc-ri.xml file, but it didn't like the second endpoint entry being there.
    Is there a way to do this?

  • Can you run multiple iPods on same computer?

    I have a "regular" ipod and have successfully loaded iTunes (dated 10-12-2005) on my pc. My husband just bought a shuffle but we cannot seem to run them on the same pc. Why not? iTunes just will NOT recognize the shuffle. I have successfully loaded the shuffle on our kids' pc; but all 2,000 songs are on my pc. I DON'T want to reload all of them. ANY suggestions? Comments?
    I did try to update the iTunes. Ran into other problem - iTunes wouldn't even start - had to uninstall/reinstall.
    Dell   Windows XP  

    I had the same problem with iTunes not recognizing my
    iPod Shuffle. What I did to fix the problem was to
    download the latest version of the iPod updater and
    select the restore option. It should reset the
    factory settings and flash the device with the latest
    software. I recommend trying to get iTunes to
    recognize the shuffle on its own, and then connecting
    the additional unit.
    Sounds great - but every time I load updater I cannot even start iTunes. VERY frustrated.

  • Can't run multiple instances on same page!

    Hi,
    Since I got no response on the shadowbox forums after 2 weeks, I thought it's worth to post it here and hope someone can help me out.
    Note: This is also related on non-joomla pages. I've tested it on plain html as well (by Dreamweaver) and get the same issue.
    The following issue was posted by me on the shadowbox forums:
    I was wondering if the following is possible.
    I've tried almost everything where I can think of, but no luck.
    Searched many forums and googled a lot, but without success.
    I got feeling that I'm so close and missing some simple solution.
    So I'm stuck here, I'm not able to figure it out.
    This is what I want to achieve:
    My website is running on Joomla 1.5. And I'm using a Shadowbox extension.
    In an article I've put multiple SWF movies, like previews acting like buttons.
    So when clicking on a SWF button/movie, Shadowbox opens and plays a related FLV movie.
    To achieve this part I've followed the instructions at this site under FAQ > first paragraph.
    So far so good...
    Now the ugly thing is when putting multiple swf buttons on a single page, after clicking a random button Shadowbox always displays the same flv movie. I did some altering with ID's and such but had no luck.
    Even try to alter with the Shadowbox options and variables, flashVars and such (at this site under Options and Usage) but that worked out for me.
    The strange thing is when placing the buttons, let's say in an article belonging to a section and category and make the articles paginated, after clicking the swf button the related flv plays. Browsing to the next page and clicking the button, the related flv will play also. This is the way it should be. Unfortunately it doesn't work when multiple buttons are displayed on the frontpage or an single article regardless whether they belong to sections and categories or not.
    Even when a single code is placed in a single article and display 2 or more articles containg a different swf and a different related flv link only the last added flv plays with every random swf button/movie.
    This the code I'm using for each swf (actionscript behavior):
    FIRST INSTANCE SWF=====================================
    on (release) {
    getURL("javascript:openShadowbox
    ('http://test.cquence-multimedia.nl/images/cqmm_test.flv','flv','title')");
    SECOND INSTANCE SWF=====================================
    on (release) {
    getURL("javascript:openShadowbox
    ('http://test.cquence-multimedia.nl/images/WizardFinal_1.flv','flv','title')");
    ================================================
    This is the code I'm using in the article (2 instances on a single page):
    =======================================================
    <!-- FIRST INSTANCE -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="150" height="50" data="images/default_swf_button.swf">
    <param name="movie" value="images/default_swf_button.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>-->                       
    <object width="150" height="50" data="images/default_swf_button.swf" type="application/x-shockwave-flash">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    </p>
    <script type="text/javascript">
    swfobject.registerObject("FlashID");
    </script>
    <script type="text/javascript">
    function openShadowbox(content, player, title, width, height, options){
    Shadowbox.open({
    content:"http://test.cquence-multimedia.nl/images/cqmm_test.flv",
    player:"flv",
    title:"SHADOWBOX FLASHBUTTON TEST FLV",
    width:"800px",
    height:"600px",
    </script>
    <!-- SECOND INSTANCE -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <object id="FlashID1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="150" height="50" data="images/default_swf_button2.swf">
    <param name="movie" value="images/default_swf_button2.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>-->        
    <object width="150" height="50" data="images/default_swf_button2.swf" type="application/x-shockwave-flash">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash player" width="112" height="33" /></a>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    <script type="text/javascript">
    swfobject.registerObject("FlashID1");
    </script>
    <script type="text/javascript">
    function openShadowbox (content, player, title, width, height, options){
    Shadowbox.open({
    content:"http://test.cquence-multimedia.nl/images/WizardFinal_1.flv",
    player:"flv",
    title:"SHADOWBOX FLASHBUTTON TEST BRIAN",
    width:"800px",
    height:"600px",
    </script>
    =======================================================
    This is the link to the page in question:
    http://test.cquence-multimedia.nl/index.php?option=com_content&view=article&id=9&Itemid=13
    Please, any suggestions would be great!
    Thanks in advance.
    Best Regards,
    John.

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • Issues when running multiple apps on same JRE?

    I've created an application that launches other Java applications, all running on the same JRE. I've noticed that this results in significant memory savings (60% or more). Performance doesn't seem to be measurably affected, but I've never run more than 4 applications at the same time on the same JRE.
    Does anyone know of any performance issues in situations like this? JRE limitations? Any information would be appreciated.

    "It's just not obvious from the 1.3 API docs that the classLoader is what's responsible for associating a set of classes with a set of threads."
    No, that's not what I was implying. The default classloader caches the definition of previously loaded classes (ie, bytecode, static variables). By default, there is no way to unload a class. Static variables will also retain their values -- which could confuse an application that is run multiple times.
    This is the suggested implementation defined in the JVM spec:
    http://java.sun.com/docs/books/vmspec/html/ConstantPool.doc.html
    Basically, if a class has already been loaded, it returns it. You can write your own custom classload to prevent this (as the link you found suggests) or use multiple classloaders.
    Imagine what happens when you write an application and then recompile a class WHILE running your application. Will the next instance of that class be updated? The answer depends on whether your classloader will reload the class from disk, or use a cached instance in memory (as the default one does).

  • Help with running multiple threads

    I'm new to programming with threads. I want to know how to run
    multiple threads at the same time. Particularly for making games
    in Java which I'm also begining to learn. For running multiple
    threads at the same time, do you have to put two run() methods
    in the source? If not then how do you make two threads or more
    run at the same time?
    Thanks for helping.

    For running multiple
    threads at the same time, do you have to put two run()
    methods
    in the source? Hi there,
    Each thread is presumably performing a task. You may be performing the same task multiple times or be performing different tasks at once. Either way, each task would typically be contained within the run() method of a class. This class would either be a subclass of java.lang.Thread (extends Thread) or would be an implementation of java.lang.Runnable (implements Runnable). In either case, you would define a method with signature (public void run()...). The difference comes into play when you wish to actually perform one of these tasks. With a subclass of Thread, you would simply perform:
    new MyTask().start();
    With an implementation of Runnable, you would do this:
    new Thread(new MyTask()).start();
    This assumes you don't need to monitor the threads, won't be sending any messages to your tasks or any such thing. If that were the case, you would need to tuck away those returns to new MyTask() for later access.
    In order to launch two threads simultaneously, you would have something along the lines of:
    new MyTask().start();
    new MyOtherTask().start();
    Now it is perfectly possible that MyTask() would complete before MyOtherTask() managed to start in which case it wouldn't appear as if you had actually had multiple threads running, but for non-trivial tasks, the two will likely overlap. And of course, in a game, these tasks would likely be launched in response to user input, which means that you wouldn't have any control over when or in what order they executed.
    Anyhow, it's as simple as that. You should also consider following the Java Threading trail which shows a simple example of using multiple threads. You can find it at:
    http://java.sun.com/docs/books/tutorial/essential/threads/index.html
    Regards,
    Lynn

  • Running multiple instances on same machine

    I need to run multiple instances of BEA WLS on a unix machine. I need 4 separate instances (dev and test for two different departments) on one machine and two production instances on another machine. What is the best way to go about separating these (ex. an account or directory structure for each)?
    Thanks,
    Roger ---|-

    Dev/Test:
    Give each one its own domain name - i.e. a separate directory under config. This
    works well.
    Production:
    Do the same, but to keep licensing costs down, I'd be inclined to run everything
    on a single instance.
    simon.
    Roger Cornejo wrote:
    I need to run multiple instances of BEA WLS on a unix machine. I need4 separate instances (dev and test for two different departments) on
    one machine and two production instances on another machine. What is
    the best way to go about separating these (ex. an account or directory
    structure for each)?
    Thanks,
    Roger ---|-

  • Problems in running the servlet in Oracle JDeveloper

    I have problems in running servlets(http servlet) in oracle jDeveloper.
    Heres the code
    package view;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("<p>The servlet has received a GET. This is the reply.</p>");
    out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error
    Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml.
    07/09/12 21:37:43 Fatal error: server exiting
    does anyone know here whats the problem???

    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("
    The servlet has received a GET. This is the reply.
    "); out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml. 07/09/12 21:37:43
    Fatal error: server exiting does anyone know here whats the problem???

  • Problem in running the servlet

    I have compiled the servlet and put the class file HelloWorld.class inside
    $CATALINA_HOME$/webapps/ROOT/WEB-INF/classes/
    directory, under tomcat6.0.18
    and also mapped servlet in
    $CATALINA_HOME$/webapps/ROOT/WEB-INF/web.xml, as below
    web.xml:
        <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You 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/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
       version="2.5">
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description>
      <servlet>
        <servlet-name>HelloWorld</servlet-name>
        <servlet-class>HelloWorld</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloWorld</servlet-name>
        <url-pattern>/HelloWorld</url-pattern>
      </servlet-mapping>
    </web-app>and run the servlet using this url......*.http://localhost/HelloWorld*
    but I got following error code under tomcat 6.0.18
      type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Thread.java:619)
    root cause
    java.lang.NoClassDefFoundError: HelloWorld (wrong name: hall/HelloWorld)
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Thread.java:619)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.is there something I did wrong?
    Edited by: san_4u on Mar 16, 2009 1:20 AM

    root cause
    java.lang.NoClassDefFoundError: HelloWorld (wrong name: hall/HelloWorld)Is your servlet contains first line as package hall;If it is there,remove it from the servlet code. And run your program.
    If you want to keep it, then make a folder named hall in classes folder and put your HelloWorld.class there. Also change <servlet-class> as
    <servlet>
        <servlet-name>HelloWorld</servlet-name>
        <servlet-class>hall.HelloWorld</servlet-class>
      </servlet>

  • How to run multiple reports From One Form with 1 report object?

    Hi ALL!
    i want to run multiple reports (in 10g technology) from 1 Form having only 1 report object.
    i.e
    IF parameter=yes THEN
    Rpt_new should run
    Else
    Rpt_old should run
    END IF;
    How can i do this?
    thanks
    rana

    Rana,
    I found this in the Forms online Help. You could easily found it yourself. Don't be afraid of pressing CTRL-H:
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME, 'yourreportsfilename.rdf')Regards,
    Martin Malmstrom

  • Win7 with FF 31, Android 4.2 smart phone with FF letest ver. using same account with 1 email. But phone is not get any pass, Bokmr, etc.

    Brother,
    We r using win7 with Mozila 31, Android 4.2 smart phone with Mozila latest ver. from google app store on 04/10/0214. Using same account with same email. But phone is not get any new information from win7 with Mozila 31. Pl z give helpful information.

    Hi w3ur_team,
    Thank you for your question. I understand that there are two devices that are logged into the Sync account. However the Android is not syncing.
    There are two places we can check:
    # In the Android Settings, under accounts is the attached account Firefox Sync or Firefox Sync (deprecated)?
    # Do the login credentials work on accounts.firefox.com on the mobile device and are there any error messages on the Sync menu from Settings > Sync?
    Please also see [[Firefox Sync troubleshooting and tips]] for more troubleshooting steps.

  • HELP - Problem in running a servlet

    I have developed an application of internet payment gateway(IPG). The application architecture is a cardholder visits a shoping cart and from the payment page he fill out his payment information such as credit card number, amout etc. on submit this payment form frowards a request to a merchant payment servlet that recieve the request, perform some action on it and forwards a request to the IPG. The IPG servlet receives the merchant servlet request and forward to a switch. Switch performs tranasction and replies back to the IPG servlet and then IPG servlet will response back to the merchant servlet about the transaction response.
    The IPG is connected each time with switch on specific IP and Port which is predefined in switch for this IPG and this is only 1 IP and 1 port assigned to this IPG. When IPG servlet completes the transaction request now it is disconnected with Switch.
    My issue is when 2 or more transaction request are generated at the same time the IPG servlet processes each request separate in a servlet (as i understand) but due to only 1 IP and Port is assigned to the IPG, the IPG can connect only one time with the switch and if IPG is connected then other requests can not processed by IPG because second and so on request are unable to connect with switch on the same IP and Port when for the first reuest IPG is already connected on this IP and Port.
    I have successfully implemented this modal in a desktop application which can handles multiple request on the same IP and Port at a time.
    Is there any possibility in servlets that IPG servlet will connects only one time with switch on IP and Port when i started the web server and all request in IPG uses the same channel to forward request to switch and recieve response from the switch.
    I will be very very thankfull if anyone will solve my problem because my 3 clients are waiting for my application and i have in trouble to solve the problem.
    IT IS A HUMBLE REQUEST AND HOPE YOU WILL REPLY AS SOON AS POSSIBLE.
    Thanks
    Wajid Hussain

    Your piece code seems fine but just make sure that your switch is as below
    Have ReaderThread class implementing Runnable
    In your main program create a server socket (in main method or whereever)
    ServerSocket listener = new ServerSocket(Integer.parseInt(host.getARValuePort()));now
    while(true){
      Socket socket = listener.accept();
      // after this instantiate ReaderThread as below
      ReaderThread theThread = new ReaderThread (socket);
    // Start the thread with this ReaderThread object as below
           Thread t = new Thread(theThread);
            t.start();
    }Now ReaderThread is as below
    class ReaderThread implements Runnable{
             private Socket server;
                 ReaderThread (Socket server) {
                      this.server=server;
            public void run () {
                // Here play around with your socket to read write or what ever and close.
                DataInputStream in = new DataInputStream (server.getInputStream());
                PrintStream out = new PrintStream(server.getOutputStream());              
    }Hope the above steps should solve your problem.

  • Contextual menu in finder "open with" has multiple entries of same apps

    When I use the contextual menu (right click) on documents, the menu point "open with..." shows multiple entries of the same programs. For example when right clicking a PDF, there appears 5 times neoOffice, 2 times Preview, 6 times ... any other application that you could use to open the document. This occurs on all user accounts, only that the multiplicity of listings of the apps is different. So it can't be a preferences problem on my account. What else could be the cause?
    This is quite annoying because the apps-list becomes very long and unusable.
    Note: I have 2 internal start up disks with OS and apps installed, but only one mounted. That means, there cannot be a duplicate (triplicate...etc) copy of any app accessible at any time.
    Thanks.

    if I quit all running applications, it will be pretty hard to put anything in the Trash!
    Are you being literal? Like quitting the Finder too? Or what bespeaks you?
    Actually, I use Xupport to do that, but I think Onyx and several other Utilities include that option.

Maybe you are looking for

  • My macbook treats my TV as a second moniter.

    How can I change my display settings so that when I hook my computer up to the TV it shows on the TV exactly what is shown on the computer's screen? Currently it is showing a blank desktop as though I was using dual moniters, this is very awkward for

  • How to know interfaces connected to BI system

    Dear Experts, I want to know how many interfaces my BI SYSTEM in connected to. How can I find that. Thanks

  • Using CONVERT_ABAPSPOOLJOB_2_PDF - 2 PDFs are being generated instead of 1

    We are doing upgrade project and problem what i am facing is that when a mail sent to vendor 2 PDF files are sent. Earlier it was sending 1 file as attachment in 4.6 C. Can any body help on this issue

  • 2mbit up, but still bad quality?!

    Hi! I am using a Macbook 2.2ghz intel, 4gb laptop to live stream. The location I use got 2mbit both up and down. At the moment I have been testing with a old Sony Handycam DCR-TRV9E. I would like to send this to a place where they show the video with

  • MASSBACK to update GI Times in APO

    Guys, we use MASSBACK program in Process chain to change/update GI and GR processing time in product master. This process runs monthly and always business teams provide values to be updated in the begining of the month. We have maintained variants li