EL and parameters

I am having some issues with expression language and the submit button. There is a page that displays the value of a parameter(passed to page) called name. The user is given a text field to enter a new name and a button to submit the name back to page for another greeting. I guess my code is fine, I can see the initial form, when I hit the submit button nothing happens in code (a) and in another project code for which is in (b) it says requested resource not avaliable.

code (a)

templateText.jsp

<html>

<head>

<title>Professional JSP 2, 4th Edition</title>

<style>

body, td{font-family:verdana;;}

</style>

</head>

<body>

<h2>EL and Template Text</h2>

<table border="1">

<tr>

<td colspan="4">Hello ${param['name']}</td>

</tr>

<tr>

<form action="templateText.jsp" method="post">

<td><input type="text" name="name"></td>

<td><input type="submit"></td>

</form>

</tr>

</table>

</body>

</html>

The deployment desc for this is:

web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

version="2.5">

</web-app>

(b) In another project the code is

simpleBean.jsp

<jsp:useBean id="person" class="com.apress.projsp.Person" scope="request">

<jsp:setProperty name="person" property="*"/>

</jsp:useBean>

<html>

<head>

<title>Professional JSP 2, 4th Edition</title>

<link rel="stylesheet" href="projsp.css">

</head>

<body>

<h2>EL and Simple JavaBeans</h2>

<table border="1">

<tr>

<td>${person["name"]}</td>

<td>${person.age}</td>

<td> </td>

</tr>

<tr>

<form action="simplebean.jsp" method="post">

<td><input type="text" name="name"></td>

<td><input type="text" name="age"></td>

<td><input type="submit"></td>

</form>

<tr>

</table>

</body>

</html>

JaavaBean is:

Person.java

package com.apress.projsp;

public class Person {

private String name;

private int age;

public Person() {

setName("A N Other");

setAge(21);

}

public void setName(String name) {

this.name = name;

}

public String getName() {

return name;

}

public void setAge(int age) {

this.age = age;

}

public int getAge() {

return age;

}

}

Any help is greatly appreciated. Has it something to do with intranet settings? How do I fix this problem? Thanks

[3224 byte] By [m_minia] at [2007-11-27 6:36:34]
# 1
I faced this kind of issue some time back. I just stoped and started the server again.
skp71a at 2007-7-12 18:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thanks for the input. I tried it out, did'nt work. When I did so entered a value in input box and hit submit button it said IE cannot display the webpage, any idea why? Is it something to do with the IE settings? Also the top text box should display just Hello it displays Hello ${param['name']}. Also with several examples I found that the EL is getting printed out as such, not getting evaluated. Any suggestions please?

m_minia at 2007-7-12 18:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Sorry just realized the server was shut down, that was dumb on my part. Instead of IE cant display webpage it says requested resource is not available. Rest of the problems as in my response (my earlier mail)to your suggestion remain. Any help wud be appreciated.
m_minia at 2007-7-12 18:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...