RE: syntax error

2003-05-31 Thread Kris Schneider
String s4 = (String)request.getSession(true).getAttribute("dispsOfPO_action");
if ("123".equals(s4)) {
  int s11 = 1;
  ...
}

Quoting dream weaver <[EMAIL PROTECTED]>:

> Thanks Mark,
> 
> I changed as following, but I still get error message:
> Syntax error on token "s11", ".", "[" expected
> 
> String s4 =
> (String)(request.getSession(true).getAttribute("dispsOfPO_action"));
> 
> if ("123".equals(s4))
>   int s11 = 1;
> 
> 
> 
> 
> 
> --- Mark Galbreath <[EMAIL PROTECTED]> wrote:
> > 1. "if" needs to be lowercase, unless you are using
> > Visual Basic.
> > 
> > 2. you need to wrap the whole request.get in
> > parentheses before casting
> > to String.
> > 
> > Mark
> > 
> > -Original Message-
> > From: dream weaver
> > [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, May 30, 2003 9:02 AM
> > To: [EMAIL PROTECTED]
> > Subject: syntax error
> > 
> > 
> > Hi, 
> > 
> > Could you tell me what the problem(error) is: 
> > 
> > If
> >
> ("123".equals((String)request.getSession(true).getAttribute("dispsOfPO_actio
> > n")))
> > int s11 = 1;
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync to
> > Outlook(TM).
> > http://calendar.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]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Kris Schneider 
D.O.Tech   

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



RE: syntax error

2003-05-31 Thread dream weaver
Thanks Mark,

I changed as following, but I still get error message:
Syntax error on token "s11", ".", "[" expected

String s4 =
(String)(request.getSession(true).getAttribute("dispsOfPO_action"));

  if ("123".equals(s4))
int s11 = 1;





--- Mark Galbreath <[EMAIL PROTECTED]> wrote:
> 1. "if" needs to be lowercase, unless you are using
> Visual Basic.
> 
> 2. you need to wrap the whole request.get in
> parentheses before casting
> to String.
> 
> Mark
> 
> -Original Message-
> From: dream weaver
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, May 30, 2003 9:02 AM
> To: [EMAIL PROTECTED]
> Subject: syntax error
> 
> 
> Hi, 
> 
> Could you tell me what the problem(error) is: 
> 
> If
>
("123".equals((String)request.getSession(true).getAttribute("dispsOfPO_actio
> n")))
>   int s11 = 1;
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to
> Outlook(TM).
> http://calendar.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]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: syntax error

2003-05-31 Thread Mark Galbreath
Hey man, happens to me all the time.  :-)

-Original Message-
From: Denis Avdic [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 10:20 AM
To: Struts Users Mailing List
Subject: Re: syntax error


Mark Galbreath wrote:

>2. you need to wrap the whole request.get in parentheses before 
>casting to String.
>
>Mark
>  
>
Really?

Man, I was wondering why sometimes my casts failed... I ended up doing 
stuff like first storing the object needed to be cast as an Object, and 
then casting that Object.

Things you learn every day




-
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]



Re: syntax error

2003-05-31 Thread Denis Avdic
Mark Galbreath wrote:

2. you need to wrap the whole request.get in parentheses before casting
to String.
Mark
 

Really?

Man, I was wondering why sometimes my casts failed... I ended up doing 
stuff like first storing the object needed to be cast as an Object, and 
then casting that Object.

Things you learn every day



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


RE: syntax error

2003-05-30 Thread Mark Galbreath
1. "if" needs to be lowercase, unless you are using Visual Basic.

2. you need to wrap the whole request.get in parentheses before casting
to String.

Mark

-Original Message-
From: dream weaver [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 9:02 AM
To: [EMAIL PROTECTED]
Subject: syntax error


Hi, 

Could you tell me what the problem(error) is: 

If
("123".equals((String)request.getSession(true).getAttribute("dispsOfPO_actio
n")))
int s11 = 1;


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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]



RE: syntax error

2003-05-30 Thread Kamholz, Keith (corp-staff) USX
Use this:

if(request.getSession(true).getAttribute("dispsOfPO_action").equals("123"))
int s11 = 1;

~ Keith

http://www.buffalo.edu/~kkamholz



-Original Message-
From: dream weaver [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 9:02 AM
To: [EMAIL PROTECTED]
Subject: syntax error


Hi, 

Could you tell me what the problem(error) is: 

If
("123".equals((String)request.getSession(true).getAttribute("dispsOfPO_actio
n")))
int s11 = 1;


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.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]