Haythem Ben Yahia

Greenhorn
+ Follow
since Nov 29, 2012
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 Haythem Ben Yahia

hi,
i have a file "*.txt" that contains a lot of informations seperated by ";"
i wanted just to read the second and the third argument.can you please help me doing that?
this is my code that allows me to read text file


how can i read only the 2nd and the third argument from this file??


thank you
5 years ago
i know that i need tomcat 7 but how can i configure it? i have tomcat 5.5 indtalled in my server and i think that my app is deployed with that version (tomcat 5.5)
i changed the $CATALINA_HOME but it didn't work

please can someone help me !!!
5 years ago
I explain the situation which is actually a bit tricky. I'm working with fedora 10 and tomcat 5.5. I have a domain name (eg www.stoner2008.com) in which I used to host my application. I currently just finished a jsf2.2 application that only works with apache tomcat 7.if I deploy my application locally, it works perfectly with tomcat7(in 127.0.0.1:8087) but if I deploy as usual to the webapps to put online, it doesn't work.Html pages are ok but in other hand the jsp pages and .xhtml pages are not showed properly (no component jsf or primefaces).

NB: I modified the file /bash_profile and I put in the variable CATALINA_HOME location of the new tomcat 7..

I think that by accessing online (in www.stoner2008.com/myApp), the system uses the old tomcat.

What to do? Do I reconfigure apache2 and also to listen the port 87 mode?i did so but it doesn't work too. please help !!!
5 years ago
hi,
i have worked a lot and tried a lot of methods to read from a csv file.
i tried to import my file into a folder and then read from it.to do that i tried to import the csv file into my disk but it didn't work.
this is my javaBean code


this is my jsf page



and this is web.xml



please help me !!
6 years ago
JSF
hi,
i have to import a csv file and show its components in a datatable.and then i must select all items(checkbox) and click a button witch call a methods that takes parameter everey checkbox that is checked.
how can i do that, please
6 years ago
JSF

K. Gil wrote:

className.var cannot be resolved to a type


i copied the hole project from my workspace into /webapps but the result is the same.



This error message means, that the program can't recognize "className.var" as a type.
The cause of the problem can be that you have not imported the package that contains "className.var"


i imported the hole package that contains the class file but when i tried to import the class it generates an error that say

i'm surprised because my code works fine under eclipse but when i deploy it under tomcat it generates this error like he wasn't able to locate my classes
6 years ago
hi,
I set up a JSP page that retrieves values ​​from the URL and save them in a database.
so I break my code and I created a class to connect to the database and executes the JSP request, however, it doesn't work.
Here is the code of the class knowing that I tested and it works


here is my jsp page that calls the method getMyConnection() in my class Connect.java


and this is the error



it seems like my jsp can't locate my classes.
i'm sure that i imported them into my jsp file.
the saving process is working under eclipse but if i i try to aceess to the same URL successfully launched on eclipse it generates me the error that " CLASSNAME CANNOT BE LOCATED "


Please help !!!
that's i'm doing.
my jsp need to store in a database so i call a class that simply call a method to store data received from the url

and then i call just my method which saves it into my database
6 years ago
JSP
hi,
my project contains a jsp page that calls different classes.
when i run my project under eclipse it works fine.
but when i enter the same URL link (wich runs on eclispe) in my browser, tomcat said that there is some errors.


it seems like he can't locate the other classes.i copied the hole project from my workspace into /webapps but the result is the same.
why is it running fine under eclipse and not under tomcat?


help please !!!
6 years ago

Jeanne Boyarsky wrote:Connect.getMyConnection is a static method. This means you don't need jsp:useBean. That would be for an instance method.

Did you import the connection class on the top of your JSP? This should look like
<%@ page import="com.database.Connect" %>


no it doesn't work i can't import the class Connect but i can import the whole package that contains the Connect class
what's wrong with my first code??
it works perfectly with eclipse but when i decided to execute the URL directly in my browser it generates the error above.
i copied the project from my eclipse workspace into webapps of tomcat but it doesn't work.
please help
6 years ago
JSP
hi,
I set up a JSP page that retrieves values ​​from the URL and save them in a database.
so I break my code and I created a class to connect to the database and executes the JSP request, however, it doesn't work.
Here is the code of the class knowing that I tested and it works


here is my jsp page that calls the method getMyConnection() in my class Connect.java


and this is the error



i tried this to but it doesn't work


and this this the related error



please help me
6 years ago
JSP
hi,
i found this code in a practice exam but even i tested it in Eclipse, i didn't find how it works.
please can someone explain me what this 1$+10d %.....

help please!!!
i found the problem.the original equals() it is like ==.so x.equals(y) return true if & if only x==y.
if 2 objects have the same parameter then it will be not equal with this method.so we need to modify it.
hi,
i'm studying with the book of kathy Sierra and i wanna pass the SCJP but i foud a problem:
i didn't understand why we used to override equals() at the page 582.what is the goal of doing that.
thank you