struts problem..action forward not working...please help...

2004-07-28 Thread Shilpa Nalgonda
I am writing a struts application...I have configued struts-config such that
when the user submit billing info,
the data is inserted into database and returns result.jsp page.  when i run
my aplication the billing info is created in database but the result page is
displayed blank.  Is there any in configuraton that i am missing..below is
my striys config

action
path=/BillingInfo
type=com.ecommerce.action.BillingInfoAction
name=BillingInfoForm
input=/BillingInfo.jsp
forward name=success path=/result.jsp /
/action

Below is the action class excute method.
--
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();
String action = request.getParameter(action);
if (action == null)
action = Create;
BillingInfoForm usrform = (BillingInfoForm)form;
System.out.println(usrform.firstname: + usrform.getFirstName());
System.out.println(usrform.firstname: + usrform.getLastName());
try
{
UserDAO usrDao = new UserDAO();
usrDao.createUser(usrform);
}
catch(DAOException e)
{
e.printStackTrace();
throw new Exception(User could not be created);

}

return (mapping.findForward(result));
}

web.xml has the default entry

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
==


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

===

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Hmm the jsp appears to be alright.  What's in your
application.properties file for properties used in the html:errors/ tag?

Shilpa Nalgonda wrote:



org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my
BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
 head
   

Re: struts problem..action forward not working...please help...

2004-07-28 Thread David Liles
try:

return (mapping.findForward(success));


 [EMAIL PROTECTED] 07/28/04 02:44PM 
I am writing a struts application...I have configued struts-config such that
when the user submit billing info,
the data is inserted into database and returns result.jsp page.  when i run
my aplication the billing info is created in database but the result page is
displayed blank.  Is there any in configuraton that i am missing..below is
my striys config

action
path=/BillingInfo
type=com.ecommerce.action.BillingInfoAction
name=BillingInfoForm
input=/BillingInfo.jsp
forward name=success path=/result.jsp /
/action

Below is the action class excute method.
--
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();
String action = request.getParameter(action);
if (action == null)
action = Create;
BillingInfoForm usrform = (BillingInfoForm)form;
System.out.println(usrform.firstname: + usrform.getFirstName());
System.out.println(usrform.firstname: + usrform.getLastName());
try
{
UserDAO usrDao = new UserDAO();
usrDao.createUser(usrform);
}
catch(DAOException e)
{
e.printStackTrace();
throw new Exception(User could not be created);

}

return (mapping.findForward(result));
}

web.xml has the default entry

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
==


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

===

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Hmm the jsp appears to be alright.  What's in your
application.properties file for properties used in the html:errors/ tag?

Shilpa Nalgonda wrote:



org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my
BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld