hany hashemi

Greenhorn
+ Follow
since Dec 17, 2008
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 hany hashemi

Thanks for your response but i downloaded JavaEmail Server as a server.Still i don't know how to use this email server...
15 years ago
Hi everybody,
I am going to have an email server on my pc and read emails by using JavaMail Api.So i downloaded "javamail-1.4.1" , "jaf-1.0.2" and also "jes-1.6.1" and added their jar files to the ClassPath.
Here is a problem confusing me some days.I have a simple java program which needs host,id and password.
I don't know exactly how should i configure this email server to set these variables and i will appreciate if anybody can help me.

Regard
15 years ago
I put it outside of the method.I mean before pressing the insert button ,i declare a model and inside the insertRow i just add row.BUT ... ???!!!
evrything is just like before,without any changes...
15 years ago
Thanks for your help.
I did what you suggested and removed a code which was declaring a new model while adding a new row.But it still doesn't work.I get so frustrated and completely confused. :!:
This is a new part of my code:
15 years ago
Sorry i didn't get it.
You mean i should delete the following lines from the code:

so i just have these lines in the insertRow() function:

but it still doesn't work properly yet...

Would you please tell me what should i do now?
15 years ago


This part of code took a long time and i will be appreciative if you can help me solving my problem.
Thanks in advance.
15 years ago
Hi everybody,
I have a Jtable and i am going to add an empty row after pressing a button named insert.
Whenever i put these following code in my class ,it works properly.

I should add after these 2 lines i create a JScrollPane and add it to the getContentPane().

THE PROBLEM:
Whenever i put these 2 lines in a seperate function like addRow() and call this function after pressing the insert button , i see no changes in Jtable,i mean a new empty row isn't added to the table.
I think i should add a new table to the JScrollPane but since i'm a new programmer in java ,i don't know how to do this.

Can anyone help me please?
15 years ago
I use the println and i saw that addNewRow method was called.I also comment the line related to fire a table but after pressing the insert button ,instead of adding a new row at the bottom of my table , i faced to these massages:
15 years ago
Hi everybody,
I have a Jtable which is filled by the data related to MySql table.I added a button and i want the JTable to add a row while i am pressing the Insert button.
This is a part of my code.



I will be appreciative if somebody can help me solving this problem.
Thanks
Hany
15 years ago
Hi everybody.
Since i am a new jave programmer , i have a simple problem using html forms.
How can i place a form in the middle of the page?
I am going to see my form in the middle of the IE page.Which attribute should i set?
Thanks a lot
Hany
Hi,
I have a page named "Login" and after entering username and password , a user can enter into a page named "MainMenu".So simple..
I am going to use session so when a user login and enter into a MainMenu and after that close this page,with opening new page the controller set if it is a new session forward it to "Login" , otherwise forward the request to the "MainMenu" or each page that a user was in before closing the page.
Here is my code:

[CODE]
if (session.isNew()){ // the first login
getServletConfig().getServletContext().getRequestDispatcher ("/Login.html").forward(request,response);
currentUrl = getUrl(request);

}
else {
oldUrl =(String) session.getAttribute("currentUrl");
String servletPath = request.getServletPath(); // /control

if (oldUrl != null) {
// out.println("oldUrl != null");
getServletConfig().getServletContext().getRequestDispatcher("\"servletPath").forward(request,response);
}

}
session.setAttribute("currentUrl",currentUrl);
out.close();

}
[CODE]

but unfortunately it doesn't work and i face to this error:

type: Exception report
message escription The server encountered an internal error () that prevented it from fulfilling this request.

exception:
java.lang.IllegalArgumentException: Path "servletPath does not start with a "/" character

Thanks in advance
Hany

[ December 23, 2008: Message edited by: Bear Bibeault ]
[ December 24, 2008: Message edited by: hany hashemi ]
15 years ago
hi again,
I should thank you alot ,i changed the capital letter in package name in to small one and it is working now.
you save me some time...:-)

Hany
15 years ago
hi,
thanks for your help.
this is a url for accessing my page:
"http://localhost:8080/control"

I put my file in this location:
web/src/phoneBook/service

Is it wrong location???!!
thanks for helping me
Hany
15 years ago
Hi,
I have a simple class file named ControllerServlet.Whenever i put it in a default root (in src) my program run successfully. Since i put it in to a seperate package i force with this error:

"HTTP Status 404 - Servlet (control) is not available ..."

I also set the servlet parameters in web.xml.
<servlet>
<servlet-name>control</servlet-name>
<servlet-class>phoneBook.service.ControllerServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>control</servlet-name>
<url-pattern>/control</url-pattern>
</servlet-mapping>

I will appreciate it if anybody can help me.
many thanks
Hany
15 years ago