Re: jsp:getProperty not working

2013-01-25 Thread Benin Technologies

thanks for your reply

below my EmployeeBean source code

package org.company.beans;

public class EmployeeBean {
private int id;
private StringfirstName,
lastName,
email,
department;

public EmployeeBean(int id) {
this.id = id;
firstName = "";
lastName = "";
email = "";
department = "";
}

public EmployeeBean() {
this(0);
}

public int getId() {
return id;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getFirstName() {
return firstName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getLastName() {
return lastName;
}

public void setEmail(String email) {
this.email = email;
}
public String getEmail() {
return email;
}

public void setDepartment(String department) {
this.department = department;
}
public String getDepartment() {
return department;
}
}

Le 26/01/2013 02:10, Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

To whom it may concern,

On 1/25/13 6:56 PM, Benin Technologies wrote:

I'm new to Tomcat/JSP

I have a JSP page that instantiates a bean, then it access the
bean through a scriptlet, it works fine. But when I replace the
scriptlet by a  IS WORKING, it
displays the employee's firstname   IS NOT WORKING, displays nothing

any idea why ?

Can you give us the interface for EmployeeBean? Perhaps "firstName"
isn't a proper "Java Beans" "property" and so it can't be properly
detected, while EmployeeBean.getFirstName works just fine.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEDLRsACgkQ9CaO5/Lv0PC8awCfTPG1cu31z0RwYeolkR+TbHy6
/TQAniNRX2HjsPZhHyZ3EcH+2zjHHeBF
=FOIU
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



jsp:getProperty not working

2013-01-25 Thread Benin Technologies

Hi,

I'm new to Tomcat/JSP

I have a JSP page that instantiates a bean, then it access the bean 
through a scriptlet, it works fine. But when I replace the scriptlet by 
a 

Take my code below :
<%= employee.getFirstName() %> IS WORKING, it displays the employee's 
firstname
  IS NOT 
WORKING, displays nothing


any idea why ?



scope="request" />


<%
Vector v =(Vector)request.getAttribute("list");
Iterator i = v.iterator();
int j = 0;
while (i.hasNext()) {
employee = (EmployeeBean)i.next();
%>

<%= employee.getFirstName() %>  
  WORKS
 DOESN'T 
WORK !! WHY ?


<%
}
%>



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: session not working when dash or underscore in application name

2013-01-20 Thread Benin Technologies
Thanks, maybe the problem has been solved in 7.0.34, I'll try that 
version later
in the meantime I simply removed all dashes and underscores, and 
everything works fine


Le 19/01/2013 20:52, Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

To whom it may concern,

On 1/19/13 7:15 AM, Benin Technologies wrote:

I just installed Tomcat 7.0.32 on Debian Linux 6 (Squeeze). Client
is Mozilla Firefox 12.0, also on Debian Linux 6.

To test session behavior, I did a simple JSP page that simulates a
coin launch (heads or tales), and displays the total of heads and
total of tails.

If my war file is called headsOrTails.war, it works just fine :
http://tomcat:8080/headsOrTails/

but if there are dashes or underscores in the name, Tomcat creates
a new session for each page request (so I can't get the totals)
http://tomcat:8080/heads-or-tails/
http://tomcat:8080/heads_or_tails/

is this a normal behavior ?

I do not experience the behavior you describe on 7.0.34.

Neither dashes nor underscores anywhere in the path of the JSP seem to
have that effect: a single session is created when I try it.

Perhaps something else is affecting your environment?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlD6+X0ACgkQ9CaO5/Lv0PDYxACeIdD6MLMC1P8Fwpzk6BFCHjnR
ZiIAoJRe1RfgHH9ZWbe9T6lDMn3A+PbO
=n4ZY
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



session not working when dash or underscore in application name

2013-01-19 Thread Benin Technologies

Hi,

I just installed Tomcat 7.0.32 on Debian Linux 6 (Squeeze). Client is 
Mozilla Firefox 12.0, also on Debian Linux 6.


To test session behavior, I did a simple JSP page that simulates a coin 
launch (heads or tales), and displays the total of heads and total of tails.


If my war file is called headsOrTails.war, it works just fine : 
http://tomcat:8080/headsOrTails/


but if there are dashes or underscores in the name, Tomcat creates a new 
session for each page request (so I can't get the totals)

http://tomcat:8080/heads-or-tails/
http://tomcat:8080/heads_or_tails/

is this a normal behavior ?

thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org