Author Login
Post Reply
user Digest 14 Mar 2010 03:10:46 -0000 Issue 9027
Topics (messages 205379 through 205393):
How can one use OGNL on custom .tag files?
205379 by: wild_oscar
205380 by: Dale Newfield
FB API and Struts2
205381 by: Frans Thamura
205382 by: Saeed Iqbal
205383 by: Frans Thamura
page redirecting problem
205384 by: tesla
205389 by: Pawe³ Wielgus
205391 by: tesla
205392 by: Pawe³ Wielgus
205393 by: tesla
Error: Cannot get a connection, pool error Timeout waiting for idle object
205385 by: abhishek jain
Re: How to deploy struts on tomcat
205386 by: abhishek jain
205390 by: Girish Naik
Re: Catching url for action not defined
205387 by: abhishek jain
S2 as ESB
205388 by: Frans Thamura
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_205379.ezm (zipped)
I have a custom tag file called with:
<help:date dateField="death.deathDate" label="Date of Death (dd-MM-yyyy)"/>
Inside the tag I want to have:
<s:date name="${dateField}.date" var="dt" format="${dateField}.format" />
<s:textfield value="%{#dt}"/>
However, EL security doesn't allow for expressions in the s:date tag. I am
failing to make the s:date get the name from death.deathDate.date field.
I've tried several alternatives in the name attribute of date:
%{#attr.dateField}.date, %{attr.dateField}.date, and I even tried:
<s:set var="aaa" >${dateField}.date</s:set>
<s:date name="%{#aaa}" var="dt" />
None works. Can anyone point me to the right format?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205380.ezm (zipped)wild_oscar wrote:
> However, EL security doesn't allow for expressions in the s:date tag.
This is true no matter where the tag resides (.jsp or .tag).
If you have an EL value you can use c:set to put it someplace (request
scope might be simplest) where you can also address it using ognl.
> <s:set var="aaa" >${dateField}.date</s:set>
Note this is setting the struts variable aaa to the string resulting
from evaluating "${dateField}.date", not the date object.
try something like this:
<c:set var="dateInTag" scope="request" value="${dateField}"/>
<s:date name="%{#request.dateInTag}"/>
and make sure that you've got taglib directives in the .tag file for all
the tag libraries you want to use.
-Dale

Attachment:
user_205381.ezm (zipped)hi all
i just got Iqbal's code about FB Connect and Struts2, the code still
using the HTTP servlet, and i still finding an idea to make a good
architecture for using FB API
i see there is 2 way
1. using spring security integrate with Struts2, so we need S2 with
SpringSecurity
2. map using interceptor that iqbal did
any share idea all
--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource
Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit
bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari
Gunadarma
Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info
We provide services to migrate your apps to Java (web), in amazing
fast and reliable.

Attachment:
user_205382.ezm (zipped)Feel free to brainstorm how the project should be. I am focusing now on
client side ajax http://ajax4business.wordpress.com/ . i should be back to
improve my server work in 2 months.
On Sat, Mar 13, 2010 at 6:31 AM, Frans Thamura <frans@(protected):
> hi all
>
> i just got Iqbal's code about FB Connect and Struts2, the code still
> using the HTTP servlet, and i still finding an idea to make a good
> architecture for using FB API
>
> i see there is 2 way
>
> 1. using spring security integrate with Struts2, so we need S2 with
> SpringSecurity
> 2. map using interceptor that iqbal did
>
> any share idea all
> --
> Frans Thamura
> Meruvian.
> Experiential Tempation of Java and Enterprise OpenSource
>
> Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit
> bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari
> Gunadarma
>
> Mobile: +6287885901958
> Blog & Profile: http://frans.thamura.info
>
> We provide services to migrate your apps to Java (web), in amazing
> fast and reliable.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment:
user_205383.ezm (zipped)cool..
hope can share my code after this integration
still work with David Whitehurst and Iqbal's code , hope can bring a
new thing shortly
F
On Sat, Mar 13, 2010 at 10:17 AM, Saeed Iqbal <saeedcs@(protected):
> Feel free to brainstorm how the project should be. I am focusing now on
> client side ajax http://ajax4business.wordpress.com/ . i should be back to
> improve my server work in 2 months.
>
> On Sat, Mar 13, 2010 at 6:31 AM, Frans Thamura <frans@(protected):
>
>> hi all
>>
>> i just got Iqbal's code about FB Connect and Struts2, the code still
>> using the HTTP servlet, and i still finding an idea to make a good
>> architecture for using FB API
>>
>> i see there is 2 way
>>
>> 1. using spring security integrate with Struts2, so we need S2 with
>> SpringSecurity
>> 2. map using interceptor that iqbal did
>>
>> any share idea all
>> --
>> Frans Thamura
>> Meruvian.
>> Experiential Tempation of Java and Enterprise OpenSource
>>
>> Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit
>> bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari
>> Gunadarma
>>
>> Mobile: +6287885901958
>> Blog & Profile: http://frans.thamura.info
>>
>> We provide services to migrate your apps to Java (web), in amazing
>> fast and reliable.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>

Attachment:
user_205384.ezm (zipped)Hi
I have a basic struts project i can't redirect my jsp page to another.But i
did the similar example before that it was working but know it's not.
My problem is bookAdd.jsp dont redirect to the data.jsp it's redirecting to
the bookAdd.do please help!Thanks
Here is my BookAddForm
public class BookAddForm extends
org.apache.struts.action.ActionForm {
private String book_title;
private String book_description;
private int book_price;
//Getters Setter
public void reset(ActionMapping mapping,HttpServletRequest request){
this.book_description=null;
this.book_title=null;
this.book_price=0;
}
BookAddAction
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
BookAddForm bookAddForm= (BookAddForm) form;
Book book=new Book();
book.addBook(bookAddForm.getBook_title(),bookAddForm.getBook_description(),bookAddForm.getBook_price());
return mapping.findForward(SUCCESS);
}
Book.Java
public class Book {
private String title;
private String description;
private int price;
Connection con ;
Statement ps;
ResultSet rs;
public void addBook(String title,String description,int price) throws
SQLException
{
try
{
Class.forName("
com.mysql.jdbc.Driver");
con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/logintest_development","root","pass");
ps = (Statement) con.createStatement();
String sql = "insert into books(title,description,price)
values('"+title+"','"+description+"''"+price+"')";
ps.executeUpdate(sql);
}
catch (Exception e)
{
System.out.println("Error Data : " + e.getMessage());
}
con.close();
}
bookAdd.jsp
<body>
<h1>Add Book!</h1>
<html:form action="/bookAdd" method="post" >
Book's Title:<html:text property="book_title" size="30"
maxlength="30"/><br>
Book's Descripton:<html:textarea property="book_description"
/><br>
Book's Price:<html:text property="book_price" size="30"
maxlength="30"/><br>
<html:submit>Add</html:submit>
</html:form>
</body>
struts_config.xml
<form-bean name="BookAddForm" type="paket.BookAddForm"/>
<action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
scope="request" type="paket.BookAddAction" >
<forward name="success" path="/data.jsp"/>
</action>
when i click submit button at the jsp file it shows me the same page can't
redirect to data.jsp but my browser changes bookAdd.jsp to bookAdd.do
i cant understand why it is
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205389.ezm (zipped)Hi Tesla,
validation problem?
BookAdd.jsp is defined as input for bookAdd action.
Best greetings,
Pawel Wielgus.
2010/3/13, tesla <fatihdurdu@(protected)>:
>
> Hi
>
> I have a basic struts project i can't redirect my jsp page to another.But i
> did the similar example before that it was working but know it's not.
> My problem is bookAdd.jsp dont redirect to the data.jsp it's redirecting to
> the bookAdd.do please help!Thanks
>
> Here is my BookAddForm
>
>
> public class BookAddForm extends
org.apache.struts.action.ActionForm {
>
> private String book_title;
> private String book_description;
> private int book_price;
>
> //Getters Setter
>
> public void reset(ActionMapping mapping,HttpServletRequest request){
>
> this.book_description=null;
> this.book_title=null;
> this.book_price=0;
>
>
> }
>
>
> BookAddAction
>
>
> public ActionForward execute(ActionMapping mapping, ActionForm form,
> HttpServletRequest request, HttpServletResponse response)
> throws Exception {
> BookAddForm bookAddForm= (BookAddForm) form;
> Book book=new Book();
>
> book.addBook(bookAddForm.getBook_title(),bookAddForm.getBook_description(),bookAddForm.getBook_price());
>
>
> return mapping.findForward(SUCCESS);
>
> }
>
>
> Book.Java
>
>
> public class Book {
>
> private String title;
> private String description;
> private int price;
>
> Connection con ;
> Statement ps;
> ResultSet rs;
>
> public void addBook(String title,String description,int price) throws
> SQLException
> {
> try
> {
> Class.forName("
com.mysql.jdbc.Driver");
> con = (Connection)
> DriverManager.getConnection("jdbc:mysql://localhost:3306/logintest_development","root","pass");
>
> ps = (Statement) con.createStatement();
> String sql = "insert into books(title,description,price)
> values('"+title+"','"+description+"''"+price+"')";
> ps.executeUpdate(sql);
> }
> catch (Exception e)
> {
> System.out.println("Error Data : " + e.getMessage());
> }
>
> con.close();
>
> }
>
>
> bookAdd.jsp
>
>
> <body>
> <h1>Add Book!</h1>
>
> <html:form action="/bookAdd" method="post" >
> Book's Title:<html:text property="book_title" size="30"
> maxlength="30"/><br>
> Book's Descripton:<html:textarea property="book_description"
> /><br>
> Book's Price:<html:text property="book_price" size="30"
> maxlength="30"/><br>
> <html:submit>Add</html:submit>
> </html:form>
> </body>
>
>
> struts_config.xml
>
>
> <form-bean name="BookAddForm" type="paket.BookAddForm"/>
>
> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
> scope="request" type="paket.BookAddAction" >
> <forward name="success" path="/data.jsp"/>
> </action>
>
>
>
> when i click submit button at the jsp file it shows me the same page can't
> redirect to data.jsp but my browser changes bookAdd.jsp to bookAdd.do
> i cant understand why it is
> --
> View this message in context:
> http://old.nabble.com/page-redirecting-problem-tp27886004p27886004.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205391.ezm (zipped)thanks for reply.
" BookAdd.jsp is defined as input for bookAdd action." is it wrong??i think
it must be like that.
when i click submit button at the bookAdd.jsp i wanna forward to the data
jsp but it dont there is no action i'm still at the bookAdd.jsp where i am
wrong
<action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
scope="request" type="paket.BookAddAction" >
<forward name="success" path="/data.jsp"/>
</action>
Paweł Wielgus wrote:
>
> Hi Tesla,
> validation problem?
> BookAdd.jsp is defined as input for bookAdd action.
>
> Best greetings,
> Pawel Wielgus.
>
> 2010/3/13, tesla <fatihdurdu@(protected)>:
>>
>> Hi
>>
>> I have a basic struts project i can't redirect my jsp page to another.But
>> i
>> did the similar example before that it was working but know it's not.
>> My problem is bookAdd.jsp dont redirect to the data.jsp it's redirecting
>> to
>> the bookAdd.do please help!Thanks
>>
>> Here is my BookAddForm
>>
>>
>> public class BookAddForm extends
org.apache.struts.action.ActionForm {
>>
>> private String book_title;
>> private String book_description;
>> private int book_price;
>>
>> //Getters Setter
>>
>> public void reset(ActionMapping mapping,HttpServletRequest request){
>>
>> this.book_description=null;
>> this.book_title=null;
>> this.book_price=0;
>>
>>
>> }
>>
>>
>> BookAddAction
>>
>>
>> public ActionForward execute(ActionMapping mapping, ActionForm form,
>> HttpServletRequest request, HttpServletResponse response)
>> throws Exception {
>> BookAddForm bookAddForm= (BookAddForm) form;
>> Book book=new Book();
>>
>> book.addBook(bookAddForm.getBook_title(),bookAddForm.getBook_description(),bookAddForm.getBook_price());
>>
>>
>> return mapping.findForward(SUCCESS);
>>
>> }
>>
>>
>> Book.Java
>>
>>
>> public class Book {
>>
>> private String title;
>> private String description;
>> private int price;
>>
>> Connection con ;
>> Statement ps;
>> ResultSet rs;
>>
>> public void addBook(String title,String description,int price) throws
>> SQLException
>> {
>> try
>> {
>> Class.forName("
com.mysql.jdbc.Driver");
>> con = (Connection)
>> DriverManager.getConnection("jdbc:mysql://localhost:3306/logintest_development","root","pass");
>>
>> ps = (Statement) con.createStatement();
>> String sql = "insert into books(title,description,price)
>> values('"+title+"','"+description+"''"+price+"')";
>> ps.executeUpdate(sql);
>> }
>> catch (Exception e)
>> {
>> System.out.println("Error Data : " + e.getMessage());
>> }
>>
>> con.close();
>>
>> }
>>
>>
>> bookAdd.jsp
>>
>>
>> <body>
>> <h1>Add Book!</h1>
>>
>> <html:form action="/bookAdd" method="post" >
>> Book's Title:<html:text property="book_title" size="30"
>> maxlength="30"/><br>
>> Book's Descripton:<html:textarea property="book_description"
>> /><br>
>> Book's Price:<html:text property="book_price" size="30"
>> maxlength="30"/><br>
>> <html:submit>Add</html:submit>
>> </html:form>
>> </body>
>>
>>
>> struts_config.xml
>>
>>
>> <form-bean name="BookAddForm" type="paket.BookAddForm"/>
>>
>> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
>> scope="request" type="paket.BookAddAction" >
>> <forward name="success" path="/data.jsp"/>
>> </action>
>>
>>
>>
>> when i click submit button at the jsp file it shows me the same page
>> can't
>> redirect to data.jsp but my browser changes bookAdd.jsp to bookAdd.do
>> i cant understand why it is
>> --
>> View this message in context:
>> http://old.nabble.com/page-redirecting-problem-tp27886004p27886004.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205392.ezm (zipped)Hi,
specifying bookAdd.jsp as input is for validation framework only,
nor it is good or bad.
So when You submit form on page, struts try to fire BookAddAction,
but if validation fails (and it looks like it is the case)
it comes back to input which is bookAdd.jsp
Try to change input for something else and see if it is the case.
Best greetings,
Paweł Wielgus.
2010/3/13 tesla <fatihdurdu@(protected)>:
>
> thanks for reply.
> " BookAdd.jsp is defined as input for bookAdd action." is it wrong??i think
> it must be like that.
> when i click submit button at the bookAdd.jsp i wanna forward to the data
> jsp but it dont there is no action i'm still at the bookAdd.jsp where i am
> wrong
>
> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
> scope="request" type="paket.BookAddAction" >
> <forward name="success" path="/data.jsp"/>
> </action>
>
>
> Paweł Wielgus wrote:
>>
>> Hi Tesla,
>> validation problem?
>> BookAdd.jsp is defined as input for bookAdd action.
>>
>> Best greetings,
>> Pawel Wielgus.
>>
>> 2010/3/13, tesla <fatihdurdu@(protected)>:
>>>
>>> Hi
>>>
>>> I have a basic struts project i can't redirect my jsp page to another.But
>>> i
>>> did the similar example before that it was working but know it's not.
>>> My problem is bookAdd.jsp dont redirect to the data.jsp it's redirecting
>>> to
>>> the bookAdd.do please help!Thanks
>>>
>>> Here is my BookAddForm
>>>
>>>
>>> public class BookAddForm extends
org.apache.struts.action.ActionForm {
>>>
>>> private String book_title;
>>> private String book_description;
>>> private int book_price;
>>>
>>> //Getters Setter
>>>
>>> public void reset(ActionMapping mapping,HttpServletRequest request){
>>>
>>> this.book_description=null;
>>> this.book_title=null;
>>> this.book_price=0;
>>>
>>>
>>> }
>>>
>>>
>>> BookAddAction
>>>
>>>
>>> public ActionForward execute(ActionMapping mapping, ActionForm form,
>>> HttpServletRequest request, HttpServletResponse response)
>>> throws Exception {
>>> BookAddForm bookAddForm= (BookAddForm) form;
>>> Book book=new Book();
>>>
>>> book.addBook(bookAddForm.getBook_title(),bookAddForm.getBook_description(),bookAddForm.getBook_price());
>>>
>>>
>>> return mapping.findForward(SUCCESS);
>>>
>>> }
>>>
>>>
>>> Book.Java
>>>
>>>
>>> public class Book {
>>>
>>> private String title;
>>> private String description;
>>> private int price;
>>>
>>> Connection con ;
>>> Statement ps;
>>> ResultSet rs;
>>>
>>> public void addBook(String title,String description,int price) throws
>>> SQLException
>>> {
>>> try
>>> {
>>> Class.forName("
com.mysql.jdbc.Driver");
>>> con = (Connection)
>>> DriverManager.getConnection("jdbc:mysql://localhost:3306/logintest_development","root","pass");
>>>
>>> ps = (Statement) con.createStatement();
>>> String sql = "insert into books(title,description,price)
>>> values('"+title+"','"+description+"''"+price+"')";
>>> ps.executeUpdate(sql);
>>> }
>>> catch (Exception e)
>>> {
>>> System.out.println("Error Data : " + e.getMessage());
>>> }
>>>
>>> con.close();
>>>
>>> }
>>>
>>>
>>> bookAdd.jsp
>>>
>>>
>>> <body>
>>> <h1>Add Book!</h1>
>>>
>>> <html:form action="/bookAdd" method="post" >
>>> Book's Title:<html:text property="book_title" size="30"
>>> maxlength="30"/><br>
>>> Book's Descripton:<html:textarea property="book_description"
>>> /><br>
>>> Book's Price:<html:text property="book_price" size="30"
>>> maxlength="30"/><br>
>>> <html:submit>Add</html:submit>
>>> </html:form>
>>> </body>
>>>
>>>
>>> struts_config.xml
>>>
>>>
>>> <form-bean name="BookAddForm" type="paket.BookAddForm"/>
>>>
>>> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
>>> scope="request" type="paket.BookAddAction" >
>>> <forward name="success" path="/data.jsp"/>
>>> </action>
>>>
>>>
>>>
>>> when i click submit button at the jsp file it shows me the same page
>>> can't
>>> redirect to data.jsp but my browser changes bookAdd.jsp to bookAdd.do
>>> i cant understand why it is
>>> --
>>> View this message in context:
>>> http://old.nabble.com/page-redirecting-problem-tp27886004p27886004.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/page-redirecting-problem-tp27886004p27888959.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205393.ezm (zipped)special thanks for your advice i found where validation fails.Now it's
working fine
Paweł Wielgus wrote:
>
> Hi,
> specifying bookAdd.jsp as input is for validation framework only,
> nor it is good or bad.
> So when You submit form on page, struts try to fire BookAddAction,
> but if validation fails (and it looks like it is the case)
> it comes back to input which is bookAdd.jsp
> Try to change input for something else and see if it is the case.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2010/3/13 tesla <fatihdurdu@(protected)>:
>>
>> thanks for reply.
>> " BookAdd.jsp is defined as input for bookAdd action." is it wrong??i
>> think
>> it must be like that.
>> when i click submit button at the bookAdd.jsp i wanna forward to the data
>> jsp but it dont there is no action i'm still at the bookAdd.jsp where i
>> am
>> wrong
>>
>> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
>> scope="request" type="paket.BookAddAction" >
>> <forward name="success" path="/data.jsp"/>
>> </action>
>>
>>
>> Paweł Wielgus wrote:
>>>
>>> Hi Tesla,
>>> validation problem?
>>> BookAdd.jsp is defined as input for bookAdd action.
>>>
>>> Best greetings,
>>> Pawel Wielgus.
>>>
>>> 2010/3/13, tesla <fatihdurdu@(protected)>:
>>>>
>>>> Hi
>>>>
>>>> I have a basic struts project i can't redirect my jsp page to
>>>> another.But
>>>> i
>>>> did the similar example before that it was working but know it's not.
>>>> My problem is bookAdd.jsp dont redirect to the data.jsp it's
>>>> redirecting
>>>> to
>>>> the bookAdd.do please help!Thanks
>>>>
>>>> Here is my BookAddForm
>>>>
>>>>
>>>> public class BookAddForm extends
org.apache.struts.action.ActionForm {
>>>>
>>>> private String book_title;
>>>> private String book_description;
>>>> private int book_price;
>>>>
>>>> //Getters Setter
>>>>
>>>> public void reset(ActionMapping mapping,HttpServletRequest request){
>>>>
>>>> this.book_description=null;
>>>> this.book_title=null;
>>>> this.book_price=0;
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>> BookAddAction
>>>>
>>>>
>>>> public ActionForward execute(ActionMapping mapping, ActionForm form,
>>>> HttpServletRequest request, HttpServletResponse response)
>>>> throws Exception {
>>>> BookAddForm bookAddForm= (BookAddForm) form;
>>>> Book book=new Book();
>>>>
>>>> book.addBook(bookAddForm.getBook_title(),bookAddForm.getBook_description(),bookAddForm.getBook_price());
>>>>
>>>>
>>>> return mapping.findForward(SUCCESS);
>>>>
>>>> }
>>>>
>>>>
>>>> Book.Java
>>>>
>>>>
>>>> public class Book {
>>>>
>>>> private String title;
>>>> private String description;
>>>> private int price;
>>>>
>>>> Connection con ;
>>>> Statement ps;
>>>> ResultSet rs;
>>>>
>>>> public void addBook(String title,String description,int price)
>>>> throws
>>>> SQLException
>>>> {
>>>> try
>>>> {
>>>> Class.forName("
com.mysql.jdbc.Driver");
>>>> con = (Connection)
>>>> DriverManager.getConnection("jdbc:mysql://localhost:3306/logintest_development","root","pass");
>>>>
>>>> ps = (Statement) con.createStatement();
>>>> String sql = "insert into books(title,description,price)
>>>> values('"+title+"','"+description+"''"+price+"')";
>>>> ps.executeUpdate(sql);
>>>> }
>>>> catch (Exception e)
>>>> {
>>>> System.out.println("Error Data : " + e.getMessage());
>>>> }
>>>>
>>>> con.close();
>>>>
>>>> }
>>>>
>>>>
>>>> bookAdd.jsp
>>>>
>>>>
>>>> <body>
>>>> <h1>Add Book!</h1>
>>>>
>>>> <html:form action="/bookAdd" method="post" >
>>>> Book's Title:<html:text property="book_title" size="30"
>>>> maxlength="30"/><br>
>>>> Book's Descripton:<html:textarea
>>>> property="book_description"
>>>> /><br>
>>>> Book's Price:<html:text property="book_price" size="30"
>>>> maxlength="30"/><br>
>>>> <html:submit>Add</html:submit>
>>>> </html:form>
>>>> </body>
>>>>
>>>>
>>>> struts_config.xml
>>>>
>>>>
>>>> <form-bean name="BookAddForm" type="paket.BookAddForm"/>
>>>>
>>>> <action input="/bookAdd.jsp" name="BookAddForm" path="/bookAdd"
>>>> scope="request" type="paket.BookAddAction" >
>>>> <forward name="success" path="/data.jsp"/>
>>>> </action>
>>>>
>>>>
>>>>
>>>> when i click submit button at the jsp file it shows me the same page
>>>> can't
>>>> redirect to data.jsp but my browser changes bookAdd.jsp to bookAdd.do
>>>> i cant understand why it is
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/page-redirecting-problem-tp27886004p27886004.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/page-redirecting-problem-tp27886004p27888959.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205385.ezm (zipped)Hi friends.
I am using strurts 1 with mysql and is using the datasource in
struts-config.xml.
I am gettting the following errors in my log file,
Cannot get a connection, pool error Timeout waiting for idle object
What could be the reason to this error, it seems like this is because of db
which is mysql in my case,
Pl. advice, what to do in to remove this error,
I have searched net and could not find a sol.
--
Thanks and kind Regards,
Abhishek jain

Attachment:
user_205386.ezm (zipped)Hi Girish and Pawal,
Thanks for the help, the copy and paste worked, the error i am getting is
that the code works on :8080 port and not via apache,
Some of the code gets delivered by 80 apache though, the one which is
supposed to be worked via web.xml like url rewrite.
I guess some error with configuration of apache will look at that,
Any pointers to learn Ant. any link?
Thanks for the help.
thanks
abhishek
On Thu, Mar 11, 2010 at 8:57 PM, Girish Naik <girish.naik@(protected):
> I think that for local dev -deployment we can configure tomcat in eclipse
> (the same should apply for MyEclipse), by telling the eclipse tomcat home
> location in the workspace preference. This would deploy ur app in the
> tomcat
> as context / xml files as u mention in preference.
>
> But for QA, prod or remote deploy, i would suggest you use ant or maven
> deploy script. Ant is simplest and could be learnt in few hours :)
>
>
> Regards,
> ---------------------------------------------------------
> Girish Naik
> Mobile:-+91-09740091638
> girish.naik@(protected)
>
>
> 2010/3/11 Paweł Wielgus <poulwiel@(protected)>
>
> > Hi Abhishek,
> > normaly just copying and pasting war should work on tomcat, i can't
> > remeber if tomcat needs to be restarted or it will discover the war
> > automaticaly - check the tomcat server.xml for that. War is a
> > standard, it doesn't matter if it contains struts or spring
> > application inside.
> > As for myeclipse, i don't know if it will autodeploy your app,
> > probably it can. As for ant, You can use it there is nothing wrong
> > with it.
> > Best greetings,
> > Pawel Wielgus.
> >
> > 2010/3/10, abhishek jain <abhishek.netjain@(protected)>:
> > > Hi friends,
> > >
> > > I have developed a struts 1 application, i need to know what are the
> ways
> > > and means to deploy a struts application, if i just copy and paste the
> > war
> > > application, will it be the correct way?
> > >
> > > Also if i have myeclipse can it directly deploy on the remote server
> via
> > > FTP(on linux), and is it ok to use ant,i am new to ant.
> > > Please advise,
> > > Thanks a lot.
> > > --
> > > Thanks and kind Regards,
> > > Abhishek jain
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
--
Thanks and kind Regards,
Abhishek jain
+91 9971376767

Attachment:
user_205390.ezm (zipped)Number of sites that give u ant tutorials, you can also have a look @
http://ant.apache.org/manual/
ps: r u using modjk to bridge apache and tomcat?
Regards,
---------------------------------------------------------
Girish Naik
Mobile:-+91-09740091638
girish.naik@(protected)
On Sat, Mar 13, 2010 at 4:59 PM, abhishek jain
<abhishek.netjain@(protected):
> Hi Girish and Pawal,
>
> Thanks for the help, the copy and paste worked, the error i am getting is
> that the code works on :8080 port and not via apache,
>
> Some of the code gets delivered by 80 apache though, the one which is
> supposed to be worked via web.xml like url rewrite.
> I guess some error with configuration of apache will look at that,
> Any pointers to learn Ant. any link?
>
> Thanks for the help.
> thanks
> abhishek
>
> On Thu, Mar 11, 2010 at 8:57 PM, Girish Naik <girish.naik@(protected)>
> wrote:
>
> > I think that for local dev -deployment we can configure tomcat in eclipse
> > (the same should apply for MyEclipse), by telling the eclipse tomcat home
> > location in the workspace preference. This would deploy ur app in the
> > tomcat
> > as context / xml files as u mention in preference.
> >
> > But for QA, prod or remote deploy, i would suggest you use ant or maven
> > deploy script. Ant is simplest and could be learnt in few hours :)
> >
> >
> > Regards,
> > ---------------------------------------------------------
> > Girish Naik
> > Mobile:-+91-09740091638
> > girish.naik@(protected)
> >
> >
> > 2010/3/11 Paweł Wielgus <poulwiel@(protected)>
> >
> > > Hi Abhishek,
> > > normaly just copying and pasting war should work on tomcat, i can't
> > > remeber if tomcat needs to be restarted or it will discover the war
> > > automaticaly - check the tomcat server.xml for that. War is a
> > > standard, it doesn't matter if it contains struts or spring
> > > application inside.
> > > As for myeclipse, i don't know if it will autodeploy your app,
> > > probably it can. As for ant, You can use it there is nothing wrong
> > > with it.
> > > Best greetings,
> > > Pawel Wielgus.
> > >
> > > 2010/3/10, abhishek jain <abhishek.netjain@(protected)>:
> > > > Hi friends,
> > > >
> > > > I have developed a struts 1 application, i need to know what are the
> > ways
> > > > and means to deploy a struts application, if i just copy and paste
> the
> > > war
> > > > application, will it be the correct way?
> > > >
> > > > Also if i have myeclipse can it directly deploy on the remote server
> > via
> > > > FTP(on linux), and is it ok to use ant,i am new to ant.
> > > > Please advise,
> > > > Thanks a lot.
> > > > --
> > > > Thanks and kind Regards,
> > > > Abhishek jain
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
>
>
>
> --
> Thanks and kind Regards,
> Abhishek jain
> +91 9971376767
>

Attachment:
user_205387.ezm (zipped)Hi,
urlrewrite.xml did worked for me,
thanks
abhishek
On Thu, Mar 11, 2010 at 7:17 PM, Brian Thompson <elephantium@(protected):
> Wildcard mapping should do the trick. See [1].
>
> -Brian
>
> [1] -
> http://struts.apache.org/2.0.14/docs/action-configuration.html#ActionConfiguration-WildcardMethod
>
>
>
> On Thu, Mar 11, 2010 at 1:39 AM, Saeed Iqbal <saeedcs@(protected):
> > Hi Guys
> >
> > How would I do http://localhost/some_name
> >
> > where some_name is a random name and not defined as an action in
> struts.xml
> >
> > I would like your input on this please.
> >
> > Thanks,
> > -saeed
> >
> > --
> > Saeed Iqbal
> > Independant Consultant
> > J2EE - Application Architect / Developer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205388.ezm (zipped)hi all
can the S2 using S2 plugins become ESB?
i see mule concept, and if we change the M and V become services and
services, i think S2 = ESB
--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource
Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit
bagi SMK yang melakukan mapping SKKD, dg program beasiswa dari
Gunadarma
Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info
We provide services to migrate your apps to Java (web), in amazing
fast and reliable.