Timeout between servlets???

Hi.
          Let me start explain our situation. We have WLS 51 with Apache 1.3.12.
          We have developed an application that uses servlets mostly.
          Before we knew about the connection pool provided by weblogic, we builded our own connection pool to the database: oracle.
          This is how the application works:
          To generate a file with data, the servlet, lets say ReportServlet, calls a RunSQLStmtServlet, which finds an available database connection thread, SQLThreadServlet, which connects to our oracle database using JDBC.
          The problem we have is that whenever we try to generate a file with lots of data (more than 5 minutes processing), somewhere the connection between the servlets breaks up.
          I know is not the apache timeout, i changed it to 10 minutes, and again when we reach 5 minutes processing, the processing stops.
          Can anybody help me out with this?
          Maybe we're doing something we are not suppose to do?
          thanks,
          Mauricio
          

          At first we thought it might be the http time out, but as i told in my previous
          mail, we chaged in Apache to 10 minutes and again the processing stoped at 5 minutes.
          Anyone knows how Weblogic manages the grace period (time to live, timeout, etc)
          of servlets.
          Anyway, we found out something that might help. We're going to try whats suggested
          in:
          http://java.sun.com/docs/books/tutorial/servlets/lifecycle/service-threads.html
          What do you think???
          thanks,
          Mauricio
          "Anshum Sharda" <[email protected]> wrote:
          >
          >Mauricio <[email protected]> wrote:
          >>Hi.
          [...deleted....]
          >>I know is not the apache timeout, i changed it to 10 minutes, and again
          >>when we reach 5 minutes processing, the processing stops.
          >>
          >>Can anybody help me out with this?
          >>Maybe we're doing something we are not suppose to do?
          >>
          >>thanks,
          >>Mauricio
          >
          >My thoughts:
          >What you are facing might be HTTP timeout happening at the web server
          >level.
          >The browser client only waits for 2min (i think ) or so before it closes
          >the connection.
          >
          >
          >What you may want to do is show a temporary "Processing...." page that
          >refreshes
          >every few seconds and polls the backe-end for the completed report.
          >Once the
          >report is completed, the temp page redirect to the final report page.
          

Similar Messages

  • Difference between servlet and filter

    difference between servlet and filter

    Its not a secret you know; if you just read a little about what they are used for, you answer your own question plus many more to follow.
    Servlet: http://en.wikipedia.org/wiki/Java_Servlet
    Filter: http://www.oracle.com/technetwork/java/filters-137243.html

  • Difference between servlet and ActionServlet

    Difference between servlet and ActionServlet..
    Anybody reply

    jsf_VWP5.5.1 wrote:
    Difference between servlet and ActionServlet..
    Anybody replyAs their name imply, ActionServlets like outdoor activities, whereas Servlets are rather contemplative types.
    The only time Servlets exhibit behavior similar to ActionServlets, in under extremely stressful situations, like when a Servlet is being chased by a pit bull.

  • Whats the difference between servlet-config.xml ang web.xml???

    whats the difference between servlet-config.xml ang web.xml???

    web.xml is the standard configuration for all Java EE web modules.
    servlet-config.xml appears to be pertinent only for Struts apps.
    you don't have to have servlet-config.xml if you don't use Struts, but you've got to have web.xml.
    %

  • Transfering data between servlets

    hi
    how would i transfer data between servlets - Im creating a form (form1) which asks the user to enter information - the user then submits, and this takes them to the next form (form2) - i need to transfer the data from form1 to form2 (ie. name, lastname). code follows
              // set content type
              response.setContentType("text/html");
              // then write the data of the response
              out = response.getWriter();
              out.println("<HTML><HEAD><TITLE>" + Title + "</TITLE></HEAD><BODY BGCOLOR=white>");
              out.println("<H2>Customer Registration Form</H2>");
              //create link to servlet action = pathOfServlet?
              out.println("<FORM action = \"ServletExample1\">");
              out.println("First name: <input type=text name=\"name\" value=\"" + name + "\">");
              out.println("Last Name: <input type=text name=\"lastName\" value=\"" + lastName + "\"><P>");
              //value=\"female\" -- forward slash enters html/java and ends java
              out.println("Male<input type=radio name=\"gender\" value=\"male\"> ");
              out.println("Female<input type=radio name=\"gender\" value=\"female\"><P>");
              out.println("Telephone: <input type=text name=\"phone\" value=\"" + phone + "\">");
              out.println("Email: <input type=text name=\"email\" value=\"" + email + "\"><P>");
              out.println("<INPUT TYPE=SUBMIT><P>");
              out.println("</FORM>");
              // then write the data of the response
              out = response.getWriter();
              out.println("<HTML><HEAD><TITLE>" + Title + "</TITLE></HEAD>\n");
              out.println("<BODY BGCOLOR=white>");
              out.println("<H3>Credit Card Information</H3>");
              out.println("<FORM>");
              out.println("First name: <input type=text name=\"name\" value=\"" +should i link here+ "\">");
              out.println("</BODY></HTML>");

    Have you tryed using the request parameter? It should contain what you seek, I think.
    Here for example;
    String firstName = request.getParameter("name");
    String lastName = request.getParameter("lastname");Use that in the second form, which should get its parameters from form1.

  • Different timeout between bean and method

    I have to set on the same bean a different timeout between the bean und one method.
    I set in the weblogic-ejb-jar.xml <trans-timeout-seconds> to 39 sec But I will
    set the timeout for a method in this bean to 120 sec. How con I set this timeout?

    I don't know if this is yourproblem, but you have unbalanced quotes on the line
    name=""object1">I didn't know that javascript could talk to java like this. Please tell me where I can read more about this.

  • Sharing an object between Servlets

    I am using a Connection object to query a database from a few different servlets. Is there a way I can pass it between the Servlets, so that I don't have to keep re-opening the connection for each Servlet?

    I may have mis-understood your question. Do you want to keep the "same" connection open between servlets, e.g. pass around ResultSet objects? If so, and I've not tried this with connection pooling, it should still work, you simply pass the connectin reference object to the other servlet and don't close it. Though most will probably call this bad development practice (e.g. leaving connections open while jumping around Servlets). If so, I like to here the "best practice" approach.
    bRi

  • Passing Session info between servlets

    We are running WebLogic 5.1, sp 4 and Apache 1.3 on Solaris 2.6 and we are
              successfully proxying requests to the server. But we are unable to pass
              session information between servlets. We are NOT using URL encoding. We are
              instead using cookies. We believe our configuration is correct because the
              BEA example session servlet works. Does anyone have any recommendations or
              suggestions?
              Thank you,
              Jorge
              Jorge A. Martin
              Systems Analyst
              The Kinetic Group
              1950 Stemmons Freeway, Suite 3040
              Dallas, Texas 75207
              

    This is a basic misunderstanding of how Java Works:
    String name +r = request.getParameter(name +r);1) You can't use a + on the left part of an assignment operation - it must be a plain variable reference. This isn't like JavaScript where you have an eval(...) capability.
    2) Your Strings are being defined inside the For Loop, which means they will leave scope once the loop ends and you won't be able to refer to them anymore.
    3) Is there already a String value named 'name' which you are using in getParameters(name+r)? You should probably use getParameter("name"+r) instead.
    What you want to do is either put the values in an array so they are easy to access:
    String name[] = new String[value1];Then loop through the parameters to assign values:
    for(int r = 0; r< value1; r++) { //Start at 0 to value1-1 because arrays are 0 based.
      String nameParam = "name"+ (r+1);
      name[r] = request.getParameter(nameParam);Now I can access the names in order:
    name1 via name[0]
    name2 via name[1]
    name3 via name[2]
    etc...Before going any further I would stop working on Servlets and go back to some good Basic Java Tutorials and books until you get a better grasp of how the language works.

  • DNS timeout and Name Server timeout between two DC's

    Hi All
    My clients have a brand new domain built for them, with two domain controllers at separate sites, and one site is having some issues.
    At one site (where DC2 is hosted), all users are having 5-10 minute log on delays - once in everything is running without issues. Site where DC1 is has zero issues - they run smoothly, get a nice quick login etc. All users are using redirected folders and
    all have the same GPO's applying to them.
    DC1 also has periodic issues communicating with DC2 - nslookup using DC2 gives "DNS request timed out. timeout was 2 seconds" on external AND internal queries, but then 5 minutes later will resolve perfectly. During the "DNS time out"
    period, trying to resolve DC2 as a Name Server also gives the error "A timeout occurred during validation".
    Not sure if these (slow logon and DNS/NameServer time out issues) issues are related but I am at a loss.
    Reverse lookup zones are fully created and populated, entries aren't randomly deleting themselves. Replication between both DC's is working fine, no errors and SYSVOL/NETLOGON are sharing fine from both DC's. Occassionally restarting the DNS server services
    on both servers will kick them back into talking - but only for around 30sec-1minute, after that they communicate periodically without problems and spend the rest of the time not resolving.
    Any ideas floating around, as I am at a loss here. We haven't been able to join more than a few test users to DC2's site for fear of them all calling every day due to long log on periods.

    Hi,
    Are you pointing each DC/DNS to the other one as primary dns in tcp/ip properties? Can you post a dcdiag /a /f:dcdiag.log from the DC2?
    Any warnings/errors in Application log on the client(s) facing issues after they get logged in ? Can you also confirm that users from site with DC2 are having DC at : set | find /I "LOGONSERVER" output?
    Hope it helps.
    Regards,
    Calin
    Hi Calin
    The DC's were originally pointing at each other for the primary but others prior to posting here suggested that was not best practice anymore and said they should be the other way around - in any case, either direction doesn't resolve the issues.
    The only application error the users are getting is :
    The winlogon notification subscriber <SessionEnv> was unavailable to handle a notification event.
    The winlogon notification subscriber <GPClient> took 84 second(s) to handle the notification event (Logon)
    DCDIAG of DC2 :
    Directory Server Diagnosis
    Performing initial setup:
    Trying to find home server...
    Home Server = CAB1-DC-V01
    * Identified AD Forest.
    Done gathering initial info.
    Doing initial required tests
    Testing server: AUS\NDC1-DC-V01
    Starting test: Connectivity
    ......................... NDC1-DC-V01 passed test Connectivity
    Testing server: AUS\CAB1-DC-V01
    Starting test: Connectivity
    ......................... CAB1-DC-V01 passed test Connectivity
    Doing primary tests
    Testing server: AUS\NDC1-DC-V01
    Starting test: Advertising
    ......................... NDC1-DC-V01 passed test Advertising
    Starting test: FrsEvent
    ......................... NDC1-DC-V01 passed test FrsEvent
    Starting test: DFSREvent
    ......................... NDC1-DC-V01 passed test DFSREvent
    Starting test: SysVolCheck
    ......................... NDC1-DC-V01 passed test SysVolCheck
    Starting test: KccEvent
    ......................... NDC1-DC-V01 passed test KccEvent
    Starting test: KnowsOfRoleHolders
    ......................... NDC1-DC-V01 passed test KnowsOfRoleHolders
    Starting test: MachineAccount
    ......................... NDC1-DC-V01 passed test MachineAccount
    Starting test: NCSecDesc
    ......................... NDC1-DC-V01 passed test NCSecDesc
    Starting test: NetLogons
    ......................... NDC1-DC-V01 passed test NetLogons
    Starting test: ObjectsReplicated
    ......................... NDC1-DC-V01 passed test ObjectsReplicated
    Starting test: Replications
    ......................... NDC1-DC-V01 passed test Replications
    Starting test: RidManager
    ......................... NDC1-DC-V01 passed test RidManager
    Starting test: Services
    ......................... NDC1-DC-V01 passed test Services
    Starting test: SystemLog
    A warning event occurred. EventID: 0x80000109
    Time Generated: 12/17/2014 08:25:05
    Event String:
    A pointer device did not report a valid unit of angular measurement.
    A warning event occurred. EventID: 0x80000101
    Time Generated: 12/17/2014 08:25:05
    Event String:
    A pointer device reported a bad angular physical range.
    A warning event occurred. EventID: 0x80000102
    Time Generated: 12/17/2014 08:25:05
    Event String:
    A pointer device reported a bad angular logical range.
    A warning event occurred. EventID: 0x80000109
    Time Generated: 12/17/2014 08:25:06
    Event String:
    A pointer device did not report a valid unit of angular measurement.
    A warning event occurred. EventID: 0x80000101
    Time Generated: 12/17/2014 08:25:06
    Event String:
    A pointer device reported a bad angular physical range.
    A warning event occurred. EventID: 0x80000102
    Time Generated: 12/17/2014 08:25:06
    Event String:
    A pointer device reported a bad angular logical range.
    A warning event occurred. EventID: 0x80000109
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device did not report a valid unit of angular measurement.
    A warning event occurred. EventID: 0x80000101
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular physical range.
    A warning event occurred. EventID: 0x80000102
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular logical range.
    A warning event occurred. EventID: 0x80000109
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device did not report a valid unit of angular measurement.
    A warning event occurred. EventID: 0x80000101
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular physical range.
    A warning event occurred. EventID: 0x80000102
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular logical range.
    A warning event occurred. EventID: 0x80000109
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device did not report a valid unit of angular measurement.
    A warning event occurred. EventID: 0x80000101
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular physical range.
    A warning event occurred. EventID: 0x80000102
    Time Generated: 12/17/2014 08:47:55
    Event String:
    A pointer device reported a bad angular logical range.
    ......................... NDC1-DC-V01 failed test SystemLog
    Starting test: VerifyReferences
    ......................... NDC1-DC-V01 passed test VerifyReferences
    Testing server: AUS\CAB1-DC-V01
    Starting test: Advertising
    ......................... CAB1-DC-V01 passed test Advertising
    Starting test: FrsEvent
    ......................... CAB1-DC-V01 passed test FrsEvent
    Starting test: DFSREvent
    There are warning or error events within the last 24 hours after the
    SYSVOL has been shared. Failing SYSVOL replication problems may cause
    Group Policy problems.
    ......................... CAB1-DC-V01 passed test DFSREvent
    Starting test: SysVolCheck
    ......................... CAB1-DC-V01 passed test SysVolCheck
    Starting test: KccEvent
    ......................... CAB1-DC-V01 passed test KccEvent
    Starting test: KnowsOfRoleHolders
    ......................... CAB1-DC-V01 passed test KnowsOfRoleHolders
    Starting test: MachineAccount
    ......................... CAB1-DC-V01 passed test MachineAccount
    Starting test: NCSecDesc
    ......................... CAB1-DC-V01 passed test NCSecDesc
    Starting test: NetLogons
    ......................... CAB1-DC-V01 passed test NetLogons
    Starting test: ObjectsReplicated
    ......................... CAB1-DC-V01 passed test ObjectsReplicated
    Starting test: Replications
    ......................... CAB1-DC-V01 passed test Replications
    Starting test: RidManager
    ......................... CAB1-DC-V01 passed test RidManager
    Starting test: Services
    ......................... CAB1-DC-V01 passed test Services
    Starting test: SystemLog
    An error event occurred. EventID: 0x0000272C
    Time Generated: 12/17/2014 08:30:22
    Event String:
    DCOM was unable to communicate with the computer 139.130.4.4 using any of the configured protocols; requested by PID 1810 (C:\Windows\system32\dcdiag.exe).
    An error event occurred. EventID: 0x0000272C
    Time Generated: 12/17/2014 08:30:43
    Event String:
    DCOM was unable to communicate with the computer 203.50.2.71 using any of the configured protocols; requested by PID 1810 (C:\Windows\system32\dcdiag.exe).
    An error event occurred. EventID: 0x0000272C
    Time Generated: 12/17/2014 08:31:05
    Event String:
    DCOM was unable to communicate with the computer 8.8.4.4 using any of the configured protocols; requested by PID 1810 (C:\Windows\system32\dcdiag.exe).
    An error event occurred. EventID: 0x0000272C
    Time Generated: 12/17/2014 08:31:27
    Event String:
    DCOM was unable to communicate with the computer 8.8.8.8 using any of the configured protocols; requested by PID 1810 (C:\Windows\system32\dcdiag.exe).
    ......................... CAB1-DC-V01 failed test SystemLog
    Starting test: VerifyReferences
    ......................... CAB1-DC-V01 passed test VerifyReferences
    Running partition tests on : DomainDnsZones
    Starting test: CheckSDRefDom
    ......................... DomainDnsZones passed test CheckSDRefDom
    Starting test: CrossRefValidation
    ......................... DomainDnsZones passed test
    CrossRefValidation
    Running partition tests on : aus
    Starting test: CheckSDRefDom
    ......................... aus passed test CheckSDRefDom
    Starting test: CrossRefValidation
    ......................... aus passed test CrossRefValidation
    Running partition tests on : ForestDnsZones
    Starting test: CheckSDRefDom
    ......................... ForestDnsZones passed test CheckSDRefDom
    Starting test: CrossRefValidation
    ......................... ForestDnsZones passed test
    CrossRefValidation
    Running partition tests on : Schema
    Starting test: CheckSDRefDom
    ......................... Schema passed test CheckSDRefDom
    Starting test: CrossRefValidation
    ......................... Schema passed test CrossRefValidation
    Running partition tests on : Configuration
    Starting test: CheckSDRefDom
    ......................... Configuration passed test CheckSDRefDom
    Starting test: CrossRefValidation
    ......................... Configuration passed test CrossRefValidation
    Running enterprise tests on : swms.com
    Starting test: LocatorCheck
    ......................... swms.com passed test LocatorCheck
    Starting test: Intersite
    Doing intersite inbound replication test on site AUS:
    ......................... swms.com passed test Intersite
    SYSVOL is sharing OK, these errors are occurring when DC1 is performing backups and comes good a few seconds later)
    The DNS failures are not on the NIC of each server they are the forwarders for the server, not sure why they are failing as DNS lookup is running fine and the IP's are resolving correctly within the forwarders.
    set | find /I "LOGONSERVER"
    C:\Users\Christopher.McCartne>set | find /I "LOGONSERVER"
    LOGONSERVER=\\NDC1-DC-V01
    NDC1 = DC1
    CAB1 = DC2
    The users are logging onto NDC1 currently as I did switch around their DNS servers to have DC1 as their primary to test if this resolved the logon times. It didn't so I've switched them back and will re-run the check to see which server is the logonserver.

  • EJB 3.0 Stateful session bean shared between Servlet's

    Hello
    I have a bit of a noob question regarding Stateful sessions beans.
    I am wanting to know if there is a way that I can share an instance of a session bean between multiple HttpServlet instances?
    I am sending XML messages from a mobile J2ME application, there will be several http POST's made from the mobile client to the server. I would like these multiple POST's to be passed from the handling servlet instance to the same uniquely identified single stateful session bean instance (i can then @Remove the stateful bean when I have finished my several requests).
    I would greatly appreciate any tips anyone could give me.

    If not, your only option is to maintain the
    association yourself by creating a unique id for
    each
    conversation and storing that id along with the SFSB
    reference in the ServletContext. Then you'll
    need to pass the id in along with each invocation to
    retrieve the appropriate SFSB reference.Thanks for your reply.
    Will I always be presented with the same ServletContext instance? Even if the time between requests might be many minutes? Where can I learn more about how to use the ServletContext?
    Thanks!

  • What's the best way to share JE environments between servlets?

    Hi, I'm happily serving requests for the same webapp (so single servlet) which uses multiple JE environments. In my case I have an environment for each db, one of these environments is a login details only db. Things work great, three questions though:
    1. Right now I'm keeping environment/entity store references in global vars (everything below entity store, views etc. is created and discarded for each request), is there a better way?
    2. When I want to add a new app (so additional servlet) - how can I make sure the login environment is shared across servlets, to take advantage of shared cache etc?
    3. As indexes are thread safe, is it considered best practice to store index refs. in global vars. and have each incoming thread (in a servlet) share these vars. or should each request build the object refs. it uses and discard accordingly?
    Hoping the above makes sense.
    PhilQ.

    Yes, EntityIndex objects are also thread-safe. Really only EntityCursor objects are not.
    The entity objects themselves are not owned by JE. You will have problems if you have multiple threads changing them concurrently (if one thread is changing an entity object's properties and another thread is storing it, for example). However, it is up to you if you want to share entity objects between threads; there is nothing wrong with that, since there is no interaction with JE. But your app will need to enforce thread safety, perhaps by using them only in a read-only fashion, for example.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • The lease timeout between avaiability group and the Windows Server Failover Cluster has expired

    Hi,
    I am having some issues where I get a lease timeout from time to time.  I have a Windows 2012 Failover Cluster with 2 nodes and 2 SQL 2012 Always-on Availability Groups.  Both nodes
    are a physical machines and each node is the primary for an AG. 
    From what I understand if
    the HealhCheckTimeout
    is exceeded without the signal exchange the lease is declared 'expired' and the SQL Server resource dll reports that the SQL Server availability group no longer 'looks alive' to the Windows cluster manager.  Here are the properties I have setup
    which are the default settings:
    LeaseTimeout - 20000
    HealthCheckTimeout - 30000
    VerboseLoging - 0>
    FailureConditionLevel – 3
    Here are the events that occur in the Application Event Viewer:
    Event ID 19407:
    The lease between availability group 'AG_NAME' and the Windows Server Failover Cluster has expired. A connectivity issue occurred between the instance of SQL Server and the Windows Server Failover
    Cluster. To determine whether the availability group is failing over correctly, check the corresponding availability group resource in the Windows Server Failover Cluster.
    Event ID 35285:
    The recovery LSN (120881:37533:1) was identified for the database with ID 32. This is an informational message only. No user action is required.
    SQl server logs are too long to post in this box but I can send them if you request.
    The AG is setup to failover automatically but it did not failover.  I am trying to figure out why the lease timed out.  Thanks.

    From what I've been able to find out, this is due to an issue with the procedure sp_server_diagnostics.  It sounds like the cluster is expecting this procedure to regularly log good status "Clean" in the log files, but the procedure is designed not
    to flood the logs with "Clean" messages, so only reports changes, and does not make an entry when the last status was "Clean" and the current status is "Clean".  The result is that the cluster looks to be unresponsive.  However, once it initiates
    the failover, the primary machine responds, since it was never really down, and the failover operation stops.   
    The end result is that there really never is a failover, but the database becomes unavailable for  a few minutes while this is resolved.
    I'm going to try setting the cluster's failure condition level to 2 (instead of 3) and see if that prevents the down time.
    blogs.msdn.com/b/sql_pfe_blog/archive/2013/04/08/sql-2012-alwayson-availability-groups-automatic-failover-doesn-t-occur-or-does-it-a-look-at-the-logs.aspx

  • Differences between servlet and backing bean

    Could anyone please tell me whether everywhere that servlet can be used, backing bean and JSF can be used too? Are JSF and backing beans the new alternatives for JSP and servlets? please clarify the relations between these concepts for me.
    Thanks
    Laura

    Laura_Jlover wrote:
    Thank you. You mean backing beans can do every thing that servlets can do? Yes.
    JSF pages can work with servlets? Strictly speaking, every JSF page gets passed through the FacesServlet which does all the task. The lifecycle, creating the FacesContext, putting the request parameters in backing beans, rendering the response, etcetera.
    what are the advantages of servlet and the advantages of backing beans? what's the disadvantages? In general, which one is better?In context of JSF, you should be using backing beans, not Servlets. There is nothing what a Servlet can offer you as an advantage in the JSF context. It is simply not an option/alternative. You can't even call a Servlet (directly) using a JSF h:form. You, however, can access backing beans in any JSP or Servlet outside the JSF context.
    Just carefully read the JSF specification or buy a JSF book and the picture will be clear.
    JSF spec: [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html].
    JSF book: [http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400].

  • How to pass objects between servlet services

    I wanted to pass an object from one service to another service and that object must be visible only for these two services. I don't want to use session.setAttribute or session.getAttribute to do this. When I use request.setAttribute and request.getAttribute methods not helping me to do this. Is there a way to do this?
    Between, how these request.setAttribute and request.getAttribute methods useful?
    regds
    -raju

    Actually, I set attribute in one of the service
    methods. Within that service method a form will be
    there. After pressing submit button in that form, the
    other service will be called. Does it mean that both
    the services are not in the same request scope, even
    if they are in the same servlet?They are on different request scopes. Each time the user clicks a link, they make a request to the server. The server processes the request creates a response and send that response back to the client. Once the response it sent (and finished being sent) the request is done with, and anything is request scope goes out of scope. When the user clicks the submit button, a NEW request (and request scope) is made to handle that ...
    Your best bet is to use a session here. It is the easiest way to maintain state between requests. That is what the session is designed for.

  • How to exchange information(parameters) between servlets & jsps

    with an examle if possible.

    Hi
    Exchanging parameters/objects between JSP and Servlets is done by creating an Object and placing it in the ServletContext , User Session or the Request depending on whether the Object requires Application Wide scope, Session Scope or Request Scope respectively.
    If the object is created in the Servlet then it can shared by placing it in either Context, Session or Request through the setAttribute method and similarly retrieved through the getAttribute method.
    For JSP use the <jsp:useBean> tag to retrieve/create the Object (bean).
    For eaxmples see the following Links:
    http://java.sun.com/docs/books/tutorial/servlets/communication/attributes.html
    http://developer.java.sun.com/developer/onlineTraining/JSPIntro/contents.html#JSPIntro11
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

Maybe you are looking for