Pankaj Kr. Singh

Ranch Hand
+ Follow
since Mar 31, 2011
Pankaj likes ...
Hibernate Spring Ubuntu
Merit badge: grant badges
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
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pankaj Kr. Singh

Thanks all, I created the Parallel workflow and defined the .bpmn file using java code as well as eclipse jbpm plugin.
I will post the solution very shortly.

10 years ago
Hi All,

I have to create a parallel workflow using JBPM.
Where a task will go to multiple user at the same time and after approval from all it will proceed to the next level.

your little help will be appreciated.

Thanks
10 years ago
Hi All,

I am using hibernate and I have to track that an entity has been changed or not since it loaded last time from the database.
I am not using the Locking mechanism.

Thanks
hi

you can use as follows
10 years ago
Hi All,

As we know that the default a bean scope of bean in Spring framework is Singleton.
So, why it is Singleton why not other like prototype etc.
Please help me...

Thanks
10 years ago
Hi,

There is no buffer size defined in the <JSP:include> action, we only define buffer size and flush mode in <%@page%> attribute.

cross check your jsp include action.


Thanks,
Pankaj Singh
11 years ago
JSP
Hi All,

I have worked on rest full web service but I have not used SSL certificate.
I have to create secure restfull web services using SSL certificate.

Please help.

Thanks.
11 years ago
Hi SoumyaGh,

Use the MimeBodyPart and use the Input stream and read the message and save where ever you need to save

For example


Thanks
11 years ago
Hi,

There may be jar conflict or there may be no jar included.
So If you are migrating from HB 2 to HB3 so keep HB3 jars and try.
This may work out your problem
Hi,

Please check your .Jar files which is required for Hibernate.
Hi All
Finally I got the solution and it is working fine.

I changed the following things in code.

Thanks
11 years ago
Hi All,

I want to read the body message and attachment of mail. But when I start reading mail if the mail contains the attachment only attachment content is being read. I am not able to read the body message.

Please help
Below is the code.

Thanks
Pankaj singh
11 years ago
Hi All,

I want to read the body message and attachment of mail. But when I start reading mail if the mail contains the attachment only attachment content is being read. I am not able to read the body message.

Below is the code.
public void readEmails()
{
Store store = null;
Folder folder = null;
try
{
Properties properties = System.getProperties();
Session session = Session.getDefaultInstance(properties, null);
store = session.getStore(PROTOCOL);
store.connect(HOST, USERNAME, USERPASSWORD);
folder = store.getFolder(PROCESSFOLDER);
if (folder == null && !folder.exists())
{
System.out.println("Invalid folder ");
}
folder.open(Folder.READ_WRITE);
Message[] messages = folder.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false));

// For Starting
for (int i = 0; i < messages.length; i++)
{
Message msg = messages[i];
String contentType = msg.getContentType();
String textMsg = "";
if (contentType.contains("text/html") || contentType.contains("text/plain"))
{
textMsg = msg.getContent().toString();
System.out.println("Text Msg 111::::::::: " + textMsg);
} else if (contentType.contains("multipart"))
{
Multipart multiPart = (Multipart) msg.getContent();
int partCount = multiPart.getCount();
System.out.println("Multipart Count::::::::::: "+partCount);
for (int j = 0; j < partCount; j++)
{
BodyPart part = multiPart.getBodyPart(j);
if (Part.ATTACHMENT.equalsIgnoreCase(part.getDisposition()))
{

System.out.println("Attachment data::::::: "+part.getFileName());
System.out.println("Attachment data::::::: "+part.getContent().toString());

} else
{
System.out.println(part.getContent()+"_______");
// not an attachment, maybe the body content of the message
textMsg = part.getContent() != null ? part.getContent().toString() : "";
System.out.println("Text Msg::::::::: " + textMsg);

}
}
}
}
} catch (Exception ex)
{
ex.printStackTrace();
}
}

Thanks
Pankaj singh
11 years ago
Hi
You can do as follows

String [] param=request.getParameterValues("music");

out.println("<p>We'll use email to notify you whenever we have new releases for these types of music:</p>\n" );
for(String music:param)
{
out.println("<p>"+music+"</p>");
}
11 years ago
Hi Guys,
I want to record Video from camera which is attached through USB , using java.
I am using Canon T3 SLR camera.
Your little help will be appreciable.
Thanks
12 years ago