Get full caller URL from JSP
I have several static Web pages calling a JSP page using IFrame src. Is there a way to get the full URL of calling Web pages within the JSP? Below is an example to illustrate what I have to do. I don't have to call JSP from IFrame src if there is another way to make this work.
JSP is called from:
http://somewhere.com/home/
JSP outputs:
http://somewhere.com/home/
JSP is called from:
http://somewhere.com/work/
JSP outputs:
http://somewhere.com/work/
Each (i)frame spawns a new HTTP request. If you want to do it all in single request, use jsp:include instead of iframe.
Similar Messages
-
How to get requested (target) URL from login page jsp.
Hi,
How can I get requested (target) URL from within login jsp page where unauthenticated user was redirected.
IN other words I need to get target URL that user requested before he was redirected to login page.
In Weblogic there is "j_target_url" session attribute for this purpose.
Does NetWeaver have analogue?
Thanks in advance.hi Alex,
NWDS provides Authentication through Pre defined properties,
We can trap unauthorised user.
To know more about this,
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4ecd6eb1-0301-0010-61bd-a3d6bee102c0
thank you -
i m trying to call it from jsp using
<a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
but its giving error..
type Status report
message HTTP method GET is not supported by this URL
description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).i m trying to call it from jsp using
<a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
but its giving error..
type Status report
message HTTP method GET is not supported by this URL
description The specified HTTP method is not allowed
for the requested resource (HTTP method GET is not
supported by this URL).Are you implementing the doGet or doPost method in your servlet? If you are calling from a hyperlink then it needs to be implementing the GET method. To access the POST method use a html form. -
How to call Servlet from jsp page and how to run this app using tomcat..?
Hi ,
I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
Please tell me how to do this into jsp page..?
Also i wanted to execute this application using tomcat.
Please tell me how to do this...? what setting are required for this...? what will be url ..??
Thanks.well....my problem is as follows:
whenever i type...... http://localhost:8080/appName/
i am getting 404 error.....it is not calling to login.jsp (default jsp)
but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
plz help me. -
Calling url from a form - err using ".value" method
I'm trying to call url from a form, which seems to be the subject of many of these Posts.
I have a form with a combo box/LOV and a button. The LOV will read a url into the combo box from a table of url's.
I used the following code in the "OnClick" Java Script Event Handler section, which I pieced together from other posts in this and other forums. (i.e. I'm a pl/sql programmer trying to use Java Scripts for the first time).
OnClick
var X = FORM_DRWING.DEFAULT.A_DRILLDOWN_PATH.value;
run_form(x);
When I attempt to run this form from the "manage" window, I get a run time error "FORM_DRWING is undefined" upon clicking the button. FORM_DRWING "IS" the name of the form!
The runform() function in the "before displying form" pl/sql code section is
htp.p('<script language="JavaScript1.3">
< !--
function runForm(v_link)
window.open(V_LINK);
//-->
</script>');
This code was from yet another Post.
Any help would be appreciated.
Thanks, Larry
nullHi Larry,
the problem could be that you need to preface your form with 'document.'.
i.e.
var X = document.FORM_DRWING.DEFAULT.A_DRILLDOWN_PATH.value;
Regards Michael -
Can't create DeliveryBean when call bpel from jsp
Can't create DeliveryBean when call bpel from jsp
/*** code ********************************/
Properties props = new java.util.Properties();
java.net.URL url = ClassLoader.getSystemResource("context.properties");
props.load(url.openStream());
Locator locator = new Locator(domain, "bpel", props);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
NormalizedMessage nm = new NormalizedMessage();
String convId = GUIDGenerator.generateGUID();
nm.setProperty(NormalizedMessage.CONVERSATION_ID, convId);
nm.addPart("payload", xml);
NormalizedMessage res = deliveryService.request(processID,operationName, nm);
/*** code ********************************/
This code works well in java , but when I use it in jsp on tomcat server,
the following exception ocured:
Can not create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: Name ejb is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:768) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53) at workflow.bpel.BpelProcessHelper.invokeSyncBpel(BpelProcessHelper.java:54) at
Will anyone to tell me where "ejb/collaxa/system/DeliveryBean" bean is?
Which jar file is this class in ?
Thanksdid you try including bpel/lib/orabpel.jar & bpel/system/server/j2ee/ob_ejb_engine.jar in your tomcat classpath.
-
Wot all ways are there to call servlet from jsp
hi all
i want to know wot all methods are available
so that i can call servlet from jsp
the one which i know is using RequestDispatcher
wot are others ?
thanxhi all
i want to know wot all methods are available
so that i can call servlet from jsp
the one which i know is using RequestDispatcher
wot are others ?
thanxhi here are few ways... to call servlet from jsp...
these are just generic syntax.
Form:
<form action="ServletPath">
Link:
Directives & Action tags :
<%@ page import="ServletPath" %>
<%@ taglib uri="ServletPth" %>
<jsp:include page="ServletPath">
<jsp:forward page="ServletPath">
<jsp:useBean class="ServletPath"> (Not sure about this useBean)
hope you got your answer.
regards,
immu -
Hi,
Can any one tell me how to call JApplet from JSP? I am using <jsp:plugin>
tag but it is not working.use the jsp:plugin tag like this in your jsp page..
<jsp:plugin type="applet"
code="appletclsname.class"
codebase="ourapplets"
jreversion="1.5"
width="400px"
height="200px">
</jsp:plugin> -
REP-52284: Failed to get create resource URL from OiD.
Any one using SSO and Reports ever get this error message? I cannot find any relavant information on this error in the documentation ...
Any assistance appreciatedI'm getting the same error:
REP-52284: Failed to get create resource URL from OiD.
running the URL:
http://host:7778/reports/rwservlet?server=rep_new&report=test.rdf&destype=cache&desformat=html&ssoconn=rep
using several different oracle accounts. It seems like it just started happening. Like you, I haven't found any details on OTN or Metalink.
Doug -
How to call URL from BADDI??
Hi,
I have a requirement to call URL from BADI, i tried to use 'CALL BROWSER' function module,
it works when we are working in GUI, but for portal/PCUI it gives sy-subrc = 2 ( Front end Error)
How to call a pop up page or URL from poral??
Thanks,
Manoj
Edited by: Manoj Lakhanpal on Sep 27, 2010 10:27 AMHi!
I'm using this code for calling a browser, you might try out as well...
MOVE 'http://www.sap.com' TO command.
CONCATENATE 'url.dll,FileProtocolHandler'
command
INTO command
SEPARATED BY space.
MOVE 'rundll32' TO lv_application.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
APPLICATION = lv_application
PARAMETER = command
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
BAD_PARAMETER = 3
FILE_NOT_FOUND = 4
PATH_NOT_FOUND = 5
FILE_EXTENSION_UNKNOWN = 6
ERROR_EXECUTE_FAILED = 7
others = 8
Regards
Tamá -
Get Gateway name / url via JSP
Anyone say what is the method to get the Gateway name / url via JSP?
Thanks
FaustoAlex, 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 -
Calling RFC from JSP : development component
Hi everyone,
I created JSP that call RFC from SAP/R3.
I have problem with the DestinationService.
Without DCs, it worked very good.
But since I created a DC for my JSP project, I have exception at run time regarding
the java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/DestinationService.
Eventhough I add the specific jar, I get an excpetion.
Thanks for the help.
DavidGo to the application-j2ee-engine.xml file and add following reference:
<reference
reference-type="weak">
<reference-target
provider-name="sap.com"
target-type="interface">tcsecdestinations~interface</reference-target>
</reference> -
Hello,
I would like to know whether it is possible to call Oracle Reports (Version 2.5/3.0) from JSP?.
Early reply is highly appreciated.
Thanks
SekharHi Kalyan,
I am assuming that your report itself is saved as a JSP. If you want to run the web layout inside your report (the JSP code in your report), you will have to deploy it to run it. If you want to run the paper layout of your report, you don't need to deploy it, but can call it by a URL in which you specify the report location.
http://machine:port/reports/rwservlet?report=...
Navneet. -
Hi friends,
Can we call a web URL from a ABAP program?
Is there anyway its possible ? if yes how?
Please provide the solution.
Thanks & Regards
kapilHi Kapil,
<b>Look at the below example program:-</b>
REPORT zget_mayors_for_cities.
DATA: it_citymayors TYPE TABLE OF zcitymayors,
wa_citymayors LIKE LINE OF it_citymayors,
mayor TYPE full_name,
trash TYPE string.
PARAMETERS: s_city TYPE s_city LOWER CASE.
SELECT * FROM zcitymayors INTO TABLE it_citymayors
WHERE city LIKE s_city.
* HTTP Client according to
* /people/thomas.jung3/blog/2005/07/01/bsp-create-a-weather-magnet-using-xml-feed-from-weathercom
DATA: client TYPE REF TO if_http_client,
<b>url TYPE string,</b>
xml TYPE xstring,
c_xml TYPE string,
city TYPE string.
* Converter
DATA: l_convin TYPE REF TO cl_abap_conv_in_ce.
LOOP AT it_citymayors INTO wa_citymayors.
* Use the Progress Indicator to show the user which City is processed
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = sy-index
text = wa_citymayors-city.
city = wa_citymayors-city.
* Spaces have to be replaced by _ in the URL
REPLACE FIRST OCCURRENCE OF space IN city WITH '_'.
<b> CONCATENATE
'http://de.wikipedia.org/wiki/Spezial:Export/' city
INTO url.</b>
****Create the HTTP client
TRY.
<b> CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = url
IMPORTING
client = client
EXCEPTIONS
OTHERS = 1.</b>
client->send( ).
client->receive( ).
xml = client->response->get_data( ).
client->close( ).
CATCH cx_root.
WRITE: / 'HTTP Connection error: ', city.
ENDTRY.
* Wikipedia does not provide a encoding with the returned XML
* so we have to do the conversion manually
TRY.
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
encoding = 'UTF-8'
input = xml
endian = 'L'
RECEIVING
conv = l_convin.
CALL METHOD l_convin->read
IMPORTING
data = c_xml.
CATCH cx_root.
WRITE: / 'Problem during Character conversion: ', city.
ENDTRY.
****Transform XML to ABAP Values
TRY.
CALL TRANSFORMATION zwikipedia_mayor_to_abap
SOURCE XML c_xml
RESULT mayor = mayor.
CATCH cx_root.
WRITE: / 'Data loss during transformation: ', city.
ENDTRY.
* Some Mayors already have pecial Pages
REPLACE FIRST OCCURRENCE OF '[[' IN mayor WITH ''.
REPLACE FIRST OCCURRENCE OF ']]' IN mayor WITH ''.
* Some Mayors are members of a Party
SPLIT mayor AT '(' INTO mayor trash.
wa_citymayors-mayor = mayor.
WRITE: / wa_citymayors-city.
* Update Database
IF NOT wa_citymayors-mayor IS INITIAL.
UPDATE zcitymayors FROM wa_citymayors.
WRITE: wa_citymayors-mayor.
ENDIF.
ENDLOOP.
Look at the below thread for more info:-
/people/gregor.wolf3/blog/2006/06/29/use-data-from-wikipedia
Regards
Sudheer -
Calling EJB from JSP in SSL Mode
Hi,
I need to call an EJB from JSP in SSL Mode.
How can i do that.
Regards,
S.V.Satish KumarIn that case you can refer to the following documents:
Using JPA: http://help.sap.com/saphelp_nwce711/helpdata/en/44/eba6292f446c30e10000000a114a6b/frameset.htm
Accessing persistence functionality in EJB 3.0: http://help.sap.com/saphelp_nwce711/helpdata/en/46/307a2a50094f09e10000000a114a6b/frameset.htm
Tell me, if these documents help you. Otherwise, I will search for more information on the topic.
Best regards,
Ekaterina
Maybe you are looking for
-
Opening CDR file - Extremely Fatal to CS6 64-bit apps
I'm trying to get down the bottom of what's causing an extremely serious error in the 64-bit version of Adobe Illustrator CS6. Adobe Illustrator can open CorelDRAW .CDR files, to a certain extent. The .CDR files need to be saved down to version 9 or
-
WCF-SQL Adapter Login fail 'NT AUTHORITY\ANONYMOUS LOGON
Hi, I am have three WCF-SQL receive with WCF-SQL Adapater and two are working fine but the third one is giving the following warning in the Eventlog. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. I really appreciate your help. thanks Ram -
-
I am a new user to Mac and I am trying to build a shared library using gcc. However, I am getting errors when creating a execuatble. My system info. is: [email protected] <810> gcc --version i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, I
-
Ok....what is the trick with hotspots and popping a new browser window.... In my working window there is the # which seems to trigger the cursor that it is hyperlinked...but, it will only stay as a hover versus click over....so, I removed the # symbo
-
Checking textbox through java class which is called in jsp
I have created a text box in html and if the string entered by user is a alphabet it will not show any message ,else it should display a error message..These checking validations of textbox is done in java and called in jsp; a.html <font size="4">Ent