priya kakkar

Greenhorn
+ Follow
since May 12, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by priya kakkar

Getting error at :
// now open the bfile to get the data
bfile.openFile(); //GETTING RUNTIME ERROR HERE!!!

running code from eclipse @ C:\Data\Softwares\Code backup\PDAutomation8.2\src\com\ing\qa\dbtools
4 years ago
I had a project to insert data into Bfile column in oracle DB and read it back in JAVA:

I did as below but getting error @ line where i am trying to open file to read:

*****************************************************************************************

*******************************************************

Error message states:
java.sql.SQLException: ORA-22285: non-existent directory or file for FILEOPEN operation
But file exist in the location mentioned
Please suggest if i have to give some some folder setting at directory level.
Folder is visible to all users to read and write>
4 years ago
I have used email text box and email link in jsp.
I want to change email dynamically as soon I change Email text box

the code in JSP is
//----------starts---------

Email: <a href="mailto:<%=advert.getEmail()%>"><%=advert.getEmail()%></a><br>

//----------ends-----------
Code in js take email from document using element Id and make its href="mailto:" + emailaddress
But as soon as I change Email text box the email link also changes but it adds string "mailto:" before email

If i remove "mailto:" from js email does not work as link to mail to emailaddress


Please let me know how to mail email link functional even after editing email text box so that mailto text is removed from display and email link works prefectly
I am stuck in a problem.
I need to change email in text box , as soon as the email is changed the href which exist to that email address in the screen should also change.

I have called a java script but it only change the reference but not the text dispalyed along. For example when email entered is changed to abc@qq.com from xyz@qq.com then link text should also change .
But in my code although actual reference is getting changed but text dispalying email is not getting changed.

Please provide me solution

Below is the code:



java script
function changeLink()
{
var qwerty ='priyanka.kakkar@ps.net';
document.getElementById("myAnchor").href=qwerty;
}

java script ends

JSP

//form tag
form method="get"
//input tag
input type="text" id="id" name="username" size="25" onblor="changeLink()"
//anchor tag
a id="myAnchor" href="mailto:priyanka.kakkar@gmail.com" priyanka.kakkar@gmai.com






Thankz

Priyanka
I tried it by replacing \s with \\s at all places

I even replaced special characters with \ and special charactes following...

webTextLen = viewAdvertForm.getWebKeyword().replace(/^\s*|\s*$/g,"").replace(/\s+/g," ");

OR

webTextLen = viewAdvertForm.getWebKeyword().replace(/^\\s\*\|\\s*$/g,"").replace(\/\\s\+/g," ");

Bur same error message "syntax error at tokens" is shown for both of the syntax
12 years ago
I have coded following code at jsp which does not work in java file.
Do let me know how acn I make it work in java

Jsp code:
if ( document.forms[0].webKeyword != null && document.forms[0].webKeyword.value.length != 0 )
{

keywords = document.forms[0].webKeyword.value;
keywords = keywords.replace(/^\s*|\s*$/g,"").replace(/\s+/g," ");
iweblen = keywords.length;

}

Java code which give me complilation error:
if (viewAdvertForm.getWebKeyword() != null
&& viewAdvertForm.getWebKeyword().length() != 0) {
webTextLen = viewAdvertForm.getWebKeyword().replace(/^\s*|\s*$/g,"").replace(/\s+/g," ");
}
12 years ago
If its not setting value in attribute then what is request.setattribute doing here .
Please give me some way to use param and hence request attribute in my jsp
so that the output comes out to be 12345 not priyanka
12 years ago
JSP
I am learning jsp and trying to run following code in jsp :

I am setting name to psaaword(value 12345) but browser still dispalys Priyanka.
Please tell how can I display 12345 instead of priyanka.


[BSouther: Added UBB CODE tags]
[ September 03, 2007: Message edited by: Ben Souther ]
12 years ago
JSP
Well I am ok with it was giving wrong path for servlet3

Thankz you all for patience and support
12 years ago
The issue which you say contradictory is actually what is happening and is what is making me wonder

The problem now is that its going back to servlet1 and not going to servlet3
Please help by looking at my code and guide be by identifying where the code is wrong which make code to go back to servlt1 instead of going to servlet3
12 years ago
Look, as per my understanding I have made an application where call goes from jsp to servlet1 where code is like following:


RequestDispatcher rd= getServletContext().getRequestDispatcher("/Servlet2");
rd.forward(request,response);
}

From servlet1 it is dispatched to servlet2 as following
session.setAttribute("name","Priyanka");
response.encodeRedirectURL("/package1/Servlet3");

and from here to servlet3 where I want to read values from request assuming that since session is same so I can read values
String str=(String)session.getAttribute("name");

But the control comes back to servlet1 after servlet2 instead of going to servlet3


How can i use urlrewriting and hence use value of attributes of session
12 years ago
In that case if I do
<a href="SessionServlet;$sessionId=juwsgdiws7ydiw">Encode URL</a>

How will it help to maintain session in next SessionServlet.
I mean how will I use attributes of jsp in servlet

Does following code give me the sessionid in servlet and hence use attributes.

HttpSession session = request.getSession();
12 years ago
Rahul
I know what you have written is not url rewriting
but I wanted to use same.
Please help me by modifying my code to perform url rewriting

You can use session id it thats mandatory
12 years ago
Thankz
12 years ago