Solved

eclipse with tomcat issues

Posted on 2013-01-28
26
2,927 Views
Last Modified: 2013-02-05
My eclipse juno used to work perfect with tomcat 7 server. I ran many servlets and jsps until this afternoon. All of sudden I keep seeing this kind of error now

Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.


Please advise on how to fix this issue. I tried to install jboss 7 but eclipse server set up configuration has until jboss 5 only. I installed jboss 5 when i tried to start it is also giving errors. Please advise. Any links, ideas, resources highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
  • 11
  • 6
  • 5
  • +2
26 Comments
 
LVL 7

Author Comment

by:gudii9
ID: 38829254
when i try to start tomcat7 server it keep on giving below error

Jan 28, 2013 5:18:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files\Roxio\OEM\AudioCore\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\softwares\eclipse juno new\eclipse-jee-juno-SR1-win32\eclipse;;.
Jan 28, 2013 5:18:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ServletProject' did not find a matching property.
Jan 28, 2013 5:18:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 28, 2013 5:18:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 28, 2013 5:18:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1489 ms
Jan 28, 2013 5:18:56 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 28, 2013 5:18:56 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.35
Jan 28, 2013 5:18:57 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ServletProject]]
      at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
      at java.util.concurrent.FutureTask.get(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ServletProject]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      ... 7 more
Caused by: java.lang.IllegalArgumentException: The servlets named [com.gp.java.InitParamServlet] and [com.gp.java.ParameterNameReqSessionContext] are both mapped to the url-pattern [/ParameterNameUP] which is not permitted
      at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:335)
      at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2412)
      at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2125)
      at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2080)
      at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2073)
      at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2073)
      at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2073)
      at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
      at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 7 more
Jan 28, 2013 5:18:57 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
      at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
      at java.util.concurrent.FutureTask.get(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 7 more
Jan 28, 2013 5:18:57 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 11 more
Jan 28, 2013 5:18:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1031 ms
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38829836
I think this problem because of servlet.jar, The servlet.jar floating around somewhere in your CLASSPATH, it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal.

Servlet.jar should only be found only once in $CATALINA_HOME/lib
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38829839
remove other place servlet.jar 's
0
 
LVL 1

Expert Comment

by:srikotesh
ID: 38829883
in some scenarios tomcat didnt start with in 45seconds it requires some more time in that case we need increase timeout if u are running tomcat server inside the eclipse please do the things to increase the server time
goto servers open the server( Tomcat v6.0 Server at localhost.server) double click on it , one window will be opened go to timeout tab increase the time up to 300 secs ans run it
0
 
LVL 7

Author Comment

by:gudii9
ID: 38831082
i increased to 120 seconds that did not help. Let me try 300 as well
0
 
LVL 16

Expert Comment

by:Valeri
ID: 38831543
it's not because of the timeout setting, there is something wrong with your Tomcat! Did you do anything else before tomcat stoped working?
My advice is to remove tomcat from Eclipse and to setup it again.
Also chek this in order to be sure that there are no problems with servlet api:
http://tech.amikelive.com/node-269/eclipse-quick-tip-resolving-error-the-import-javaxservlet-cannot-be-resolved/
0
 
LVL 7

Author Comment

by:gudii9
ID: 38831563
i installed myeclipse trial version. That has built in tomcat server that is working perfect. Please advise
0
 
LVL 7

Author Comment

by:gudii9
ID: 38832091
>>Did you do anything else before tomcat stoped working?

i do not remember doing anything wrong.

>> i removed tomcat from eclipse many times and tried to point to new tomcat download still the error exists.

I even changed the eclipse from juno to helios version and freshly configured tomcat then also error coming. I spent many hours with this issue but no solution yet. Please advise
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38834437
>>>>>@gudii9
 
Have you tired my suggestion .

your web application and tomcat both are having servlet.jar  so that only its give the problem .

Try to remove your servlet.jar in your web applicaion it will work .
0
 
LVL 16

Assisted Solution

by:Valeri
Valeri earned 50 total points
ID: 38834879
another possible reason is the ports used by tomcat to be busy, but the only reason for that is "ports are still in use by tomcat itself", so I know it sounds stupid, but try to restart your PC and then try again...
0
 
LVL 7

Author Comment

by:gudii9
ID: 38835535
how to uninstasll tomcat. I just removed tomcat from eclipse server view. Downloaded new tomcat server dump from internet. Configured in eclipse with new tomcat server dump url. Do i need to do something different to uninstall, install tomcat, link with eclipse. please advise
0
 
LVL 16

Expert Comment

by:Valeri
ID: 38835726
No. it's not a problem to have two different versions of tomcat installed. it's important which one you have configured in Eclipse.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38838546
component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ServletProject]]
      at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
      at java.util.concurrent.FutureTask.get(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

Open in new window


your servlert miss match only 2 servlet are confilt  ...
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 7

Author Comment

by:gudii9
ID: 38840290
i searched n servlet.jar on my entire C drive. I found followig entries as in the attachment. I am not able to understand where is the conflict. Please advise
servletJAr.jpg
servletJAr2.jpg
0
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 50 total points
ID: 38842615
it will in that same name other postfix. like servlet-API.jar.

Go to your in lib folder in eclispe. you can find there servelt-api.jar or servelt 3.jar some name like that (servler*.jar) . you can delete that one  thats it .

* is some  postfix .

you can see your screen shot all tomcat have servlet.jar 's (servlet-api.jar) . if web also have same  jar that time tomcat doesnt know which one to load .  so its giving error
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 38843137
I would suggest , just remove your application (war or whatever) from deployments or staging folder and try to start tomcat . I believe the problem is with your app , not with the server.

Is this your class ? com.gp.java.InitParamServlet?
0
 
LVL 7

Author Comment

by:gudii9
ID: 38844861
I searched on servlet*.jar. I found followin entries as in attachment. I do not see duplicate servlet jar in web content or web-inf lib directory

I removed the application. then when i start tomcat tomcat is starting fine. when i add the web project and restart the tomcat server then server is not starting with timeour error. Please advise
0
 
LVL 7

Author Comment

by:gudii9
ID: 38844883
I have removed all the jars in

C:\Users\ganesha\eclipseJuno_workspace\SimpleWebProject\WebContent\WEB-INF\lib


Now I see errors in the project as in the attachments. Please advise
junkjars.jpg
ErrorAfterRemovingJarsIWebLib.jpg
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 38848490
See , as I said the problem is with your app ,not with the server . You have not yet answered my other question : com.gp.java.InitParamServlet - is this your class?
0
 
LVL 7

Author Comment

by:gudii9
ID: 38848577
yes. that is one of the servlet in the SimpleWebProject as attached.Now itisnot getting reference toservlet jars as in the attachment. Ia m attaching the code for that servlet for referece.


package com.gp.java;
 
import java.io.IOException;

import java.io.PrintWriter;
import java.util.Enumeration;
 
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;




 
@WebServlet(description = "ParameterName desc", urlPatterns = { "/ParameterNameUP" }
    //       initParams={@WebInitParam(name="defaultUser", value="g p")}

,initParams = {
            @WebInitParam(name="defaultUser", value="value1")
            }
)


/*
@WebServlet(
name = "WebInitParamExample", urlPatterns = {"/hello"}
,initParams = {
@WebInitParam(name= "Site :", value="http://roseindia.net"),
@WebInitParam(name= "Rose", value= "India"),
}
)*/

public class InitParamServlet extends javax.servlet.http.HttpServlet implements
        javax.servlet.Servlet {
 
    public InitParamServlet() {
        super();
    }
 
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {/*
         
        PrintWriter pw = response.getWriter();
 
                //
                // Let's obtains parameters name here!
                //
        Enumeration enumeration = request.getParameterNames();
        while (enumeration.hasMoreElements()) {
            String parameterName = (String) enumeration.nextElement();
            pw.println("Hello Parameter = " + parameterName);
        }
        pw.close();
    */
          
    response.setContentType("text/html");
    PrintWriter writer=response.getWriter();
    String userName=request.getParameter("name");
    HttpSession session=request.getSession();
   
    ServletContext context= request.getServletContext();
   
    if( userName!="" & userName != null){
          session.setAttribute("savedUserName", userName);
          context.setAttribute("savedUserNamec", userName);
    }
   
    writer.println("Hellllooo request"+userName);
    writer.println("Hellllooo session"+(String)session.getAttribute("savedUserName"));
    writer.println("Hellllooo context"+(String)context.getAttribute("savedUserNamec"));
    writer.println("Hellllooo init param has default value of"+getServletConfig().getInitParameter("defaultuser"));
 //   this.getServletConfig().getInitParameter("defaultuser");
   
   
   
    }
 
    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
    }
}

0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38849975
commans-logging.jar  is import for web apps .

you need to remove servlet-api.jar only ..

Can you show me

what are all jar avaliable in

C:\Users\ganesha\eclipseJuno_workspace\SimpleWebProject\WebContent\WEB-INF\lib
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 38850246
@gudii9 ,

The problem is very clear from your stack trace . The problem is not with the jars , but with your app . Unless and until you fix this , you won't get out of this .

Caused by: java.lang.IllegalArgumentException: The servlets named [com.gp.java.InitParamServlet] and [com.gp.java.ParameterNameReqSessionContext] are both mapped to the url-pattern [/ParameterNameUP] which is not permitted
0
 
LVL 7

Author Comment

by:gudii9
ID: 38851773
ParameterNameReqSessionContext code looks like below

package com.gp.java;
 
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
 
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
 
@WebServlet(description = "ParameterName desc", urlPatterns = { "/ParameterNameUP" })
 //          initParams={@WebInitParam(name="defaultUser",value="g p")}
public class ParameterNameReqSessionContext extends javax.servlet.http.HttpServlet implements
        javax.servlet.Servlet {
 
    public ParameterNameReqSessionContext() {
        super();
    }
 
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {/*
         
        PrintWriter pw = response.getWriter();
 
                //
                // Let's obtains parameters name here!
                //
        Enumeration enumeration = request.getParameterNames();
        while (enumeration.hasMoreElements()) {
            String parameterName = (String) enumeration.nextElement();
            pw.println("Hello Parameter = " + parameterName);
        }
        pw.close();
    */
          
    response.setContentType("text/html");
    PrintWriter writer=response.getWriter();
    String userName=request.getParameter("name");
    HttpSession session=request.getSession();
   
    ServletContext context= request.getServletContext();
   
    if( userName!="" & userName != null){
          session.setAttribute("savedUserName", userName);
          context.setAttribute("savedUserNamec", userName);
    }
   
    writer.println("Hellllooo request"+userName);
    writer.println("Hellllooo session"+(String)session.getAttribute("savedUserName"));
    writer.println("Hellllooo context"+(String)context.getAttribute("savedUserNamec"));
   
   
   
    }
 
    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
    }
}


web.xml looks like below
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>SimpleWebProject</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>xmlServlet</servlet-name>
    <servlet-class>com.gp.java.XmlServlet</servlet-class>
    <init-param>
      <param-name>default value</param-name>
      <param-value>sai</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>xmlServlet</servlet-name>
    <url-pattern>/xmlServletPath</url-pattern>
  </servlet-mapping>
</web-app>



i wonder what it means

Caused by: java.lang.IllegalArgumentException: The servlets named [com.gp.java.InitParamServlet] and [com.gp.java.ParameterNameReqSessionContext] are both mapped to the url-pattern [/ParameterNameUP] which is not permitte

i removed both the servlets. now it started fine.

I could not understand what went wrong.What fixed the problem after removing both servlets. Please advise
0
 
LVL 12

Accepted Solution

by:
Sharon Seth earned 400 total points
ID: 38853891
I believe you cannot have two servlets mapping to the same URL pattern . Not sure why you would want that practically . Even if your container allows that , you can't say which servlet  gets the request
0
 
LVL 7

Author Comment

by:gudii9
ID: 38854662
oh i  see. init-param is specific to one servlet as per web.xml




<servlet>
    <servlet-name>xmlServlet</servlet-name>
    <servlet-class>com.gp.java.XmlServlet</servlet-class>
    <init-param>
      <param-name>default value</param-name>
      <param-value>sai</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>xmlServlet</servlet-name>
    <url-pattern>/xmlServletPath</url-pattern>
  </servlet-mapping>


But inside my two problematic servlets where i am referring above init-param related code. Please advise
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 38856057
Just do a txt search on your project and you will see it.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bunnyEars2 challenge 6 68
topping1 challenge 7 51
for i loop in grovy 1 32
Error with Java/Cache JDBC Classpath 2 19
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now