Passing parameter fr doGet to doPost via getRequestURI() /form
doGet
in my doGet i hav a
<form action = req.getRequestURI() method post>
......do stuff...
<input type=hidden name=accno value=rs.getObject(4)>
<input type=submit >
</form>
my doPost
String accno = req.getParameter("accno");
out.println (accno) ----> is "null"....
can anyone tell me how to solve this please?
Hi,
I guess the input type is hidden in your doGet(). Just change input type from hidden to text
<form action = req.getRequestURI() method post>
......do stuff...
<input type=hidden name=accno value=rs.getObject(4)>
<input type=submit >
</form>bye for now
sat
Similar Messages
-
Pass parameter to WD abap iview via Portal link
Hello all,
I have created one WD ABAP application and I am accessing the same with the help of URL parameters. I am retrieving these URL parameters in 'HANDLEDEFAULT' event handler of the application window.
Now client wants to access the same with the help of NavigationParameter so I created relevant iView in portal and I am accessing application using link which is composed of portal link and NavigationTarget parameter.
My question, If I want to pass application parameters via URL, How do I access the same in my window. Do I need some sort of separate mechanism to take the URL parameters to my application window when application is running on portal?
Please share your thoughts on this.
(Same problem explained in link /thread/672163 [original link is broken])
Thanks in Advance,
Prashant JagdaleHi Kiran Kumar,
Thanks for your document but still my problem is not solved. I will try to explain my problem in detail.
I have developed one WD application and I was accessing the same using link suppose
http://newdomain.abc.com:8000/sap/bc/webdynpro/sap/zwda_url_parameters?pernr=12345&name=test1&sap-client=200&sap-language=EN
I was retrieving the values of of pernr and name in 'HANDLEDEFAULT' event handler by adding two parameters as PERNER and NAME. and it is working fine.
Now this application is running on portal. and I am accessing the same using URL
http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPage
but as i want to pass above mentioned parameter (pernr and name) via link, After an investigation, I am thinking to use of Dynamic parameter. So my link will become like
http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPage&DynamicParameter="pernr=12345&name=test1"
So, my question is , how I can access these values specified in DynamicParameter in my WD abap iView. Whether they are available in 'HANDLEDEFAULT' event handler using method wdevent->get_data?
I don't want to pass my parameters using iView property "Application Parameter."
Please give some inputs on this. Also Please guide me whether I can use some other way to achieve this. but the thing is, i must want to pass the values via URL only.
Thanks in Advance,
Prashant Jagdale -
Passing parameter to third party survey via Webex Event Destination URL
I am looking into using the end of event destination URL to route an Event attendee to a third party survey tool. Is it possible to pass WebEx environment variables (attendee email, event name, event start date, etc.) via URL parameters, so I don't need to ask the user the name and event attended in the survey?
Thanks, David!Hi David,
I assume this is for WebEx SaaS (Cloud based) solution. Unfortunately, this community is for Cisco WebEx Meetings Server (on-prem solution) and is not observed by WebEx SaaS experts. You might be better of by calling into WebEx Support - 1.866.229.3239, provide them with your WebEx Site name and see if they can answer your question.
-Dejan -
How to pass parameter /1BCDWB/DOCPARAMS from webdynpro?
Hi Experts,
We create a wdp view and indert an adobe form into it. And this form has an interface based on XML schema.
Now we want to translate this form into multi-language, and in wdp side, we will display diffenent language version of form for different regions.
I found that there is a paramater /1BCDWB/DOCPARAMS-LANGU, and it seems can control the language version in processing.
But I donot know how to pass parameter /1BCDWB/DOCPARAMS from wdp to adobe form.
Its my 1st to use adobe form and wdp, i really have no way out. Any advice will be Appreciated.
Thank you.
Richard@sahai: Hey no , I am using very very simple example without any query or complex statement. I just have 2 radio buttons in VIEW1. On clicking the radio button, the naviagtion to view2 is done and the value of selected radio button is passed as a parameter in the plug.
In the view2 , i just have a caption in my layout where i am displaying the parameter value by setting the attribute.THe warning i get is in view2. Here is the code. Apart from this there is no coding in view2.
METHOD HANDLEPLUG_IN_V2 .
DATA:
NODE_CAPT_MSG TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_CAPT_MSG TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_CAPT_MSG TYPE IF_VIEW2=>ELEMENT_CAPT_MSG ,
ITEM_MSG LIKE STRU_CAPT_MSG-MSG.
* navigate from <CONTEXT> to <CAPT_MSG> via lead selection
NODE_CAPT_MSG = WD_CONTEXT->GET_CHILD_NODE( NAME = `CAPT_MSG` ).
* get single attribute
NODE_CAPT_MSG->SET_ATTRIBUTE(
EXPORTING
NAME = `MSG`
VALUE = PAR_1 ).
ENDMETHOD. -
Using Go URL to Pass parameter between dashboard
Hi All,
I am trying to pass parameter using GO URL functionality from one dashboard analysis field to another dashboard.
The navigation is working properly but the parameter is not getting passed, I am not sure why.
The Called dashboard has a analysis which has IS PROMPTED filter attached to it for the passing filter. I tried various ways to make this work
Option 1
In the calling analysis, I am using a Narrative View and inside I have used the below code.
<a href="saw.dll?Go&Path=/shared/MI/_portal/Client-MI&Page=Supplier%20Detail%20Tab&Action=Navigate&P0=1&P1=eq&P2=Dim%20Supplier.Supplier%20Name%20Current&P3=1+%22STR%20LTD%22"> @2[br/]
This one navigate but filtering is not happening
Option 2 (My first preference will be this option)
Also I tried to provide custom Data Format under the column Properties
[html]"<font class="nav" onclick=\"JavaScript:GoNav(event, '/shared/MI/_portal/Client-MI/Supplier Detail Tab','Dim Supplier','Supplier Name Current','"@"');\">"@"</font>
This ends up giving error
Type mismatch of catalog object /shared/MI/_portal/Client-MI/Supplier Detail Tab -- expected , got .
Error Details
Error Codes: UVWDR6UA
Also, both the tabs (Called and Calling are under the same Dashboard)
Can anyone please let me know, were I am making mistake. I tried refereeing Oracle documentation but still no result.
ThanksLooks like you've got it almost right - just an extra unneeded "
<a href="two.jsp"?ant=<%= ant %>"><%=antName%></a>
which should render on the page as something like
My Ant Task
When you click the link, it should pass that parameter, and you can get it via request.getParameter(). -
How can i pass parameter from a JSP form (depends on what user chooses from a select box to a Servlet.
I need to call multiple query based on what parameter choosen and display the result in table view.
Example :
1. User select choice1 from JSP form -> Servlet : call query Select * from Table1 where cond = choice1;
2. User select choice2 from JSP form -> Servlet : call query Select * from Table1 where cond = choice2;
Any sample code?
Thanks for any help.Thanks melondck.
I have this Servlet which i want it to run queries and display results in table format. I know there's something wrong with the code. But i am new to Servlet/Java. Thanks for anyone who point me the mistakes. Thanks.
<code>
package mypackage;
import java.sql.*;
import javax.servlet.http.*;
import java.io.*;
import javax.servlet.*;
public class DisplayServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse rsp)
throws ServletException, IOException {
rsp.setContentType("text/html");
String url="jdbc:mysql://localhost/smdb";
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query;
ServletOutputStream out = rsp.getOutputStream();
PrintWriter out1 = rsp.getWriter();
String answer = req.getParameter("answer");
out1.println("<html>");
out1.println("<head><title> Inventory: </title></head>");
out1.println("<body>");
if (answer == null) {
StringBuffer action = HttpUtils.getRequestURL(req);
out1.println("<form action=\"" + action + "\" method=\"POST\">\n");
out1.println("<p><b>Please select:</b></p>");
out1.println("<p><input type=\"radio\" name=\"answer\" " +
"value=\"A\" /> Display All <br />");
out1.println(" <input type=\"radio\" name=\"answer\" " +
"value=\"B\" /> Device <br />");
out1.println(" <input type=\"radio\" name=\"answer\" " +
"value=\"C\" /> Manufacturer <br />");
out1.println(" <input type=\"radio\" name=\"answer\" " +
"value=\"D\" /> Location <br />");
out1.println(" <input type=\"submit\" value=\"Submit\" /></p>");
out1.println("</form>");
} else {
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection (url, "user", "mypass");
stmt = con.createStatement();
if (answer.equals("A")) {
query = "SELECT Device, LocFloor FROM Inventory";
esleif (answer.equals("B)) {
query = "SELECT Device, LocFloor FROM Inventory where ....";
ResultSet result = stmt.executeQuery(query);
//Display the result set in a HTML table
out.println("<HTML><HEAD><TITLE>List</TITLE></HEAD>");
out.println("<BODY>");
out.println("<FORM NAME='form' ");
out.println("METHOD='GET'><TABLE BORDER='1' CELLSPACING='2' CELLPADDING='2'>");
out.println("<TR><TH></TH><TH>Device Type</TH><TH>Floor</TH></TR>");
while(result.next()) {
String type = result.getString("Device");
String flr = result.getString("LocFloor");
out.println("<TD>" + type + "</TD>");
out.println("<TD>" + flr + "</TD>");
catch(ClassNotFoundException e) {
out.println("Could not load database driver: " + e.getMessage());
catch(SQLException e) {
out.println("SQLException caught: " + e.getMessage());
finally {
//close the database connection.
try {
if (con != null) con.close();
catch (SQLException e) {}
out.println("</body></html>");
</code> -
Passing parameter values to another report using URL actions (reportserver)
Hi guys,
I have two reports that I link with eachother. For report A - B everything works perfect. When I try to do the same for report B - A it works, but the parameter value is not filled in.
=Iif(
Parameters!PAR_LinksEnabled.Value,
Globals!ReportServerUrl & "?" & Replace(Globals!ReportServerUrl, "_vti_bin/ReportServer", "")
& "Reporting/POS Reporting/Reports/POS Report.rdl&POS_ID=" & Parameters!CONNECTION_ID.Value & "&POS_LANG=" & Parameters!POS_LANG.Value & "&PAR_Date=%5BDate invoice%5D.%5BBonus Calendar - Week%5D.%5BBonus
week of year%5D.%26%5B" & Left(Parameters!YEAR_WEEK.Label, 4) + "%5D%26%5B" & CInt(Right(Parameters!YEAR_WEEK.Label, 2)) & "%5D",
Nothing
Even tho I specify the parameter he has to pass through, the report opens with parameter period : <select a value>. Anyone has an idea why such behaviour happens?
Thanks!Hi Yvanlathem,
Per my understanding that you want to use the expression above to conditional add the hyperlink to pass the value to the parameter of anpother rreport via the URL in the SharePoint integrated mode report server, right?
I have check the expression you have provided and the issue can be caused by the wrong way you have write the expression to pass the parameter, please check detais information below to make sure you have pass parameter in the URL correctly:
Please modify the expression to below structure :
=Iif( Parameters!PAR_LinksEnabled.Value="Enabled", "URL",Nothing)
I saw you have use expression like "&POS_ID=" & Parameters!CONNECTION_ID.Value & "" which is incorrect, we need to set a report parameter within a URL, use the following syntax:
parameter=value(not Value=Parameter)
If you are using the following syntax like "Parameter1=Parameter2", both parameters and from different report, if you have add the "Go to URL" action from report2 to Report1, please make sure Parameter1 is from the Report1
and Parameter2 is from Report2, change the order will not work
More detail information:
Pass a Report Parameter Within a URL
So, In your scenario, please make sure the value is from one report's field (POS_ID) and the the parameter(CONNECTION_ID) is from another report (e.g:"&CONNECTION_ID=" &Fields!POS_ID.Value &"")
Similar thread for your reference:
SSRS 2012 Drill Through report cascading Parameters not refreshing
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Cannot pass parameter to webservice using wsdl
cannot pass parameter to webservice using wsdl
I write code the following:
step 1
-->
DECLARE
SERVLET_NAME VARCHAR2(32) := 'orawsv';
BEGIN
DBMS_XDB.deleteServletMapping(SERVLET_NAME);
DBMS_XDB.deleteServlet(SERVLET_NAME);
DBMS_XDB.addServlet(NAME => SERVLET_NAME,
LANGUAGE => 'C',
DISPNAME => 'Oracle Query Web Service',
DESCRIPT => 'Servlet for issuing queries as a Web Service',
SCHEMA => 'XDB');
DBMS_XDB.addServletSecRole(SERVNAME => SERVLET_NAME,
ROLENAME => 'XDB_WEBSERVICES',
ROLELINK => 'XDB_WEBSERVICES');
DBMS_XDB.addServletMapping(PATTERN => '/orawsv/*',
NAME => SERVLET_NAME);
END;
step 2
--> CREATE USER test IDENTIFIED BY test QUOTA UNLIMITED ON users;
step 3
--> GRANT CONNECT,CREATE TABLE, CREATE PROCEDURE TO test;
step 4
--> GRANT XDB_WEBSERVICES TO test
step 5
--> GRANT XDB_WEBSERVICES_OVER_HTTP TO test
step 6
--> GRANT XDB_WEBSERVICES_WITH_PUBLIC TO test
step 7
-->
SELECT dbms_xdb.getftpport() FROM dual;
SELECT dbms_xdb.gethttpport() FROM dual;
exec dbms_xdb.setHttpPort(8080);
exec dbms_xdb.setFtpPort(2100);
step 8
-- Double check
host lsnrctl STATUS
SET head off
-- Valid?
SELECT * FROM dba_registry WHERE comp_id='XDB';
SET head ON
connect test/test;
CREATE OR REPLACE FUNCTION FACTORIAL_I(N PLS_INTEGER)
RETURN PLS_INTEGER
IS
n_result number;
BEGIN
IF N > 1 THEN
n_result := N * FACTORIAL_I(N - 1);
RETURN(n_result);
ELSE
RETURN(1);
END IF;
END;
WSDL Output:
http://localhost:8080/orawsv/TEST/FACTORIAL_I?wsdl
output picture: http://www.picza.net/show.php?id=20120429vlxdlFdvFPdvF134795
I try pass prameter by http://localhost:8080/orawsv/TEST/FACTORIAL_I?SBINARY_INTEGER-FACTORIAL_IInput=5
but error <ErrorNumber>ORA-31011</ErrorNumber>
Edited by: 930927 on 29 เม.ย. 2555, 9:02 น.Using something like SoapUI or do it via PL/SQL as shown here: Re: Ora-31011 with a very, very simple native webservice
-
I want to display a report with rwcgi60.exe from the browser.
How do I pass a parameter to the report, e.g, I need to display sales information for certain region, without using parameter form?
anybody, any idea?
nullI'm having the same problem, and haven't found a clean example yet of passing simple string parameters to a report, anywhere.
I am trying to pass a string like 'A123' as a parameter to a 6i report via IAS, from a web browser by entering the URL direclty into the IE address box.
If I run the report with ¶mform=yes the parameter form pops up and I can enter the value and the report pops up. So I know that side works.
But if I want to build the URL and pass the parameter A123, like &myparam='A123'....
well... I get a blank report like a blank or null parameter was received at the other end.
Anyone have a simple example, like you would directly type into the IE Address box to test the functionality?
TIA -
Difference Between doGet() and doPost
Hi Everyone !!!
I'm very new to servlets.I dont know what is the difference between doGet() and doPost() Method.
Can anyone explain me .
Can any give me details and differences between these two
thanks in advanceAs you mention Why developer will use GET, if POST have all the advantages. Please look into, it may clear you doubts
GET
the GET type request is normally used for simple HTML page requests. The types of events that generate this type of request are clicking on a hyperlink, changing the address directly by typing in the address textbox on a browser or application that has HTML functionality, and submitting an HTML form where the method header is set to get as in method=get. Also, a GET request is triggered when selecting a favorite from the Favorites list and using JavaScript to change location.href. Usually the browser is configured to send a GET request even if no method is set explicitly by the HTML.
The benefits of the GET method are
1. It retrieves information such as a simple HTML page or the results of a database query.
2. It supports query strings (name-value pairs appended to URL). Servers usually limit query strings to about
1024 characters.
3. It allows bookmarks.
POST
This occurs when a browser or application submits an HTML form with the method attribute set to post as in method=post.
The benefits of the POST method are
1. It sends information to the server such as form fields, large text bodies, and key-value pairs.
2. It hides form data because it isn't passed as a query string, but in the message body.
3. It sends unlimited length data as part of its HTTP request body.
4. It disallows bookmarks.
Conclusion, always prefer to use GET, except mentioned in the following reason:
1. If data is sensitive
2. It is greater than 1024 characters
3. If your application don't need bookmarks
As because GET is more faster than POST.
Both are used to send the request to the server, if you analyze than you may make the differnces like
In the case of GET means send the request to get the simple HTML page from server whereas, in the case of POST means send the request to post the data to server.
By Ausaf Ahmad
Message was edited by:
Genius_Brainware -
About DoGet() and DoPost()
{color:#0000ff}Hi Guys,
I have one doubt in my mind,
That is,
In an HTTP Based servlets We are going to Override doGet() or doPost() depend on the request come from the user,
if it is a POST data then we are going to Override doPost (), or if it is a GET data then we are going to implement(),
*{color:#ff0000}But how can the servlet or we knows that the data is POST data or GET data...{color}*
Can anybody clarify this please
Thank q so much in advence.{color}1) Assume all requests are GET (all <a href ...> links and direct URL access requests are GET)
2) POST occurs when the CLIENT submits a form whose method is POST
ex: <form action="servlet" method="post">
3) Sometimes, direct URL connections are established as POST requests as well
The server knows because the client is required to define the request METHOD when making a request via a header attribute. The Servlet container reads the attribute, calls the proper doXXX method, and gives you access to the method via request.getMethod() -
Passing parameter through url to report
Hi
I'm sorry if this question already exist anywhere in forum i didnt found it.
so my question is:
CAN I PASS PARAMETER VIA URL TO REPORT USING WEBFORM
i don have RAS(Because in beta version of 2008 is this not included)
I tried
http://localhost/CRWEB/Default.aspx?param0="value" ->here i'm prompt for value instead of showing report with set value
and
http://localhost/CRWEB/DocumentDoc.rpt?param0=krneki&init=html_page -> here i prompt to save rpt file
so But both doesnt work!
OR it is necessery to have RAS to pass parameters through url
thanks for quick answerURL reporting and RAS are not available with CR2008. To view reports over the web you will need to use the Crsytal Reports for .NET runtime engine inside a .NET app. This engine is licensed with CR 2008.
Rob Horne<br /><a href="/blog/10">Rob's blog - http://diamond.businessobjects.com/robhorne</a> -
Import statement: pass parameter or variable in import statement ??
Hi All..
Is there a way to pass parameter or a variable to a url in the import statement..
I'll be using a url in the import statement, the url will be having a dynamic .rtf file...something like
<?import:http://#server#:#port#/xmlpserver/<mySubTemplate>.rtf?>
where <mySubTemplate> is dynamic..
I've been searching this thread for a while now and ended up close...
Import sub template dynamically
Thanks in Advance..Have you tried replacing the mySubtemplate.rtf part with a variable, or replace the entire URL using a variable? Try using the same construct from this example in the Report Designer's guide (page 7-14, 10.1.3.4).
In Microsoft Word's Format Picture dialog box select the Web tab. Enter the
following syntax in the Alternative text region to reference the image URL:
url:{IMAGE_LOCATION}
where IMAGE_LOCATION is an element from your XML file that holds the full
URL to the image.
You can also build a URL based on multiple elements at runtime. Just use the
concat function to build the URL string. For example:
url:{concat(SERVER,'/',IMAGE_DIR,'/',IMAGE_FILE)}
where SERVER, IMAGE_DIR, and IMAGE_FILE are element names from your XML
file that hold the values to construct the URL.
This method can also be used with the OA_MEDIA reference as follows:
url:{concat('${OA_MEDIA}','/',IMAGE_FILE)} -
Hi,
I have 2 pages, in page2 CO2, it passes parameter 'cancel'
processFormRequest{
else if("Cancel".equals(pageContext.getParameter("event")))
pageContext.putParameter("cancel", "Y");
pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG",
null,(byte)0,null,null,true,null);
in page1, CO1, I get the parameter 'cancel'.
processRequest{
cancel = pageContext.getParameter("cancel");
Now, if I want pass 'cancel' to processFormRequest of CO1, how should I do it?
thanks
LeiLei,
To get the value in co1, there are two alternatives:
1)Pass value in hashmap:
HashMap hmap= new HashMap();
hmap.put("cancel","Y");
pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG",
null,(byte)0,null,hmap,true,null);
in page1, CO1 processRequest, you can get it by
cancel = pageContext.getParameter("cancel");
2)Pass param in url itself:
pageContext.forwardImmediately("OA.jsp?page=/company/oracle/apps/xxg2c/goaling/webui/Xxg2cGoalSheetSearchePG&cancel=Y",
null,(byte)0,null,null,true,null);
in page1, CO1 processRequest, you can get it by
cancel = pageContext.getParameter("cancel");
--Mukul -
Post Author: usaitconsultant
CA Forum: JAVA
Would you know if there's a way to mimic Deski
document from BOXI server(CMS) to local machine, pass parameter, execute and
save in a mutiple report format then store in a local drive or network
drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence. Please let me know your ideas. I would really appreciate your help. Thanks.Post Author: usaitconsultant
CA Forum: JAVA
Hi Ted,
Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below.
Error Message:
A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.
Maybe you are looking for
-
The patch can be found on metalink. The patch number is: 1841088. Oracle9iAS Portal 3.0.9 Patch Release Notes July 2001 Contents For the latest release note updates, visit the Oracle Technology Network and click the Documentation tab. Installation an
-
I am trying to update apps on my iPad. We are using family sharing. My husband has the app on his iPad. When I try to download, i get the error message and it doesn't look like I have the app on my iPad. I had it on an older iPad and did cancel t
-
Batch at the order header level
Hi , When I transfer the production order from SAP ERP to SAP ME , The Batches at the order header level (Goods Receipt) have not been transferred to SAP ME.with out these batches goods receipt in ERP while backflush is failed. How SAP ME can handl
-
Connect to network over internet?
Pardon my lack of knowledge; can I connect to my home network over the internet? if so, do I need an IP address? Is there any information that I need from my network?(if so, I may have to wait until i get home). I've searched, but to no avail. Any he
-
Blank DVD not in Finder 10.8.3
I have a MacPro4,1. Since I upgraded to 10.8.3 I can not see my blank DVD or CD in Finder or on the Desktop. I tried resetting the SMC and the NVRAM and that does not work. The only thing that works is to restore to 10.8.2 from TimeMachine? Does anyo