Single signon between JSP page and Net.Data page

I am trying to setup a single signon between a JSP page hosted on a tomcat server, and a Net.Data page hosted on an IBM HTTP server. Both of these servers are running on an AS400. The JSP page (www.jsppage.com/menu) contains a link to the Net.Data page (www.netData.com/page2). In order to access www.jsppage.com/menu the user needs to login. Once this happens I want them to be able to go back and forth between the two pages without having to log in when they switch servers. Page navigation is handled through myServlet.java so that when a user clicks on a link the request is forwarded on to myServlet.java where the servlet determines where to redirect the user to. The servlet uses
RequestDispatcher requestDispatcher = getServletContex().getRequestDispatcher(url);
requestDispatcher.forward(request, response);
to forward the user to the correct page. This works fine for the JSP pages but when I forward to www.netData.com/page2 I get an error telling me the address doesn't start with a /. I also need to send the user name and password for the net.data pages to avoid the second login window to popup.
I understand that the requestDsipatcher.forward() method directs the browser to a page that is relative to the current root directory. If I try to use response.sendRedirect(url) I get sent to the right page but the signon window pops up. I would appreciate any help.

I am trying to setup a single signon between a JSP
page hosted on a tomcat server, and a Net.Data page
hosted on an IBM HTTP server. Both of these servers
are running on an AS400. The JSP page
(www.jsppage.com/menu) contains a link to the Net.Data
page (www.netData.com/page2). In order to access
www.jsppage.com/menu the user needs to login. Once
this happens I want them to be able to go back and
forth between the two pages without having to log in
when they switch servers. Page navigation is handled
through myServlet.java so that when a user clicks on a
link the request is forwarded on to myServlet.java
where the servlet determines where to redirect the
user to. The servlet uses
RequestDispatcher requestDispatcher =
getServletContex().getRequestDispatcher(url);
requestDispatcher.forward(request, response);
to forward the user to the correct page. This works
fine for the JSP pages but when I forward to
www.netData.com/page2 I get an error telling me the
address doesn't start with a /. I also need to send
the user name and password for the net.data pages to
avoid the second login window to popup.
I understand that the requestDsipatcher.forward()
method directs the browser to a page that is relative
to the current root directory. If I try to use
response.sendRedirect(url) I get sent to the right
page but the signon window pops up. I would
appreciate any help.You can't do that without passing username and password.
The servers keep track of the user by storing a cookie on the clients computer. The cookie is only valid for the domain that created it.
So, to make this work you need to send the username and password as part of the sendRedirect. the forward() method won't work.
What you could do is create some code on the .net machine that accepts username, password and target URL as input. Once it receives those parameters it should perform the .net login procedure and redirect to the correct page.
In your servlet you should pass those parameters on to the .net machine and the user should get the correct page without ever seeing any login windows.
Make sure to use https if you decide to follow this scheme since http will transmit the username/password in cleartext.
/Christopher

Similar Messages

  • What is the difference between jsp :include and server side include

    what is the difference between jsp :include and server side include(request dispatcher include method)????
    i understand that both request dispatcher include method and jsp:include take dynamic data,so when would one use request dispatcher include and when jsp:include.
    Is the usage interchangeable?i believe jsp include is used only for jsp/html but include directive can be used to include servlets ,jsp and html....correct me if i m wrong and
    do suggest if u hav ny other diff in this context...

    The difference really is: in what format do you want your inclusions? If your environment has many Java developers and only a few designers that focus mainly on, say, Flash, that might push you more towards the server-side include() directive. Or, if you have a large set of pages that receive dynamic content that is displayed in a consistent fashion (such as a workflow header area on a page).
    If, on the other hand, you have more web designers, there may be a greater desire to deal in markup rather than Java code. Java developers themselves might prefer to view markup (JSP) that more resembles the eventual output than something occuring in Java code.
    Finally, there are considerations of tiering. While it is totally possible to (and I have previously) implement 'view classes' that render markup or generate layout templates, JSP's offer, IMO, a subtle, psychological advantage. By forcing a developer to work in a different format, markup versus Java source, the separation on view from controller and model becomes a bit easier. It is still possible to make mistakes, but if a developer at some point notices, "Wait, I'm in a JSP, should I be importing a java.sql class?", then the choice to use JSP includes has paid off in spades.
    - Saish

  • Difference between jsp:include and %@ include

    what is the difference between <jsp:include> and <%@ include %>? which has better performance? When to use which? suppose i have a menu that should be included in every page, which should I use?
    Thank you
    Cal

    <%-- some date this page was last updated with that particular version of JSP file --%>
    <% include file="relative URL" %>
    You use the include directive, as indicated, to include a file in the main JSP file at the time the file is translated into a servlet. This is done at translation time and therefore if the included JSP file changes, all the JSP files that use this included file will need tobe updated. If you use this include statement then i would suggest that you add a date descriptor of the last time it was modifed so that you can go back and tell if you have updated a particular JSP file or not.
    <jsp:include page="relative url" flush = "true" />
    When you use the JSP descriptor like this, you are getting the requested JSP file at REQUEST time and therefore you do not hae to worry about updating the calling JSP page.
    Hope this helps

  • Function to get differenece between sy-datum and any date entered in days

    Dear Friends;
                    I have to find out the days difference between sy-datum and any valid date that come from table . Is there any function available in SAP that will give me
    the difference in  no. of  days between sy-datum and any date that come from table??
                   please help me out.
    Regards;
    Parag

    Just subtract the dates from each other and you will get the number of days. I have used it and it works prefect
    try this:
    DATA: date1 like sy-datum,
    date2 like sy-datum.
    data I type i.
    date1 = '20070301'.
    date2 = '20070228'.
    i = date1 - date2.
    write: / date1, date2, i.
    date1 = sy-datum.
    date2 = sy-datum - 30.
    i = date1 - date2.
    write: / date1, date2, i.
    SD_DATETIME_DIFFERENCE

  • Replication between 130 nodes and 1 Data Center

    Hi everyone.
    I have 130 database nodes (Oracle Standard Edition One) with a big distance of separation, and 1 Data Center with 3 nodes (Oracle Real Application Cluster 10g R2). The connection between nodes and datacenter is through various ISP ( WAN).
    I have exactly the same model design of database in nodes and datacenter.
    DataCenter is a repository of data for reporting to directors and dictate the business rules to guide all nodes.
    Each node have approximately 15 machines connected with desktop application.
    In other words Desktop Application with a Backend Database (node).
    My idea of replication is not instantly, when a transaction commit in a node then replicate to datacenter. Also over nigth replicate images because is heavy, approximately 1 mg per image. Each image correspond to one transaction.
    On the orher hand i have to replicate some data from datacenter to nodes, business rule, for example: new company names, new persons, new prohibitions, etc.
    My problem is to determine th best way to replicate data through nodes to datacenter.
    Please somebody could suggest me the best solution.
    Thanks in advanced.

    Last I checked, Streams and multi-master replication require enterprise edition databases at both ends, which rules them out for the sort of deployment you're envisioning.
    If a given table will only ever be modified on nodes or on the master site, never both, you can build everything as read-only materialized views. This would probably require, though, that the server at the data center have 130 copies of each table, 1 per node. For schemas of any size, this obviously gets complicated very quickly. For asynchronous replcation to work, you'd need to schedule periodic refreshes, which assumes that you have relatively stable internet connections between the nodes and the data center.
    I guess I would tend to question the utility of having so many nodes. Is it really necessary to have so many? Or could you just beef up the master and have everyone connect directly?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Can anybody explain me difference between test cases and test data

    Hi All,
    Can anybody explain me difference between test cases and test data.
    Testing procedure for FS.
    Thanks & Regards,
    Smitha

    Hi,
    Test case is a procedure how to do the testing of particular functionality and it consists the data that to be given for testing a particular requirement of the given Functional Spec and it also consists the result whether the desired functionality is fullfilling or not.
    Regards
    Pratap

  • Whats a good way switch between a real and mock data service?

    I have a new Flex application...and am contemplating the use of the Mate mock remote object capability.
    However, I'd like the application to be able to switch back and forth between a real and mock data service without recompilation.  And without loading the mock service objects unless they are needed.
    Whats a good way to handle this switching without recompiling the application?

    The only way I can think of not having ANY mock services in the production code is to take them out manually.  Your program for mocking purposes is going to have to be able to know where these services/object are and how to contact them.  I'm sure if it had to be done , you could use some mass of modules and event maps.
    Sincerely ,
      Ubu

  • Unable to set site master page and system master page separetly in SP 2013

    hi,
    How to set site master page and system master page separetly in SP 2013,even setting different master pages through code or UI.Always only  single custom master page is getting applied for both.
    Thanks &amp; Regards, Krishna

    Check below:
    http://msdn.microsoft.com/en-us/library/office/ee537530(v=office.14).aspx
    Normally on Masterpage setting of publising site the second option is for Settings page and 1st option is for site.

  • How to open a page  and closing source page in jdev 10.1.3.3

    how to open a page and closing source page in jdev 10.1.3.3.
    for example.
    From page 'A' , we are opening a page 'B' and closing the page 'A'. how this can achived.Please let me know

    Your question is totally not clear?
    What page? a JSF page? A code editor in JDeveloper?

  • Insert in master page, the first page and the last page of my article...

    I need insert in the master page, the first page and the last page of my article... (Indesign CS3-4)
    Is this possible ????
    Thanks for read me...

    Marcos Suárez wrote:
    I need insert in the master page, the first page and the last page of my article... (Indesign CS3-4)
    Insert WHAT ?
    robin
    www.adobescripts.com

  • How to Create a Page and provide the Page link in personalisation.

    Hi Techies,
    I have unique requirements as follow ...
    On a Page , We need to create a Link. After clicking this link , the control should open a new page and the new page details need to shown.
    I did the following ,
    1. Personalized the page. Added a new Item of the Type "Link". In URI filed I gave an existing page ( for testing ). It was working fine. But When I gave my actual page which I created in HTML(*.html extension ) , which did not worked.
    Can not we provide *html page in the URI filed of the Item type Link.
    Please help me in resolving this.
    Thanks in Advance
    Regards
    Raghu

    Guys one update if you want to create a link for a PDF file to show on to your browser use the below method.
    I used this below method for bringing the PDF file ( the file which business want to show on browser ) using the below steps.
    1. Created a Link using personalization.
    2. Provided target frame as "New Window".
    3. Provided URI : FileName.pdf.
    Note that the FileName.pdf should be kept in the $OA_HTML Path on the Unix box. The Personalization would look for the file in the path of $OA_HTML and display in the other browser which is a full file. I did not get Home and Logout buttons over there. So I suggest you to use if you in need of Loading an informative page on the Browser.
    Raghu

  • The beta page and Test Pilot page come up EVERY time I use Firefox. Same information so why not allow us to bypass it after the 1st or 2nd or 3rd reading?

    The beta page and Test Pilot page come up EVERY time I use Firefox. Same information so why not allow us to bypass it after the 1st or 2nd or 3rd reading?

    That is not normal behaviour, for possible causes see [[Firefox has just updated tab shows each time you start Firefox]].

  • How to customize / edit wiki theme in content_entry.xsl file to display tags for blog pages and not wiki pages?

    I am trying to customize a wiki theme by displaying the "Edited Today at… by…" for only blog pages and not wiki pages. 
    I tried editing the content_entry.xsl with an xsl if tag, but failed.
    <xsl:if test="context/link='/groups/groupname/weblog/'">
      <div id="entry_date" class="entry_date">
        <a href="{../contentEntry/historyURL}" id="history_link" title="{../../jsstrings/tooltips_history_link}" onclick="return false"><xsl:value-of select="../../strings/History"/></a>
        <span id="history_time_author"><xsl:value-of select="historyTimeAuthor" disable-output-escaping="yes"/></span>
      </div>
    </xsl:if>
    What is the correct <xsl:if test=""> tag, that would execute this? 
    For <xsl:if test="context/"> I believe the content after "context/" are variables like link, baseHREF, contentEntry.  What are other variables I can use?

    I also tried it this way, but does not seem to work. 
      <xsl:if test="context/link='/groups/groupname/weblog/'">
            <xsl:template match="context/entryMeta">
                <div class="metadata" id="entry_metadata">
                    <div class="start startmetadata"><span></span></div>
                        <div class="contents contentsmetadata">
                            <div id="entry_date" class="entry_date">
                                            <a href="{../contentEntry/historyURL}" id="history_link" title="{../../jsstrings/tooltips_history_link}" onclick="return false"><xsl:value-of select="../../strings/
    History"/></a>
                                            <span id="history_time_author"><xsl:value-of select="historyTimeAuthor" disable-output-escaping="yes"/></span>
                                  </div>
                             </div>
                        <div class="end endmetadata"><span></span></div>
                   </div>
              </xsl:template>
         </xsl:if>

  • How do I show the reload page and stop loading page buttons on the navigation toolbar. v. 10.0.2

    I upgraded to v 10.0.2
    I can't access the reload page and stop loading page buttons on the navigation toolbar, or add them to the toolbar, although I see them on the toolbar when I select Customize.

    Hi,
    Please try to '''Reset toolbars and controls:''' and '''Make Changes and Restart''' in the [https://support.mozilla.org/en-US/kb/Safe%20Mode Safe Mode] start screen. Please note that you may have to customize the previous personal settings again. [https://support.mozilla.org/en-US/kb/how-do-i-customize-toolbars Customizing]

  • If I am using pages and deleted my page bu mistake how do I go back? I have not saved or deleted the page.

    If I am using pages and deleted my page by mistake how do I go back? I have not saved or deleted the page.

    You have deleted your page, but you have not deleted your page?
    Which is it?
    If you never saved it it is gone. If you saved it in Lion (OSX 10.7) with Pages 09 v4.1, there should be versions available when you mouse overv the document name at the top of the window.
    Peter

Maybe you are looking for