Including an absolute URL in a jsp

All the documentation that I have seen says that I CAN NOT include a file in a jsp using an absolute URL...only relative URL's can be included. Is this true? If not, can somebody give me an example of how to do this?
Thanks,
Pat

Hello Pat
What is the URL doing is it trying to access a JSP file
if so , Then you meed to include the port number with the URL
if not an JSP then I Think It works fine with Absolute URL
Good Luck
Ranjith

Similar Messages

  • How to include a java-class in a JSP.

    I have the following code in a jsp:
    <jsp:include page = "http://test1.testing.com:81/TestClass" />
    I throws the following error:
    Servlet failed with Exception
    java.io.IOException: Nested 404 error
    If I copy paste the url (http://test1.testing.com:81/TestClass) directly on the browser address, it successfully runs the class.

    Copy the servlet class file in the servletclasses folder in the weblogic server then give the code like this
    <jsp:include page="servlet/servletclassfiles" flush="true" />
    this will include the class file to your jsp page
    what ever server better put the servlet class file in the servlet class invoking area

  • XML being loaded thru an absolute URL

    Hi,
    I have an slide show that references a XML document (through
    an absolute URL) which then calls images (also through an absolute
    URL). I'm doing this because I'm pulling the show onto a facebook
    page therefore need it absolutely referenced. [ex:
    http://www.mysite.com/photolist.xml
    The problem I'm running into is that once I try to use the
    same file on my own site by referencing it relatively, it only
    works when the user types in my URL with "www" included.
    So it WILL NOT work if someone goes to
    http://mysite.com but WILL work if
    they go to
    http://www.mysite.com
    Does anyone have an idea of what might cause this and if
    there is a work around? Thanks!

    you are going to have to tell me where "display remote URL's
    enabled" is at?
    i can tell you that i am able to see graphics from adobe.com
    when i place a remote URL in my code, it shows up. to make matters
    even more confusing and painful... i quit CS3, opened my site up in
    dreamweaver 8 and started working on the site. upon reading your
    reply, i quit 8 and reopened CS3 to see if i could find this
    "display remote URL's enabled" feature, and unable to find it, i
    did notice that my previous page with ??? now displayed correctly
    after being run through dreamweaver 8. what does this mean? is
    dreamweaver doing something with my remote site that CS3 is failing
    to do??? using the exact same setup and procedure... CS3 just fails
    miserably and I can't figure out why.

  • Creating absolute urls  in CQ for consuming externally.

    1) Selector which gets parsys
        StringWriter defaultHtml = new StringWriter();
        pageContext.pushBody(defaultHtml);
      %>
        <cq:include path="<%=nodeName%>" resourceType="<%=resourceType%>"/>
      <% pageContext.popBody();%>
    <%=defaultHtml %>
    2) the above produces relative urls, so the externall app wont show images, styles, any scripts.
    3) how can make the above output with absolute urls. Please suggest.

    I'm sorry, here is the link
    http://www.wemblog.com/2011/08/how-to-remove-html-extension-from-url.html
    Regards,

  • Submitting a form data to an absolute url from an h:form?

    I am using <h:form> in a jsf file.
    I need to submit this form to an absolute url. How to accomplish this? I cannot do this way (code at commadButton).
    <h:form prependId="false" id="form2">
              <h:panelGrid columns="2">
              <h:outputText value="Applicant Name: "></h:outputText>
              <h:outputText value="#{appbean.applicantName}" id="name"></h:outputText>
              <h:outputText value="AAMC ID" />
              <h:outputText value="#{appbean.aamcId}"></h:outputText>
              <h:outputText value="Applicant EmailId" />
              <h:outputText value="#{appbean.email}"></h:outputText>
              </h:panelGrid><br>
              <h:inputHidden value="3453323242324" id="Identifier"></h:inputHidden>
              <h:inputHidden id="Order_Items" value="0"></h:inputHidden>
              <h:inputHidden id="Order_Price" value="50"></h:inputHidden>
              <h:inputHidden id="Order_Checksum1" value="9233"></h:inputHidden>
              <h:inputHidden id="Order_Checksum2" value="2623423"></h:inputHidden>
                    <h:commandButton action="absoluteurl?" />
                     </fomr>So what I thought was submit the form to a new page "result.jsp" In result.jsp I used response.sendRedirect(). The absolute url will process the form data.Can you please helpppp..

    Hi Sri,
    You will need to have a Show item for the form as the users will need to be able to view the contents of the form.
    Darin's idea for the email is a good one. You should create a group for all the intended recipients of the email and then configure them to receive notification on updates to the directory that you specify your XML forms to point to.
    SAP library has the answers.
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/e5f85dae7d8a49bffd2cbc255197f0/content.htm
    Cheers
    Daniel

  • Absolute url from h:form

    I need to send form data to an absolute url which is a jsp page out of my application.
    What should be in the attribute of CommandButton for this?
    Any help is greatly appreciated.

    Dear Sir, I have read your articles in your blog. http://balusc.blogspot.com/2007/03/post-redirect-get-pattern.html I have also posted a comment on this too. Frankly I am not an expert but I am learning jsf. I can still accomplish the task in jsp and html. But I want to learn JSF.
    I have the following case. I want all the <h:form> input data passed to an external url which reads them via the parameters names.
    I have created the following form in "process.jsp"
    <h:form prependId="false" id="form2" >
              <h:outputText value="Applicant Name: "></h:outputText>
              <h:outputText value="#{appbean.applicantName}" id="name"></h:outputText><br>
              <h:outputText value="AAMC ID" />
              <h:outputText value="#{appbean.aamcId}" id= "aamcid"></h:outputText><br>
              <h:outputText value="Applicant EmailId" />
              <h:outputText value="#{appbean.email}" id="email"></h:outputText><br>
              <h:inputHidden value="3.2" id="Version"></h:inputHidden>
              <h:inputHidden value="238098" id="Identifier"></h:inputHidden>
              <h:inputHidden id="Order_Items" value="0"></h:inputHidden>
              <h:inputHidden id="Order_Price" value="60"></h:inputHidden>
              *<h:commandButton  action="??" value="Process Payment" type="submit"></h:commandButton> *           
              </h:form>My appbean is as follows.
    public class ChmAppBean {
         public ChmAppBean() {
         private String email;
         private String aamcId;
         private String applicantName;
                    public String getEmail() {
              return email;
         public String getAamcId(){
              return aamcId;
         public String getApplicantName(){
              return applicantName;
         public void setEmail(String email){
              this.email = email;
         public void setAamcId(String aamcId){
              this.aamcId = aamcId;
         public void setApplicantName(String applicantName){
              this.applicantName = applicantName;
    }what should be there in the action="??" following code *<h:commandButton action="??" value="Process Payment" type="submit"></h:commandButton> *
    Your help is greatly appreciated in this regards. Kindly help..

  • New page on click of absolute url

    I need IE to open new page of the absolute url when user click the url on initial page, but as result the new page always replace the inital page but not open a new session, I also refer to the threads in the forum like adding "sap-sessioncmd=open" or "syscmd=nocookie" but still does not work, can anyone give me any suggestion?following is my coding:
    Layout of the page1.htm:
    <htmlb:link id = "link1"
                text = "google with new session"
                reference = "http://www.google.com"
                target    = "_BLANK"
                onClick   = "LinkClick">
    <htmlb:link>
    OnInputProcessing:
      if event_id = cl_htmlb_manager=>event_id. " HTMLB event?
        data: lr_htmlb_event type ref to cl_htmlb_event.
        lr_htmlb_event = cl_htmlb_manager=>get_event( request ).
        if lr_htmlb_event is not initial.
          if lr_htmlb_event->server_event = 'LinkClick'.
            call method navigation->use_absolute_url.
            call method navigation->goto_page
              exporting
                url = 'http://www.google.com/ncr?sap-sessioncmd=open'
    *          url = 'http://www.google.com/ncr?sap-syscmd=nocookie'
                session = 'NEW'.
          endif.
        endif.
      endif.
    Message was edited by: Patrick Yan

    now i got a few minutes to work on this.
    here is a sample code.
    in the layout of the flow logic:
    i am using button for example,
    1) <htmlb:button id = 'CONTINUE'
          text          = "Continue"
          onClick       = "OnInputProcessing(continue)" />
    2) create a page attribute called index and also link the 'continue' page to the same page in the BSP
    3)in the layout
    <% IF INDEX = '1'.(use the dynamic link)
    l_url = 'http://www.google.com/'. %>
        <script type="text/javascript">
      <!--
        window.open("<%=l_url%>","ErrorLog","width=400,height=250,left=250,top=200 dependent=yes resizable=yes");
      //-->
    </script>
    4) in the oninput processing of this page
    assign event
      l_event = cl_htmlb_manager=>get_event( runtime->server->request ).
      IF l_event->id = 'CONTINUE'.
      l_index = '1'.
           navigation->set_parameter( name  = 'INDEX'
                                 value =  l_index ).
        navigation->NEXT_page( 'CONTINUE' ).
    endif.
    so when you click on the button you should get the google page in a popup.
    this is working for me. let me know if you are still having problms.
    regards,
    manasa

  • Absolute URL's do not display in design editor

    if i create a new page in my Site and I display a absolute
    URL image in my page ie:
    http://images.apple.com/home/2007/images/finalcutstudio20070415.jpg
    a image from apple.com's homepage. the image displays
    perfectly inside my HTML preview inside dreamweaver.
    however.... :( if i take that same image and place it inside
    my site (in a image folder) and i link the image using an absolute
    URL ie:
    http://www.mysite.com/images/finalcutstudio20070415.jpg
    the image suddenly no longer will preview inside dreamweaver.
    what gives??? i can view a external absolute img URL from another
    companys website, but using the same site URL that my project
    contains displays a ? icon instead of the image, even though if you
    copy and paste that same URL into a browser the image loads. it
    ONLY works if the image is hosted on another site not associated
    with your sites URL. This is NOT the way dreamweaver 8 was
    working... in fact, i opened my site directly from dreamweaver 8
    and the image loaded perfectly. i can quit dreamweaver 8 and open
    CS3 and using the same site and same site settings that same image
    shows up as a ? and nothing will get through unless its a different
    website URL entierly!!! i am so confused... what has changed?
    and before someone says " you need to upload that image to
    your site" i am past that.. the image i took from apple
    http://images.apple.com/home/2007/images/finalcutstudio20070415.jpg
    i COPIED AND PASTED INTO MY WEBSERVER IMAGE DIRECTORY. so its
    absolutely 100% not a "your image shows up as a ? because it
    doesn't exist BS... no it exists.. its very much the correct URL..
    i can copy the absolute URL of my image on my site and paste it
    into a browser and it displays fine. its only dreamweaver CS3
    trying to do some weird crap that causes it to show up as a grey ?
    box. and remember.. in dreamweaver 8 i can open the page and it has
    www.mysite.com/images/image.jpg written in the code and it displays
    off my site PERFECTLY. someone have any clue why this is now not
    working, and how i can fix it without having to work entierly in
    relative URLS, and then go back and manually paste in my
    www.website.com in front of all relative URLS after i am 100%
    finished.. I would rather go back to dreamweaver 8 where it works
    than use CS3 and not have this feature working.... 1 step forward 2
    steps backward.

    you are going to have to tell me where "display remote URL's
    enabled" is at?
    i can tell you that i am able to see graphics from adobe.com
    when i place a remote URL in my code, it shows up. to make matters
    even more confusing and painful... i quit CS3, opened my site up in
    dreamweaver 8 and started working on the site. upon reading your
    reply, i quit 8 and reopened CS3 to see if i could find this
    "display remote URL's enabled" feature, and unable to find it, i
    did notice that my previous page with ??? now displayed correctly
    after being run through dreamweaver 8. what does this mean? is
    dreamweaver doing something with my remote site that CS3 is failing
    to do??? using the exact same setup and procedure... CS3 just fails
    miserably and I can't figure out why.

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • Hi, how to use URL encoding in jsp

    hi, how to apply URL encoding in jsp for a string, could u pls suggest some ideas to use URL encoding in jsp
    thank you in advance

    hi, thnx for the reply, but my problem is to use url encoding method
    i would u like to know how to represent in jsp program i have asp code some thing like this
    href='/project/tel_number.asp?team=<%=DbRecTeam("id")%>&name=<%=Server.URLEncode(DbRec("name"))%>'
    i would like to know how replace that Server.URLEncode stmt in jsp, could u pls suggest some equivalent method for the above stmt
    thanx in advance

  • How do I get the URL of a jsp page?

    I have a jsp page which has a link to a servlet page, in the servlet page, I want to get the URL of the jsp page.
    I tried to use request.getHeader("referer"), it seems like if it is a link in the jsp directly lead to the servlet, it works, but if the link calls a javascript function which opens up a window runing the servlet, it is not working. I have to do the second way, so it is not working by doing request.getHeader("referer")
    I tried to use javascript "location.href", I get the whole url by alerting the url in the jsp page:
    http://localhost:8080/pos-webapp/serv/qt_old?currentpage=portal&bcd=ABC123&pnm=P1001830&prnm=1&psd=236863.0&ln=01&sln=NYPPA&stp=2.1&stt=A&_POSID=1F8464122ADAF4EEC9B1A94C286EB252
    then I pass this url when calling with my servlet, in the servlet page, when I do request.getParameter("url"), the url is actually cut off like this:
    http://localhost:8080/pos-webapp/serv/qt_old?currentpage=portal
    anything after &pnm is cut off, anyone has any idea?
    Thanks in advance.

    Thank you.
    but how do I put encoding in the javascript code? do I need to decode in my servlet page?
    here is my code in the jsp page:
    linkset[3]+='<div class="menuitems">Email Diagnostics to AutoOne</div>'<%     
    function emailDiagnostics()
    win = window.open("/pos-webapp/serv/email_diagnostics?url=" + location.href + "&browser=" + navigator.appName, "emailDiagnostics",
    "width=350, height=140, resizable=no, scrollbars=no, toolbar=no, location=yes, directories=no, status=no, menubar=no, copyhistory=no, left=450, top=300");
    win.focus();
    }

  • Absolute URLs  not working when file is on a remote server.

    My client has asked me to provide a template for an investor relations section of their website. The HTML page or template for this page will be at the service providers site, but all the images etc. for the page will be linked to files on my clients server. Everything looks fine, but the absolute URL's in the .swf file back to my clients site aren't working.
    This is what the service provider's guidlines say, but I'm not sure where the code is supposed to go:
    Similarly, newer versions of the Flash Media Player installed by most users have a high level of security enabled by default. This is done to prevent Flash movies from playing on web pages that are hosted on different domains than the movie itself (again, to combat “phishing” or “spoofing”).
    You do have the ability to overwrite this feature by proactively developing your Flash file so that it contains the following lines of code:
    System.security.allowDomain(“*”)
    stem.security.allowInsecureDomain(“*”)
    Sy
    You should also add the following line of HTML within the embedded Flash call in your HTML template:
    <param name=”AllowScriptAccess” value=”always” />
    This solution requires edits to the ActionScript of the pre-compiled Flash file, and is not something we can edit. For further guidance and more information, please speak with the developer of your Flash file.
    Thanks

    the easiest way to deal with security issues is to avoid them.  if all files are on the same server, use relative urls.
    otherwise, you may have to deal with security issues.  whether you do or not, and if you do, how you deal with them, depends on what you're trying to do.
    you may be able to use System properties but you may need cross-domain security files.

  • How I can include js (javascript) file in a jsp page?

    Hi,
    I�ve tried to include a js (javascript) file in jsp file but it doesn�t work.
    When I try to use a js function in the browser I always receive an error. Oh, of course, I�m including the correct tag <script src= ...
    What can I do? Does the problem in the WebServer?

    I cheated and put the scripts in another '.jsp' file and had no problem...then put an include b4 the closing 'head' tag, like this:
    <jsp:include page="scrpt.jsp" flush="true" />
    I had to do it this way for debugging using JDeveloper (it doesnt seem to like '.js' files). But when the jsp is on the server I used the following line instead:
    <script language='JavaScript' src='scrpt.js'></script>
    hope this helps.

  • Please suggest the URL to display JSP report

    Hi Experts,
    Last week, we tried to change the memory of Response Cache and buffer Cache to increase the speed of the Excel report. But it didn’t work out.
    And from the below link, I understood we can convert the oracle 9i report to excel by converting the Oracle 9i report to JSP report.
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    I’ve converted the Oracle 9i report to JSP report and finding the way to display the JSP report using Application Server. I am trying to find out the REPORT URL of simple JSP report and using Reports Servlet . Right now I am trying the below steps to display the JSP report in Application Server.
    Please suggest the URL for displaying the JSP report
    Thanks & Regards

    Please explain how any of this relates to the topic of this forum: "Database Upgrade."
    If you repost your question in the correct forum, or perhaps with the correct company, will be more likely to find the help you need. For example ... what App Server (make and model).
    Thank you?

  • Absolute URL IMAGE UI control in Web Dynpro ABAP fails

    I would like to display a .jpg from the Internet, either using a URL or an RFC Destination as the source.
    The "Web Dynpro ABAP Development in Detail" manual says that this can be done using only the Source attribute of the IMAGE UI control (see page 114) - that is,
       create an RFC Destination G-HTTP entry for the URL,
       type in that RFC Destination as $NAME$
       append any further extension of the URL as "/path in lower letters"
    I can enter an RFC Destination (ex., $UBERORBS$) which points directly to a single image file via its host/path and it is displayed in SE80's Layout Preview, but nothing displays at runtime.
    If I try to extend an RFC Destination's path to point to that image file (ex., $UBERORBS_BASE$/uberorbs_44pence.jpg), the image is also displayed in the Layout Preview, but not at runtime.
    Is this a bug?  or something wrong with our implementation?  We are at SAP_BASIS 700 level 0006.
    (Also, if the Source entry is not exactly correct, SE80 aborts following the entry with STRING_OFFSET_NEGATIVE.)

    Here's another piece of information.
    I am able to use the test app WDR_TEST_UI_ELEMENTS to display at runtime the $UBERORBS$ RFC Destination-absolute URL image.
    So, does this mean that there is a critical setting within my Web Dynpro component which must be set properly to permit this?

Maybe you are looking for