You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Julien Martin <ju...@wanadoo.fr> on 2003/06/07 09:01:57 UTC

tomcat 5 won't compile my jsp

Hello,

I am having a problem with tomcat5/jwsdp-1.2.
Tomcat doesn't take into account changes made to jsp. If I delete the
generated java file and the class file compiled from it, Tomcat won't
translate(jsp->java) it and compile (java->class) it.

The specific file I am having a problem with is
jsp%jwsdp_home%\webapps\jsp-examples\jsp2\el\implicit-objects.jsp

Please help.

Julien.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Problem with request scope example

Posted by Julien Martin <ju...@wanadoo.fr>.
Hello,

I am trying to understand the use of the request scope.

I have two jsp and a bean class as follows:

***first jsp
<jsp:useBean id="person" class="paquet.Person" scope="request">
	<jsp:setProperty name="person" property="age" value="5"/>
	<jsp:setProperty name="person" property="name" value="toto"/>
<html>
	<head>
		<title>First Page</title>
	</head>
	<body>
		<jsp:getProperty name="person" property="age"/><br />
		<jsp:getProperty name="person" property="name"/><br />
 <a href="index2.jsp">here</a>
 </body>
</html>
</jsp:useBean>


***second jsp
<%@ page import="paquet.Person" %>
<jsp:useBean id="p" class="paquet.Person" scope="request"	>
<%
p = (Person)request.getAttribute("person");
%>
<html>
	<head>
		<title>Second Page</title>
	</head>
	<body>
		<jsp:getProperty name="p" property="age"/><br />
		<jsp:getProperty name="p" property="name"/><br />
	</body>
</html>
</jsp:useBean>



***java bean
package paquet;
public class Person {
private int age;
private String name;
public int getAge() {
	return age;
}
public String getName() {
	return name;
}
public void setAge(int i) {
	age = i;
}
public void setName(String string) {
	name = string;
}
}


I am trying to display on jsp two the properties set in jsp one. It is not
working. Can anyone help?

Thanks in advance,

Julien.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tomcat 5 won't compile my jsp

Posted by Tim Funk <fu...@joedog.org>.
Tomcat5 precompiles all of it's jsps during the build of tomcat5.

So if you change any jsp shipped with tomcat you will either need to
A) Rename your change to a new file
   -- or --
B) Remove the web.xml entries which map the jsps to a particualr class

-Tim

Julien Martin wrote:
> Hello,
> 
> I am having a problem with tomcat5/jwsdp-1.2.
> Tomcat doesn't take into account changes made to jsp. If I delete the
> generated java file and the class file compiled from it, Tomcat won't
> translate(jsp->java) it and compile (java->class) it.
> 
> The specific file I am having a problem with is
> jsp%jwsdp_home%\webapps\jsp-examples\jsp2\el\implicit-objects.jsp
> 
> Please help.
> 
> Julien.
> 
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org