Passing a URL parameter to an applet
Hi,
I am NEW to Java and need to know how can I capture a parameter from the application URL and store it so that it is available to any class, applet and/or server on my application? And, once I store it how can I access it from an applet for example?
Thanks in advance
Applets and servlets are entirely different things, and how you do something like this changes for each.
Similar Messages
-
ADF Faces + ADF BC : how to pass an url parameter to a backend business ser
Hi,
I'm using latest JDev studio version SU 3.
My project is using ADF Faces with BC4J in the service layer.
I have a backend application module which exposes a method taking a String parameter as an input (ex: void setUsername(String username))
I need to have a jspx page which reads a parameter passed in the url (http://localhost/faces/registerUser.jspx?username=john) and send it to the backend service method when a submit is raised on a clicked button.
It's pretty simple when using inputtext for example but not obvious if I want to use urm param instead of inputtext.
How do I do this ?
ThanksHi,
Thanks a lot for your answers.
The link http://www.it-eye.nl/weblog/2006/06/12/passing-a-url-parameter-to-model-using-adf/ is no more reachable.
The following EL expression work for displaying the parameter inside an outputText component :
#{facesContext.externalContext.requestParameterMap[yourParameter′]}
The parameter is not sent to the business service when the button is clicked.
Thanks,
Seb. -
Passing custom URL parameter to a FPM app
Hello,
I am facing a problem when trying to pass an URL parameter to a GAF FPM application.
The standard way by adding a parameter to the WD application and adding a parameter to the default plug in the window doesn't work for FPM... at least in my case.
Does anyone know how URL parameters work with the FPM framework?
Thank you and BR,
ChrisYou just need to declare parameters which you will be using in WD Application - Parameters tab.
To fetch parameters for application which is using FPM, you have to use following piece of code -
wd_this->app_param = wd_this->mr_fpm->mo_app_parameter.
CALL METHOD wd_this->app_param->get_value
EXPORTING
iv_key = 'INTERFACE_MODEL'
IMPORTING
ev_value = wd_this->lv_interface_model.
CALL METHOD wd_this->app_param->get_value
EXPORTING
iv_key = 'MODE'
IMPORTING
ev_value = wd_this->lv_mode.
Here wd_this->mr_fpm holds FPM reference and is of type ref to IF_FPM
and wd_this->app_param holds FPM parameters reference and is of type IF_FPM_PARAMETER.
After getting reference I'm calling methods to get individual application parameters by sending their names.
We called this in DOINIT of component controller.
Regards
Manas Dua -
Passing a url parameter to a method using ADF and JSP
Hi
(JDEV10.1.3 : ADF BC, JSP, STRUTS)
I have a text input on my JSP Page which I need to pass the content as an argument for the dataaction which is implemented in my application Module as a method to set the where clause of a query. I do not know How to set the Method's NDValue. I have tried:
NDValue='${pageContext.request.parameterMap[ComplexID]}'
But it always returns null
hint: ComplexID is my txtBox name on the JSP page.
I need to pass request.getParameter("ComplexID") but as an NDValue it is not accepted.
note that ComplexID is not a databind object, It has been created by myself as an HTML element.What result do you get when you enter the following into your browser:
http://mylocalhost_IP/path/to/component/questions.cfc?method=getQuestionsXML&quizid=2 ?
(Replace http://mylocalhost_IP/path/to/component/ with the correct path to your component)
Are the results valid/well-formed XML? Is there any extraneous text that might interferre with the XML processing? I noticed your xPath was looking for an element called "question s" - Is that the correct name of the element in your XML? Is there really a space in the name?
See if you can troubleshoot the issue using your browser first before adding it back into the Spry call.
Hope that helps!
- Michael -
How to pass mysql query id through url parameter to a detail page
Hi there,
I am a newbie to JSP and I am trying to pass a url parameter to a detail page so that it will query a mysql data query to show the details of that query. How can I write the query on the details page so that it will display the query results on the page. eg select * From data Where = "passed_url parameter_ value". Please i need urgent help on this please.<Acknowledged>
which should be strongly cautioned against even for "newbies".
</Acknowledged>
Right, but the code you posted will "work" in a very harmful wayNot always, I used normal Statements last year and I had no problems.
Even with pretty capible code brakers trying to cause $h!t with my application.
Just check for invalid datatypes, and for SQL Injections remove stuff like ' or replace with `
But yes PStat... are the better way. -
Hi,
I would like to pass a url parameter, with the following format, to a get method.
http://myserver/send?param-id=1234@5678
I was able to do it using the HTTPService send(parameter) but the characters "-" and "@" are changed. I want to send the parameter as is, can anyone teach me how?
Thanks in advance..rockstar888,
for a GET, you can only use things which are permitted characters in a URL string. Hence some characters won't work just as they are. Now, we all know some browsers are very accommodating with things like this (eg a space character should be sent as %20 but if typing in a URL you can usually get away with it in a browser), but you have to be more strict in this situation. One way is to have some encode/decode stuff at each end. Another (if you are going to use the result simply as a URL at the other end) is just to let the URL encoding go on its way without problems. Another is to use POST rather than GET, since POST variables are passed like entries in an HTML form rather than a querystring, so you have more flexibility. To do this you just use the method property of HTTPService.
Richard -
How to get the URL parameter value when navigating from JSP Page to portal
Hi All,
I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
How do we resolve this problem?
Regards,
Boopathi MHi
Please try these link might helpful for you
1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
Best Regards
Satish Kumar -
Pass an hidden parameter to the BI Publisher
Hi guru,
I need to pass a value (parameter) to a BI Publisher report without to show the value to the user. I tried to create an hidden parameter, and tried to pass the value but don't work. I tried to call the report in GET and POST without success.
If the parameter is visible, it works.
Any idea to do it with another method?
Thanks in advance
Alessandro SabelliHi,
Thanks a lot for your answers.
The link http://www.it-eye.nl/weblog/2006/06/12/passing-a-url-parameter-to-model-using-adf/ is no more reachable.
The following EL expression work for displaying the parameter inside an outputText component :
#{facesContext.externalContext.requestParameterMap[yourParameter′]}
The parameter is not sent to the business service when the button is clicked.
Thanks,
Seb. -
Sending a url parameter in web Access 2013 application
So we are using a sharepoint Access 2013 application form to enter in data that then uploads to a backend db. The form essentially is a series of reports with a report date and ID, etc. What we are trying to do is find a way to pass a url parameter that
will open up our Access 2013 site to a specific report. Currently if you use the URL in the address box its just a default URL that would open up at the default page of our application. We want it more precise so people don't have to click and
search for the specific report but that it just opens up to the report in question. Does anyone know how to do this? Please let me know if you need more information.Effort to bump this up by giving more info:
So I have a sharepoint site with the url like this:
//Microsoft.445(various).sharepoint.com/reports/default.aspx#Tile=History
So this would take us to the Report site and go directly to the History tab of the page. For this example it would be a running list of reports from say the last month going back 5 years. When you go to this site it defaults to the newest report
so say a report from July 31st and lets say it has a report id of 12335. What I am looking to do is be able to go to a specific report id so lets say I want to give a link for people to go to a report from May 5th with a report id of 12201.
You would think following simple language conventions I would be able to simply add in to the URL above an addition of &ReportID=12201 This does not work however. I've also tried another example I saw in which you add in a where clause
so it would be an addition of Where==reported=12201 This also did not work. Whenever I enter these in it still just defaults to the July 31st report. I cannot seem to find a way to get it to go to a specific report.
Any suggestions? -
How can I pass empty value in URL Parameter
Hi,
I am passing different URL parameters to one page, to filter
the recordset on that page. How can I pass an empty value in the
URL parameter so that the recordset in unfiltered?
The URL parameter is based on one field of the database:
ContentType. So, the link would be to
default.asp?ContentType=Event
and then all records that have the ContentType field in the
DB as Event are displayed. Is it possible to use this system to
pass an empty parameter so that all records are displayed?
Thanks
Ian?ContentType=All
<% if (ContentType == "All")
Build recordset w/o filtering
ASP is rusty, but those are the basics.
"iandobie" <[email protected]> wrote in
message
news:e8im80$q7m$[email protected]..
> Hi,
> I am passing different URL parameters to one page, to
filter the recordset
> on
> that page. How can I pass an empty value in the URL
parameter so that the
> recordset in unfiltered?
> The URL parameter is based on one field of the database:
ContentType. So,
> the
> link would be to
> default.asp?ContentType=Event
> and then all records that have the ContentType field in
the DB as Event
> are
> displayed. Is it possible to use this system to pass an
empty parameter so
> that
> all records are displayed?
> Thanks
> Ian
> -
Passing parameter between two applets
hi all,
i want to pass parameter between two applets. in other words, when user clicks the button; close the running applet, pass parameter to another applet and run another applet.
now i think that could be, ( creating a parameter table in database, when user click on button write parameters to table and stop active applet and run other applet. when other applet runs in init methot it takes parameter from table). but it will be very indirect way.
if you have an idea or information, plesae tell me.
thanks for your interestHi ,
Plz pay a visit to this wonderful website,
http://www.rgagnon.com/javadetails/java-0022.html / http://www.rgagnon.com/howto.html
Best Wishes,
Gaurav
PS : Thanks to Real Gagnon. This is all I can do at this stage, but wanted to say you are doing a wonderful job. -
How to pass a querry as a url parameter
Hi Forum
I need to pass an sql query as a url parameter I wrote the following code:
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly");
applicationURL="?distACN="wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN()"&type="type"&query="strGreportQuery;
but got the following exception:
ecom.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=../../local/AgencyFee_SettlementSummaryReport/Ko_AgencyFee_PrinterFriendly?type=1&query=SELECT v.PAY_TO_ACN_NAME PAY_TO_ACN_NAME, v.DIST_ACN DIST_ACN, v.DIST_NAME DIST_NAME, v.AP_CHECK_NBR AP_CHECK_NBR, v.BATCH_NBR BATCH_NBR, TO_DATE(v.TRANS_DATE) TRANS_DATE, TO_DATE(v.AP_CHECK_DATE) SETTLE_DATE, Sum(v.QTY_DELIVERED) QTY_DELIVERED, Sum(v.TOTAL_AMT) TOTAL_AMT, Min(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_BEG, Max(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_END, (select sum(vr.qty_delivered) from VRF_ERR_DETL vr where vr.ccf_acn_nbr=v.dist_acn and to_char(vr.batch_nbr)=v.batch_nbr) TOTAL_ERR_REC From VRF_VOL_DETL v WHERE v.PAY_TO_ACN = 3182 AND v.AP_CHECK_NBR = 0 GROUP BY v.PAY_TO_ACN_NAME, v.DIST_ACN, v.DIST_NAME, v.AP_CHECK_NBR, v.BATCH_NBR, v.TRANS_DATE , v.AP_CHECK_DATE ORDER BY v.DIST_ACN, v.AP_CHECK_NBR, v.BATCH_NBR
Can someone help me out on this?
Thanks & Regards
Jaspreet KaurHi jaspreet,
you can try the following:
HashMap params = new HashMap();
params.put("distACN", wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN());
params.put("type","type");
params.put("query",strGreportQuery);
try {
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly", params);
} catch (Exception ex) { -
Passing date criteria in url parameter
Hi,
I want to filter a recordset by a given date.
Create the recordset, if I use a runtime value of #27/11/06#
all the records for that date are returned.
However, when I try to pass the same information through an
URL Parameter it doesn't work.
Is there a problem with passing this info in that way?
Thanks, Mark.No, should be absoloutely fine. The prob is most likely to do
with your SQL
statement.
As a test, don't display any records. At the top of your
page, try
outputting the completed SQL statement onto the page to see
what it looks
like. The problem being you may need to add the # symbols
manually. Should
look something like
"SELECT * FROM TableName WHERE DateField = #" &
URLParameter & "#"
HTH,
Piers -
Problem passing Session variable as URL parameter?
Hi,
I am trying to create a multiple page entry form using
coldfusion session. But I am having some problem when passing the
session variable to url parameter. For test purpose I have created
the following code:
<cfif Not IsDefined("SESSION.AE")>
<!--- If structure undefined, create/initialize it
--->
<cfset SESSION.AE = StructNew()>
<!--- Represent current form srep; start at one --->
<cfset SESSION.AE.StepNum = 1>
</cfif>
<cfif IsDefined("Form.GoBack")>
<cfset SESSION.AE.StepNum = #url.StepNum# - 1>
<cfelseif IsDefined("Form.Next")>
<cfset SESSION.AE.StepNum = #url.StepNum# + 1>
</cfif>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<form method="post"
action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
<input type="submit" name="GoBack" value="Back">
<input type="submit" name="Next" value="Next">
</form>
</body>
</html>
When run it I get the following error:
The value "" cannot be converted to a number
The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm: line
11
9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
10 : <cfelseif IsDefined("Form.Next")>
11 : <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
12 : <!---<cfset SESSION.AE.StepNum = #url.StepNum# +
1>--->
13 : </cfif>
I couldn't figure out where is the problem. Any help is
really appreciated.
Thanks in advance.You are mixing up your gets and posts aren't you?
You have your form method set to post which creates form
variables not
url variables. So when you try to use the url variable to set
your
session it does not exist.
Change your SESSION.AE.StepNum = #url.StepNum# to
Session.AE.StepNum =
form.StepNum, note there is no need for the #'s.
OR
change your form method="post" to form method="get"
Nagelia wrote:
> Hi,
>
> I am trying to create a multiple page entry form using
coldfusion session. But
> I am having some problem when passing the session
counter to url parameter. For
> test purpose I have created the following code:
>
> <cfif Not IsDefined("SESSION.AE")>
> <!--- If structure undefined, create/initialize it
--->
> <cfset SESSION.AE = StructNew()>
> <!--- Represent current form srep; start at one
--->
> <cfset SESSION.AE.StepNum = 1>
> </cfif>
> <cfif IsDefined("Form.GoBack")>
> <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
> <cfelseif IsDefined("Form.Next")>
> <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
> </cfif>
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> </head>
> <body>
> <form method="post"
action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
> <input type="submit" name="GoBack" value="Back">
> <input type="submit" name="Next" value="Next">
> </form>
> </body>
> </html>
>
> When run it I get the following error:
>
> The value "" cannot be converted to a number
>
>
> The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm:
line 11
>
> 9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
> 10 : <cfelseif IsDefined("Form.Next")>
> 11 : <cfset SESSION.AE.StepNum = #url.StepNum# +
1>
> 12 : <!---<cfset SESSION.AE.StepNum =
#url.StepNum# + 1>--->
> 13 : </cfif>
>
> I couldn't figure out where is the problem. Any help is
really appreciated.
>
> Thanks in advance.
>
>
>
> -
How to pass url parameter string to a query
I need urgent help please, to pass a mysql query string from a master page to another details jsp page using a url parameter. The master page's url parameter looks like this;
<a href="Details.jsp?jobs=<c:out value="${row.actions_id}"/>"><c:out value="${row.action_title}"/></a>How can I query the mysql database using the url query string to get the query details.
Please help me out with detailed example please.You can get the parameter value using HttpServletRequest#getParameter():String jobs = request.getParameter("jobs");You can interact with databases using the JDBC API. This is a different topic. If you aren't familiar with it yet, then learn it. There is a very good JDBC tutorial here at Sun.com: [http://java.sun.com/docs/books/tutorial/jdbc/index.html]. Once you're familiar with that, create a DAO class which does the all the database interaction tasks. Create a method which takes the jobs value as parameter and let it return result(s) accordingly. You may find this article useful either: [http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html].
Maybe you are looking for
-
Hi, I'm trying to configure SSO for my web application using IIS as webserver and the IIS-Weblogic proxy plugin provided by bea. I use Weblogic 8.1 SP4. I followed the procedure described in the dev2dev documentation and now I am stuck with a ntlm vs
-
I cannot plug it into iTunes and reload as my MacBook crashed a few days ago and I had to get a new hard drive. Recovery software is unable to retrieve anything from the hard drive. All the songs were from CDs so not saved in iTunes. The iPod was las
-
How to load flat file in existing Architecture.
Hi everyone! There is an existing architecture that I have to upload data into. There is a cube on top, followed below by an ODS and its update rules to the cube, followed below by an Infosource and its corresponding update rule to the ODS above it,
-
Problem with InDesign, Photoshop and the clipboard...
Dear community, this is my first posting within the adobe forums, please be gentle So, first things first. We recently switched from PowerPC PowerMac infrastructure to much more powerful Windows machines (i.e. i7 3.4GHz, 16GB Ram, 128GB SSD and decen
-
Getting no result by joining three tables in BMM
Hi all, I have a requirement where I have a fact table and two ailas dimension table. Let say fact is w_account_f and dimension ailas dim_w_account_d_trans and dim_w_account_d_sal of w_account_d table I have join in physical layer w_account_f ----> d