Hiding url in JSP

I have one little JSP application that is used to perform some test on user and based upon that test this application needs to load a different page that is on a different server and that page is just an html page. I need to hide url of the html page that jsp will load. Is it possible? Is it possible to pass a parameter on a different server?
Your help will be greatly appreciated.
Lionfoo

I take it that by "hiding the URL" you mean to do something similar to a jsp:forward except to another server... That's not really possible but you can grab the content on the other server and display it. Check out Jakarta's scrape taglib:
http://jakarta.apache.org/taglibs/doc/scrape-doc/intro.html

Similar Messages

  • HOW TO MOVE FROM ONE JSP TO ANOTHER BY HIDING URL CHANGES

    HOW TO MOVE FROM ONE JSP TO ANOTHER BY HIDING URL CHANGES IN AN ADDRESS BAR

    Please check before posting that you have not accidentally turned on the CAPS LOCK feature of your keyboard.
    To answer your question. You can't do that. There are alterate ways to solve this sort of problem. What exactly is the nature of the problem you are seeking to solve?

  • Get Gateway name / url via JSP

    Anyone say what is the method to get the Gateway name / url via JSP?
    Thanks
    Fausto

    Alex, in the normal case you have reason the client host is the gateway host.
    A simple code:
    <%
    InetAddress inet = InetAddress.getByName( request.getRemoteHost() );
    String gateway = inet.getHostName();
    String portal="http://" + gateway + "/portal/dt";
    gateway="https://" + gateway + "/";
    String url=request.getParameter("url");
    if ( url != null) {
    response.sendRedirect(gateway + url);;
    }else{
    responde.sendRedirect(gateway + portal);
    %>
    I put a jsp in the web container, I contact the jsp trough an url
    http://www.mydomain/portal/desktop/redirect.jsp without the method get for the url variable, if I call the jsp directly without gateway from my client the gateway variable is my dns hostname and the jsp cannot redirect my in the portal login page
    If I take the localhost, it works fine but if a particular case when the gateway and the platform are the same host.
    There is not a HTTP enviroment variable to get the gateway name or a simple java method to ask the correct host?
    Thank you again
    Fausto
    http://www.mydomain/portal/desktop/redirect.jsp
    i

  • How to retrieve URL in JSP

    Hi guys.
    Does somebody knows how can I retrieve URL in JSP?
    I need to know if the user came to my page via www.MySite.com/page.jsp or 128.951.0.0/page.jsp
    Thanks in advance,
    and have a nice day.
    Vadim.

    String URL = "http://"+request.getServerName()+":"+request.getServerPort()+request.getRequestURI()+(request.getQueryString() != null ? "?"+request.getQueryString() : "" )

  • How Can Hide The File Name in URL Using Jsp

    I Want source code for Hiding The File name in url address using jsp.
    for example www.website/login.jsp is view but i want www.website/ only.

    Hi Praveen - how does that DEF would be determined?
    Have a look at the below blog for executing os commands
    SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki
    XI/PI: Command line sample functions
    Is there any problem in using the dynamic file name configuration??
    Message was edited by: Hareesh Gampa

  • Building dynamic URLS in jsp

    Hello,
    I wonder if you could help , please.
    I have prepared a JSP page which has three different combo boxes.
    Depending on the option chosen , I have to submit the form to an html page that it is located in a different server.
    So I have to make the url to that server but with the value chosen in the last combo box.
    I mean , in another server in the address (http://www/ejemplo.com/test/)I have pages like :
    a1.html
    b2.html
    c1.html
    Where a1, b2 and c3 are the values chosen in the last combo.
    I have an input button , and when it is clicked , it should forward to the address:
    http://www/ejemplo.com/test/a1.html if a1 were chosen.
    I have written teh following code, but it does not work....How can I do it??? Could anybody help, please???
    <INPUT TYPE="submit" name="Solicitud" value ="Request Page" >
    <%
    if ( request.getParameter("Solicitud") != null )
    String pagina = "http://www/ejemplo.com/test/" ;
    String sel3 = request.getParameter( "Combo3" );
    pagina = "pagina" + "sel3";
    pageContext.forward(pagina);
    }%>
    </form>

    Hi Ani,
    First of all, you were correct , I forgot to include the .html for the option chosen in the combo3.....I have corrected it..but still does not work....
    Do you have any idea???
    Here you have my new code...
    <INPUT TYPE="submit" name="Solicitud" value ="Request Page" >
    <% if ( request.getParameter("Solicitud") != null )
    String pagina = "http://www.ejemplo.com/test/";
    String sel3 = request.getParameter( "CountryCode" );
    sel3 = sel3+".html";
    pagina = pagina + "sel3"; //removed the quotes for pagina
    %>
    <jsp:forward page="<%=pagina%>">
    </jsp:forward>
    <%}%>
    </form>

  • Hiding url in the run time

    hi gurus,
    i am using oracle forms 10g, i have developed a form
    i am running that form it is showing in the web browser
    http://192.168.0.15:8889/frm/frmservlet/?from=test.fmx and also how to hide the back side main window i mean to say the by default window/MDii window which is shown
    at the run time.
    can i hide the '192.168.0.15:8889/frm/frmservlet/?from=test.fmx' this from other users who is running this forms by accessing my ip address while running the form.
    in fact i have already seen this hiding but i don't how to hide this
    can anybody tell me how to hide this by giving alternative name from my own..........

    Yes, this is possible. To hide the URL you will need to use HTML Frames and assign the Forms Servlet page to one of the frames. Then call your application using the frames html page. Here is the basic setup:
    1. Create a simple index.html as follows:
    <HTML>
    <HEAD>
    <TITLE>YOUR APP TITLE HERE</TITLE>
    </HEAD>
    <FRAMESET BORDER=0 rows="1, *">
    <FRAME NAME="top" SRC="top.html" FRAMEBORDER="NO"
    SCROLLING = "NO" NORESIZE>
    <FRAME NAME="bottom"
    SRC=http://HOST:PORT/forms/frmservlet?config=myAPP FRAMEBORDER="NO" SCROLLING = "AUTO">
    </FRAMESET>
    </HTML>Beware to change the HOST:PORT to your actual host and port information.
    2. Save this file in the docroot directory for the HTTP server
    3. Create a dummy empty file at the same location named top.html (To represent the upper frame)
    4. Run the URL http://HOST:PORT/index.html or simply http://HOST:PORT
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Using gateway'd URLs in JSP custom tag attributes

    Hello,
    I am running Plumtree G6 using a gateway prefix to gateway Javascript from a remote server. I have recently discovered, thanks to people's help on the forum here, that in certain cases, you need to wrap a URL in a pt:url tag in order for Plumtree to recognize it as a URL that has to be gateway'd (i.e. a URL inside of a Javascript function).
    However, I have a custom tag that contains a contextPath attribute. This custom tag then includes other XML files that get included in the final page that is displayed. I am passing this value as my contextPath:
    <mytag:body sessionName="mysession" campusName="SampleCampus" contextPath="<pt:url pt:href='http://localhost:7021/application/scripts' xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>"/>
    However, in the resulting content that is created from this custom tag, the contextPath value is still set to <pt:url pt:href=......./>, and not the actual gateway'd URL. I would have thought that Plumtree would have recognized and gateway'd this URL before it got substituted in the custom tag.
    Does anyone have any thoughts on how to get around a problem like this? One thought I had was to get ahold of the gateway URL value and pass that value directly in my contextPath attribute. Is it possible to get that gateway value, or is there a better solution here?
    Thanks again for any help you can provide.

    Chris,
    I added your code, changed the portlet's web service to send a login token for this portlet, and was then getting some ClassNotFoundExceptions related to Axis classes. So, I went and added all of the jar files from the devkit's lib directory (i.e. plumtree\ptedk\5.3\devkit\WEB-INF\lib), recompiled, and those errors went away. But, now I see the following error:
    java.lang.NoSuchFieldError: RPC
         at com.plumtree.remote.prc.soap.QueryInterfaceAPISoapBindingStub.(QueryInterfaceAPISoapBindingStub.java:27)
         at com.plumtree.remote.prc.soap.QueryInterfaceAPIServiceLocator.getQueryInterfaceAPI(QueryInterfaceAPIServiceLocator.java:43)
         at com.plumtree.remote.prc.soap.QueryInterfaceProcedures.(QueryInterfaceProcedures.java:37)
         at com.plumtree.remote.prc.xp.XPRemoteSession.(XPRemoteSession.java:202)
         at com.plumtree.remote.prc.xp.XPRemoteSessionFactory.GetTokenContext(XPRemoteSessionFactory.java:80)
         at com.plumtree.remote.portlet.xp.XPPortletContext.getRemotePortalSession(XPPortletContext.java:261)
         at com.plumtree.remote.portlet.PortletContextWrapper.getRemotePortalSession(PortletContextWrapper.java:45)
         at jsp_servlet._collabrasuite.__riarooms._jspService(__riarooms.java:325)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:417)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    I am using version 5.3 of the EDK, and running Plumtree Foundation G6. Have you ever seen an error like this before?
    Thanks again for all of your help.

  • How to make browser aware of new URL after JSP:forward

    When I use JSP:forward (or pageContext.forward() for that matter) to forward from a.jsp to b.jsp, the browser still seems to think he's at a.jsp. Assumably because the request for the new URL didn't originate with the browser. This causes problems when I try to use relative URL's in b.jsp (the forwarded URL) since the client kindly tries to resolve them for me using the wrong base URL.
    For example:
    I log in at <mysite>/Security/login.jsp.
    Here, I do some login magic and then forward to /Accounts/index.jsp.
    The state of the browser is now:
    a) the URL is <mysite>/Security/login.jsp
    b) the page displayed is <mysite>/Accounts/index.jsp
    Is there a better mechanism I can use to keep browser URL and displayed page synched up?
    BTW, in this simplified example I could use JavaScript history.go(-1) to let the browser do the forwarding itself. This won't work in my actual scenario because I actually forward to a page stored in the session several requests back.
    Any help would be very much appreciated!
    Andy

    Assumably because the request for the new URL didn't originate with >the browserThis is correct.
    One way for the browser to show the URL is by using a sendRedirect() after doing all the necessary processing. But you will loose all request attributes during a sendRedirect(). To overcome this, after you have done all processing and are ready to process the accounts jsp, you can put the required info in the session. The accounts jsp can get the info from the session instead of from the request, and then reset these in the session to prevent further use.

  • How to call a URL in jsp without direct the page to the URL

    Hi,
    I have a jsp page, which when user come in to the page, the page will call a URL without direct the current jap page the URL. This URL will only help me to do on something in the backend. Anyone know any method that i can use to call the URL?
    Thanks a lot

    Doeas AJAX rings a bell? ;-)
    https://blueprints.dev.java.net/bpcatalog/ee5/ajax/usingAJAXwithoutJSF.html

  • Resolving non http urls in JSP

    When I include an html hyperlink in my JSP as follows :
    Yahoo
    then the hyperlink on the web page points to
    http://www.yahoo.com
    However if I write the hyperlink as
    Yahoo
    then the hyperlink on the web page is wrongly created as
    http://<hostname>/www.yahoo.com
    This seems to be an issue with the JSP engine. I am using weblogic.
    Is there any way to resolve the non http urls?

    This has nothing to do with the JSP engine.
    <a href="www.yahoo.com">Yahoo</a> IS not a JSP tag and is not touched by the JSP engine.
    The problem you have is just your WEBBROWSER interpreting the url wrongly mainly becasue you have forgotten to provided the protocol your webbrowser has to use.

  • Hidding the Url in JSP

    Hi,
    I have a JSP that generates links to a Servlet, the problem is that in the M$-Explorer the url appears when you pass the mouse-pointer over the link, how can I hide the URL? or how to hide the Servlet Url and params?

    Greetings,
    Hi,
    I have a JSP that generates links to a Servlet, the problem is that in the M$-Explorer the url appears
    when you pass the mouse-pointer over the link, how can I hide the URL? or how to hide the Servlet
    Url and params?If your JSP is providing the links as anchor tags (i.e. '<a href=...') then their is really very little that can ultimately be done about it.  Some JavaScript and CSS can be thrown in to keep the link from showing up in the browser's "info line".  However, unless you also throw in some script to also keep the user from being able to view the page source, this is only going to superfically "mask" the information and not really "hide" it.  Yet, even with disabling "view source" the user can still also disable JavaScript in the browser making all this moot. ;)
    A better solution to the matter is to move the "linking" from the client over to the server instead. Spend some time investigating the Front Controller pattern (see http://java.sun.com/blueprints/patterns/FrontController.html), and RequestDispatcher. Using 'buttons' in your JSP to signal views to the controller and session objects to store parameters already known to your application will take your application a lot farther in the long run than embedding HTML links in your front JSP. ;)
    Regards,
    Tony "Vee Schade" Cook

  • Encoding URL in jsp

    Hello All,
    I want to encode URL in my jsp code such that when the jsp is rendered and if user sees the source code then the url should not be shown.
    Is this possible ?
    Thanks

    if user sees the source code then the url should not be shownIf html source code doesn't contain the URLs then how will browser know where to send HTTP request? It is like saying "I sent my sister a $100 bank cheque but didn't sign it because I don't want her to know who has sent it."

  • Previous Page's URL in JSP/JSTL

    Dear Sirs,
    Could you please advice me how I could get the previous page's url( ie, the page the the user was visting before coming to the current page) in JSP/JSTL..
    Thank you in advance

    You mean the referrer? You can just get it from the HTTP header.
    String referrer = httpServletRequest.getHeader("referer"); // Yes, with the legendaric misspelling.

  • Get printer url in jsp

    hi
    how to get the printer url in java/jsp?
    any method to get the printer IP.

    yes i worked out it in that way...
    String url = request.getRequestURL().toString().replaceAll(request.getRequestURI(),"");Is any other good way to do it?
    Edited by: jStanzilaous on May 5, 2008 4:11 AM

Maybe you are looking for

  • Error in CreateOUIProcess():5

    Hi, Can anyone please guide me. I am getting this error when starting Oracle 10g Rel2 client setup on Windows XP machine. Error in CreateOUIProcess():5 Please help me out of this. Thanks Nadeem

  • Source System set error

    We are seeing a weird error with a source system we are trying to re-create after a refresh. Our basis folks have tried many things, and they finally deleted the source system and are trying to re-create it again. They error they cannot get past is i

  • Upgrade SAP XI 3.0 to SAP XI 7.0

    Is there a list of checks that should be perform after the upgrade since is mainly a kernel upgrade (ABAP/JAVA).

  • Can't poweroff if APIC is enabled

    Hi If I disable APIC, System Information display only 1 core instead 4. If I enable APIC in Bios I can't poweroff my computer, system halt all processes and display "POWER OFF" without any action. Is there any solution to fix this problem? Best regar

  • Getting hundreds of emails fromMail Delivery System MAILER-DAEMON@tajo.unex.es . What do i do to make it stop?

    How do I stop the hundreds of emails from, for example,Mail Delivery System <[email protected]>?