You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bib_lucene bib <bi...@yahoo.com> on 2005/10/12 02:31:18 UTC

sample please ....

Hi
 
Can I get a working sample which has struts and tiles. Basically has some layout like head body and footer. Body includes a jsp with a form that has html:text.
 
My example just dont work.
 
Thanks
bib


		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

Re: struts 1.2.7 culprit.....?????

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "bib_lucene bib" <bi...@yahoo.com>

> Any Comments?
...
> I got it to work with struts.jar details of which are ...
> Implementation-Title: Struts Framework
> Implementation-Version: 1.1
...
> However if I use struts.jar from struts-1.2.7 I get an error saying
...

The first thing I would try is deleting the 'work' directory where your 
container keeps compiled JSPs, (or otherwise forcing it to recompile them.)

However, switching versions of Struts involves more than just dropping in a 
new struts.jar file.  You need to make sure you've got the right versions of 
the other libraries that Struts itself depends on.

Here are the release notes and Wiki pages on upgrading:
   http://struts.apache.org/userGuide/release-notes.html
   http://wiki.apache.org/struts/StrutsUpgrade

-- 
Wendy Smoak



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


Re: struts 1.2.7 culprit.....?????

Posted by Simons Kevin <fb...@skynet.be>.
Bib,

I am using that struts version without problems. I first had troubles in the 
beginning to but someone got me started. However I have not yet used 
tiles...
----- Original Message ----- 
From: "bib_lucene bib" <bi...@yahoo.com>
To: <us...@struts.apache.org>
Sent: Friday, October 14, 2005 2:05 AM
Subject: Re: struts 1.2.7 culprit.....?????


> Any Comments?
> Does struts 1.2.7 has problem?
>
> bib_lucene bib <bi...@yahoo.com> wrote:
>
> ok
> got it to work...
> But here is the catch.....
>
> I got it to work with struts.jar details of which are ...
> Manifest-Version: 1.0
> Extension-Name: Struts Framework
> Specification-Title: Struts Framework
> Specification-Vendor: Apache Software Foundation
> Specification-Version: 1.1
> Implementation-Title: Struts Framework
> Implementation-Vendor: Apache Software Foundation
> Implementation-Vendor-Id: org.apache
> Implementation-Version: 1.1
> Class-Path: commons-beanutils.jar
> Class-Path: commons-collections.jar
> Class-Path: commons-dbcp.jar
> Class-Path: commons-digester.jar
> Class-Path: commons-logging.jar
> Class-Path: commons-pool.jar
> Class-Path: commons-services.jar
> Class-Path: commons-validator.jar
> Class-Path: jakarta-oro.jar
> [got a warning duplicates I guess because of classpath in manifest]
>
>
> However if I use struts.jar from struts-1.2.7 I get an error saying
> SEVERE: ServletException in '/layouts/classicLayout.jsp': ServletException 
> in '/
> tiles/body.jsp': /tiles/body.jsp(14,3) Unable to find setter method for 
> attribute: name
> javax.servlet.ServletException: ServletException in '/tiles/body.jsp': 
> /tiles/bo
> dy.jsp(14,3) Unable to find setter method for attribute: name
>
> I do have the setter method, I am attaching the form and action files.
>
> Should I just use the older version and be happy ( as it could be a bug in 
> ther 1.2.7) or is there a remedy. Thanks for all the support.
>
>
>
> bib
>
>
>
>
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.package 
> example;
>
> import java.io.IOException;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
>
> public class NameAction extends Action {
> public ActionForward execute(ActionMapping mapping, ActionForm form,
> HttpServletRequest request, HttpServletResponse response)
> throws IOException, ServletException {
> String target = new String("success");
> String name = null;
> if (form != null) {
> // Use the NameForm to get the request parameters
> NameForm nameForm = (NameForm) form;
> name = nameForm.getName();
> }
> // if no mane supplied Set the target to failure
> if (name == null) {
> target = new String("failure");
> } else {
> request.setAttribute("NAME", name);
> }
> return (mapping.findForward(target));
> }
> }
> package example;
> //import statements
> import javax.servlet.http.HttpServletRequest;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionMapping;
>
> public class NameForm extends ActionForm {
> private String name = null;
> public String getName() {
> return (name);
> }
> public void setName(String name) {
> this.name = name;
> }
> public void reset(ActionMapping mapping, HttpServletRequest request) {
> this.name = null;
> }
> }
> "-//Apache Software Foundation//DTD Tiles Configuration//EN"
> "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
>
>
>
>
>
>
>
>
>
>    -->
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>   It overload the page title, and the body used.
>   Use the same mechanism to define new pages sharing common
>   properties (here header, menu, footer, layout)
> -->
>
>
>
>
>
>
>
>
>
>
>
>
>
>    This definition describe a "bar" of menu stacked verticaly.
> Each menu is describe elsewhere.
> Add new entry in the list to add new menu.
>  -->
>
>
>
>
>
>
>
>
>
>    A menu has a title and a set of entries rendered as links.
> Add new entry to add new links in menu.
>   -->
>
>
>
>
>
>
> link="/index.jsp"
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> link="/templateNoDef.jsp"
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>
>
>
>
>    A menu has a title and a set of entries rendered as links.
> Add new entry to add new links in menu.
>   -->
>
>
>
>
>
>
> link="/index.jsp"
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> link="/index.jsp"
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> icon="/images/struts-power.gif"
> link="http://www.apache.org"
> classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.0/132 - Release Date: 13/10/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.0/132 - Release Date: 13/10/2005


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


Re: struts 1.2.7 culprit.....?????

Posted by bib_lucene bib <bi...@yahoo.com>.
Any Comments?
Does struts 1.2.7 has problem?

bib_lucene bib <bi...@yahoo.com> wrote:

ok
got it to work...
But here is the catch.....

I got it to work with struts.jar details of which are ...
Manifest-Version: 1.0
Extension-Name: Struts Framework
Specification-Title: Struts Framework
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.1
Implementation-Title: Struts Framework
Implementation-Vendor: Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.1
Class-Path: commons-beanutils.jar
Class-Path: commons-collections.jar
Class-Path: commons-dbcp.jar
Class-Path: commons-digester.jar
Class-Path: commons-logging.jar
Class-Path: commons-pool.jar
Class-Path: commons-services.jar
Class-Path: commons-validator.jar
Class-Path: jakarta-oro.jar
[got a warning duplicates I guess because of classpath in manifest]


However if I use struts.jar from struts-1.2.7 I get an error saying 
SEVERE: ServletException in '/layouts/classicLayout.jsp': ServletException in '/
tiles/body.jsp': /tiles/body.jsp(14,3) Unable to find setter method for attribute: name
javax.servlet.ServletException: ServletException in '/tiles/body.jsp': /tiles/bo
dy.jsp(14,3) Unable to find setter method for attribute: name

I do have the setter method, I am attaching the form and action files.

Should I just use the older version and be happy ( as it could be a bug in ther 1.2.7) or is there a remedy. Thanks for all the support.

 

bib




---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.package example;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class NameAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String target = new String("success");
String name = null;
if (form != null) {
// Use the NameForm to get the request parameters
NameForm nameForm = (NameForm) form;
name = nameForm.getName();
}
// if no mane supplied Set the target to failure
if (name == null) {
target = new String("failure");
} else {
request.setAttribute("NAME", name);
}
return (mapping.findForward(target));
}
}
package example;
//import statements
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class NameForm extends ActionForm { 
private String name = null;
public String getName() { 
return (name); 
} 
public void setName(String name) { 
this.name = name; 
} 
public void reset(ActionMapping mapping, HttpServletRequest request) { 
this.name = null; 
} 
} 
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">









    -->






















	  It overload the page title, and the body used.
	  Use the same mechanism to define new pages sharing common 
	  properties (here header, menu, footer, layout)
	-->













    This definition describe a "bar" of menu stacked verticaly.
	Each menu is describe elsewhere.
	Add new entry in the list to add new menu.
  -->









    A menu has a title and a set of entries rendered as links.
	Add new entry to add new links in menu.
   -->






link="/index.jsp" 
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
link="/templateNoDef.jsp" 
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />




    A menu has a title and a set of entries rendered as links.
	Add new entry to add new links in menu.
   -->






link="/index.jsp" 
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
link="/index.jsp" 
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
icon="/images/struts-power.gif" 
link="http://www.apache.org" 
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />








---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

struts 1.2.7 culprit.....?????

Posted by bib_lucene bib <bi...@yahoo.com>.
ok
got it to work...
But here is the catch.....

I got it to work with struts.jar details of which are ...
Manifest-Version: 1.0
Extension-Name: Struts Framework
Specification-Title: Struts Framework
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.1
Implementation-Title: Struts Framework
Implementation-Vendor: Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.1
Class-Path: commons-beanutils.jar
Class-Path: commons-collections.jar
Class-Path: commons-dbcp.jar
Class-Path: commons-digester.jar
Class-Path: commons-logging.jar
Class-Path: commons-pool.jar
Class-Path: commons-services.jar
Class-Path: commons-validator.jar
Class-Path: jakarta-oro.jar
[got a warning duplicates I guess because of classpath in manifest]


However if I use struts.jar from struts-1.2.7 I get an error saying 
SEVERE: ServletException in '/layouts/classicLayout.jsp': ServletException in '/
tiles/body.jsp': /tiles/body.jsp(14,3) Unable to find setter method for attribute: name
javax.servlet.ServletException: ServletException in '/tiles/body.jsp': /tiles/bo
dy.jsp(14,3) Unable to find setter method for attribute: name

I do have the setter method, I am attaching the form and action files.

Should I just use the older version and be happy ( as it could be a bug in ther 1.2.7) or is there a remedy. Thanks for all the support.

 

bib



		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

RE: sample please ....

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Bib,

Can you include your Tiles definition and your jsp using tiles so we can
look at it?  Are you observing any errors in your logs?  Do the logs show
that the TilesRequestProcessor has initialized?

Regards,
David

-----Original Message-----
From: bib_lucene bib [mailto:bib_lucene@yahoo.com]
Sent: Tuesday, October 11, 2005 8:31 PM
To: user@struts.apache.org
Subject: sample please ....


Hi

Can I get a working sample which has struts and tiles. Basically has some
layout like head body and footer. Body includes a jsp with a form that has
html:text.

My example just dont work.

Thanks
bib



---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


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