Trying to understand servlet jar/war interaction

I am working on an integration project.
I have a war file that has many of the components that I need.
In my new project (Sun Studio IDE), I am trying to call up a servlet that exists in this other war file.
I can mount the war file as a directory, just like mounting a jar for use like classes12.zip whatever or similar to including a jar in your classpath.
Can I call a servlet in another jar, war, or zip file from my existing code?
How will the existing code or jsp know where to find this servlet outside the project?
Usually you have to either map the servlet or set this info in the web.xml, I think.

I am working on an integration project.
I have a war file that has many of the components that I need.
In my new project (Sun Studio IDE), I am trying to call up a servlet that exists in this other war file.
I can mount the war file as a directory, just like mounting a jar for use like classes12.zip whatever or similar to including a jar in your classpath.
Can I call a servlet in another jar, war, or zip file from my existing code?
How will the existing code or jsp know where to find this servlet outside the project?
Usually you have to either map the servlet or set this info in the web.xml, I think.

Similar Messages

  • I am trying to understand servlets

    In the tutorial it says :
    2. In a terminal window
    <INSTALL>/j2eetutorial14/examples/web/bookstore1/.
    What is the terminal window is this a J2EE editor window of some sort? I do not quite understand what they mean by "terminal window".

    What is the terminal window is this a J2EE editor
    window of some sort? I do not quite understand what
    they mean by "terminal window".It's the same ol' command prompt/console. :)

  • Calling servlets in another jar/war

    I am working on an integration project.
    I have a war file that has many of the components that I need.
    In my new project (Sun Studio IDE), I am trying to call up a servlet that exists in this other war file.
    I can mount the war file as a directory, just like mounting a jar for use like classes12.zip whatever or similar to including a jar in your classpath.
    Can I call a servlet in another jar, war, or zip file from my existing code?
    How will the existing code or jsp know where to find this servlet outside the project?
    Usually you have to either map the servlet or set this info in the web.xml, I think.
    If the servlet mappings are in the web.xml, does that mean that if I access a servlet in another war, with it's own web.xml, does that mean that I have to map that servlet in my current projects web.xml also?
    Thanks

    Can I call a servlet in another jar, war, or zip file
    from my existing code?
    How will the existing code or jsp know where to find
    this servlet outside the project?When you say 'call' I assume you mean forward. Yes, you can forward to servlets in other contexts/wars.
    If the other context is say 'appB' you can forward the request to a servlet mapped as say '/test' in web.xml of appB in the following way:
    getServletContext().getContext("/appB").getRequestDispatcher("/test").forward(request,response);
    Usually you have to either map the servlet or set this
    info in the web.xml, I think.
    If the servlet mappings are in the web.xml, does that
    mean that if I access a servlet in another war, with
    it's own web.xml, does that mean that I have to map
    that servlet in my current projects web.xml also?No. You don't need to map it again. However as you might have noticed, you do need to know the url pattern of the other servlet, so that you can forward properly.
    But beware - Session info will not be shared in cross-context forwarding

  • Deploying servlets (not in jar/war/ear!) to OC4J?

    I must be missing some very tiny but crucial issue....
    For over 2 days now (shame) I have been trying but not
    succeeding to deploy servlets to OC4J behind Apache. The 'behind
    Apache'-part is easy. Just set up a proxy. This is because
    Apache configuration is easy and well documented. But here is my
    real problem. I am using JDev 3.2 (9i too large) and this is
    what I want:
    I want to code a servlet in Jdeveloper, compile it to a class-
    file, not a jar, war, ear or whatever-r. Then I want to set up
    OC4J in such a way that I can access my servlets from the
    directory where the class files are. I do NOT want to use the
    default-web-app subdirectory for obvious reasons. Please, how do
    I set up OC4J to just look in my own classes-directory with my
    own servlets???? No jar, no war, no ear.
    I have been reading all sorts of information on this and tried
    everything, but am not succeeding and getting all sorts of
    error/not found messages.
    Extra info:
    I am using OC4J on windows. To start I use java -jar orion.jar,
    to restart I use ^C and repeat the start command. Is that ok or
    do I need to restart in a different way? I tried to setup OC4J
    as a service but the link to runexecsvc went astray to judosoft
    Any help will be greatly appreciated!

    Avi,
    Thanks for your swift reply. I have indeed read the docs, but
    the exploded directory format does not seem to work for one
    reason or another (got some error messages on file not found or
    something). Have you succeeded in deployment using exploded
    directories? If so, I would be greatly interested in your xml-
    files and directory structure!
    But, please do not spend too much time on this, because I have
    now decided that I will deploy using a war. I have written a
    small script to make a war out of my whole project and copy it
    to de OC4J file system. This works and everybody is happy.
    Thanks again,
    Martijn

  • Jar, War or Ear file ?

    Hi,
    I am a total newbie in J2EE technology.
    I am currently using Sun One Application. Using the sample application, it produces all the Jar, War and Ear files.
    My understanding is Jar is produced to be a library-like usage.
    War is for web application.
    And Ear is for what?? oops EJB? Can someone tell me?
    Anyway, my concern is, if I am to produce Ear, war, or Jar file after deploy, I have problems doing the testing. Let's say I want to modify the Jsp file, then I have to use ant to compile all, undeploy the instance and deploy again.
    Any better way?

    your jar files contain your EJBs, your WAR file contains your web application (JSPs, servlets and support) and these are all bundled into your EAR file. All of these files are just zip-formatted archives, you can look at them all via the jar tool (or something like WinZip, if you are so inclined). Each of these will contain a descriptor file (in XML format) - check out the J2EE spec on it.
    Lee

  • Hello, World - trying to understand the steps

    Hello, Experts!
    I am pretty new to Flash Development, so I am trying to understand how to implement the following steps using Flash environment
    http://pdfdevjunkie.host.adobe.com/00_helloWorld.shtml         
    Step 1: Create the top level object. Use a "Module" rather than an "Application" and implement the "acrobat.collection.INavigator" interface. The INavigator interface enables the initial hand shake with the Acrobat ActionScript API. Its only member is the set host function, which your application implements. During the initialize cycle, the Acrobat ActionScript API invokes your set host function. Your set host function then initializes itself, can add event listeners, and performs other setup tasks.Your code might look something like this.
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" implements="acrobat.collection.INavigator" height="100%" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    Step 2: Create your user interface elements. In this example, I'm using a "DataGrid" which is overkill for a simple list but I'm going to expand on this example in the future. Also notice that I'm using "fileName" in the dataField. The "fileName" is a property of an item in the PDF Portfolio "items" collection. Later when we set the dataProvider of the DataGrid, the grid will fill with the fileNames of the files in the Portfolio.
    <mx:DataGrid id="itemList" initialize="onInitialize()" width="350" rowCount="12"> <mx:columns> <mx:DataGridColumn dataField="fileName" headerText="Name"/> </mx:columns> </mx:DataGrid>
    Step 3: Respond to the "initialize" event during the creation of your interface components. This is important because there is no coordination of the Flash Player's initialization of your UI components and the set host(), so these two important milestone events in your Navigator's startup phase could occur in either order. The gist of a good way to handler this race condition is to have both your INavigator.set host() implementation and your initialize() or creationComplete() handler both funnel into a common function that starts interacting with the collection only after you have a non-null host and an initialized UI. You'll see in the code samples below and in step 4, both events funnel into the "startEverything()" function. I'll duscuss that function in the 5th step.
                   private function onInitialize():void { _listInitialized = true; startEverything(); }

    Hello, Experts!
    I am pretty new to Flash Development, so I am trying to understand how to implement the following steps using Flash environment
    http://pdfdevjunkie.host.adobe.com/00_helloWorld.shtml         
    Step 1: Create the top level object. Use a "Module" rather than an "Application" and implement the "acrobat.collection.INavigator" interface. The INavigator interface enables the initial hand shake with the Acrobat ActionScript API. Its only member is the set host function, which your application implements. During the initialize cycle, the Acrobat ActionScript API invokes your set host function. Your set host function then initializes itself, can add event listeners, and performs other setup tasks.Your code might look something like this.
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" implements="acrobat.collection.INavigator" height="100%" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    Step 2: Create your user interface elements. In this example, I'm using a "DataGrid" which is overkill for a simple list but I'm going to expand on this example in the future. Also notice that I'm using "fileName" in the dataField. The "fileName" is a property of an item in the PDF Portfolio "items" collection. Later when we set the dataProvider of the DataGrid, the grid will fill with the fileNames of the files in the Portfolio.
    <mx:DataGrid id="itemList" initialize="onInitialize()" width="350" rowCount="12"> <mx:columns> <mx:DataGridColumn dataField="fileName" headerText="Name"/> </mx:columns> </mx:DataGrid>
    Step 3: Respond to the "initialize" event during the creation of your interface components. This is important because there is no coordination of the Flash Player's initialization of your UI components and the set host(), so these two important milestone events in your Navigator's startup phase could occur in either order. The gist of a good way to handler this race condition is to have both your INavigator.set host() implementation and your initialize() or creationComplete() handler both funnel into a common function that starts interacting with the collection only after you have a non-null host and an initialized UI. You'll see in the code samples below and in step 4, both events funnel into the "startEverything()" function. I'll duscuss that function in the 5th step.
                   private function onInitialize():void { _listInitialized = true; startEverything(); }

  • Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi All,
    I am facing problem while deploying a simple servlet
    using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3
    on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2
    (9.0.3)      
    I referred following link to Deploy Applications
    Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed
    following steps to deploy WAR file:
    1] I have created a war file by name
    SimpleServlet.war. In SimpleServlet.war, there is a
    servlet by name Simple which prints time at which
    servlet was accessed.
    2] I have modified
    <ora9ias_home>\j2ee\home\config\application.xml and
    added following web module entry:
    <web-module id="SimpleServlet"
    path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web,
    I have modified file
    <ora9ias_home>\j2ee\home\config\default-web-site.xml
    and added following entry:
    <web-app application="SimpleServlet"
    name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP
    Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to
    user. I have verified that SimpleServlet.war is
    extracted to SimpleServlet folder under
    <ora9ias_home>\j2ee\home\applications folder. I found
    that Simple.class is stored under WEB-INF/classes
    folder and web.xml contains correct entry for url
    pattern for servlet Simple.
    What else could be the problem? Am I placing the war
    file in wrong place or modifying application.xml or
    default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your
    valuable comments on this.
    Thanks in advance.
    Regards,
    SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
    Good luck!
    rgds Thomas

  • How to Create a jar war or ear--Probelms in deploying

    I have the following dir structure. I am using Struts 1.1 and weblogic 7.0
    APP
    +jsp
    +WEB-INF
    + ---lib
    +--- classes
    +----com
    --ap
    --action
    --beans
    --handler
    --service
    --client
    --ejb
    --valueobject
    1> Do I need to create a ear file since i want both the ejb (under service folder) and war as reusable components. Whenever we have a EJB component do we always need to have an EAR file??
    2> Whats the best way to create the jar, war or ear file. I am facing great difficulty in deploying the war.Do we need to set any classpath before we create the war and jar files except for the deployment descriptors.I have created the ejb descriptors correctly through ejbc.
    3>I have kept struts.jar,log4j.jar under lib folder. However when i create the ear and try to deploy it under weblogic it deploys the war file but gives error in deploying the jar which has the ejb. I have aslo validated the jar using ejbc.
    It gives error indicating that it requires struts.jar in classpath. If we give the classpath of struts.jar at system leve the Application deploys with ease..Can anyone tell whats the error.The jar does not use any strust component .
    4>Also the valueobject which has some beans which are used to populate the jsp through Actionformbean. Is it ok if we give refrences in both ejb jar and war?
    ie while creating jar and war folder have the valueobject in both the files or will it lead to any errors..
    Thanks in Advance
    ....

    Yes, I have tried that. But, as the server is running and the jars are in use, it throws and EditFailedException

  • Trying to understand the basic concept of object oriented programming.

    I am trying to understand the basic concept of object oriented programming.
    Object - a region of storage that define is defined by both state/behavior.
    ( An object is the actual thing that behavior affects.)
    State - Represented by a set of variables and the values they contain.
    (Is the location or movement or action that is the goal that the behavior is trying to accomplish.)
    Variables- (What does this mean?)
    Value - (What does this mean?)
    Behavior - Represented by a set of methods and the logic they implement.
    ( A set of methods that is built up to tell's the how object to change it's state. )
    Methods - A procedure that is executed when an object receives a message.
    ( A very basic comand.For example the method tells the object to move up, another method tells the method to go left. Thus making the object move up/left that combination is the behavior.)
    Class - A template from which the objects are created.
    ( I am very confused on what classes are.)
    - The definitions of the words I obtained from the "Osborne Teach Yourself Java". The () statements are how I interperate the Mechanisms (I do not know if Thats what you call them.) interact with each other. I understand my interpretation may be horribly wrong. I will incredibly appreciate all the support I may get from you.
    Thank you

    Object oriented programming is a replacement for the older idea of procedural programming (you can research procedural programming in google). As I understand it, in procedural programming, you have a step by step set of function calls to accomplish some task. Each function receives a data structure, manipulates it, and passes it to the next function. The problem with this is that each function preforms some action for the overall task and can't easily be reused by some other task. Its also harder to read the flow of what is happening with raw data structures flying all over the place.
    In object oriented programming, an object calls a function of another object and receives back, not a data structure, but another object. Objects contain a data structure that can only be accessed by its functions. An object is not so much a sub component of a bigger task, as it is a service that any other task can use for any purpose. Also, when you pass an object to the caller, the caller can ask questions about the data structure via its functions. The developer doesnt have to know what the previous function did to the data by reading up on any documentation, or having to reverse engineer the code.
    I suggest the best way of learning this is to code something like a library object.
    A library object contains a collection of book objects
    A book object contains a collection of chapter objects
    A chapter object contains a collection of paragraph objects
    A paragraph object contains a collection of sentence objects
    A sentence object contains a collection of word objects.
    Add functions to each object to provide a service
    Example: A library object should have a:
    public void addBook(Book book)
    public Book getBook(String title)
    public boolean isBookInLibrary(String title)
    The key is to add functions to provide a service to anyone who uses your object(s)
    For example, what functions (service) should a paragraph object provide?
    It shouldn't provide a function that tells how many words there are in a sentence. That function belongs to a sentence object.
    Lets say you want to add a new chapter to a book. The task is easy to read
    if you write your objects well:
    Sentence sentence1=new Sentence("It was a dark and stormy night");
    Sentence sentence2=new Sentence("Suddenly, a shot ran out");
    Paragraph paragraph=new Paragraph();
    paragraph.addSentence(sentence1);
    paragraph.addSentence(sentence2);
    Paragraphs paragraphs=new Paragraphs();
    paragraphs.addParagraph(paragraph);
    Library library= new Library();
    library.getBook("My Novel").addChapter("Chapter 1",paragraphs).
    Now, lets say you want to have a word count for the entire book.
    The book should ask each chapter how many words it contains.
    Each chapter should ask its paragraphs, each paragraph should ask
    its sentences. The total of words should ripple up and be tallied at each
    stage until it reaches the book. The book can then report the total.
    Only the sentence object actually counts words. The other objects just tallies the counts.
    Now, where would you assign a librarian? What object(s) and functions would you provide?
    If written well, the project is easily extensible.

  • Error loading servlet.jar

    I deployed a web application in tomcat server. I'm getting following error when starting the server
    WebappClassLoader: validateJarFile(D:\jakarta-tomcat-4.1.27\webapps\registeruser
    \WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
    Offending class: javax/servlet/Servlet.class

    I am trying to deploy a web application using Netbeans 6.1 but when I am running it I am getting the following errors:
    deployed with moduleid = S
    validateJarFile(/home/aadhya/sanju/S/build/web/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    ##### Error java.lang.ClassNotFoundException: com.mysql.Driver
    ##### Error java.lang.ClassNotFoundException: com.mysql.Driver
    Can any body please tell me how to solve this problem???
    I tried even by deleting servlet.jar from my application but still the same problem exists.
    Thanks & Regards,
    Sanjeev K
    Edited by: sanjeev.pk on Sep 2, 2008 3:35 PM

  • Servlet.jar problem

    Hi all
    Could anyone help me out this problem, I keep trying to figure it out these days but I still cant find my way.
    I cannot compile a simple HelloWorldServlet.java, as it gave me 6 errors:
    ===========================================
    package javax.servlet does not exist
    import javax.servlet/*;
    ^
    package javax.servlet.http does not exist
    import javax.servlet.http/*;
    ^
    the other 4 errors also pointing to the HttpServlet, HttpServletRequest, HttpServletResponse and ServletException
    ===========================================
    I have installed Tomcat 4.1.24 and j2sdk1.4.1_01 on my computer. I know the compiler javac needs the servlet.jar when compiling servlet source code, so I have set the path like this
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\J2SDK1.4.1_01\BIN;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar
    However, same errors are still generated after I set the path. So can anyone can tell me what thing goes wrong with my setting? or this is not the servlet.jar and path problem?
    With uncountable thank : )
    Kelvin

    Hi,
    My questions are the same.
    But I have also set up the classpath for the servlet component.
    After that, I found I can't call user-defined obecjts in my servlet.
    Even when I just write a simple Java command-line progarm which call the outside objects, it also can't find the user-defined objects; unless I move out the setup of CLASSPATH. So does anyone have the further solution? or tell me where I can find the answer!
    Thank you so much!

  • Servlet.jar

    can anyone tell me what this error message means. Ive installed a .war file that should work. but i get this error. Is it something to do with not being able to find servlet.jar ? if it is where do i need to put it?
    Thanks
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.products_jsp._jspService(org.apache.jsp.products_jsp:72)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    No, it means you have a null reference in your JSP page.

  • Error message - servlet.jar ?

    can anyone tell me what this error message means. Ive installed a .war file that should work. but i get this error. Is it something to do with not being able to find servlet.jar ? if it is where do i need to put it?
    Thanks
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.products_jsp._jspService(org.apache.jsp.products_jsp:72)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    can anyone tell me what this error message means. Ive
    installed a .war file that should work. but i get
    this error. Is it something to do with not being able
    to find servlet.jar ? if it is where do i need to put
    it?
    Thanks
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(J
    spServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(J
    spServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServl
    et.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.products_jsp._jspService(org.apache.js
    p.products_jsp:72)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJsp
    Base.java:99)
         javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:802)
         org.apache.jasper.servlet.JspServletWrapper.service(J
    spServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(J
    spServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServl
    et.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:802)
    Pal..pls quote d JSP code....
    Hope the forum could get more info regarding your problem, and help u !
    Cheers !
    Shekhar

  • Location of SunServer7 Servlet.jar file?

    Hello All I have AppServer7 development edition installed on my machine and I'm trying to compile a simple helloworld servlet to test my installation, but I can't seem to find servlet.jar in the AppServer7 directory structure. Any ideas which file has the servlet interfaces?
    Thanks,
    Coop

    The forum for AppServer questions is:
    http://swforum.sun.com/jive/forum.jspa?forumID=114
    Having said that, did you check under server_root/jwsdp/common/lib directory?
    Thanks
    Manish

  • Problem when trying to compile servlets!

    Hi,
    Can someone help me with my problem.
    I have installed jakarta-tomcat-1.4.27 after instructions from the book 'Core Servlets and JavaServer Pages' but I have one problem. When I compile a servlet I get the following message:
    C:\Apache-Tomcat-4.1.27\jakarta-tomcat-4.1.27\webapps\ROOT\WEB-INF\classes>javac HelloServlet.java
    HelloServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    HelloServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    HelloServlet.java:13: cannot resolve symbol
    symbol : class HttpServlet
    location: class HelloServlet
    public class HelloServlet extends HttpServlet {
    ^
    HelloServlet.java:14: cannot resolve symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    ^
    HelloServlet.java:15: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    ^
    HelloServlet.java:16: cannot resolve symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    ^
    6 errors
    What is the problem, and how will i fix the problem? I think there is some problem with the CLASSPATH, but I don't now what!
    My classpath looks as follows:
    set JAVA_HOME=C:\j2sdk1.4.1_01;CLASSPATH=.;C:\ServletDevel;C:\Apache-Tomcat-4.1.27\jakarta-tomcat-4.1.27\common\lib\servlet.jar
    N.B. I use Java version j2sdk1.4.1_01!

    OK, I have tried to do this but it does n't solve my problem. Maybe my problem is that I don't put my environment variables in a proper way (my windows knowledge is not the best). How will I set this variables in a proper way? I use windows XP Pro.
    Now I have put all my variables in one row as follows:
    Variable name: set
    Variable value: JAVA_HOME=C:\j2sdk1.4.1_01;CLASSPATH=.;C:\ServletsDevel;C:\Apache-Tomcat-4.1.27\jakarta-tomcat-4.1.27\common\lib\servlet.jar;C:\j2sdk1.4.1_01\bin
    Is this correct, or how will I make this in a proper way?
    N.B. I must restart my computer each time I have changed my settings, isn't that right?

Maybe you are looking for

  • HP Belgium will not do a Regional Reset of my HP Photosmart

    The HP Techical Support Line in Belgium refuses to do a Regional Reset for my printer. I have an HP Photosmart C4480 from Singapore.  I moved to Belgium this year.  I knew that the ink cartridges were not the same and that printers had regional setti

  • [SOLVED] stucked in GDM

    Hello, I forgot to create more users besides the admin, and I set GDM as default login, now when I start Arch, it takes me directly to gdm and because I only have one "user" I can't login, so I'm stuck in gdm. How can I go back to the old login scree

  • Permanently set registry EnableRbacReporting=0 in reporting services ?

    Hi Guys and gals I would like to permanently disable the "EnableRbacReporting" setting i SCCM 2012 R2 - Reporting Services. How is this possible and is this in fact possible? /Leth

  • ISE BYOD Error: "We are unable to determine access privileges" on redirect

         I am running ISE 1.1.1 and have gone through the design guide and setup the certificate based wireless authentication and device registration process using the ISE as a SCEP proxy for handing out certificates.  On the device registration portal

  • Starting from external disk: cannot unmount standard startup volume

    Hi all, I started my my mac from an external disk to do some maintainance on my standard startup volume but this volume cannot be ejected. I already tried lsof to find out whether there is still a process running on the starup volume but lsof doesn't