RE: Struts in Servlet 2.4

2007-04-17 Thread Slattery, Tim - BLS
 I'd still try it without it, because that's just the way I am ;)
 
 I mean, it's obviously there if you're enumerating over it...

I switched that directive to % page session=true %, and it finds
Contact in Session context!

Apparently, specifying true makes the session implicit variable
available, according to a JSP book I have. But if I put Java code in the
page, and use request.session(), I can get the session even though I
specify false. And it must be true that WL9 enforces this more
stringently than WL8. Weird, weird.

Now, on to the next disaster. I use JSTL tags, c: and fmt: type. So I
have these page directives:

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %

I get this message for both tags:

No tag library could be found with this URI. Possible causes could be 
that the URI is incorrect, or that there were errors during parsing of
the .tld file.

Since I'm in servlets version 2.4, I've gotten rid of all of Struts's
jstl and EL libraries, since JSTL and EL are supposed to be builtin
here. I guess I got something wrong, but I don't know what.


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Struts in Servlet 2.4

2007-04-17 Thread Rod Bollinger
Hi Tim,

For 2.4 the URIs have changed. They are now:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt %

HTH,
-Rod

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 10:55
To: Struts Users Mailing List
Subject: RE: Struts in Servlet 2.4

 I'd still try it without it, because that's just the way I am ;)
 
 I mean, it's obviously there if you're enumerating over it...

I switched that directive to % page session=true %, and it finds
Contact in Session context!

Apparently, specifying true makes the session implicit variable
available, according to a JSP book I have. But if I put Java code in the
page, and use request.session(), I can get the session even though I
specify false. And it must be true that WL9 enforces this more
stringently than WL8. Weird, weird.

Now, on to the next disaster. I use JSTL tags, c: and fmt: type. So I
have these page directives:

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %

I get this message for both tags:

No tag library could be found with this URI. Possible causes could be 
that the URI is incorrect, or that there were errors during parsing of
the .tld file.

Since I'm in servlets version 2.4, I've gotten rid of all of Struts's
jstl and EL libraries, since JSTL and EL are supposed to be builtin
here. I guess I got something wrong, but I don't know what.


--
Tim Slattery
[EMAIL PROTECTED]


-
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: Struts in Servlet 2.4

2007-04-17 Thread Dave Newton
--- Slattery, Tim - BLS [EMAIL PROTECTED]
wrote:
 I switched that directive to % page session=true
 %, and it finds Contact in Session context!

Zounds.

 %@ taglib uri=http://java.sun.com/jstl/core;
 prefix=c %
 %@ taglib uri=http://java.sun.com/jstl/fmt;
 prefix=fmt %
 
 I get this message for both tags:
 
 No tag library could be found with this URI.
 Possible causes could be 
 that the URI is incorrect, or that there were errors
 during parsing of
 the .tld file.

I think the URI is now {http...}/jsp/jstl/{whichever}.

d.


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



RE: Struts in Servlet 2.4

2007-04-17 Thread Slattery, Tim - BLS
 
  %@ taglib uri=http://java.sun.com/jstl/core;
  prefix=c %
  %@ taglib uri=http://java.sun.com/jstl/fmt;
  prefix=fmt %
  
  I get this message for both tags:
  
  No tag library could be found with this URI.
  Possible causes could be
  that the URI is incorrect, or that there were errors during 
 parsing of 
  the .tld file.
 
 I think the URI is now {http...}/jsp/jstl/{whichever}.

I've tried it that way too:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt %

Same messages.


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Struts in Servlet 2.4

2007-04-17 Thread Dave Newton
I don't know what, if anything, WL provides; you may
still need the jstl/standard libs, just a later
version.

--- Slattery, Tim - BLS [EMAIL PROTECTED]
wrote:

  
   %@ taglib uri=http://java.sun.com/jstl/core;
   prefix=c %
   %@ taglib uri=http://java.sun.com/jstl/fmt;
   prefix=fmt %
   
   I get this message for both tags:
   
   No tag library could be found with this URI.
   Possible causes could be
   that the URI is incorrect, or that there were
 errors during 
  parsing of 
   the .tld file.
  
  I think the URI is now
 {http...}/jsp/jstl/{whichever}.
 
 I've tried it that way too:
 
 %@ taglib uri=http://java.sun.com/jsp/jstl/core;
 prefix=c %
 %@ taglib uri=http://java.sun.com/jsp/jstl/fmt;
 prefix=fmt %
 
 Same messages.
 
 
 --
 Tim Slattery
 [EMAIL PROTECTED]
 
 

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


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



RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
 Sounds as if your ejb compiler didnt generate and compile the 
 necessary interfaces for what its worth here is a sample of a 
 build for my wl env

Eh?? Who said anything about EJBs? This is an exploded directory that
will become a WAR file. The bean that can't be found is a plain old Java
bean, with getters and setters. Nothing fancy. I can see where the
Action module is storing it in Session context, I've put debug print in
so that I *know* that staement runs. But the tag can't find it in any
scope.


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty


tough to guess on what your configuration is without seeing your 
configuration files


Please display web.xml and struts.xml for us

M-
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Slattery, Tim - BLS [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, April 16, 2007 8:30 AM
Subject: RE: Struts in Servlet 2.4



Sounds as if your ejb compiler didnt generate and compile the
necessary interfaces for what its worth here is a sample of a
build for my wl env


Eh?? Who said anything about EJBs? This is an exploded directory that
will become a WAR file. The bean that can't be found is a plain old Java
bean, with getters and setters. Nothing fancy. I can see where the
Action module is storing it in Session context, I've put debug print in
so that I *know* that staement runs. But the tag can't find it in any
scope.


--
Tim Slattery
[EMAIL PROTECTED]


-
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: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
 
 tough to guess on what your configuration is without seeing 
 your configuration files
 
 Please display web.xml and struts.xml for us

Thanks, that's entirely reasonable. I've followed Laurie Harper's
advice, and put a loop into the JSP page immediately before it fails.
That loop calls requestSession.getAttributeNames(), then iterates
through the resulting Enumeration and displays the session attributes
present. Contact is there. But the very next statement, an
html:link... tag that includes paramName=Contact, generated the
error message:

javax.servlet.jsp.JspException: Cannot find bean Contact in any scope

It's running only the very first Action, which is path=/index in the
weblogic-config.xml file. That module finds and reads its form bean,
sets the Contact object in the session objects and forwards to a JSP
page.

Hmm..maybe I should put some more debug print into the JSP page, and
make sure that the right object is stored in the Contact session
attribute.

Anyway, thanks for giving some thought to this.

So, as requested, here are the config files

web.xml:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

  display-nameCES/display-name

  filter
filter-namejspFilter/filter-name
filter-classgov.bls.idcf.ces.filters.jspFilter/filter-class
  /filter

  filter
filter-namesessionFilter/filter-name
filter-classgov.bls.idcf.ces.filters.sessionFilter/filter-class
  /filter

  filter-mapping
filter-namesessionFilter/filter-name
url-pattern*.do/url-pattern
  /filter-mapping

  filter-mapping
filter-namejspFilter/filter-name
url-pattern*.jsp/url-pattern
  /filter-mapping

  filter-mapping
filter-namesessionFilter/filter-name
url-pattern*.jsp/url-pattern
  /filter-mapping
  
  servlet
servlet-namesetup/servlet-name
servlet-classgov.bls.idcf.SetupServlet/servlet-class
load-on-startup1/load-on-startup
  /servlet

  servlet
servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valueces/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

  session-config
session-timeout30/session-timeout
  /session-config

jsp-config
  taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-logic-el.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-form.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-form.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-template.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-template.tld/taglib-location
  /taglib

/jsp-config  
  
/web-app

And here's struts-config.xml:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration
1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;


struts-config


  !-- == Form Bean Definitions
=== --
form-beans
form-bean 
name=CESHomeForm type=gov.bls.idcf.ces.struts.CESHomeBean
/form-bean
form-bean  
name=EntryFormBean
type=gov.bls.idcf.ces.struts.EntryFormBean
/form-bean
form-bean  
name=ContactFormBean
type=gov.bls.idcf.ces.struts.ContactFormBean
/form-bean
form-bean 
name=SolcFormBean type=gov.bls.idcf.ces.struts.SolcFormBean
/form-bean
form-bean 
name=WorksiteFormBean
type=gov.bls.idcf.ces.struts.WorksiteFormBean
/form-bean
form-bean
name=ReviewBean type=gov.bls.idcf.ces.struts.ReviewFormBean
/form-bean
form-bean
name=PayGroups type=gov.bls.idcf.ces.struts.PayGroupForm
/form-bean
/form-beans


!-- == Global Forward Definitions
== --
global-forwards
forward name=CESHome path=/index.jsp redirect=false/
forward name=Upload path=/content/thankup.jsp
redirect=false/
forward name=SystemFailure path=/systemError.jsp
redirect=false/
 

Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty

Tim--

I dont understand why looping would help when your webserver cant find a 
page whicgh is misconfigured or missing???


The only reference I could see for Contact was located at
forward name=Contact  path=/content/address.jsp redirect=false/

keeping in mind that path=URL
where The URL can be absolute or relative to the current JSP file. If it is 
absolute (beginning with a /), the path is resolved by your Web or 
application server.


my question is where is address.jsp specifically located?

Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Slattery, Tim - BLS [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, April 16, 2007 1:25 PM
Subject: RE: Struts in Servlet 2.4




tough to guess on what your configuration is without seeing
your configuration files

Please display web.xml and struts.xml for us


Thanks, that's entirely reasonable. I've followed Laurie Harper's
advice, and put a loop into the JSP page immediately before it fails.
That loop calls requestSession.getAttributeNames(), then iterates
through the resulting Enumeration and displays the session attributes
present. Contact is there. But the very next statement, an
html:link... tag that includes paramName=Contact, generated the
error message:

javax.servlet.jsp.JspException: Cannot find bean Contact in any scope

It's running only the very first Action, which is path=/index in the
weblogic-config.xml file. That module finds and reads its form bean,
sets the Contact object in the session objects and forwards to a JSP
page.

Hmm..maybe I should put some more debug print into the JSP page, and
make sure that the right object is stored in the Contact session
attribute.

Anyway, thanks for giving some thought to this.

So, as requested, here are the config files

web.xml:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

 display-nameCES/display-name

 filter
   filter-namejspFilter/filter-name
   filter-classgov.bls.idcf.ces.filters.jspFilter/filter-class
 /filter

 filter
   filter-namesessionFilter/filter-name
   filter-classgov.bls.idcf.ces.filters.sessionFilter/filter-class
 /filter

 filter-mapping
   filter-namesessionFilter/filter-name
   url-pattern*.do/url-pattern
 /filter-mapping

 filter-mapping
   filter-namejspFilter/filter-name
   url-pattern*.jsp/url-pattern
 /filter-mapping

 filter-mapping
   filter-namesessionFilter/filter-name
   url-pattern*.jsp/url-pattern
 /filter-mapping

 servlet
   servlet-namesetup/servlet-name
   servlet-classgov.bls.idcf.SetupServlet/servlet-class
   load-on-startup1/load-on-startup
 /servlet

 servlet
   servlet-nameaction/servlet-name

servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameapplication/param-name
 param-valueces/param-value
   /init-param
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value2/param-value
   /init-param
   init-param
 param-namedetail/param-name
 param-value2/param-value
   /init-param
   init-param
 param-namevalidate/param-name
 param-valuetrue/param-value
   /init-param
   load-on-startup1/load-on-startup
 /servlet

 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping

 session-config
   session-timeout30/session-timeout
 /session-config

jsp-config
 taglib
   taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   taglib-location/WEB-INF/tld/struts-bean.tld/taglib-location
 /taglib

 taglib
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   taglib-location/WEB-INF/tld/struts-html.tld/taglib-location
 /taglib

 taglib
   taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
   taglib-location/WEB-INF/tld/struts-logic-el.tld/taglib-location
 /taglib

 taglib
   taglib-uri/WEB-INF/struts-form.tld/taglib-uri
   taglib-location/WEB-INF/tld/struts-form.tld/taglib-location
 /taglib

 taglib
   taglib-uri/WEB-INF/struts-template.tld/taglib-uri
   taglib-location/WEB-INF/tld/struts-template.tld/taglib-location
 /taglib

/jsp-config

/web-app

And here's struts-config.xml:

?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration
1.0//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;


struts-config


 !-- == Form Bean Definitions
=== --
form-beans
   form-bean
   name=CESHomeForm type

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
 

 -Original Message-
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 16, 2007 3:20 PM
 To: Struts Users Mailing List
 Subject: Re: Struts in Servlet 2.4
 
 Tim--
 
 I dont understand why looping would help when your webserver 
 cant find a page whicgh is misconfigured or missing???
 
 The only reference I could see for Contact was located at 
 forward name=Contact  path=/content/address.jsp 
 redirect=false/

It's running only the /index action. That forwards to the CESHome
global forward (I don't know whay they made that one global) which
resolves to index.jsp. Index.jsp invokes homeHeader.jsp to put our
standard header before the meat of the page. Here's homeHeader.jsp:

%@ page language=java
import=gov.bls.idcf.ces.struts.ContactFormBean %
%@ page session=false%
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

head
title%=request.getParameter(title)%/title
meta name=ROBOTS content=none,noindex,nofollow
meta http-equiv=Content-Language content=en-US
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
meta http-equiv=Expires content=Sat, 01 Jan 2000 23:59:00
GMT
meta http-equiv=PRAGMA content=NO-CACHE
meta name=Description
content=%=request.getParameter(pgDesc)%
meta name=Keywords
content=%=request.getParameter(pgKey)%
link href=mailto:[EMAIL PROTECTED]
link rel=stylesheet href=/CES/images/all.css
TYPE=text/css
link rel=stylesheet href=/CES/images/print.css
media=print type=text/css /
/head

script type=text/javascript

function help_window(url)
{ 

window.open(url,'Help','width=600,height=425,toolbar=no,location=no,dire
ctories=no,
status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=no'); 
}

function contact_window(url,title,ret)
{ 

window.open(url,title,width=600,height=565,toolbar=no,location=no,direc
tories=no,
status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes); 
if(ret==false) 
{
return false; 
} 
}

/script

body marginwidth=0 marginheight=0
div id=hbanner title=Bannerimg src=/CES/images/1ptrans.gif
alt=[spacer] width=1 height=63 hspace=0 vspace=0
border=0/div
div id=tmenu title=Top Menu
%
Enumeration atts = request.getSession().getAttributeNames();
while (atts.hasMoreElements())
{
System.out.println(homeHeader.jsp: session:  +
(String)atts.nextElement());
}

ContactFormBean  cfb =
(ContactFormBean)request.getSession().getAttribute(Contact);
System.out.println(homeHeader.jsp: solno:  +
cfb.getSolicitationNumber());

%
html:link href=/CES/contactForm.do paramId=solicitationNumber
paramName=Contact 
   paramProperty=solicitationNumber styleClass=menu
title=Respondent Information 
   onClick=Javascript:return contact_window(this,
'Contact','false')
  Update Respondent Information/html:linknbsp;|nbsp;
a name=Help id=Help
href=javascript:help_window('/CES/help/cesindex.jsp','Help','true') 
   class=menu title=HelpHelp/anbsp;|nbsp;
a name=Logout id=Logout
href=/CES/content/exitSurvey.jsp?target=http://www.bls.gov/idcf/logout.
htm 
class=menu title=LogoutLogout/anbsp;

/div

div id=hmain title=Body of Document


I've added the import at the top and the Java code between the %  %
tags to verify that Contact is there and that it contains the right
thing. It is and it does. But the html:link tag just below the java
code can't find it.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
From: Martin Gainty [EMAIL PROTECTED]
I dont understand why looping would help when your webserver cant find a 
page whicgh is misconfigured or missing???

The problem doesn't have anything to do with a missing page, the problem is 
that even though a bean is in scope and works on one version of the app server 
when he upgraded to a new version of the app server the struts tag is 
complaining it can't find the bean anymore.

Is that the nutshell version?

d.





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



Re: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
From: Slattery, Tim - BLS [EMAIL PROTECTED]
 %@ page session=false%

Whoa.

session=true | false
 
Whether the client must join an HTTP session in order to use the JSP page. If 
the value is true, the session object refers to the current or new session.

 
If the value is false, you cannot use the session object or a jsp:useBean 
element with scope=session in the JSP file. Either of these usages would cause 
a translation-time error.

 
The default value is true.



d.





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



RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
  From: Martin Gainty [EMAIL PROTECTED]
 I dont understand why looping would help when your webserver 
 cant find a page whicgh is misconfigured or missing???
 
 The problem doesn't have anything to do with a missing page, 
 the problem is that even though a bean is in scope and works 
 on one version of the app server when he upgraded to a new 
 version of the app server the struts tag is complaining it 
 can't find the bean anymore.
 
 Is that the nutshell version?

Dead on!


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
  %@ page session=false%
 
 Whoa.
 
 session=true | false
  
 Whether the client must join an HTTP session in order to use 
 the JSP page. If the value is true, the session object refers 
 to the current or new session.
  
 If the value is false, you cannot use the session object or a 
 jsp:useBean element with scope=session in the JSP file. 
 Either of these usages would cause a translation-time error.

Now THAT's interesting. This setting is an office standard (I don't know
why). It's always worked in WL 7 and WL 8 (and Jboss 3.2.5, for that
matter). 

I put debug print in the JSP page, just before the failing tag. That
print proves that the session is available, that the Contact bean is
there, and that it has the correct value. That being the case, I can't
believe that this is the problem. It would require me to believe that
the Java code in the page can see the session and its attributes, but
because of this setting, the tag cannot. 


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty
I did'nt see The bean:define for Contact before its usage in paramName 
html:link paramName=Contact


bean:define type=java.util.Map id=Contact
 param id=name value=NameValue/
 param id=address value=AddressValue/
/bean:define
html:link paramName=Contact

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Slattery, Tim - BLS [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, April 16, 2007 3:29 PM
Subject: RE: Struts in Servlet 2.4





-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Monday, April 16, 2007 3:20 PM
To: Struts Users Mailing List
Subject: Re: Struts in Servlet 2.4

Tim--

I dont understand why looping would help when your webserver
cant find a page whicgh is misconfigured or missing???

The only reference I could see for Contact was located at
forward name=Contact  path=/content/address.jsp
redirect=false/


It's running only the /index action. That forwards to the CESHome
global forward (I don't know whay they made that one global) which
resolves to index.jsp. Index.jsp invokes homeHeader.jsp to put our
standard header before the meat of the page. Here's homeHeader.jsp:

%@ page language=java
import=gov.bls.idcf.ces.struts.ContactFormBean %
%@ page session=false%
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

head
title%=request.getParameter(title)%/title
meta name=ROBOTS content=none,noindex,nofollow
meta http-equiv=Content-Language content=en-US
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
meta http-equiv=Expires content=Sat, 01 Jan 2000 23:59:00
GMT
meta http-equiv=PRAGMA content=NO-CACHE
meta name=Description
content=%=request.getParameter(pgDesc)%
meta name=Keywords
content=%=request.getParameter(pgKey)%
link href=mailto:[EMAIL PROTECTED]
link rel=stylesheet href=/CES/images/all.css
TYPE=text/css
link rel=stylesheet href=/CES/images/print.css
media=print type=text/css /
/head

script type=text/javascript

function help_window(url)
{

window.open(url,'Help','width=600,height=425,toolbar=no,location=no,dire
ctories=no,
status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}

function contact_window(url,title,ret)
{

window.open(url,title,width=600,height=565,toolbar=no,location=no,direc
tories=no,
status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes);
if(ret==false)
{
return false;
}
}

/script

body marginwidth=0 marginheight=0
div id=hbanner title=Bannerimg src=/CES/images/1ptrans.gif
alt=[spacer] width=1 height=63 hspace=0 vspace=0
border=0/div
div id=tmenu title=Top Menu
%
   Enumeration atts = request.getSession().getAttributeNames();
   while (atts.hasMoreElements())
   {
   System.out.println(homeHeader.jsp: session:  +
(String)atts.nextElement());
   }

   ContactFormBean  cfb =
(ContactFormBean)request.getSession().getAttribute(Contact);
   System.out.println(homeHeader.jsp: solno:  +
cfb.getSolicitationNumber());

%
html:link href=/CES/contactForm.do paramId=solicitationNumber
paramName=Contact
  paramProperty=solicitationNumber styleClass=menu
title=Respondent Information
  onClick=Javascript:return contact_window(this,
'Contact','false')
 Update Respondent Information/html:linknbsp;|nbsp;
a name=Help id=Help
href=javascript:help_window('/CES/help/cesindex.jsp','Help','true')
  class=menu title=HelpHelp/anbsp;|nbsp;
a name=Logout id=Logout
href=/CES/content/exitSurvey.jsp?target=http://www.bls.gov/idcf/logout.
htm
   class=menu title=LogoutLogout/anbsp;

/div

div id=hmain title=Body of Document


I've added the import at the top and the Java code between the %  %
tags to verify that Contact is there and that it contains the right
thing. It is and it does. But the html:link tag just below the java
code can't find it.

--
Tim Slattery
[EMAIL PROTECTED]


-
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: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
I'd still try it without it, because that's just the way I am ;)

I mean, it's obviously there if you're enumerating over it...

- Original Message 
From: Slattery, Tim - BLS [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, April 16, 2007 4:04:50 PM
Subject: RE: Struts in Servlet 2.4

  %@ page session=false%
 
 Whoa.
 
 session=true | false
  
 Whether the client must join an HTTP session in order to use 
 the JSP page. If the value is true, the session object refers 
 to the current or new session.
  
 If the value is false, you cannot use the session object or a 
 jsp:useBean element with scope=session in the JSP file. 
 Either of these usages would cause a translation-time error.

Now THAT's interesting. This setting is an office standard (I don't know
why). It's always worked in WL 7 and WL 8 (and Jboss 3.2.5, for that
matter). 

I put debug print in the JSP page, just before the failing tag. That
print proves that the session is available, that the Contact bean is
there, and that it has the correct value. That being the case, I can't
believe that this is the problem. It would require me to believe that
the Java code in the page can see the session and its attributes, but
because of this setting, the tag cannot. 


--
Tim Slattery
[EMAIL PROTECTED]


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





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



Re: Struts in Servlet 2.4

2007-04-14 Thread Laurie Harper

Slattery, Tim - BLS wrote:

I found this to be a great tutorial
http://www.exadel.com/tutorial/struts/5.2/guess/strutstutorial.html

Create your formbean with public Accessors/Mutators for each 
private attribute and also create methods for reset method 
validateMethod and of course public no arg constructor for bean


in struts-config.xml configuration define the Bean form-beans
  form-bean name=NameOfBeanForm 
type=package.NameOfBeanForm/ /form-beans


so later in your jsp you will be able to access the 
FormAttribute html:html  html:form 
action=PathForAction..   html:text property=AttributeFromForm


Thanks, but I don't think that has anything to do with what's happening
here. This app works under WL8, and I'm having trouble getting it to
work in WL9. The problem right now is this html:link... tag, which
asks for a property named solicitationNumber in a bean named Contact.
It's not the form's default bean, the Action doesn't have any problem
getting its form bean. I've verified that it saves the proper bean in a
session attribute named Contact. The tag says it can't find it. Dead
end.


Tim, have you tried examining the content of the session at JSP render 
time, either using the s:debug tag or some other custom tag or 
scriptlet, to confirm that the bean really got stored to the session 
under the name you think it did?


L.


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



RE: Struts in Servlet 2.4

2007-04-13 Thread Slattery, Tim - BLS
 c:forEach items=${RespData} var=resp

 Andit points to items and gives this message:

 This attribute does not support request time values.

Well, I've made some progress, I guess.

I removed the jstl.jar and standard.jar that came with the Struts
distribution. I deleted the taglib tags for c: and fmt: in web.xml.
And I got rid of references to -el tags, since in this brave new world,
EL should be built-in.

And now the page gets past the compiler. But it stops at my first Struts
tag:

html:link href=/CES/contactForm.do paramId=solicitationNumber
paramName=Contact 
   paramProperty=solicitationNumber styleClass=menu
title=Respondent Information 
   onClick=Javascript:return contact_window(this,
'Contact','false')
  Update Respondent Information/html:link

The error message is: Root cause of ServletException.
javax.servlet.jsp.JspException: Cannot find bean Contact in any scope

Now the Action module that runs and invokes this JSP page uses
session.setAttribute to store a bean under the name Contact. I have
some debug print in that module, and there's *no* doubt at all that it's
running that statement. So why can't my struts tag find my bean?


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts in Servlet 2.4

2007-04-13 Thread Martin Gainty

Hi Tim

I found this to be a great tutorial
http://www.exadel.com/tutorial/struts/5.2/guess/strutstutorial.html

Create your formbean with public Accessors/Mutators for each private 
attribute and also create methods for

reset method
validateMethod
and of course public no arg constructor for bean

in struts-config.xml configuration define the Bean
form-beans
 form-bean name=NameOfBeanForm type=package.NameOfBeanForm/
/form-beans

so later in your jsp you will be able to access the FormAttribute
html:html
html:form action=PathForAction.. 
html:text property=AttributeFromForm

HTH
M--


This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Slattery, Tim - BLS [EMAIL PROTECTED]

To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, April 13, 2007 1:31 PM
Subject: RE: Struts in Servlet 2.4



c:forEach items=${RespData} var=resp

Andit points to items and gives this message:

This attribute does not support request time values.


Well, I've made some progress, I guess.

I removed the jstl.jar and standard.jar that came with the Struts
distribution. I deleted the taglib tags for c: and fmt: in web.xml.
And I got rid of references to -el tags, since in this brave new world,
EL should be built-in.

And now the page gets past the compiler. But it stops at my first Struts
tag:

html:link href=/CES/contactForm.do paramId=solicitationNumber
paramName=Contact
  paramProperty=solicitationNumber styleClass=menu
title=Respondent Information
  onClick=Javascript:return contact_window(this,
'Contact','false')
 Update Respondent Information/html:link

The error message is: Root cause of ServletException.
javax.servlet.jsp.JspException: Cannot find bean Contact in any scope

Now the Action module that runs and invokes this JSP page uses
session.setAttribute to store a bean under the name Contact. I have
some debug print in that module, and there's *no* doubt at all that it's
running that statement. So why can't my struts tag find my bean?


--
Tim Slattery
[EMAIL PROTECTED]


-
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: Struts in Servlet 2.4

2007-04-13 Thread Slattery, Tim - BLS
 I found this to be a great tutorial
 http://www.exadel.com/tutorial/struts/5.2/guess/strutstutorial.html
 
 Create your formbean with public Accessors/Mutators for each 
 private attribute and also create methods for reset method 
 validateMethod and of course public no arg constructor for bean
 
 in struts-config.xml configuration define the Bean form-beans
   form-bean name=NameOfBeanForm 
 type=package.NameOfBeanForm/ /form-beans
 
 so later in your jsp you will be able to access the 
 FormAttribute html:html  html:form 
 action=PathForAction..   html:text property=AttributeFromForm

Thanks, but I don't think that has anything to do with what's happening
here. This app works under WL8, and I'm having trouble getting it to
work in WL9. The problem right now is this html:link... tag, which
asks for a property named solicitationNumber in a bean named Contact.
It's not the form's default bean, the Action doesn't have any problem
getting its form bean. I've verified that it saves the proper bean in a
session attribute named Contact. The tag says it can't find it. Dead
end.


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts in Servlet 2.4

2007-04-13 Thread Martin Gainty
Sounds as if your ejb compiler didnt generate and compile the necessary 
interfaces

for what its worth here is a sample of a build for my wl env

Note the easiest path is to run the build.xml target to build the ear
cd %WL_HOME%
cd samples
cd server
cd examples
cd src
cd examples
cd webservices
cd complex
cd statelessSession
ant build-ejb

Note: you can also run all of this by going to 
/samples/server/medrec/src/medrecEar
and running the targets which will run the wlcompile such as build.split.dir 
or build.web.service


Note: I dont have WL version 9 on any of my boxes so I'll let other folks 
provide help for that specific version
(being mindful that whatever solution is provided should run the ejb 
compiler)


HTH/
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.


- Original Message - 
From: Slattery, Tim - BLS [EMAIL PROTECTED]

To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, April 13, 2007 1:31 PM
Subject: RE: Struts in Servlet 2.4



c:forEach items=${RespData} var=resp

Andit points to items and gives this message:

This attribute does not support request time values.


Well, I've made some progress, I guess.

I removed the jstl.jar and standard.jar that came with the Struts
distribution. I deleted the taglib tags for c: and fmt: in web.xml.
And I got rid of references to -el tags, since in this brave new world,
EL should be built-in.

And now the page gets past the compiler. But it stops at my first Struts
tag:

html:link href=/CES/contactForm.do paramId=solicitationNumber
paramName=Contact
  paramProperty=solicitationNumber styleClass=menu
title=Respondent Information
  onClick=Javascript:return contact_window(this,
'Contact','false')
 Update Respondent Information/html:link

The error message is: Root cause of ServletException.
javax.servlet.jsp.JspException: Cannot find bean Contact in any scope

Now the Action module that runs and invokes this JSP page uses
session.setAttribute to store a bean under the name Contact. I have
some debug print in that module, and there's *no* doubt at all that it's
running that statement. So why can't my struts tag find my bean?


--
Tim Slattery
[EMAIL PROTECTED]


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



Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
I'm still trying to move Struts apps from WL 8 (servlet 2.3 environment)
to WL 9 (servlet 2.4 environment). I've change the top line in my
web.xml to the long, complicated string that specifies 2.4. The app runs
the first Action module, then forwards to a jsp page. In that page are
both JSTL and Struts tags. The first tag it hits is this:

c:forEach items=${RespData} var=resp

Andit points to items and gives this message:

This attribute does not support request time values.

What!!! What's going on?


--
Tim Slattery
[EMAIL PROTECTED]



Re: Struts in Servlet 2.4

2007-04-12 Thread Dave Newton
--- Slattery, Tim - BLS [EMAIL PROTECTED]
wrote:
 c:forEach items=${RespData} var=resp
 
 Andit points to items and gives this message:
 
 This attribute does not support request time values.

I don't recall, but did the TLD URIs change between
2.3/2.4? 

(I don't even know if it would matter if they did,
actually, I guess.) I suppose it could also be a JSTL
library issue etc. I'm sure it's something configurey
or libraryey, though.

d.



   

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

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



RE: Struts in Servlet 2.4

2007-04-12 Thread Frank Russo
Did you change the version of your jstl jars? I forget which version you need, 
but I think jstl 1.0 was 2.3 compliant, and 1.1 was 2.4 compliant. You'll need 
to upgrade both jstl.jar and standard.jar... 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 12, 2007 2:21 PM
To: Struts Users Mailing List
Subject: Re: Struts in Servlet 2.4

--- Slattery, Tim - BLS [EMAIL PROTECTED]
wrote:
 c:forEach items=${RespData} var=resp
 
 Andit points to items and gives this message:
 
 This attribute does not support request time values.

I don't recall, but did the TLD URIs change between 2.3/2.4? 

(I don't even know if it would matter if they did, actually, I guess.) I 
suppose it could also be a JSTL library issue etc. I'm sure it's something 
configurey or libraryey, though.

d.



   

8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime 
shortcut.
http://tools.search.yahoo.com/shortcuts/#news

-
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: Struts in Servlet 2.4

2007-04-12 Thread Musachy Barroso

Did you change web.xml to this?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
   version=2.4

musachy


On 4/12/07, Frank Russo [EMAIL PROTECTED] wrote:


Did you change the version of your jstl jars? I forget which version you
need, but I think jstl 1.0 was 2.3 compliant, and 1.1 was 2.4 compliant.
You'll need to upgrade both jstl.jar and standard.jar...

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 12, 2007 2:21 PM
To: Struts Users Mailing List
Subject: Re: Struts in Servlet 2.4

--- Slattery, Tim - BLS [EMAIL PROTECTED]
wrote:
 c:forEach items=${RespData} var=resp

 Andit points to items and gives this message:

 This attribute does not support request time values.

I don't recall, but did the TLD URIs change between 2.3/2.4?

(I don't even know if it would matter if they did, actually, I guess.) I
suppose it could also be a JSTL library issue etc. I'm sure it's something
configurey or libraryey, though.

d.






8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie
showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

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





--
Hey you! Would you help me to carry the stone? Pink Floyd


RE: Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
 --- Slattery, Tim - BLS [EMAIL PROTECTED]
 wrote:
  c:forEach items=${RespData} var=resp
  
  Andit points to items and gives this message:
  
  This attribute does not support request time values.
 
 I don't recall, but did the TLD URIs change between 2.3/2.4? 
 
 (I don't even know if it would matter if they did, actually, 
 I guess.) I suppose it could also be a JSTL library issue 
 etc. I'm sure it's something configurey or libraryey, though.

I'd been usuing the Struts-supplied JSTL stuff: c.tld, jstl.tld. For my
new deployment, I got rid of those, and used:

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %


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



RE: Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
  -Original Message-
 From: Frank Russo [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 12, 2007 2:40 PM
 To: Struts Users Mailing List
 Subject: RE: Struts in Servlet 2.4
 
 Did you change the version of your jstl jars? I forget which 
 version you need, but I think jstl 1.0 was 2.3 compliant, and 
 1.1 was 2.4 compliant. You'll need to upgrade both jstl.jar 
 and standard.jar... 
 
I got rid of the jstl.jar from Struts. Wouldn't WL version 9 have a
newer JSTL built-in? 

Also...this is using an older version of Struts, I think it's 1.1. 

--
Tim Slattery
[EMAIL PROTECTED]


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