Url in jsp

hi
i code in jsp but normally my urls are http:/www.xxx.com/xxx/myfile.jsp?xx=xx&xx=xx
lately i encountered a site with this kind of url:
https://xxxxxxxxxxxxxxxxx/application?xxxxxx=xx&xxxxx=myfile.jsp&xxxx=xxx.xxxxxxxxxx
can somebody please explain this url (especially the application bit)
THANKS LODES
sabcarina

For any JSP application the string following the ? character is the set of parameters being passed to that application. In this case the value of one of the parameters is "myfile.jsp" as a string, what the application does with this value internally is up to that application.
https is the secure HTTP protocol, meaning that the request is encrypted.

Similar Messages

  • 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() : "" )

  • 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>

  • 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 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

  • 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.

  • 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

  • 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

  • Hide url in jsp

    in my project(JSP) ,i want to hide the url(after Login url should not be visible) ,
    please give the code for it

    OP, if your JSPs allow direct access to a database, throw them away NOW!
    JSPs should be used for display purposes only. To modify the contents of the database, a JSP form can be displayed that should POST to a servlet that validates the input. This servlet should be protected to allow access only to authorized users.
    Note that there is no real way to hide the URL or details of what gets posted to the server. You may be able to "hide" some information from direct view by using framesets, using HTTP POST instead of GET, but for anyone with a bit of sense it will be trivially easy to inspect the HTML pages and find out what happens.

  • Enctypting URL in JSP

    Hi All,
    I am working on a web site being developed in jsp. I need to encrypt the URL shown in the address bar of explorer. When a user clicks on a link, a jsp page is called and i dont want to display the URL for That page in address bar. Can anyone please tell me how to achieve this.
    Thanks and Regards
    Mukesh Harjai

    You can't really hide stuff like that.
    The browser will ALWAYS display in the title bar, the destination of the link you clicked.
    Couple of potential solutions:
    1 - Use a frameset, and then navigate only with the main frame. The address bar retains the address of the frameset, and does not display the current page location.
    2 - Use a dispatcher servlet. That way you always access the same URL (ie the servlet) but the parameters you send are different so you get a different result.
    Good luck,
    evnafets

Maybe you are looking for