Cesar Tg.

Greenhorn
+ Follow
since Jul 05, 2004
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 Cesar Tg.

hi all!

I'd like to know if there is an API or function that allows me to add periods of time in the way of years,months and days to a date, for instance

add 25 years, 13 months, 50 days to the date 01/10/2007, and it provides me
the result in format dd/mm/yyyy

Any hint???, what apis could i use?

Thanks!
17 years ago
Hi!
I am a beginner in e-commerce and i'd like to know how these systems are
made, how to make the electronic payment?, what should i learn? or where can i learn this? i guess i should learn SSL, buy i also think this is not the only thing..

any hint or tutorial will be appreciated!!

Greetings
Csar.
Hi gurus!

I have a web application(JSF) and runs in http, i�d like to know how slow this application is if it is runned in HTTPS???, an estimated percentage how slow it could be...


Regards!
Csar.
Hi!

I am using java mail in a web application, i need to use authentication.
I've seen code on the web, in which is implemented a class like this and then is used when creating the session object,

private class SMTPAuthenticator extends javax.mail.Authenticator
{

public PasswordAuthentication getPasswordAuthentication()
{
String username = "user";
String password = "password";
return new PasswordAuthentication(username, password);
}
}

then ...

Properties props = new Properties();
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");

Authenticator auth = new SMTPAuthenticator();
Session session = Session.getDefaultInstance(props, auth);


i am actually getting the mail session from context, by using lookups:

Context initial = new InitialContext();
MailConfiguration mailConfig = (MailConfiguration)initial.lookup(.....

i don't have any information harcoded, everything is defined in Admin Console in Application Server (smtp server, protocols, ...)

my questions is: for authentication does it work the same way? i mean, should I define password and user in admin console? because i don't find any information on the web, or should I write code like the one presented? which i don't think is the best solution, becuase i need to hardcoded usr and password or what about if afterwards i connect to a server which
not require authentification to send emails..., i should change my code...



Any hints or link on the web will be appreciated!

Thanks!
Csar.
18 years ago
Hi all!

I got this problem:
I am using backing beans with scope of session, and i am using the
backing bean constructor to initialize the form, everything is fine when
form is loaded the first time, but the second and the others times not,
how can i initialize the form the second time and the others, because constructor is just the firs time?

i don't want to use backings beans with scope of request because i've noticed some dificulties when coding, for instance,in every request a backing bean is created and his constructor is executed, sometimes it is not appropiate to execute constructor again because maybe i am just catching an onSelect event and i want just to fill another field in the form, and constructor executed again in every request is not appropiate, that is way i went to use session backing beans, but now i got the problem mentioned before...

any hints???

help will be appreciated...


Csar.
18 years ago
JSF
Hi!

I'd like to know how can i disable a link(commandlink) with code...

h:commandLink action="datgendeclarante" id="datgendeclarante"
h utputText value="#{msg.rubros_dat_generales}"
h:commandLink

i got checkbox like this ...

h:selectBooleanCheckbox id="nin_datconyuge" value="#{RubrosDeclaracionBean.nin_datconyuge}" immediate="true" onclic="this.form.submit();" valueChangeListener="#{RubrosDeclaracionBean.SalvaChecks}"


and in SalvaChecks method ...

public void SalvaChecks(ValueChangeEvent event){ ...


i want to disable the link , how can i do that?



Thanks, Cesar.
18 years ago
JSF
Hello Gurus!

I don't know why it doesn't work, according to me i should display
FALSE and it displays TRUE, what is it comparing?, what am i doing wrong?
please help me!, i don't know what else to do...

Regards!
Csar

<%
String s1 = "1";
String s2 = "2";
%>

value s1: <%= s1 %> <br>
value s2: <%= s2 %> <br>


<c:if test="${s1 == s2}" var="result"/>

<c ut value="${result}" />
[ September 28, 2005: Message edited by: Bear Bibeault ]
18 years ago
JSP
Hi all!

I'd like to access session objets from differents objects, i have the main
browser window, and one button click opens a new window, how can i access the session in this window, is it possible?


Thanks!
Csar
18 years ago
JSF
Hi!

I'd like to know if will there be a new version for SCEA exam, i mean
any update from J2EE 1.3 to J2EE 1.4 in the exam...



Thanks!
Csar.
Hi all!

I'd like to know how to implement a MVC architecture in a Java
Swing application???

something similar to struts or java server faces where there is a controller that controls pages flaw, is it posible???


Thanks
Csar.
18 years ago
Hi all!

I'd like to know how to integrate Tiles to a JSF project with the latest
release of Tiles, Tiles comes in Struts package and the latest version of Struts is 1.2.7, i don't find examples on internet on how to use ONLY tiles from the package, there are examples but by using Struts as intermediate, is configured a Tiles plug in in struts-config.xml ...

i'd like to do it by using TilesServlet like in examples from Struts 1.1. but with the release 1.2.7, TilesServlet is gone..

can i use only Tiles from Struts 1.2.7 package??? and if so, where can i find information of this???

The reason of using Tiles from Struts 1.2.7 is that i want to use the
latest releases...


Thanks!
Csar.
18 years ago
JSF
Hi!

i'd like to know if i can use javascript in JSF to do something like
validations on client side, cause i've read that is not supported by JSF (only server side validations) or is limited....


Thanks
Csar.
18 years ago
JSF
Hi Sharad!

I wasn't refering to Sesions on data, In fact i am not using sessions, i meant it seems that TCP/IP connections are maintained by the JAS when the servlet doesn't find where to write the response(maybe user close the browser).. and because of this
the messages java.io.Exception broken pipe... are on logs

does it cause the Server CPU is always in 100%? (this open connections..)

and if so, what can i do to solve it?


Thanks
Csar
18 years ago
Hi Sharad!

I wasn't refering to Sesions on data, In fact i am not using sessions, i meant it seems that TCP/IP connections are maintained by the JAS when the servlet doesn't find where to write the response(maybe user close the browser).. and because of this
the messages java.io.Exception broken pipe... are on logs

does it cause the Server CPU is always in 100%? (this open connections..)

and if so, what can i do to solve it?


Thanks
Csar
18 years ago
Hi Servlets Gurus!

I developed an application, it's a servlet that receives files and process
according to bussiness rules, the problem is that in Java Application Server Logs, there are messages like this:

java.io.Exception : Broken pipe or Connection reset by peer and
it's on logs lot of times, i know the problem is due to servlet doesn't find
where to write the response, (maybe users hit on refresh, close the browser or something like this)

According to Servers administrator, this sessions aren't destroyed and are present on the JAS and consumes resources on CPU or others, IS IT POSSIBLE???

so from time to time Administrator has to restart the JAS to free those resources, and so the application has a good performance...


if this sessions represent a problem, what can i do to solve it?, do i have to do something in code? or on JAS aministration console?

Please any help or hint will be apreciated...


Thanks!
Csar.
18 years ago