Same thread for ServletRequestListener and Servlet request?

Does ServletRequestListener methods execute in the same thread that the Servlet.service method?
I wonder if the answer is always 'yes'. And I hope it will. I've been reading the specs but found nothing related.
I think it's an important issue because this way you can take advantage and share data between listener and request in a ThreadLocal object for a request.
Can anyone help me?
Thanks in advance.
Message was edited by:
pucherico

I've checked it up for Tomcat (version 5). I can say it is true for Tomcat: For a given request, the service method and request listeners are executed in the same thread. But who can say this is true for all Application Servers....! and who can say it will be true for future version of Tomcat!
Because of the lack in the spec (I haven't found any comment on this subject) I am still not sure if I can rely on this property!

Similar Messages

  • Which tutorials may you suggest for JDBC and servlets?

    Hello, i would to learn about JDBC and servlets.
    May you please suggest me a good tutorial(e.g.post me a link) in order to study for JDBC and servlets?
    e.g. How to make a servlet etc.
    Thanks, in advance!

    I agree with PhHein, it's best to learn one technology and then the other. (Just my two cents, but start with JDBC from a simple standalone application, then when that is working, try to tackle Servlets, since you will need to also learn how to get them working in a container like Tomcat).
    Here is a tutorial that has both concepts in it at the same time. Site is down now, but is usually up. http://www.roseindia.net/jdbc/jdbcconnectivity.shtml
    Also, you will eventually want to download a J2EE container such as Tomcat or Jboss.
    - Saish

  • Same SLD for dvlpmnt and prod servers??

    Is it right to have same SLD for Development and Production servers??

    Hello,
    Is it right to have same SLD for Development and Production servers??
    The answer actually depends on your requirements, you can refer to this thread for more information (see the reply of Bhavesh):
    Re: Difference Between Central SLD & Local SLD
    The approach we've taken is more like what Barry suggested in the thread.
    Hope this helps,
    Mark

  • Lick on the icon in appstore which allows to gift an app or copy link , post to facebook etc does not open it stucks.Also same case for itunes and moreover when I play music in iTunes it

    Itunes and appstore problems:
    i have an iPhone 5 whenever I try to click on the icon in appstore which allows to gift an app or copy link , post to facebook etc does not open it stucks.Also same case for itunes and moreover when I play music in iTunes it stops ..start again stops and start again ..stops and does not play..so I  am unable to make gift purchase and listen to the songs..are these bugs or what? help

    ps when syncing it jumps through steps 1 - 4 real fast, i seem to remeber iphone showing the number of tracks transferring and names, but i see nothing? then it sits on 5 saying "waiting for changes to be applied"

  • Same BS for sender and receiver comms

    Hey pals,
    can we use same BS for sender and reciever communication channels?!!
    -Esha

    Hello Esha,
    You have to you 2 BS
    One from where u hav to pick the file and the other one where you want to post it.
    what is a Business system? What is use of creating it
    Business System have an entry in the SLD and Buiness Service do not.
    Business Systems are used when you are sending data to and from an R3 system and can be of ABAP, JAVA and Third Party Types.
    Business System is a logical representation of a Technical System.
    Business Service is a abstract representation of a System. For instance, www.google.com have a several system working together and IPs of this machines change eventually. When we use a Business Services like google we reference a computer that we don't know the phisical implementation.
    Thanks,
    Satya
    Edited by: SATYA KUMAR AKKARABOYANA on May 15, 2008 5:51 PM

  • Different segment in same document for leading and non-leading ledger

    Hi,
    Is it possible to have different segments derived in the same document for Leading and Non-leading ledgers.
    Is there an exit where we can substitute the segment originally derived so as to update only in one particular ledger
    Please suggest.

    Thanks Alex for your response.
    But would it be possible to update the segment only in one ledger, the other one carrying the default values coming from profit center?

  • Bug or feature: TableView.EditEvent - same type for value and row?

    Just noticed (normally I don't care overly much about generics, they are my natural enemies : -) that the return type for both cell and row data is the same:
    class EditEvent<T> {
        T getNewValue()
        T getOldValue()
        T getRowValue()
    }old/new value is fine, but typically the row has another type, which most probably is completely unrelated, as f.i. in
    TableView<Person> tableView = new TableView<Person>(persons);
    TableColumn<String> firstName = new TableColumn<String>("First Name");
    firstName.setProperty("firstName");
    EventHandler<EditEvent<String>> nameEditHandler = new EventHandler<TableView.EditEvent<String>>() {
                @Override
                public void handle(TableView.EditEvent<String> e) {
    // compile error
                    Person p = (Person)e.getRowValue();
                    String newValue = (String)e.getNewValue();
                    p.setFirstName(newValue);
    firstNameCol.setOnEditCommit(nameEditHandler);The compile error is due to the event requiring the same type for row and cell. Obviously, can remove all type parameters - but how to solve cleanly without getting unchecked/rawtype warnings?
    Thanks
    Jeanette

    Good morning, Jonathan (my day time : -)
    If you mean that big issue where you threaten (and locally actually already did) to remove all the niceties of auto-magic column binding via setting property names - yeah, I've read it, partly unhappily. But that's another story.
    to create two separate EditEvents - one for row edits and one for cell edits.
    hmm .. have been expecting something along the lines of
    EditEvent<R, C> {
         R getRowValue();
         C getOldValue();
         C getNewValue();
    // used in
    TableView<R>
    TableColumn<C>
    // for row edits
    R == C
    getRowValue() == getOldValue()Musing a bit longer, the event could be streamlined a bit - remove all the convenience sugar: the receiver has to know the exact details of grabbing the data anyway in order to be able to change it (in the current workflow, it's not necessarily the way to go) so old/row is redundant
    EditEvent<S> {
       <S> getEditValue();
    }Cheers
    Jeanette

  • I am currently receiving error message "Microsoft Excel quit unexpectedly".  Any suggestions on how to fix?  I notice same message for powerpoint and word.

    I am currently receiving error message "Microsoft Excel quit unexpectedly".  Any suggestions on how to fix?  I notice same message for powerpoint and word.

    That generally has to do with data corruption.   Is your data backed up?
    What version of Office do you have?
    What Mac operating system?

  • How is it possible to make sure that LV uses the same thread for several threadsafe DLL calls?

    Hello,
    i have a thread safe DLL and most functions are called from serveral threads from the LV apllication without problems.
    In case of an error i have to call an error handler function in this DLL (like WinAPI: GetLastError()) from the same thread which has called the function that failed before.
    I can't use the user interface execution because some functions need a long execution time and i don't want to balk the user interface.
    All other executions than the user interface execution have more than one thread and in most cases the DLL function calls were executed from different threads - so the error handling doesn't work...
    Any idea?
    Thanks for your help!

    Hmmm....
    How about wrapping all of your dll calls in a single VI (or an Action Engine ) and make sure the VI's thread is NOT set for "Same as caller".
    "Threadconfig.vi" (sp?) will also let you dictate the number of threads associated with an execution system. Set your target thread for "1".
    Not sure on the above.
    Please correct me if this is wrong!
    Ben
    Message Edited by Ben on 07-19-2007 08:26 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Do I need separate thread for readObject() and writeObject()?

    Somehow, my Client/Server code behaves badly. A click on
    the GUI did not always send a message to the Server as
    intented (using writeObject(String)). Most of the times the
    message was sent. But not always.The Client (GUI) also uses
    readObject() to receive messages from the Server. Is this
    problem associated with the fact that my readObject() and
    writeObject() from the GUI are on the same thread? Need
    some help.
    Thank you.

    "and I don't do GUIs"
    First, let me say, as a Newbie, how good it feels to
    even be able to follow this.
    But I honestly don't understand the above quoted
    comment from jverd.
    How does somebody do Java and not do GUI stuff?
    It almost sounds like a plumber saying "I don't do
    sinks."
    Even from my novice perspective, Java seems slow and
    sucks copious amounts of memory.
    Is there any practical use for Java if you're not
    doing GUIs?In my experience, it's often the GUIs that make it slow. Apparently things are better if you use Swing carefully, or use SWT or maybe AWT.
    As far as I can tell, the vast majority of Java code that's out there is backend stuff. Not that I've done a formal survey. I can tell you from personal experience however, that there is a LOT of stuff that Java is good for besides GUIs (business logic behind websites being one of its major areas of use), and if you write reasonably good code, it will be very fast.
    Your analogy might be better couched as "an auto mechanic saying 'I don't do body work.'"

  • Can I use same account for android and PC and how ...

    Can I use same account for android tablet and PC and how do I link both?

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

  • How to use same jsp for edit and add form

    Hi,
    I would like to use the same .jsp file for edit and add. I just want to change a few controls based on edit/add mode. How do I configure this in the jsp?

    In the environment I currently have access to do not have similar setup.
    Let say you setup the DFF1 default value to $HEADER.customer_name, the name of the DFF is CUSTOMER_NAME, description can be anything.
    In DFF2, default value should be a SQL, where you can reference the DFF1. For example, SELECT DECODE($FLEX.CUSTOMER_NAME, 'ABC', 1, 'DEF', 2, NULL) FROM dual
    In this case, you can reference the DFF1.

  • How to set default encoding and charsets for jsp and servlets.

    Hi,
    Is there any possibility to set default encoding or charset for jsps and servlest (for both request and response)?
    For example in Weblogic such parameters can be set in weblogic specific configuration files (weblogic.xml).
    Thanks in advance.

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • Load balancing for JSPs and servlets

    Hi:
              I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              cluster. This provides round robin load balancing just fine. Will it
              provide weight based load balancing if I set 'weblogic.system.weight'
              differently on each server, or is that not relevant for clustering JSPs
              and servlets?
              Sincerely,
              Ashish
              

    Currently the plugins ( for NES, IIS and Apache) just use the round robin
              algorithm. the property
              weblogic.system.weight is used only be weblogic's replica aware clusterable
              RMI/EJB stubs.
              To use this property for your JSP/Servlet load balancing you have to use
              weblogic server as proxy fron-ending your weblogic cluster.
              --Viresh Garg
              Ashish Vimal wrote:
              > Hi:
              > I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              > cluster. This provides round robin load balancing just fine. Will it
              > provide weight based load balancing if I set 'weblogic.system.weight'
              > differently on each server, or is that not relevant for clustering JSPs
              > and servlets?
              > Sincerely,
              > Ashish
              

  • Same Algo for Key and Cipher recommended?

    Hi,
    Can I use different algos for the key i want to use for a cipher and the cipher itself or
    is it mandatory to use the same algo for both?
    I don't found any answer for this simple question.
    regards,
    Olek

    Olek wrote:
    Hi,
    No - but who said that this is complete sensless?If it made sense then there would be no need to create a SecretKey object for a particular algorithm. AES requires a 128 bit or 192 bit or 256 bit key so how can a 56 bit DES key be used with AES? Simple logic.
    If using the JCE you had tried to use a DES key in AES then you would quickly have found out that an exception gets thrown in the init() method. A very simple 3 line test harness. This would have taken you no more than 5 minutes to cobble together. Much quicker than asking in this forum but ...
    The Key and the Cipher are two independent things for a non
    high skilled crypto veteran.What logic makes Key and Cipher independent? 1 minute of thought after 15 minutes with the most elementary cryptography tutorial would make you understand this.
    I wouldn't aks if this is clear like 1 + 1 = 2 - is this clear!? ;)Obvious it is not clear but I do know that insecure and faulty cryptography results from people not studying cryptography. I do not mean that one must know all about all aspect of cryptography but one should have done significant background reading, especially with regards to the type of cryptography one is using.
    How much background study have you done Olek?
    >
    Olek

Maybe you are looking for

  • Itunes 11.4 on Windows 7 crashes within 10 seconds of opening

    When I open itunes after a few seconds (regardless of whether or not I try to interact with iTunes or I just let it be), a popup says "iTunes has stopped working ... Windows will close the program and notify you if a solution is available." I was exp

  • I try to put mi Ipod touch in dfu mode but it doesn't work

    My Ipod touch doesnt respond, and i tried o put it in dfu mode to restore it like the technical support said to do it, and nothing happened..

  • Getting a "Class not registered" error in VC++

    I'm after a bit of advice concerning a system that I'm supporting. The system is an Oracle 7.3.4 DB with Oracle Objects for Ole v2.2, and the Microsoft ODBC driver for Oracle, with the application consisting of a VB(ODBC) frontend and a VC++ DLL(OO4O

  • Using UML290 with 4G Router

    Has anyone tried using their UML290 with a 4G router? You don't use VZAccess Manager with a router. I'm wondering if this would solve the problems everyone seems to be having. I know CradlePoint has a beta 4G firmware update for their MBR1000 router

  • Fireworks CS3 and Win 7

    I just upgraded to Win7 and everything in Fireworks CS3 seems to be working except the brush tool. When trying to paint the cursor is irratic, moves slowing across the picture and I can't control the speed of the brush tool. Is anybody else having th