Re: basic struts application

2010-03-10 Thread tesla

thanks for reply 
i saw this example in the website struts tutorial and there is no code in
action mappings ?
İ can't understand what am i write to the action mappings?

Paweł Wielgus wrote:
> 
> Hi,
> in action-mappings there is no result defined for your action,
> is it on purpose?
> 
> Best greetings,
> Paweł Wielgus.
> 
> 2010/3/10 tesla :
>>
>> from a few days i'm working on struts and i'm trying to develop an simple
>> web
>> application.
>> i cant see the elements of my array(bookList) on jsp page when i run my
>> program it returns me an empty page where am i wrong please help me i'm
>> losing my mind for two days.
>>
>>
>> Book class
>>
>> public class Book {
>>
>>    private String name;
>>    private String description;
>>    private int price;
>>    private int id;
>>
>>    public Book()
>>   {
>>
>>   }
>>    public Book(String name)
>>    {
>>        this.name=name;
>>    }
>>
>>     public ArrayList loadData()
>>     {
>>         ArrayList kitapListesi = new ArrayList();
>>         kitapListesi.add(new Book("calculus1"));
>>          kitapListesi.add(new Book("calculus2"));
>>         return kitapListesi;
>>     }
>>
>> BookForm Class
>>
>> public class BookForm extends org.apache.struts.action.ActionForm {
>>
>>   private ArrayList bookList;
>>
>>    private String name;
>>
>>    private int number;
>>
>>  public ArrayList getBookList() {
>>        return bookList;
>>    }
>>
>>  public void setBookList(ArrayList bookList) {
>>        this.bookList = bookList;
>>    }
>>
>> BookAction Class
>>
>> public class BookAction extends org.apache.struts.action.Action {
>>
>>    private final static String SUCCESS = "success";
>>
>>    public ActionForward execute(ActionMapping mapping, ActionForm form,
>>            HttpServletRequest request, HttpServletResponse response)
>>            throws Exception {
>>
>>        BookForm bookForm = (BookForm) form;
>>        Book book = new Book();
>>        bookForm.setBookList(book.loadData());
>>
>>
>>        return mapping.findForward(SUCCESS);
>>    }
>> }
>>
>> struts_config.xml
>>
>>  
>>        
>>    
>>
>> 
>>        > type="paket.BookAction"/>
>>    
>>
>> data.jsp
>>
>>   
>>           
>>  
>>  
>>  
>>  
>> 
>> --
>> View this message in context:
>> http://old.nabble.com/basic-struts-application-tp27844692p27844692.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/basic-struts-application-tp27844692p27856795.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: basic struts application

2010-03-10 Thread Saeed Iqbal
Check startsoft on google code.

On 3/10/10, Paweł Wielgus  wrote:
> Hi,
> in action-mappings there is no result defined for your action,
> is it on purpose?
>
> Best greetings,
> Paweł Wielgus.
>
> 2010/3/10 tesla :
>>
>> from a few days i'm working on struts and i'm trying to develop an simple
>> web
>> application.
>> i cant see the elements of my array(bookList) on jsp page when i run my
>> program it returns me an empty page where am i wrong please help me i'm
>> losing my mind for two days.
>>
>>
>> Book class
>>
>> public class Book {
>>
>>    private String name;
>>    private String description;
>>    private int price;
>>    private int id;
>>
>>    public Book()
>>   {
>>
>>   }
>>    public Book(String name)
>>    {
>>        this.name=name;
>>    }
>>
>>     public ArrayList loadData()
>>     {
>>         ArrayList kitapListesi = new ArrayList();
>>         kitapListesi.add(new Book("calculus1"));
>>          kitapListesi.add(new Book("calculus2"));
>>         return kitapListesi;
>>     }
>>
>> BookForm Class
>>
>> public class BookForm extends org.apache.struts.action.ActionForm {
>>
>>   private ArrayList bookList;
>>
>>    private String name;
>>
>>    private int number;
>>
>>  public ArrayList getBookList() {
>>        return bookList;
>>    }
>>
>>  public void setBookList(ArrayList bookList) {
>>        this.bookList = bookList;
>>    }
>>
>> BookAction Class
>>
>> public class BookAction extends org.apache.struts.action.Action {
>>
>>    private final static String SUCCESS = "success";
>>
>>    public ActionForward execute(ActionMapping mapping, ActionForm form,
>>            HttpServletRequest request, HttpServletResponse response)
>>            throws Exception {
>>
>>        BookForm bookForm = (BookForm) form;
>>        Book book = new Book();
>>        bookForm.setBookList(book.loadData());
>>
>>
>>        return mapping.findForward(SUCCESS);
>>    }
>> }
>>
>> struts_config.xml
>>
>>  
>>        
>>    
>>
>> 
>>        > type="paket.BookAction"/>
>>    
>>
>> data.jsp
>>
>>   
>>           
>>  
>>  
>>  
>>  
>> 
>> --
>> View this message in context:
>> http://old.nabble.com/basic-struts-application-tp27844692p27844692.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

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



Re: basic struts application

2010-03-10 Thread Paweł Wielgus
Hi,
in action-mappings there is no result defined for your action,
is it on purpose?

Best greetings,
Paweł Wielgus.

2010/3/10 tesla :
>
> from a few days i'm working on struts and i'm trying to develop an simple web
> application.
> i cant see the elements of my array(bookList) on jsp page when i run my
> program it returns me an empty page where am i wrong please help me i'm
> losing my mind for two days.
>
>
> Book class
>
> public class Book {
>
>    private String name;
>    private String description;
>    private int price;
>    private int id;
>
>    public Book()
>   {
>
>   }
>    public Book(String name)
>    {
>        this.name=name;
>    }
>
>     public ArrayList loadData()
>     {
>         ArrayList kitapListesi = new ArrayList();
>         kitapListesi.add(new Book("calculus1"));
>          kitapListesi.add(new Book("calculus2"));
>         return kitapListesi;
>     }
>
> BookForm Class
>
> public class BookForm extends org.apache.struts.action.ActionForm {
>
>   private ArrayList bookList;
>
>    private String name;
>
>    private int number;
>
>  public ArrayList getBookList() {
>        return bookList;
>    }
>
>  public void setBookList(ArrayList bookList) {
>        this.bookList = bookList;
>    }
>
> BookAction Class
>
> public class BookAction extends org.apache.struts.action.Action {
>
>    private final static String SUCCESS = "success";
>
>    public ActionForward execute(ActionMapping mapping, ActionForm form,
>            HttpServletRequest request, HttpServletResponse response)
>            throws Exception {
>
>        BookForm bookForm = (BookForm) form;
>        Book book = new Book();
>        bookForm.setBookList(book.loadData());
>
>
>        return mapping.findForward(SUCCESS);
>    }
> }
>
> struts_config.xml
>
>  
>        
>    
>
> 
>         type="paket.BookAction"/>
>    
>
> data.jsp
>
>   
>           
>  
>  
>  
>  
> 
> --
> View this message in context: 
> http://old.nabble.com/basic-struts-application-tp27844692p27844692.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



basic struts application

2010-03-09 Thread tesla

from a few days i'm working on struts and i'm trying to develop an simple web
application.
i cant see the elements of my array(bookList) on jsp page when i run my
program it returns me an empty page where am i wrong please help me i'm
losing my mind for two days.


Book class

public class Book {

private String name;
private String description;
private int price;
private int id;

public Book()
   {
   
   }
public Book(String name)
{
this.name=name;
}

 public ArrayList loadData()
 {
 ArrayList kitapListesi = new ArrayList();
 kitapListesi.add(new Book("calculus1"));
  kitapListesi.add(new Book("calculus2"));
 return kitapListesi;
 }

BookForm Class

public class BookForm extends org.apache.struts.action.ActionForm {

   private ArrayList bookList;

private String name;

private int number;

  public ArrayList getBookList() {
return bookList;
}

 public void setBookList(ArrayList bookList) {
this.bookList = bookList;
}

BookAction Class

public class BookAction extends org.apache.struts.action.Action {

private final static String SUCCESS = "success";
 
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

BookForm bookForm = (BookForm) form;
Book book = new Book();
bookForm.setBookList(book.loadData());
 

return mapping.findForward(SUCCESS);
}
}

struts_config.xml

 







data.jsp

   
   
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/basic-struts-application-tp27844692p27844692.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: help in basic struts application

2006-12-15 Thread Scott Purcell
I believe first off you may want to consider whether to dig into struts
1.x or struts 2.x. If your are just creating a super simple app, you may
just want model1 with jsp.

If this will grow into something larger, you may need to get better
spec, and post question again. Keeping in minds things like templating,
dao, business layer.

Struts in Action would get you running with struts 1.x in no time at
all.

Scott

-Original Message-
From: ajay ajay [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 15, 2006 10:16 AM
To: user@struts.apache.org
Subject: help in basic struts application

Hi...

i am new to struts... i need some help

i am developing a sample basic application in
struts.in that application i have two web
pageson one page there are some check boxes..user
will select one or more or all check boxes...i want to
display values of all  selected check boxes on second
page...


please guide ..how to do that

Thank you
with regards



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



help in basic struts application

2006-12-15 Thread ajay ajay
Hi...

i am new to struts... i need some help

i am developing a sample basic application in
struts.in that application i have two web
pageson one page there are some check boxes..user
will select one or more or all check boxes...i want to
display values of all  selected check boxes on second
page...


please guide ..how to do that

Thank you
with regards



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]