Can a servlet differentiate between links?

Hello, I could you tell me please, if this can be done (and how, if it`s possible)?
I have a html page A with two links, one to page B and the other to page C.
I would like to put a servlet inbetween that receives information from A and send the user to B and C. (so A-->Servlet-->C or D)
Can a servlet recognize between two links clicked, so it can send the user to the desired web page (or can something be done for that)?
That`s using server side applications to make client side things. I know it`s weird, but any suggestion is welcomed.

hi :)
pass a parameter to the servlet.
and based on that parameter, redirect the user to the desired url.
Example:
link 1
http : // www.mysite.com/servlet/controller/myservlet?param=C
link 2
http : //www.mysite.com/servlet/controller/myservlet?param=D
on your servlet create a condition
foo = request.getParameter("param");
if foo.equals("C") {
     // redirect to c
}hope this could give you an idea :)
regards and goodluck,

Similar Messages

  • Can you please differentiate between compile time and runtime?

    hi,
    I heard many of them speaking about complie time and runtime. I sometimes feel they talk about it but they themselves don't know about it.
    Please help me out.
    Thanks in anticipation
    Regards
    Deepa Datar

    Just remember, runtime means you are running the program. Compile time means your are in the process of building the program ("javac bla.java").

  • Servlet filter that can differentiate between Filter and Servlet Writers

    Hey,
    I'm trying to build a Filter and HttpServletResponseWrapper that, when applied to a generic servlet, can differentiate between the output stream from the Servlet and the one from the Filters.
    So, say I have a servlet:
    PrintWriter pw = response.Writer();
    pw.write( "Output from servlet" );
    pw.close();And a filter that is applied to the servlet:
    PrintWriter pw = response.Writer();
    pw.write( "Output from filter" );
    pw.close();I want to be able to do this in my filter that is able to differentiate between the servlet and filter response:
    System.out.println( "Response from servlet: " + responseWrapper.servlet.toString() );
    System.out.println( "Response from filter: " + responseWrapper.filter.toString() );The responseWrapper.servlet and responseWrapper.filter can contain all filter responses from all the servlet(s) and filter(s), respectively.
    Can anyone give me guidance as to how to start with this - really I just need to know if I can differentiate between servlet and filter responses in a generic way (without having to modify the response specially in the filter or servlet files that write output)
    Thanks for your time.

    first thing's first..if the OutputStream if not closed Either a Filter or a ServletChain can write on to the stream.
    There could be cases where the servletoutputstream would be closed at servlet end itself.Therefore,its a valiant effort by acomplishing a responseheader in the response to indicate that.
    Now once the response/outputstream is not closed or flushed out there is not direct way by which you do this unless we indicate using response Headers as flags when we are implementing FilterChaning.
    Hope that might help :)
    REGARDS,
    RaHuL

  • I have two printers of the same model registed in eprintcenter and can't differentiate between them.

    I have two printers of the same model registed in eprintcenter and can't differentiate between them.
    I've tried change varios names in each printer's settings but they still show up in eprintcenter with the model name. What can I do to change the name so I can diffentiate the two prineters?

    Hi mptpro, the way to differentiate between your two printers within your ePrintCenter account is by their email address. The model name is automatically detected when you add the printer to your account and is not configurable but you can set the email address is. By giving each printer a distinctively different and meaningful email address you'll be able to differentiate between the two.
    To change a printer's email address: 
    log in to your ePrintCenter account
    click on the Printers tab
    select one of the printers and you will see the current email address for that printer just above the job history table
    click the Change button to the right of the address and enter the desired name in the dialog box that opens
    repeat for the second printer
    Hope this helps answer your question
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Differentiate Between A New iView link & an Old One - Detailed Navigation

    Hi All,
    Is it possible to differentiate between a new iView link on the Portal and an old one?  Basically, when I add new iViews to a role/page/workset, I would like the link to be highlighted in such a way that the users know it is new.
    All suggestions/comments welcome,
    Oloy.

    Hi Michael,
    Generally speaking, the links would be considered new for a 1 month-period.  After which, they would return to the "standard" view.
    Basically, it is desired that the link to the iView in the detailed navigation will just be highlighted or show up in a different font to indicate its "newness".
    Is there definitely no way of doing this?
    Regards,
    Oloy.

  • How can I differentiate between calendars on the notification center

    I have my calendar, and my wife's calendar on my phone so we can be sure to not double book ourselves.  In the notification center, I can see appts for both calendars, which is great, but how can I differentiate between calendars?  There is no indication that one appointment is mine versus another being hers.  Thoughts?

    You can do this face-to-face, or in writing.

  • Differentiate between quantity contract and value contract?

    Hi,
    How can i differentiate between quantity contract and value contract?
    The agreement type of contract is  is not MK or WK , its custom created.
    regards
    N Banu

    Hi
    In Qty Contract you limit the total quantity of items that  required for you;
    It sums the partial quantities of Release Orders with the Contract as a reference.
    In a Value contract, you limit the total value of items to be required when
    you create Release Orders with the Contract as a reference, that is you
    don't work with the quantities as in the first case, but indeed with the
    quantities multiplied by the unit price you fixed in the Contract
    Refer the link for details
    http://www.erpdb.info/qquantity-contracts/
    http://help.sap.com/saphelp_crm40/helpdata/en/d2/650e26a21fe04bba5298afd089b9dd/content.htm
    Regards
    Anand

  • Looking for eMac: How To Differentiate Between Models Document

    Hello,
    I have been trying to find an Apple help document about how to differentiate between eMac models.
    I have found an article about iMacs, but can not seem to find one for eMacs. Here is a link to the iMac article, just so you can better understand exactly what I've been looking for:
    http://docs.info.apple.com/article.html?artnum=58669
    Does anybody know of a direct link to a similar article for all eMac machines? That would be amazing; thank you in advance for any help. =) *april

    Hello Dave =)
    Thank you for your help and for responding to my post.. The article you posted would have completely solved my problem, however, I, unfortunately, do not have access to serial numbers, and the serial number is mandatory for identifying eMac models in the article you posted. I appologize for not being more specific about exactly what I need.
    You see, I am looking on eBay for a good, used, possibly older eMac for my mom. Unfortunately, nobody puts serial numbers in their eMac listings, so I can not properly identify and price compare different eMacs. eBay sellers only list such things as Model Name, Processor Speed MHz, SDRAM and Hard Drive GB, so I need a list to 'check against' like the iMac document. I am mostly trying to find out which eMac models came with DVD players, and also which ones are AirPort ready and AirPort Extreme enabled etc.
    Would you happen to know if there's any such eMac model document?
    Thank you again for posting to my question; I do appreciate it. *april
    iMac 15" Flat Pannel 700 MHz PowerPC G4 1GB SDRAM   Mac OS X (10.3.9)   i love my little bubble computer

  • FaceTime: I have a iPad, iPhone, iMac all on the same apple Id/account. Without changing id/email address can I use FaceTime between any 2 of my devices? It works from iPad to iPhone but not the other way??? I would like talk/see my kids if am away

    FaceTime: I have a iPad, iPhone, iMac all on the same apple Id/account. Without changing id/email address can I use FaceTime between any 2 of my devices? It works from iPad to iPhone but not the other way??? I would like talk/see my kids if am away.
    Hope you can help.
    I have added a new email address but kept my Id, but I get busy when trying from iPhone to iPad as they are clashing. Like find my iPhone app hence trying to keep them all on one account

    IOS: using facetime http://support.apple.com/kb/ht4319
    using an ipad will use the email address since you can't make a phone call.  see the link.
    Your basically calling/emailing yourself that's why your getting a busy signal.

  • Using home sharing, can you sync libraries between multiple users in a household?

    Using home sharing, can you sync libraries between multiple users in a household?

    Hey lindsay146,
    Home Sharing lets you to stream or transfer music, movies, and more with up to five authorized computers in your household. You can learn more about it in this link:
    Understanding Home Sharing
    http://support.apple.com/kb/HT3819
    Welcome to Apple Support Communities!
    All the best,
    Delgadoh

  • My husband and I use the same computer. He has his Itunes library that updates his ipod. I have my ITunes library that updates my ipod. How can we share songs between us?

    My husband and I use the same home computer. He has his ITunes library that links to his Ipod. I have my ITunes library that links to my Ipod. How can we share songs between our libraries? (Windows - Vista)

    No. Its not possible.
    Alternatively, create another user account in your computer. Install iTunes in that account with the library you wish to sync.

  • In which table we can find the relationship between Role id and Task id

    Hi Experts,
    In which table we can find the relationship between Role id and Task id in Cprojects.
    Thanks
    Subhaskar

    Hi Subhaskar,
    Apart from DPR_ENTITY_LINK , you can also get it from table DPR_PART.
    Please go through the below link
    http://wiki.sdn.sap.com/wiki/display/PLM/cProjectstablesin+SAP
    I hope this will help you.
    Regards,
    Rahul

  • Can we provide a command link in a subview element

    Hai,
    When we include a page we mention it under <f:subview> tag.
    can we specify any command link between the subview element?
    if we can what should we give navigation case in faces-config's from-view-id, the subview page or the main view page in which we included the subview page?

    I dont think so. Because the AM would be the owner of the transaction which is being created in the current database only. Other DB might be difficult to maintain. However Ihave not tried it myself.

  • Htmlb:tree differentiate between nodeclick and tree node expander click

    Hi,
    how can i differentiate between nodeclick and tree node expander (to get to its children) click in my event processing in htmlb:tree element.
    <u><b>What i am trying to achieve?</b></u>
    Onload just load root node and its immediate children.
    On node expand get the children of the current node and modify htmlb:tree table2 with additional node inofs.
    on node click  call some client function.
    But my issue is that i am not able to differentiate between node expander click and node click in my event handling. Any help on this is appreciated.
    (I am not using MVC)
    Thanks in advance.
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

    After reading your weblog I think I understand better. I did some testing with my example.  I am using the toggle = "true", so that the page returns to the server each time an expander is selected.
    <htmlb:tree id          = "myTree1"
                  height      = "75%"
                  toggle      = "true"
                  title       = "<b><otr>EQI Reporting Tree</otr></b>"
                  width       = "90%"
                  onTreeClick = "myTreeClick"
                  table       = "<%= application->selection_model->itview                             %>" >
      </htmlb:tree>
    However I have not added any coding in my event handler to respond to the expander event.  I only respond to myTreeClick (which loads some data for the given selection).  The BSP tree element itself must be doing the hard work for me. 
      if event_id cs 'tr_myTree1'.
        data: tree_event type ref to cl_htmlb_event_tree.
        tree_event ?= htmlb_event.
        if tree_event->server_event = 'myTreeClick'.
          clear appl->message1.
          appl->selection_model->get_chart_data( appl = appl
                                                 node = tree_event->node ).
        endif.
      endif.
    I pass my entire tree defintion to the element.  It appears that it only sends visible nodes to be rendered. When the expander is selected, I don't have to do anything, the tree re-renders with only the newly visible rows. 
    I tested and turned off the toggle (toggle = "false") and my page took forever to load because it was sending all the nodes to the frontend on the first load.

  • Differentiate between SRM Confirmation and Confirmation Cancellation

    We have a requirement to differentiate between SRM confirmation and cancellations.  In POWL both looks same. 
    1.  Is there any way we can assign different number ranges for confirmations and cancellations
    2.  Is there any other solution, from the POWL we can differnetiate these two documents
    Thanks

    Hi,
    Check in the confirmation POWL status
    1. SRM confirmation posted -- Status - Posted in the Backend
    2. SRM confirmation cancelled -- Status -Document deleted.
    Check this status
    Regards
    G.Ganesh Kumar

Maybe you are looking for

  • Create a tree from XML

    hi. I have created a simple XML file which contains a hierarchical structure of strings. Also, I have created a SAXParser to read from the xml. But I don't know how to put this structure in a JTree.I don't want to show the tree on screen. I want to b

  • Banner Design

    I am looking to create a banner with images that fade in and out. The problem that I have is that I only want the banner to load once. I am using pure HTML to code to the page and just include the flash swf file in the specific file eg index.html. I

  • Adobe Reader X configuration via windows domain?

    Hello, mates! I face with Adobe Reader configuring problem in my domain. We have more than 100 PC where i need to enable the following configuration in all Adobe Readers: Edit->Preferences->Security->Advanced Preferences-> Widnows integation-> [ENABL

  • Use Members on Data Form is unvalid if the Run on Save setting is not on

    Hi, I found a problem of the setting Use Members on Data Form is unvalid if the Run on Save setting is not on. It will just get the default value of the variables but not the form members, I don't know whether it is a bug or a normal behavior. Does a

  • Cloud desktop update issue

    Why does my Creative Cloud Desktop app show I need to update an app that I have already updated? The same four apps come up for updating, but they are already updated and the Home history shows they were updated. It doesn't make sense and I can't fin