This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Ram ank

Greenhorn
+ Follow
since Apr 28, 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
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ram ank

Hi Guys,

I am using struts1 to call action and sending response doing the following

response.setContentType("text/text");
response.setHeader("cache-control","no-cache");
out = response.getWriter();

out.println("Response"+String Value+"/n");

But when i parse the response in the front end the newline is missing. Thanks for any help guys
9 years ago
It worked like this
with ?<ip> it stores the matching string and using it in replacement with ${ip}

output.replaceAll("(?<ip>(\\d{1,3}\\.){3}\\d{1,3})", "${ip}\n");

Thank you guys
9 years ago
Hi Guys

I want to add newline after occurence of IPV4 address in my string. I am trying with output.replaceAll("?<=(\\d{1,3}\\.){3}\\d{1,3}", "\n");
But it is throwing Exception. Please help me.
9 years ago
That worked Thank You. I thought if i give only relative path it would call on local server but it don't.
9 years ago
Hi,

I have two applications one running on struts 1 and other on struts 2. Now i need to call action in strtus 1 application from struts2 and parse the response.
I am using

URL url = new URL("/???/executeTestAction.do");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());

writer.write(data);
writer.flush();

// Get the response
StringBuffer response = new StringBuffer();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));

but i am getting error saying Error no protocol. I am not sure this is right way to connect or not.
9 years ago
my question is cant we integrate controller and model to be in same module
i.e use same technology like servlets for both.

lets say it is spring MVC
10 years ago
I know this is simple question.
10 years ago
Thank You

can we avoid such situations

is interface injection possible

like using frameworks for IOC


just curious
10 years ago
Thats Funny

but i cant be funny in interview

what should i do in that case
10 years ago
Hi

if we develop a project implementing a interface from a jar file from some x.
if x says he wants to change the interface and want to send a new jar file.

What is best thing to do or how to avoid this case..

Thank You
10 years ago