Sanjay Mohanty

Greenhorn
+ Follow
since Sep 12, 2009
Merit badge: grant badges
For More
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 Sanjay Mohanty

Thanks a lot.

I will try Ajax option.
10 years ago
JSP
Hi

I am writing a JSP tag that will basically execute certain tasks and update the status in JSP page after completion of each task.

Lets take below example -

I want to verify different softwares like Tomcat/MySql/Java... before doing some operation. In my index.jsp page when I will click on button "Start Verification" at back end the custom tag will keep on verifying the softwares and display the status in same jsp page (which is already loaded)

Below is my tag support class - when its executing below highlighted line, throw error - Stream is closed.

Is there any way to create a separate thread in JSP custom tag ?

@Override
public void doTag() throws JspException
{
try
{
Thread thread = new Thread(new RecoveryLoggerThread(),"RecoveryLoggerThread");
thread.start();
}
catch (Exception e)
{
e.printStackTrace();
}

//return SKIP_BODY;
}

class RecoveryLoggerThread implements Runnable
{

@Override
public void run()
{
try
{
PageContext pageContext = (PageContext) getJspContext();
JspWriter out = pageContext.getOut();

out.println(getLogData("Tomcat", false) +"\t\t");

out.println("OK");

}
catch (Exception e)
{

e.printStackTrace();
}

}

}



10 years ago
JSP
Hi,

I have a image displayed in browser inside div element. Now I want to read the height, width and pixels of that image on click of a button.

Please suggest.

Regards,
Sanjay
12 years ago
Hi,

I am receiving a file from an external system. The file name has some japanese characters. So when I tried to rename that file by prefixing the date, the out put file contains only date_???.txt. The japanese characters get converted to ?. I want to retain those character in Linux environment. It work fine in windows environment.

Regards,
Sanjay
12 years ago
Hi,
I am new to eclipse ant tomcat.
Currently I am developing a web application useing Eclipse Ganymede and tomcat 6.0.20.
But I am facing problem to debug it. Kindly suggest me how to debug it.

Thanks,
Snajay