Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Miral Makadia

Greenhorn
+ Follow
since Sep 04, 2009
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 Miral Makadia

hi all,

I have a list of phone number and i want to call through VOIP in my web application. Any idea how to implement VOIP in my web page? or any dialer ?

Thanks



I want to implement video chatting system in my application where spring and hibernate framework (front end is developed JSP & DWR AJAX) are used. In my case we can’t implement applet because this application is also run on MAC Operating System. Is there any other way to implement video chatting without applet? How is this implemented in Skype, Google talk and Yahoo ?
I will welcome all the suggestions and guidance on this.
9 years ago
I want to save pdf file to server from applet and for that i make one sevlet and request form applet , but request is not goes to perticular servlet from applet.and execute completly without any error

I have one sevlet TestDataHandler sevlet and

i called that sevlet from URL class, but request is not goes to from applet
code is here

applet code
public void action(final ViewerEvent event) {
try{
System.out.println("Save.action method call 1");
final PDF pdf = event.getPDF();
//final Exporter[] chosenexporter = new Exporter[1];
Exporter ex = new PDFExporter();
System.out.println("Save.action method call 2");
final DocumentPanel docpanel = event.getDocumentPanel();
final PDFViewer viewer = event.getViewer();
final JComponent secondarycomp = null;
System.out.println("Save.action method call 3");

String strURL ="http://127.0.0.1:8080/test/TestDataHandler"; //
URL serverUrl = new URL(strURL);
//System.out.println("serverurl..."+serverUrl.getFile().getBytes());
System.out.println("Save.action method call 4");
URLConnection dataHandlerConnection = serverUrl.openConnection();


System.out.println("Save.action method call 5");
dataHandlerConnection.setDoOutput(true);
System.out.println("Save.action method call 6");
// dataHandlerConnection.connect();
OutputStream out = dataHandlerConnection.getOutputStream();
DataOutputStream dos = new DataOutputStream(out);
//dos.write("This is test input".getBytes());
dos.writeBytes("This is test input");
//out.write("This is test input".getBytes());
dos.flush();
dos.close();
//System.out.println("Exporter is : " + chosenexporter[0]);
// System.out.println("docpanel is : " + docpanel);
// Exporter.ExporterTask task = ex.getExporter(docpanel, docpanel.getPDF(), secondarycomp, out);
// System.out.println("Save.action method call 7");
// task.start(viewer, Util.getUIString("PDFViewer.SavingFile", "test file"));
System.out.println("Save.action method call 8");
}catch (Exception e) {
System.out.println("Exception while shaving data in Save.action()");
e.printStackTrace();
}
}



sevlet code



public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
try{
System.out.println("Do GET method is called");
resp.setContentType("text/html");
InputStream is = req.getInputStream();
byte[] b = new byte[1024];
while(is.read(b)!=-1){
System.out.println("read byte :" + b.toString());
}


String contentType = req.getContentType();
System.out.println("Content type is :: " +contentType);
DataInputStream in = new DataInputStream(req.getInputStream());
int formDataLength = req.getContentLength();
byte dataBytes[] = new byte[formDataLength];
int byteRead = 0;
int totalBytesRead = 0;
while (totalBytesRead < formDataLength) {
byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
totalBytesRead += byteRead;
}
System.out.println("read byte :" + dataBytes.toString());
System.out.println("Do GET method is over");
//resp.getWriter().println("DataHandlerServlet doGet is called");
}catch (Exception e) {
e.printStackTrace();
}
}
10 years ago
Hi

I have problem with client server communication with an appplet,

I have open pdf file from server using applet now i make an annotation on it and i want to save that updated file on server using applet.

I have tried with URL connection,

String strURL ="http://127.0.0.1:8080/test/TestDataHandler";
URL serverUrl = new URL(strURL);
System.out.println("Save.action method call 4");
URLConnection dataHandlerConnection = serverUrl.openConnection();


If i am request from browser for that url "http://127.0.0.1:8080/test/TestDataHandler", its working nice . but when i try form applet than it is not work,


can any one help me.

Thanks in advance.
10 years ago
I have a problem with to set label on line.


I am drawing line with svg plugin. and now i want a label or title on line , suppose "line 1",
How can i archive this?

Thanks
Hii


I want to convert PDF form to xml format.

This is how work.

1) End user attach pdf file with browser
2) parser extract form
3) create a xml file



Thanks
10 years ago
Hi


First you should separate your action code to data access object code. It makes more easier to understand.

Try this code


public BmCustomer edit(BmCustomer cust)
{
BmCustomer sessioncust=null;
Session session = HibernateSessionFactory.getSession();
System.out.println("customerid-->edit-->"+cust.getCustomerid());
sessioncust = (BmCustomer)session.get(BmCustomer.class,cust.getCustomerid());
sessioncust=FormConverter.domainTodomain(sessioncust, cust);
session.beginTransaction();
try{
session.update(sessioncust);
session.getTransaction().commit();
session.flush();
} catch (HibernateException e) {
session.getTransaction().rollback();
e.printStackTrace();
} finally {
session.close();
}
session = null;
return sessioncust;

}