About sendRedirect method usage

Hello.
I have a problem with sendRedirect method.
So. I have page with my_auth portlet.
When this form submits, i check the user information from db and must redirect it to special pages.
For this purpose i use HttpPortletRendererUtil.sendRedirect() method.
Code:
if (request.getParameter(fSubmit) != null)
if ( o.Auth_user(vLogin,vPassword) ) {
session.putValue("sUser_id" , new Integer(o.getUser_id()) );
Forward_URL fu = new Forward_URL();
HttpPortletRendererUtil.sendRedirect(pr, fu.replace(pr.getPageURL(),"_pageid=133","_pageid=84"));
But this not redirect me to page with _pageid=84.
fu.replace() method works propertly. and new url is correct: http://myhost:port/page?_pageid=84&_dad=dad1&_schema=shema1
If I make link with this and manualy click on it all works fine.
Can anyone telll me that i do wrong?
Best regards, brom.

hi,
If you make a call to do a redirect from within a JSP portlet, it WILL redirect to the specified URL - BUT the new URL's contents will be rendered inside the calling portlet. What you are doing is redirecting a specific portlet to the new URL, and NOT the page it resides in.
In the current release, JPDK apis do not have control on the page flow, or on the page the calling portlet resides.
For your functionality, you would need to use one of the following methods -
1) hide and show portlets depending on the logic when you wish to render the contents
of the new url, and correspondingly render that specific portlet and do not render the
others. You would have the same affect of this URL taking up all of the page.
2) call any of the showDetails or the customization page based on the results of the logic
and submit back to the main page. Something like that -
-Ananth

Similar Messages

  • A question about a method with generic bounded type parameter

    Hello everybody,
    Sorry, if I ask a question which seems basic, but
    I'm new to generic types. My problem is about a method
    with a bounded type parameter. Consider the following
    situation:
    abstract class A{     }
    class B extends A{     }
    abstract class C
         public abstract <T extends A>  T  someMethod();
    public class Test extends C
         public <T extends A>  T  someMethod()
              return new B();
    }What I want to do inside the method someMethod in the class Test, is to
    return an instance of the class B.
    Normally, I'm supposed to be able to do that, because an instance of
    B is also an instance of A (because B extends A).
    However I cannot compile this program, and here is the error message:
    Test.java:16: incompatible types
    found   : B
    required: T
                    return new B();
                           ^
    1 errorany idea?
    many thanks,

    Hello again,
    First of all, thank you very much for all the answers. After I posted the comment, I worked on the program
    and I understood that in fact, as spoon_ says the only returned value can be null.
    I'm agree that I asked you a very strange (and a bit stupid) question. Actually, during recent months,
    I have been working with cryptography API Core in Java. I understood that there are classes and
    interfaces for defining keys and key factories specification, such as KeySpec (interface) and
    KeyFactorySpi (abstract class). I wanted to have some experience with these classes in order to
    understand them better. So I created a class implementing the interface KeySpec, following by a
    corresponding Key subclass (with some XOR algorithm that I defined myself) and everything was
    compiled (JDK 1.6) and worked perfectly. Except that, when I wanted to implement a factory spi
    for my classes, I saw for the first time this strange method header:
    protected abstract <T extends KeySpec> T engineGetKeySpec
    (Key key, Class<T> keySpec) throws InvalidKeySpecExceptionThat's why yesterday, I gave you a similar example with the classes A, B, ...
    in order to not to open a complicated security discussion but just to explain the ambiguous
    part for me, that is, the use of T generic parameter.
    The abstract class KeyFactorySpi was defined by Sun Microsystem, in order to give to security
    providers, the possibility to implement cryptography services and algorithms according to a given
    RFC (or whatever technical document). The methods in this class are invoked inside the
    KeyFactory class (If you have installed the JDK sources provided by Sun, You can
    verify this, by looking the source code of the KeyFactory class.) So here the T parameter is a
    key specification, that is, a class that implements the interface KeySpec and this class is often
    defined by the provider and not Sun.
    stefan.schulz wrote:
    >
    If you define the method to return some bound T that extends A, you cannot
    return a B, because T would be declared externally at invocation time.
    The definition of T as is does not make sense at all.>
    He is absolutely right about that, but the problem is, as I said, here we are
    talking about the implementation and not the invocation. The implementation is done
    by the provider whereas the invocation is done by Sun in the class KeyFactory.
    So there are completely separated.
    Therefore I wonder, how a provider can finally impelment this method??
    Besides, dannyyates wrote
    >
    Find whoever wrote the signature and shoot them. Then rewrite their code.
    Actually, before you shoot them, ask them what they were trying to achieve that
    is different from my first suggestion!
    >
    As I said, I didn't choose this method header and I'm completely agree
    with your suggestion, the following method header will do the job very well
    protected abstract KeySpec engineGetKeySpec (Key key, KeySpec key_spec)
    throws InvalidKeySpecException and personally I don't see any interest in using a generic bounded parameter T
    in this method header definition.
    Once agin, thanks a lot for the answers.

  • Zen Sleek Photo Freezes/Locks Up after about 5 minutes usage (need to drain battery to recov

    Hi,
    My 20G Zen Sleek Photo has just recently transformed itself into a useless brick.
    No matter what I try and do, it always ends up freezing after about 5 minutes usage. When you force a reset it does unlock but when it comes back on it sticks on the Creative "copyright" start up screen.
    I've reformatted and re-installed the firmware several times but with the same result.
    font face="comic sans ms,sans-serif">
    The only time it totally unlocks is when you either:
    () let the battery fully drain and then recharge it or
    (2) you disconnect the battery lead and then press the On/Off switch for several minutes.
    I've looked everywhere for a solution/reason but nothing. You find plenty of people with the same problem but no answers. Surely someone knows how to fix the problem
    Is it a faulty battery (unlikely because mine charges up fine and holds it charge well)
    Is it the hard dri've (very unlikely since the player can start up correctly [given the above recovery procedure] and play tracks within the 5-0 minutes you have available)
    Is it the firmware (I doubt it, I can't see what the firmware's got to do with a delayed lock up, having worked fine up to that point)
    Is it the motherboard (maybe....., to my mind it points to a component failure that allows an electric charge to build up and not dissipate, the only way to discharge it is to short the battery pins [with, I hasten to add, the battery removed!])
    font face="comic sans ms,sans-serif">
    Has anyone within the Creative community successfully solved this problem Has anyone received a decent answer from Creative
    I find it staggering that the guys at Creative have washed their hands of this problem. They, after all, are the most likely people to identify the problem - only they have a schematic of the motherboard that would allow them to investigate and locate the problem.
    For the record the firmware I'm using is v .0.0.
    Any guidance would be much appreciated,
    Victor

    Is there really no one with an answer to this problem or have I overlooked a previous post that explained the fault.
    BR
    Victor

  • I DO NOT want to send anonymous reports to Mozilla about my computer usage and so on. How do I get rid of the question that comes up every time I open Fiorfox up?

    I DO NOT want to send anonymous reports to Mozilla about my computer usage and so on. How do I get rid of the question that comes up every time I open Fiorfox up?

    See:
    * https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel
    * go to Firefox/Tools-Option-Advance and uncheck submit performance data

  • Difference between narrow() method usage and simple class cast for EJB

    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?
    P.S. I'm working with WL 6.1 sp2
    Any help would be appreciated.
    Thanks in advance,
    Orly

    [email protected] (Orly) writes:
    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?(1) is mandated by the spec. It is required because CORBA systems may
    not have sufficient type information available to do a simple case.
    P.S. I'm working with WL 6.1 sp2 You should always use PRO.narrow()
    andy

  • I have a recently acquired iPhone 4. Is it true if I am using PhotoStream to upload photos to my PC via iCloud, photos are only pushed when wifi is available?  This means I don't have to worry about extra data usage, right? Thank you.

    I have a recently acquired an iPhone 4. Is it true if I am using PhotoStream to upload photos to my PC via iCloud, photos are only pushed when wifi is available?  This means I don't have to worry about extra data usage, right?
    Thank you.

    Correct.
    On an iOS device, new photos you take will be automatically uploaded to your photo stream when you leave the Camera app and are connected to Wi-Fi. Note: My Photo Stream does not push photos over cellular connections.

  • Where can I find the detail document about certain method of a class?????

    Moved to correct forum by moderator
    Hi everyone,
    where can I find the detail document about certain method of a class?????
    e.g.  the class CL_GUI_ALV_GRID , when I was going through the class and looking
    at the methods, sometimes the method description is just like the method name,
    and I cannot know what the method does. 
      so, I am wondering  where I can find the detail information about the class???
    Edited by: Matt on Dec 4, 2008 11:55 AM

    Hi,
    Most of the times the SAP itself provides the documentaion of the CLASS. when you click on the METHOD name the METHOD DOCUMENTATION button you can see on the application tool bar.
    more over the names of the methods suggest what it is going to do.
    SET_ATTRIBUTE( sets the attribute)
    GET_ATTRIBUTE( gets the attribute value that is provided to the method)
    GET_CHILDNODE
    BIND_TABLE
    etc
    like this
    regards
    Ramchander Rao.K

  • About calling method with arguments

    Hi,
    I have a problem about calling method using reflection. my method is like follows:
    public myMethod(Integer var1, MyObject mobj) {
    I've tried to call the method using the following code,
    Class[] parameterTypes = new Class[] {Integer.class, MyObject.class};
    Object[] arguments = new Object[] {new Integer(2), mobj};
    Method met=cl.getMethod("myMethod", parameterTypes);
    But the in the last line NoSuchMethodException is thrown.
    How can I send the reference of MyObject to myMethod()?
    Thanx
    rony

    Should work ok:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Test {
         static class MyObject {}
         public static void main(String[] args) throws Exception {
              Class c = Test.class;
              Class[] parameterTypes = new Class[] {Integer.class, MyObject.class};                              
              try {
                   Object[] arguments = new Object[] {new Integer(2), new MyObject()};
                   Method met = c.getMethod("myMethod", parameterTypes);
                   met.invoke(new Test(), arguments);
              } catch (NoSuchMethodException e) {
                   System.out.println(e);
              } catch (IllegalAccessException e) {
                     System.out.println(e);
              } catch (InvocationTargetException e) {
                   System.out.println(e);
         public void myMethod(Integer var1, MyObject mobj) {
              System.out.println("myMethod");
    }

  • Which of the following are true about abstract methods in EJB 2.0

    Hi guys I'm beginner to EJB and i got some unanswered questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed in the EJB
    component's interface
    2.Abstract accessor/mutator methods are used to access and modify
    persistent state and relationship information for entity objects
    3.Abstract Accessor/Mutator methods do not throw exceptions
    4.The EJB developer must implement the Accessor/Mutator methods
    5.Abstract accessor methods may or may not be exposed in the EJB
    component's interface
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with other Entity
    components
    2.Local interfaces cannot be used for Stateless Session EJB
    3.Local interfaces can be a part of Object's persistent state
    4.Local interfaces have the same functionality as that of a
    stateless Session EJB
    3.Which of the following describe the <cmr-field> in a EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a <cmr-field>
    2.There is no <cmr-field> in EJB 2.0 descriptor
    3.It is used to represent one meaningful association between any
    pair of Entity EJBs, based on the business logic of the Application
    4.It provides a particular mapping from an object model to a
    relational database schema
    5.It allows the Local Entity interfaces to participate in
    relationships
    4.Which of the following are the advantages of using Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in Relationships
    2.The life cycle of Local Entity Interfaces is managed by EJB
    container, intelligently
    3.Local Entity Interfaces can be used in EJB QL Queries
    4.Local Entity Interfaces can be a part of the <cmp-field> but not
    <cmr-field>
    5.Which of the following are true about Local interfaces
    1.A local interface must be located in the same JVM to which the EJB
    component is deployed
    2.Local calls involve pass-by-reference.
    3.The objects that are passed as parameters in local interface
    method calls must be serializable.
    4.In general, the references that are passed across the local
    interface cannot be used outside of the immediate call chain and must
    never be stored as part of the state of another enterprise bean.
    6.Which of the following specifies the correct way for a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interface
    2. via Home interface
    3. Message driven bean can be accessed directly by the client
    4. both 1 & 2
    5. none of the above
    ------------------------------------------------------------------------7.Which of the following statements are true about message-driven
    bean Clients?
    ------------------------------------------------------------------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory objects
    They can create Topic and TopicConnectionFactory objects
    They can lookup the JNDI server and obtain the references for
    Queue and Topic and their connection Factories
    Only 1 and 2 above

    Hi guys I'm beginner to EJB and i got some unanswered
    questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods
    in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed
    d in the EJB
    component's interfacefalse
    2.Abstract accessor/mutator methods are used to
    access and modify
    persistent state and relationship information for
    entity objectstrue
    >
    3.Abstract Accessor/Mutator methods do not throw
    exceptionstrue
    >
    4.The EJB developer must implement the
    Accessor/Mutator methodsfalse
    5.Abstract accessor methods may or may not be exposed
    in the EJB
    component's interfacetrue
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with
    other Entity
    componentsfalse
    2.Local interfaces cannot be used for Stateless
    Session EJBfalse
    3.Local interfaces can be a part of Object's
    persistent statefalse
    4.Local interfaces have the same functionality as
    that of a
    stateless Session EJBtrue
    3.Which of the following describe the <cmr-field> in a
    EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a
    <cmr-field>true
    2.There is no <cmr-field> in EJB 2.0 descriptorfalse
    3.It is used to represent one meaningful association
    between any
    pair of Entity EJBs, based on the business logic of
    the Applicationtrue
    4.It provides a particular mapping from an object
    model to a
    relational database schematrue
    5.It allows the Local Entity interfaces to
    participate in
    relationshipstrue
    4.Which of the following are the advantages of using
    Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in
    Relationshipsis
    2.The life cycle of Local Entity Interfaces is
    managed by EJB
    container, intelligentlyis
    3.Local Entity Interfaces can be used in EJB QL
    Queriesnot
    4.Local Entity Interfaces can be a part of the
    <cmp-field> but not
    <cmr-field>not
    >
    >
    5.Which of the following are true about Local
    interfaces
    1.A local interface must be located in the same JVM
    M to which the EJB
    component is deployedtrue
    2.Local calls involve pass-by-reference.true
    3.The objects that are passed as parameters in local
    l interface
    method calls must be serializable.false
    4.In general, the references that are passed across
    s the local
    interface cannot be used outside of the immediate
    e call chain and must
    never be stored as part of the state of another
    r enterprise bean.true
    >
    6.Which of the following specifies the correct way for
    a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interfacefalse
    2. via Home interfacefalse
    3. Message driven bean can be accessed directly by
    the clientfalse
    4. both 1 & 2false
    5. none of the abovetrue.
    >
    ----------------7.Which of the following statements
    are true about message-driven
    bean Clients?
    ----------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can create Topic and TopicConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can lookup the JNDI server and obtain the
    references for
    Queue and Topic and their connection Factories
    true
    Only 1 and 2 abovefalse
    somebody correct me if i'm wrong

  • Hi, I did an apple account but they didn't asked me about payment methods and now when i need something from Appstore it is written: "this apple id has not yet been used in the iTunes Store" tap reviem. I tapped review and they are asking me to introduce,

    Hi I have created an apple Id but yhey didn't asked me about paymeny methods, and know when i need something from appstore it is written: This apple Id not yet been used in the iTunes Store, tap review....but when i tap review they ask me for a credit card without giving me the opption of ''NONE''. Can you help me?

    What kinda forum is this where nobody helps!
    I am waiting since so many days after leaving a thread and till nobody helped me with a reply.
    If it's a Google PlayStore forum many hundreds of people would have replied.
    Seeking a little help and nobody bothered to give it out to you, I am really annoyed.
    Still waiting for Help!

  • Misunderstanding about abstract methods

    I think my compiler just taught me something, and after reading the JLS I concluded that I had a misconception about abstract methods. However, if someone could confirm this I would feel more comfortable.
    I had defined a class structure like so:public abstract class Grandpa{
      public abstract void do();
    public abstract class Pa extends Grandpa {
      public void do(){
      // whatever
    public class Child extends Pa {
    }I got a compile error indicating that Child must implement do(). I had thought that since there was an implementation provided by Pa that Child didn't need to supply one, but I guess I was wrong. Right? :-)

    Nested where? Inside Pa? Other? Static?Inside Pa.
    It sounds like you're satisfied, but if you want to
    continue the discussion, I'll make the standard
    request. Come on, you know it, say it with me: Provide
    a small, complete, working (in that it doesn't
    compile) example that demonstrates this. :-)Yeah, that's exactly what I was working on for the bug report, but I can't get the compile error in my small example. Argh! I'll have to go back some time and build it up to match the other classes until I get the error, because I still get it consistently with the real thing. I have no idea what the key factor is, though - I've tried everything obvious and I don't have time to work through it right now.
    No prob. It's a pleasant break from arguing with UJ.
    :-)Glad I could offer you a distraction. :-) I'll post here again if I ever figure out what the deal is.

  • DateFormat parse method usage

    Hi all,
    I am using the following code to parse the date String object to Date Object -
    ======================================================================
    if(dateString == null || dateString.trim().equals(""))
    return null;
    DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT,
    Locale.getDefault());
    Date d = null;
    try
    dateFormatter.setLenient(false);
    d = dateFormatter.parse(dateString);
    catch(ParseException pe)
    e.printStackTrace();
    =================================================================
    This code works perfectly for all formats of String objects I give except for the format - "12/12/12/1" in which case it converts to following date object -
    "Wed Dec 12 00:00:00 IST 2012" although its an invalid date String.
    Please let me know how I could have correct validation done in such cases or if this is the right behavior for DateFormat class.
    Thanks in advance!!

    I'm not going to comment on how exactly the parse method does its business, but I can suggest you use a regex pattern to validate the input you will send the parse method.
    Here is some info from the CodeProject website on date validation(Note that this is aimed at .NET - but regex works the same in Java as it does in .NET [i think]):
    Dates: As with numbers, we need two validators: a key-press validator, and a completion validator. The key-press validator can be pretty simple, if we limit how our user enters the date. Let’s say that we want to validate for the U.S. date format mm/dd/yyyy. Here is a validator that will do that:
    ^([0-9]|/)*$
    The regex reads: “Match any string that contains a sequence of zero or more characters, where each character is either a digit or a slash.” This validator will give the user immediate feedback if they enter an invalid character, such as an ‘a’.
    Copy that regex to Regex Tester and give it a try. Note that the validation fails if the user enters dashes, instead of slashes, between the parts of the date. How could we increase the flexibility of our regex to accommodate dashes? Think about the question for a minute before moving on.
    All we need to do is add a dash to the alternates group:
    ^([0-9]|/|-)*$
    We could add other alternates to make the regex as flexible as it needs to be.
    The completion validator does a final check to determine whether the input matches a complete date pattern:
    ^[0-2]?[1-9](/|-)[0-3]?[0-9](/|-)[1-2][0-9][0-9][0-9]$
    The regex reads as follows: "Match any string that conforms to this pattern: The first character can be a 0, 1, or 2, and it may be omitted. The second character can be any number and is required. The next character can be a slash or a dash, and is required…” And so on. This regex differs from the ones we used before in that it specifies each character of the pattern—the pattern is more of a template than a formula.
    Note the first character of the regex: ‘[0-2]’. This character points out that we can limit allowable digits to less than the full set. We can also expand them; for example, ‘[0-9A-F]’ would allow any hexadecimal digit. In fact, we can use this structure, known as a character class, to specify any set of characters we want. For example, the character class ‘[A-Z]’ allows capital letters, and ‘[A-Za-z]’ allows upper or lower-case letters.
    Our date regex also points out some of the limitations of regex validation. Paste the date regex shown into Regex Tester and try out some dates. The regex does a pretty good job with run-of-the-mill dates, but it allows some patently invalid ones, such as ‘29/29/2006’, or ‘12/39/2006'. The regex is clearly not ‘bulletproof’.
    We could beef up the regular expression with additional features to catch these invalid dates, but it may be simpler to simply use a bit of .NET in the completion validator:
    bool isValid = DateTime.TryParse(dateString, out dummy);
    We gain the additional benefit that .NET will check the date for leap year validity, and so on. As always, the choice comes down to: What is simpler? What is faster? What is more easily understood? In my shop, we use a regex for the key-press validator, and DateTime.TryParse() for the completion validator.
    Oh - and there is another regex validator:
    ^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$
    which matches the yyyy-mm-dd date format and also validates month and number of days in a month. Could be improved as currently all leap year dates (yyyy-02-29) will validate.
    Sorry if I couldn't be of more help...
    Edited by: JoKiLlSyA on Oct 9, 2008 11:22 PM

  • About abstract method read() in class InputStream

    I would like to know if behind the method
    public abstract int read() throws IOException
    in the abstract class InputStream there is some code that
    is called when I have to read a stream. In this case where can I find
    something about this code and, if is written in other languages, why
    is not present the key word native?
    Thanks for yours answers and sorry for my bad english.

    Ciao Matteo.
    Scusa se ti rispondo in ritardo... ma ero in pausa pranzo.
    Chiedimi pure qualcosa di pi? specifico e se posso darti una mano ti rispondo.
    Le classi astratte sono utilizzate per fornire un comportamento standard lasciando per? uno o pi? metodi non implementati... liberi per le necessit? implementative degli utilizzatori.
    Nel caso specifico la classe InputStream ? una classe astratta che lascia non implementato il metodo read(). Tu nel tuo codice non utilizzerai mai questa classe come oggetto, ma nel caso specifico una sua sottoclasse che ha implementato il metodo read().
    Se vai nelle api di InputStream vedrai che ci sono diverse sottoclassi che estendono InputStream. Guarda ad esempio il codice di ByteArrayInputStream: in questa classe il metodo read() non ? nativo ma restituisce un byte appartenente al suo array interno.
    I metodi nativi (ad esempio il metodo read() della classe FileInputStream) non hanno implementazione java ma fanno invece riferimento a delle chiamate dirette al sistema operativo.
    Per quanto riguarda la classe FilterInputStream di cui parlavi: essa nel suo costruttore riceve un InputStream. Questo significa che si deve passare nel costruttore non la classe InputStream (che ? astratta) ma una classe che la estende e che quindi non sia astratta. Il motivo per il quale FilterInputStream faccia riferimento a una classe di tipo InputStream al suo interno, ? che in java gli stream di input e di output possono essere composti l'uno sopra l'altro per formare una "catena" (a tal proposito vedi per maggiori dettagli uno dei tani articoli che si trovano in rete.... ad esempio ti indico questo http://java.sun.com/developer/technicalArticles/Streams/ProgIOStreams/). Comunque per dirla in due parole: tu puoi voler usare un FileInputStream per leggere un file, ma se hai bisogno di effettuare una lettura pi? efficiente (quindi bufferizzata) puoi aggiungere in catena al FileInputStream un oggetto di tipo FilterInputStream (nel caso specifico un BufferedInputStream che non ? altro che una sottoclasse di FilterInputStream).
    Spero di aver chiarito qualche tuo dubbio!
    Ciao
    Diego

  • About PL/SQL usage!!!

    Where do I use PL/SQL procedures for example? Do I put the calls to them in java methods?

    There is no simple answer to such a simple question.
    When I analyze your question I think that you are struggeling with an application architecture matter. Basically, the first answer that springs to mind would be:
    - You should use PL/SQL when you have to implement functionality that is databound.
    In other words: when your process is about manipulating data rather than doing complex arithmetic, you should use PL/SQL.
    When it comes to the question on how to integrate the PL/SQL code with the other components that make up your information system, than the question is raised what type of information system you are building and what the infrastructure is on which it will be running.....
    In all cases, please realise that PL/SQL code is running in the database tier of your application infrastructure!!!
    Hope this helps...
    Message was edited by:
    Toine

  • Important question to Steve about passivateState() method

    <br> <font size="2">Hello Steve, <br><br>I want to store information about application user in oracle.jbo.Session hastable. It's stored as pair KEY --&gt; VALUE. To be sure that these informations will be accessible after passivation AM I have overreaded passivateState() method as below: <br><br></font><font style="color: rgb(0, 0, 255);" size="2"><span style="font-family: Courier New;">public void passivateState(Document doc, Element parent){  <br>    Node nodeUserData = doc.createElement("USERDATA");<br>    Hashtable hs = getDBTransaction().getSession().getUserData();<br><br>    if(hs != null){ <br><br>        Set mapKeys = hs.keySet(); <br>        Iterator hsKeysIter = mapKeys.iterator(); <br>        while(hsKeysIter.hasNext()){<br>     <br>            String key = (String)hsKeysIter.next(); <br>            Node keyNode = doc.createElement(key);<br>            <span style="color: rgb(255, 0, 0);">keyNode.setTextContent(hs.get(key));</span><br>            <span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 255);">nodeUserData.appendChild(keyNode);</span> </span><br>        } <br>    } <br>    parent.appendChild(nodeUserData); <br>} <br><br></span></font><font size="3"><font size="2">I can't compile this because i get an following error in red line: <span style="color: rgb(255, 0, 0);">Error(122,25): method setTextContent(java.lang.Object) not found in interface org.w3c.dom.Node.</span> It's very strange because <span style="font-weight: bold;">org.w3c.dom.Node</span> implements <span style="font-weight: bold;">setTextContent()</span> method. I have tried this solutions creating standalone xml file and everything works. <span style="font-weight: bold;">It doesn't work inside passivateState() method.</span> Is this another way to save to ADF xml document pair KEY --&gt; VALUE. It's important because I could retrieve user data after activation AM overreading activateState() method and set it into hashtable also as pair KEY --&gt; VALUE. </font><br><br><font size="2">Regards <br>Kuba</font></font>

    Please see section "28.5 Managing Custom User Specific Information" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html for more information on this.
    Rather than trying to set the text content of a DOM element, you create an element, create a text node, then append the text node as a child of the element.

Maybe you are looking for

  • Mavericks won't finish loading due to error message

    My free Mavericks update failed to finish loading, reporting an error message with no explanation.  Shall I just try to load it again even though most of it loaded?

  • Device is already sync'd with another user account - Do I want to Replace or Merge?

    same issue with 3gs / ipad / itouch ... when go to sync with computer receive message saying that device is already sync'd with another user account - Do I want to Replace or Merge? what's going on? the only thing I did was change my password on Itun

  • Illustrator EPS behavior

    In an Illustrator file, an object (such as a path, image or an effect) exceeds the defined document size... The file (saved as Illustrator EPS) is imported into a page layout program... Should the document size (defined in Illustrator) 'crop' the fil

  • Pending Bill Booking Status (PS PRojects) ?

    Dear PS gurus, Request pl advise if there is any Standard Report to see pending Bills Booking for Project System projects related. Understand only MR11 is see for pending bills bookings, but I would like to know the Projects PO-Service, after ML81N -

  • No sound with Windows 8, HP G70 Notebook PC

    No sound after Windows 8 install. tried all suggestions I can find. Works in Linux.Is this ditch 8 and revert to 7? This question was solved. View Solution.