Rohit Ahuja

Ranch Hand
+ Follow
since Oct 04, 2001
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 Rohit Ahuja

Hi guys,

I am creating a photobook.
I have a main frame and a photo list. The photo list is nothing but a line of photo thumbnails.
I can drag and drop the thumbnails to the main frame where they become proper full sized pictures.
1 photobook can contain as many as 20 pictures. The 20 pictures are predefined/set pictures.

I am just wondering how this can be implemented.
a. Do I get all the images at one shot when my page gets loaded ?
1. In that case where can I keep/store the images?
2. Will getting those 20 pictures at once affect performance ?

b. Do I get the thumbnails and when the button is clicked, I get the actual image from the server using Ajax ?

One more thing...
How can I send these images from server to client using JSON object ?

Thanks,
Dee
Hi,

We have a sender and a receiver in a P2P communication model.
In case the sender is trying to send some data to the receiver, and the netork fails.

1. Will the sender be notified that the data packet is not received by the receiver.
2. Will the sender get an error saying that connection with the receiver failed.
3. How will sender check whether receiver is up or not ? Any particular method that will be used.

Thanks,
Deepak.
Hi Girraj,

1. I cannot use a database.
2. You saying put all three attributes in the response, means the response method will need to be altered, right ?

Thanks,
Deepak.
Listening to different queue.
As for the java types, the datatypes could be interger, character etc.
Dear friends,

I have a simple question regarding JMS.
I have a system where in I send a request to the server and will get a response maybe 2-3 days later.
The request is like METH_REQ with parameters A,B and C.
The response is like METH_RES with parameters D,E and F.

When I get the response I need the values of the request(A,B and C) also for reference. How can I go about this?

Thanks in advance.
Hi All,

Has anyone ever used SwiftMQ server for JMS ?
The SwiftMQ site claims that it is much faster than other servers. Is it better than IBM server?

Can someone who has practically worked on it give some kind of feedback about it?

Thanks,
Deepak.
Dear mates,

I am working on something and need a solution urgently...

This is what i want...
I have a html page which has 3 fields, A, B and C.
When user enters these three fields and clicks on a button called create,

1. A word document has to be created using these three fields.
The word document has to have A as right aligned, B on the next line as center aligned and C on the third line as left aligned in bold and italics.

2. An excel needs to be opened and the data written into it. A,B and C should be written into the three cells in it.


I was trying to have the code for point 1 as follows:


However, am struggling to get the alignment of the text in the document right.

Thanks,
Deepak.
what is the error message??
Which procedure within the package is causing the problem ???

Which lines of code have u added last for the compilation error to occur ?
18 years ago
Hi guys,
am having a deployment problem on oc4j for a simple application.

The error message that i am getting is :

Error instantiating application at file:/C:/oc4j/orion/application: Unable to find/read assembly info for C:\oc4j\orion/application (IO error: unable
to find application)

server.xml :

<?xml version="1.0"?>
<!DOCTYPE application-server PUBLIC "Orion Application Server Config" "http://www.orionserver.com/dtds/application-server.dtd">

<application-server
application-directory="../applications"
deployment-directory="../application-deployments"
>
<application name="VUA01" path="../application" />

<rmi-config path="./rmi.xml" />
<!-- JMS-server config link, uncomment to activate the JMS service -->
<!-- <jms-config path="./jms.xml" /> -->
<log>
<file path="../log/server.log" />
</log>

<global-application name="default" path="application.xml" />

<global-web-app-config path="global-web-application.xml" />
<web-site path="./default-web-site.xml" />

<!-- Compiler, activate this to specify an alternative compiler such
as jikes for EJB/JSP compiling. -->
<!-- <compiler executable="jikes" classpath="/myjdkdir/jre/lib/rt.jar" /> -->
</application-server>

application.xml :

<?xml version="1.0"?>
<!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">

<!-- The global application config that is the parent of all the other
applications in this server. -->
<orion-application>
<web-module id="defaultWebApp" path="../default-web-app" />
<persistence path="../persistence" />
<!-- Path to the libraries that are installed on this server.
These will accesible for the servlets, EJBs etc -->
<library path="../lib" />

<principals path="./principals.xml" />

<log>
<file path="../log/global-application.log" />
</log>

<data-sources path="data-sources.xml" />

<namespace-access>
<read-access>
<namespace-resource root="">
<security-role-mapping>
<group name="administrators" />
</security-role-mapping>
</namespace-resource>
</read-access>
<write-access>
<namespace-resource root="">
<security-role-mapping>
<group name="administrators" />
</security-role-mapping>
</namespace-resource>
</write-access>
</namespace-access>
</orion-application>

inside the ear :
application.xml :
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">

<application>
<display-name>VUA01</display-name>
<module>
<ejb>VUA01-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>VUA01-web.war</web-uri>
<context-root>/VUA01</context-root>
</web>
</module>

<security-role>
<role-name>users</role-name>
</security-role>
</application>


Am i missing something ???

thanks in advance...
18 years ago
I am having the following error and have been struggling with it for the last couple of days...
java.lang.VerifyError: class loading constraint violated (class: org/apache/xerces/jaxp/SAXParserImpl method: getXMLReader()Lorg/xml/sax/XMLReader at pc: 0
I use a Digester class in one of my java files and hence when i am building it, it fails...

It is an Ant related problem and the build works fine on eclipse and fails on WSAD. Am i missing some setting ?
Has anyone faced this earlier or can someone tell me the direction to take??
18 years ago
I have a bounced mail when i send it to an invalid e-mail id.
The bounced mail then has an eml attachment which is nothing but a copy of my text in my mail when i sent it the first time.
I need to get the name of this eml attachment, is it possible in javamail?

i need a quick solution to this...


Thanks,
18 years ago
I was just wondering whether i can get the name of an attached File.If yes, how do i go about it ?
18 years ago
Hi guys,
I am having a problem trying to receive mails from a mail server.

I am pasting the code and the error message.

import java.io.*;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;

public class Fetch {
public static void main (String args[]) throws Exception {
String host = "192.100.119.91";

// Get properties
Properties props = System.getProperties();

//props.put("mail.pop3.host", host);


props.put("mail.debug","true");
System.out.println("Here11111111111111111111");
// Get session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(true);

System.out.println("Here22222222222222222222"+session);
// Get the store
//Store store = session.getStore("imap");
Store store = session.getStore("pop3");
System.out.println("Store%%%%%%%%%%%%%%%%%%"+store);
store.connect(host,"st-oshigoto","stafoshigotoz");
System.out.println("Here33333333333333333333connected");
// Get folder
Folder folder = store.getFolder("INBOX");
folder.open(Folder.READ_ONLY);
System.out.println("Here44444444444444444444");
// Get directory
Message message[] = folder.getMessages();
System.out.println("Here5555555555555555555");
for (int i=0, n=message.length; i<n; i++) {

System.out.println(i + ": "+ message[i].getFrom()[0]+ "\t" + message[i].getSubject());

String content = message[i].getContent().toString();

if (content.length() > 200) {
content = content.substring(0, 200);
}

System.out.print(content);
}
System.out.println("Here666666666666666666");
// Close connection
folder.close(false);
store.close();
System.exit(0);
}
}

Here11111111111111111111
DEBUG: not loading system providers in <java.home>/lib
DEBUG: not loading optional custom providers file: /META-INF/javamail.providers
DEBUG: successfully loaded default providers

DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.
smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.
IMAPStore,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems,
Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: not loading optional address map file: /META-INF/javamail.address.map
Here22222222222222222222javax.mail.Session@44c86f8c
Exception in thread "main" javax.mail.NoSuchProviderException: No provider for pop3
at javax.mail.Session.getProvider(Session.java:249)
at javax.mail.Session.getStore(Session.java:323)
at javax.mail.Session.getStore(Session.java:303)
at Fetch.main(Fetch.java:26)

The problem seems to be occuring on the line
Store store = session.getStore("pop3");

I have included the pop3.jar in the classpath. Can someone tell me where am i going wrong ?

Thnks in advance,
Deepak.
[ October 11, 2005: Message edited by: Deepak A ]
18 years ago
Hello everyone,
I need the java source code implementing CRC16-CCITT encoding.The source i found were all in C or C++. Just wondering whether anyone cud help me in this regard...
Deepak.
18 years ago
Can someone please tell me how do i write a PreparedStatement onto a log file??? i want to display the record which failed to insert into the DB for some reason in the log file...