Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Akshay D Joshi

Greenhorn
+ Follow
since Aug 04, 2011
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 Akshay D Joshi

I have a web application in which i write a data (user wise) in txt file and dispaly it to user (i don't want to store in database).

when i deployed my application in cluster environment , the application directory is created at each node say node1 and node2.

The cluster members are in memory-to-memory replication mode.

When i run application , assume that my request goes to node 1 server. I am working on this node server so i visit the page which saves data in txt file . I save the data.
Now the txt file is saved in directory of node 1 server.

now suppose that i stops node 1 server while working ,so automatically my request goes to node 2 server.
now when i visit the same page i get a balnk data as file is not created in node 2 server directory.so i get confused that i had saved data,now where is it?
So i again save the data .now the file is created again at node 2 server.

I want a configuration in websphere so whenever i save the data , the txt file should be created on both node servers ,so i always get the latest one.

Kindly give me a solution.
9 years ago
I am calling a bat file in java
In bat file i am appending multiple html files to one Final html file

---Bat file code --

@echo off
IF EXIST consolidatedHTML.html (
del consolidatedHTML.html --- > if user creats html for the second time then i delete existing file and create new
)
call type %2\file 1.html >> %1\consolidatedHTML.html
call type %2\file 2.html >> %1\consolidatedHTML.html
call type %2\file 3.html >> %1\consolidatedHTML.html

--end Bat file code

After this Final html is generated i convert this file to pdf using htmltopdf converter in java..

when i convert this file to pdf the request is sent to server ,but it is not executed.
So i came to know that the Final html is locked .
When i try to delete file manually ,
windows alert comes : file is being used by another person or program.

when i shotdown tomcat and delete the file manually,it gets deleted.

So which process is holding my file Tomcat process or Batch file process ?....

Also the main thing is that multiple users access the batch file and htmltopdf code .


What is the solution for this ?

One is to write java code for appending html files..so i can,but need to know the reason for the above issue.
9 years ago
Thanks for the replay..
Yes i know the SSL but in our product it is already implemented..
My seniors want to make it in some other way..
So i thought only of javascript encryption...
Anyway .. i will research some more about it..

Thanks alot
9 years ago
JSP
Hi, I am working on jsp-Servlet application.
I want to encrypt url parameters at client side as soon as form is submitted as url can be viewed by intruders in between network of client and server .
Also url parameters should be decrypted at server side .
what technology to use?

javascript encryption is there ,but how to use it.?

Example

Actual URL:
www.mysite.com/Company?compID=111&compLoc=India

encrypted URL:
www.mysite.com/Company?compID=HTUf43HGFYG&compLoc=JHFTF42KJBYU
9 years ago
JSP
Hello Nada Bajnaid

I think...
You should write java script function .....
call this function on click of link.......
And in java script function assign the form's action to your servlet....

It will be called automatically.....
10 years ago
Hello Vishal....

I have gone through your code...

First you delete the work folder from your application.....
Then restart your tomcat.......
In ProcessInformation .java code ,i saw that you are getting the mobile number as

Mobile_Num=Integer.parseInt((request.getParameter("MOB").trim()));

But the Textbox name of Mobile No. in Index .jsp is Mob...
Therefor you are getting null pointer exception....
So either change "MOB" to "Mob" in java file or change "Mob" to "MOB" in Index.jsp.....

Now second point is commit the transaction before closing the connection as
con.commit();

Now Third point is you haven't forwarded to any jsp after executing query...

You can add following code in java after closing connection...

RequestDispatcher view=getServletContext().getRequestDispatcher("/Result.jsp");

view.forward(request,response);

Compile your java code...

And also add Result .jsp in Application folder Showing text Something like "Inserted successfully....".


Try It...
Hi all...

the following is working.....

D:\java>java -cp . Test
This is Test Program

But what should i add to my classpath....
I am using jdk 1.6...

i have set environment variable "path" as "C:\Program Files\Java\jdk1.6.0\bin"...
and "classpath" ass "C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar" for servlets....


Is there anything i need to add in environment variables
10 years ago

Here is my Output of the program.......

D:\java>javac Test.java

D:\java>java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test

D:\java>
10 years ago
Hello all,

____________________________
class Test
{
public static void main(String ar[])
{
System.out.println("This is Test Program");
}
}
___________________________

When i run the above program through cmd I get the Exception as following:
Exception in thread "main" java.lang.NoClassDefFoundError: Test

---------------------------------------


When i run the program through Eclipse IDE it runs correctly & gives me correct output......

But i want to understand why this happens.....
is there anything wrong with my cmd or is it because of any virus???
10 years ago