This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

lyo Yashnoo

Ranch Hand
+ Follow
since Sep 15, 2003
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 lyo Yashnoo

Hi friends:

In a JApplet, I want to add a JButton to SplitPaneDivider.But the code seem's don't work property. My code is:

////////////// TestApplet extends JApplet ////////////////
public class TestApplet extends JApplet {
public void paint(Graphics g) {
JPanel f=new JPanel();
f.setPreferredSize(new Dimension(300,200));

f.setBackground(Color.green);
f.setVisible(true);
f.setLayout(new BorderLayout());

JButton jep=new JButton("b");
JSplitPane jspcontent=new JSplitPane(JSplitPane.VERTICAL_SPLIT,f,jep);
jspcontent.setOneTouchExpandable(true);
jspcontent.setDividerSize(50);

BasicSplitPaneUI bspUI=(BasicSplitPaneUI)jspcontent.getUI();
JButton b=new JButton("test");
b.setVisible(true);
BasicSplitPaneDivider divi=bspUI.getDivider();

divi.add(b);
divi.setVisible(true);
divi.validate();

this.setContentPane(jspcontent);
this.setVisible(true);
this.validate();
}
}
///////////// end //////////////////

The divider can't display the JButton, why?

But in a frame (None JApplet ) application, it can work property. Does the JApplet can't use BasicSplitPaneDivider ?
:roll:

Thks!
14 years ago
Hi everyone:

I want to get Mail list using javamail API. My code is:


When I run it. Exception happen:

My username and password is correct. Maybe I need set proxy to javamail. How to set proxy using javamail for get Mail list? THks!
15 years ago
If I use the System.out.println(doc). It will print

Why it don't print the xml to Browser? :roll:
16 years ago
Hi
I do this in this way but it don't work property. I use it in a servlet.When I click the hyperlink.it redirect a page ,error is:"the root of this document is not valid,error happen when process http://localhost:5050/lyoweb/getxml range1.
my code is:

what's wrong with it?
Why it can't disply xml in browser?
16 years ago
Hi friends.

I want to implement the Hotmail's function. Does anyone use hotmail? You can add many attachment to one mail. And it can add the value(file's path) to a table ,finally,it send the table's data to server. Can jsp do this?
16 years ago
JSP
Thank you for your fast reply.
I know your means. It need set the document header. But I think the main problem is that how to write all the data to a Stream? And send the xml stream to clients? Should I use inputstream or pipestream?
16 years ago
HI everyone:

I am a new developer in webservice soap. I come across a problem.
I want to invoke a soap method which return a List for example:

Now I want to display them in client's browser. What client will see in browser is :

But I don't know how to send the List to client and display them. Could I use Inputstream to do this?
Must I create xml document in server and send it to clients? I expect that I can do this using Stream.
Anyone can tell me how to send the data using Stream.
Thks!
16 years ago
Hi
Thks for your reply
I change the code to
"if(v.isEmpty)" but I get a nullpointer Exception when I first run the jsp.
I change two file to jsp.They are all jsp file.It also can't work property.
I think I will say the my main meaning:
I am writing a email system using javamail.I want to implement file upload in my mail system.I also want to user can upload many file.So I place a vector value in jsp page.When user add a file name the vector will add one.The Vector will send to servlet after user upload all files.
But I come across two problems:
1: how to add a hyperlink to the mail attachment? Because the attachment is stored in the mail server so I don't know how to get it.What I only can get is a inputstream.It is the attachment's inputstream support by javamail API.
But how to change the attachment's inputstream to a File So when user click it the attachment will be download?
2.I change the code ,but when I refresh the page vector will add one
Mybe javascript can solve it?
Help!
16 years ago
JSP
Hi friends:
I am writing a mail systems.I can receive email attachment using javamail API. But I don't know how to add a hyperlink to the attachment so when user click the hyperlink the file will be download to disc.
I means that I want to add a hyperlink to the attachment,the hyperlink will get the file's path in mail server.Because the mail's attachment are stored in mail server so I don't know how to get it in my servlet.
what I can do is get a inputstream using messagePart.getInputStream();. I only can get a inputstream in servlet.How to change the inputstream to a File when user click it and download it?
Help!
Thks
16 years ago
JSP
Hi:
I change the code to:

It can work.It will add an item to Vector after I click button.But the new problem is that it will also add item to Vector when the user refresh the page!
I means that when I refresh the jsp page the item will add one.
How to avoid this situaction?
THks!
16 years ago
JSP
Hi everyone:
I am writing a E-mail system using javamail and I expect the user can add attachment to their mail.Add client can attach several attachments. So I write two pages,one is jsp:

<%Vector v=new Vector();session.setAttribute("allfiles",v);String file=request.getParameter("upfile");if(null!=file){ v.add(file); session.setAttribute("allfiles",v);}for(Enumeration e=v.elements();e.hasMoreElements() {out.println("File:"+e.nextElement().toString());}%><a href="#" o n c l ick="window.showModalDialog('addfile.html','Title','status:no;dialogHeight:320px;resizable:no');">Add</a>
Another is html:
<SCRIPT LANGUAGE="JavaScript"><!--function send(){alert("hello");opener.document.location="t.jsp"; self.close();}//--></SCRIPT></head><body><form action="t.jsp" name="uploadform" ENCTYPE="multipart/form-data">select File:<input type="file" name="upfile"/><INPUT TYPE="button" o n c lick="send()" value="sendToParent"/></form>
vector will get all the file and will be send to a servlet finally.
When user click "Add",it will open a ModalDialog that user can choose file.After choose file user click the button "sendToParent",the child window will close and the file name will send to t.jsp.
So t.jsp will add the value to the Vector and display it.
But when I click button after choose file the t.jsp display nothing. : (
Why the Vector can't get the value ( file path in the disc)? There is any error in my code ? Help!
Thks! :roll:
16 years ago
JSP
Hi everyone:
I have a servlet that must query database and take too much time.So I want to implement a progressBar in jsp while the servlet send the redirect.I want to implement this using javascript.Is there any javascript component available?
Or how do you process this while query database?

:roll:
16 years ago
JSP
Hi everyone:
Had anyone used RSS (rdf) develop news?I use the Jakarta digester to compile rss(.xml) and use the logic taglib to display in jsp.But the current rss version is 1.0.It is rdf format other than xml? I really don't how to code the rdf format file.I had tried the informa but it seems not read rdf.
I don't know how to read the rdf file and display it in jsp.
Someone had done it before? :roll:
16 years ago
JSP
Hi everyone
I am writing a forum.I want that the page go to another page after wait 5 seconds. I means that when user click post he will go to a page " please wait 5 seconds,if you don't want to wait, click Here" Then the page will go to another page after 5 second. It like Javaranch forum!
But the problem is that I display the data using <html:logic Taglib.And I use "request.setAttribute("data",iterator)" the set the data to request.If I do above things Tomcat will says:"can't find data in any scope".
I know why this happen because there is not any data in request after the page redirect.
How to fix it? Anyone had thinked it?Help :roll:
16 years ago