How to get Special Characters from request
Hi,
I have one textarea in my jsp.
I am entering '123' in that textarea and submiting the form to the servlet.
in the servlet i am using request.getParameter to get the value in the textarea.
But it was showing
'123'
What is the prbolem..
Thanx for giving the solution
Message was edited by:
praveen_nag
document.main_form.method="post";
document.main_form.action="CMGC_cREPORT_GEN_ENTRY?mid=<%=lStrhidMid%>&rootID=<%=lStrRootId%>";
document.main_form.hidMode.value="3";
document.main_form.submit();
through this im submiting the form to the servlet.
in servlet i am calling
lStrSqlStmt = UTIL_COMMON.fnGetValue(req.getParameter("SQL_STMT"));
SQL_STMT is my text area name....
In the text area i entered '123'
but when i am pringing lStrSqlStmt
it was showing '123'
Thanx for u reply.
Similar Messages
-
How to get promoted properties from Request to Response in two way send port scenario.
I have a requirement to access the promotes properties in response pipeline, these promoted properties are promoted in Orchestration and they are available in Send pipeline, but not available in Receive pipeline. Please help us if we have any solution for
this issue.
Thanks
RamachandraHi Ramachandra,
Obviously from above responses you would have got the point that this can’t be done out-of-box and you need to do custom. Also when you say “Get the message
from DB along with context properties.”, you do agree with this point.
One of the possible custom solutions is (Obviously in bespoken process, you can achieve it in many ways),
When send the message out to a solicit-response port, store those promoted properties in db along with the “correlation key” which you can get from the context of the request message like
“Correlation Token” and “SPID”. So when the response comes back, you can either in the “inbound map” or in the receive pipeline (using custom component) populate/constructs the message by populating data from db, where will retrieve the
“Correlation Token” and “SPID” values of the response message (it will have the same correlation value as in the request message), so you can use the value of correlation sets to get the values from db.
Regards,
M.R.Ashwin Prabhu
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
How to get useful data from request?
Hello.
I am looking for creating a management tool for a web site. All I want is that is there any ready to use API or package or open source project for retrieving user�s information? I just mean that is there any easy to use way in java to get useful data from a client (for example location, his or her system configuration and information �).
Thanks.If you dump all the data from request (see the javadoc, and especially the "header methods" ) you'll see the data you can get are quite simple.
The only thing you can try to rely on are ;
- the IP address from the sender (when reversed to DNS, you can sometime use the tld to locate the country it comes from. Yet, you'll get many .com name, so it's not that significant. it may also give you the IAP used). Note that if the user is using a proxy, it's the proxy IP that you'll collect
- the User-Agent header : from this, you can guess the OS and the browser used
- the Referer header : usefull to get where your user comes from (where they found a link to your site)
- the Cookie header : if you're using a servlet container with session id stored in cookie, you should see the Cookie header appear on the second request to your site. That helps finding out wether your user accep cookie or not (from a server point).
Besides these, i don't think you can get any other useful data without asking your users on a form. Note that it's the client that decides to send Referer, User-Agent or Cookie headers. Those are not mandatory to the Http Protocole and some browser allow their user to fool their content (butmore than 90% of the widespread browsers don't) -
How to extract special characters from a field
Hi there.
I am a novice when it comes to Web Intelligence reports. I have been tasked with producing a final report that I can export to Excel which shows a project number and a project name. Very simple. Ultimately I need to import my final Excel file to a third party software. However, the issue is the project name field consists of special characters such as hyphens, parenthesis, asterisks, etc. I need to be able to create a formula which extracts all special characters and just leaves me with alpha-numeric characters and spaces. I also need to limit the character count to no more than 34 characters. I will not be able to import my final Excel file unless I can product those results. With the help of a very knowledgable person in the Crystal Reports forum, I was able to do that by using the following formula:
stringvar a:=left({Projects.ProjectName},34);
numbervar i;
Local StringVar fin;
for i:= 1 to len(a) do
if a[i]in ["a" to "z"] then
fin := fin & a[i]
else if a[i] in ["1" to "9"] then
fin := fin & a[i]
else if a[i] = " " then
fin := fin & a[i];
fin;
It worked amazingly well in Crystal Reports but this report now needs to move to Web Intelligence. Is there a way to do this in a Web Intelligence report? Itried but the formula is not recogizable. I tried creating a variable and using this formual but I couldn't get it to work. I appreciate all helpful responses. The version of Web Intelligence I am using is SAP Business Enterprise XI. I am working in a PC environment using Windows 7 if that helps at all.
Thank you!
LaurenHi Lauren, Please provide with some sample data...
In SQL, by writing some Functions/Procedures you can eliminate special characters. Ask your database team to do that.
or
Create an object with the following syntax... It Works in SQL.
= REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE([String_Object],'&',' '),'*',' '),'(',' '),'^',' '),'%',' '),'!',' '),'@',' '),'#',' '),'$',' '),'~',' '),')',' '),'+',' '),'=',' ' ),'-',' '),'_',' '),'/',' '),':',' '),';',' '),',',' '),'<',' '),'.',' '),'>',' '),'?',' '),'"',' '),'''',' '),'[',' '),']',' '),'{',' '),'}',' '),'\',' '),'|',' ')
Example: Input: '~!@#$%^&*()_+{}:"<>-=[]./\|/*-+ascdfv123'
Output: ascdfv123 -
How to get binding variables from request
We are trying to use html-db to develop an application which need to get values from user request to use in the queries, i.e. we will have pages depend on several binding variables and the value of these variables will be provided by the user through get/post request. Because the request will be initialed by another application so to use a form to collect the values is not an option.
I am a html-db newbie. Does anyone here know how to do that?you're right in thinking this is a bit of a newbie html db question. it's a pretty straightforward matter to set up a report in html db that runs off of bind variables that can be set from a URL. you can see a pretty simple example on the first page of our "Sample Application" that's available to install into your workspace. try taking a look at that to see what i mean. you can install the Sample Application by clicking the "Review Demonstration Applications" link that's available right after logging into htmldb.oracle.com. that resulting screen lets you create (or re-create) the Sample App in your workspace. once it's installed, take a look at how the report on page 1 calls the first report on page 201. that report on 201 is dependent on a bind variable, :P202_CATEGORY, that's set from the URL. this particular URL is generated from the report on page 1, but it could just as easily have been generated from your other application. when you look at this example, the two key points to pay attention to are the 1) syntax used in the URL to set the bind variable (which is explained in our online help at http://htmldb.oracle.com/i/doc/mvl_fund005.htm#sthref357) and 2)the way in which that bind variable is referenced in the first sql query region on page 201. take a look at those when you get a chance, and let us know if you have further questions.
thanks,
raj -
How to get Int value from request.getParameter()?
Hi all,
I have a integer value which is passed from one page to another page.
i am geting this value in the next page using
request.getParameter().
Eg.
Suppose value of "i" in page1 is 32, i pass this as hidden variable to next page.
<input type="hidden" Value="<%=i%>" NAME="limit">
in page2, i fethch this value to a variable by name "limit"
String limit=request.getParameter("limit");
but, since value stored in limit is int, i can't assign it to string.
i can't use request.getParameter for int values.
How to solve my problem.
I know it is simple,
Pls. help me
Regards
ASh
String limit=request.getParameter("limit");String limitSTR = request.getParameter("limit");
int limit = -1;
if (limitSTR != null) limit = Integer.parseInt(limitSTR); -
Hi How to get XML file from servlet that XI sent to my J2EE appl?
Hi All!
I have a scenario like XI sends xml file to j2ee application. In my J2EE application my servlet receives this xml. Will the xml file be in my HTTPServletRequest object? if so how to get that file from Request object.
Please help me its urgent, Any code help is highly appreciated.
My xml file will be like this:
<ns0:Http_Message_Type_Demo
xmlns:ns0="http://abcdemo.com">
<Name>ABC</Name>
<RollNo>123</RollNo>
<Address>a-4</Address>
</ns0:Http_Message_Type_Demo>
somebody should help me!please
ThanksHi,
You can use HTTPServletRequest object to get the XML payload.
BufferedReader reader = request.getReader(); //gets XML payload
String line = reader.readLine(); // to read the XML payload line by line
(request is the HTTPServletRequest object)
Regards,
Uma -
How to find Special Characters in a single query
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIMHi,
947459 wrote:
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIMIt's not clear what you want.
What are "special characters"? Can you list all of them?
Do you want to find rows where string_column contains any of the special characters? If so
SELECT string_column
FROM table_x
WHERE string_column != NVL ( TRANSLATE ( string_column
, 'A(%$*&@,;'/+-'
, 'A'
, 'A'
;I assume 'A' is not a special character.
You could also use regular expressions, but it will be more efficient if you don't use them unless you really need to.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
You'll get better replies sooner if you always include this information whenever you have a question. -
How to use special characters in Report Builder
Hi everyone,
I wonder if you guys can help me. I'm trying to change our Invoice hearders from English to Portuguese. Eg, I've changed this English heading
("FOR ACCOUNT QUERIES CONTACT") to this Portuguese heading ("PARA CONSULTAS DE CONTA CONTACTE"). So when I'm done, my entire invoice will be in Portuguese. This works fine, until I get special characters in some of the Portuguese translations. I can copy and paste the translations with special characters into Report Builder. But when I print the invoice in Oracle Apps (with a PDF output), the special characters get replaced with a "?".
Here's an example:
< "Line No" should read "Linha nº" but it prints out as "Linha n?" > Does anybother know how I can resolve this? I'm using Report Builder: 10.1.2.3.0 on Oracle Apps: 11.5.10.2 and RDBMS : 10.2.0.4.0
Thank you in advanceHi,
You need to have Portuguese font installed on your machine, if you are running the report from your machine or else if you are running the same from report server then the font has to be there on the server font dir. -
Submit a PDF as a PDF to a servlet, and how to get my PDF from servlet
Hi all as the title above,
i have a button typeformat as PDF and sent to a URL( which is my servlet )
after this step how to get the PDF from my servlet.
the PDF has sent to my servlet and stop, so is there any way to get the PDF i sent ?
can someone help me?
thanksYou can use the following code:
byte[] content = getRequestBufferAsBytes(request);
...then do whatever you want
public static byte[] getRequestBufferAsBytes(HttpServletRequest request) throws IOException, ServletException
// get the RequestBuffer
ServletInputStream oInput = request.getInputStream();
long nContentLength = request.getContentLength();
String contentType = request.getContentType();
if (nContentLength <= 0)
return null;
byte[] cContent = new byte[(int)nContentLength];
// read the content in 512 bytes chunks
// a single read does not get all the characters
int nRead = 0;
int nToRead = (int)nContentLength;
int nBlkSize = 512;
byte[] cTemp = new byte[512];
do {
int n = 0;
int i = 0;
if (nToRead - nRead < 512)
nBlkSize = nToRead - nRead;
n = oInput.read( cTemp,0,nBlkSize);
for (i = 0; i < n; i++)
cContent[i+nRead] = cTemp[i];
nRead += i;
} while (nRead < nToRead);
//cContent[nRead] = (byte)'\0';
Long nBytesRead = new Long( nRead );
return cContent;
Jasmin -
Remove special characters from incoming data
Hi Varun, You could use either of below.. REG_REPLACE(YOUR_INPUT_STR,^[A-Za-z0-9 ],NULL) -- Replaces all non-alphanumeric with null
REG_EXTRACT(YOUR_INPUT_STR,[A-Za-z0-9 ]) -- Extracts only alphanumeric data -Rajanii have special character coming in the source data and i want to remove it before loading into target, currently i am getting one special character , it may come as some other type of special character other than alpha numeric. so how to remove those special characters from data and load the alphanumeric data into target.
-
How to get a formula from the user from a text box in a webpage
Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable value for each of the variables.
I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
Kindly help me out in this issue.
ThanksThe textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
Google for "Java math expression parser" and see what you get.
Or write your own with JavaCC.
% -
How to get the value from a JavaScript and send the same to Java file?
Hi.
How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
Thanks and regards,
Leslie VYes, I am trying with web application.
In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
How to send this 'message' with and to the 'request'?
Thanks for the help :-)
The actual JS code is:
function productdeselection()
var i=0;
var j=0;
var deselectedproduct = new Array(5);
var message = "Are you sure to delete Product ";
mvi=document.forms[0].MVI;
mei=document.forms[0].MEI;
lpi=document.forms[0].LPI;
if(null != mvi)
++i;
if(null != mei )
++i;
if(null != lpi)
++i;
if(null != mvi && mvi.checked)
deselectedproduct[++j]="MVI?";
if(null != mei && mei.checked)
deselectedproduct[++j]="GAP?";
if(null != lpi && lpi.checked)
deselectedproduct[++j]="LPI?";
if( 0!=j)
if(i!=j)
for (x=0; x<deselectedproduct.length; x++)
if(null != deselectedproduct[x])
message =message+ "-" +deselectedproduct[x];
alert(message);
else
//alert(" You cannot remove all products!");
return false;
return true;
} -
How to get argument value from portal desktop URL
hi,guys
I have a question ,it is how to get argument value.see:
in one portal desktop,I have a hyperlink like this
http://localhost:7001/TestPortal/appmanager/testPortal/testDST?eventId=1
after click,then will be switch another desktop "testDST"
I tried to get value from request,but failure.
@RequestMapping
public String listTestList(RenderRequest request, RenderResponse response,ModelMap model) {
//HttpServletRequest httpRequest = (HttpServletRequest) ; //request.getAttribute("javax.portlet.portletc.httpServletRequest");
//log.debug("httprequest eventId>>>" + httpRequest.getParameter("eventId"));
log.debug("render request eventId>>>" + request.getParameter("eventId"));
I can't get this value from request,also tried httpServeltRequest,but httpServletRequest can't get,it is null;
so ,how to get this value,thank you very much.
regards
arisHello,
It is true for JSR168 portlets that you can't just arbitrarily set parameters on a URL and get access to them inside your portlet- you must use the appropriate APIs on the PortletURL class to set parameters that you can retrieve. This is the only portable (standards-compliant) way to implement the functionality you want.
However, for your particular use-case, you can get the URL parameters from the (non-JSR168) HttpServletRequest object. The only reason you are getting a null object for that is because the attribute name is wrong. This should work:
HttpServletRequest httpRequest = (HttpServletRequest)(request.getAttribute("javax.servlet.request"));
String eventId = httpRequest.getParameter("eventId");
Kevin -
The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
Consuelo CorretjerUse the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.
Maybe you are looking for
-
I don't know what to do!!! Please Help Me?!?!?! I am not sure what the ios software specifically is... I know that It definetly is not ios 7. iPod model # A1267 16GB
-
Split TempDb in SharePoint 2010 Sql Server DB
Hi , We have envirenment of sharepoint farm,one Database server.We have plan to split tempDb acording microsoft best practices. By the time of we have the largest content database is 260 in size and SQL Server has a 2-core processor. So the tempdb wo
-
Recover calendar data from iCloud / mobile me
I converted mobileme to iCloud after updating iphones and ipads to ios5. I have lost a large amount of calendar data as part of this process. Is there a way to recover this either by reverting from iCloud back to mobile me (and how? ) or by restori
-
Adobe PDF preview handler error after install Reader XI
I have received a notification that an update to Reader XI is available. After the installation M/S outlook could not preview all PDF files with the error: This file cannot be previewed because of an error with the following previewer: Adobe PDF Pre
-
While installing OBIEE on linux box
Hi, while installing OBIEE on linux box i am getting below error ./setup.sh Unable to load the launcher file index. Cannot open launcher file. can any one let me know how to reslove this issue... Regards Venkata