WebLogic NullPointer from PageContextImpl.getAttribute

2000-12-29 Thread Tim Kuntz

   I have been using WebLogic for a while but am new to Struts and am having 
a problem running Struts as an explicit WebLogic Web application 
(weblogic.httpd.webApp.myapp) due to a problem with WebLogic class loaders.

   The problem is misleading because the error message is a 
NullPointerException from the pageContext.getAttribute() call when 
retrieving the MessageResource (MR) instance. But, if you modify the code 
slightly to retrieve the MR instance directly from the ServletContext you 
get a ClassCastException. To my knowledge, this occurs because the MR is 
being created/stored by the ActionServlet but is retrieved as part of the 
JSP servlet. WebLogic uses 2 different class loaders for these so a 
ClassCast occurs.

   The only way I can eliminate the error is to move the Struts classes and 
my application classes to the WebLogic classpath versus the dynamic 
classpath (WEB-INF/classes). Has anyone else found a workaround for this 
problem?

Thanks,
Tim Kuntz
[EMAIL PROTECTED]
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Struts Readme Instructions for WebLogic 5.1

2000-12-29 Thread Tim Kuntz

Steven,

You probably want to create a new Web application to keep your installation 
clean. I would read through the WebLogic Web Application doc as it explains 
how to set an app up:

http://www.weblogic.com/docs51/classdocs/webappguide.html

Here is a sample from my configuration...

weblogic.properties:
   weblogic.httpd.webApp.myapp=/weblogic/myserver/myapp

directory structure:
   /weblogic/myserver/myapp
   .../myapp/META-INF
   .../myapp/WEB-INF
  .../WEB-INF/classes
  .../WEB-INF/lib

Tim Kuntz

>From: "Barbosa, Steven" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Struts Readme Instructions for WebLogic 5.1
>Date: Fri, 29 Dec 2000 18:13:12 -0500
>
>The instructions say to copy "lib/struts.tld" & "lib/struts.jar" from the
>Struts distribution into the "WEB-INF/lib" directory.  WebLogic has no such
>direction.  Where should these files be stored for WebLogic 5.1?
>
>Thanks,
>Steven

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: if/elseif tag?

2000-12-29 Thread Jim Newsham

>
> > The "struts-logic" library includes quite a few
> > variations of an "if" tag that
> > can perform different sorts of conditional checks
> > for you.  At the moment,
> > however, there is nothing that provides the "else"
> > or "elseif" construct.  This
> > is mostly because I've yet to see a syntax for this
> > that is:
> > * consistent with the XML syntax required by JSP
> > custom tags
> > * easily understood by page authors
> > * not butt-ugly to look at or to type
> >
> > I'm open to suggestions for a solution to these
> > issues.
> >
> > > Mike Campbellemail: [EMAIL PROTECTED]
> >
> > Craig

I'm not too familiar with custom tag writing, so I don't know how
technically feasible this is, but... how about a "cond" tag (similar to
lisp's cond), whose body can contain multiple "test" tags.  The first
test which evaluates to true is allowed to render its body, and then
further processing is inhibited.  This would have the effect of "if,
else if, else if ...".


  The value is
A
  The value is
B
  The value is
C
  An unexpected value?


... which should be equivalent to ...

if (name.getProperty().equals("A")) {
  out.write("The value is A");
}
else if (name.getProperty().equals("B")) {
  out.write("The value is B");
}
else if (name.getProperty().equals("C")) {
  out.write("The value is C");
}
else if (true) {
  out.write("An unexpected value?");
}


Jim N.




Struts Readme Instructions for WebLogic 5.1

2000-12-29 Thread Barbosa, Steven

The instructions say to copy "lib/struts.tld" & "lib/struts.jar" from the
Struts distribution into the "WEB-INF/lib" directory.  WebLogic has no such
direction.  Where should these files be stored for WebLogic 5.1?

Thanks,
Steven



Re: Iterating a ResultSet

2000-12-29 Thread Ted Husted

On 12/29/2000 at 12:34 PM Craig R. McClanahan wrote:
> One option to do this, without maintaining a Connection throughout
the process,
is to copy the ResultSet data into an appropriate RowSet implementation

Would today's iterate tag work with a RowSet?

Right now, I'm working on a convenience class to manage the JDBC calls,
and pump the ResultSet into an array of beans. Not too fancy; I have to
subclass to make it work with a particular field set, but it still
seems fairly clean and Struts-like.

Having a little trouble exposing the array to the interator though, but
it seems to be working well otherwise. 

So, I'm also including a getHTML method to just dump a coded HTML
string into table, to be sure I will be able to put this into
production right away.

Of course, having a working iterator would be better to give HTML
authors the flexibility required by MVC.

If nothing else, I can upgrade this to a RowSet implementation later,
if that would provide a performance increase over initialzing a new
ResultSet between calls. 

Alpha code to follow. 



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/





RE: How to run Struts Example with Weblogic5.1

2000-12-29 Thread HT Levine

sorry, I am using ServicePack 8 

-Original Message-
From: Sharon Curlee
To: [EMAIL PROTECTED]
Sent: 12/29/2000 1:42 PM
Subject: RE: How to run Struts Example  with Weblogic5.1

Which service pack are you running?

-Original Message-
From: HT Levine [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 29, 2000 1:04 PM
To: '[EMAIL PROTECTED]'
Subject: How to run Struts Example with Weblogic5.1


This is an update to a previous post.  I just spent 2 days on this and
here's what I can offer.  There are 2 ways to deploy this thing to get
it to
work.

To do either, you must compile the org.apache.struts.example.*.java code
and
place it in your weblogic_classpath.  You must also make sure that
ApplicationResources.properties is in the org.apache.struts.example
directory with those compiled example classes.

>From here your options are:

1.  deploy the struts-example.war in the weblogic.properties file as per
weblogic documentation.  This worked fine for me.

2.  unzip the struts-example.war into a directory and make that
directory
your documentRoot in the weblogic.properties file.  When I did this, I
had
to change all references to the *.tld's in the .jsp files to read
"blah.tld"
instead of "WEB-INF/blah.tld" .  I also had to move action.xml up to the
documentRoot.  You also have to add some other stuff to
weblogic.properties
to make sure ActionServlet starts up with the proper args and that the
pattern *.do fires the ActionServlet.  Here are my entries:

== cut from weblogic.properties  =
### deploy the .war if necessary
#weblogic.httpd.webApp.struts-example=/weblogic5/myserver/struts-example
.war

### Register the servlets
weblogic.httpd.register.ActionServlet=org.apache.struts.action.ActionSer
vlet

### Specify the startup servlet
weblogic.system.startupClass.StartMyServlet=weblogic.servlet.utils.Servl
etSt
artup

### set arguments for startup servlet
weblogic.system.startupArgs.StartMyServlet=servlet=ActionServlet

### set arguments for other servlets
weblogic.httpd.initArgs.ActionServlet=application=\
 org.apache.struts.example.ApplicationResources\
 ,config=action.xml\
 ,debug=2\
 ,detail=2

### map requests with pattern of *.do to the ActionServlet
weblogic.httpd.register.*.do=org.apache.struts.action.ActionServlet
 



RE: How to run Struts Example with Weblogic5.1

2000-12-29 Thread Sharon Curlee

Which service pack are you running?

-Original Message-
From: HT Levine [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 29, 2000 1:04 PM
To: '[EMAIL PROTECTED]'
Subject: How to run Struts Example with Weblogic5.1


This is an update to a previous post.  I just spent 2 days on this and
here's what I can offer.  There are 2 ways to deploy this thing to get
it to
work.

To do either, you must compile the org.apache.struts.example.*.java code
and
place it in your weblogic_classpath.  You must also make sure that
ApplicationResources.properties is in the org.apache.struts.example
directory with those compiled example classes.

>From here your options are:

1.  deploy the struts-example.war in the weblogic.properties file as per
weblogic documentation.  This worked fine for me.

2.  unzip the struts-example.war into a directory and make that
directory
your documentRoot in the weblogic.properties file.  When I did this, I
had
to change all references to the *.tld's in the .jsp files to read
"blah.tld"
instead of "WEB-INF/blah.tld" .  I also had to move action.xml up to the
documentRoot.  You also have to add some other stuff to
weblogic.properties
to make sure ActionServlet starts up with the proper args and that the
pattern *.do fires the ActionServlet.  Here are my entries:

== cut from weblogic.properties  =
### deploy the .war if necessary
#weblogic.httpd.webApp.struts-example=/weblogic5/myserver/struts-example
.war

### Register the servlets
weblogic.httpd.register.ActionServlet=org.apache.struts.action.ActionSer
vlet

### Specify the startup servlet
weblogic.system.startupClass.StartMyServlet=weblogic.servlet.utils.Servl
etSt
artup

### set arguments for startup servlet
weblogic.system.startupArgs.StartMyServlet=servlet=ActionServlet

### set arguments for other servlets
weblogic.httpd.initArgs.ActionServlet=application=\
 org.apache.struts.example.ApplicationResources\
 ,config=action.xml\
 ,debug=2\
 ,detail=2

### map requests with pattern of *.do to the ActionServlet
weblogic.httpd.register.*.do=org.apache.struts.action.ActionServlet
 



Re: if/elseif tag?

2000-12-29 Thread Mike Campbell

> "WKW" == Wong Kok Wai <[EMAIL PROTECTED]> writes:

WKW> Check out chapter 14 of the book "Core Servlets and
WKW> JSP" by Marty Hall. There is a web site with the
WKW> sources at http://archive.coreservlets.com/

This does have a if/then/else, but no elseif (or elsif, or elif,
depending on your language of choice).



Re: Checking for Security Roles

2000-12-29 Thread Craig R. McClanahan

Good idea ... I just checked in modifications to the  and
 tags that let you check for a particular role (using
request.isUserInRole() underneath) or a particular user principal name.
Example:


... special menu options for an admin ...


This will show up in tonight's nightly build.

Craig


David Winterfeldt wrote:

> If you are doing form based authentication, is there a
> way to check what role someone is in with existing
> tags?  If there isn't a way to do this currently, I
> think that it would be a good thing to add to the
> logic tags and possibly a bean tag.
>
> David Winterfeldt
>
> __
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/




Re: Saving HTTP Request Info

2000-12-29 Thread Craig R. McClanahan

Neal Kaiser wrote:

> I'm brand new to struts, so forgive me if this has been covered heavily.
>
> Let's say I am POSTing a bunch of information from a form to an
> ActionServlet.  This ActionServlet will
> detect I'm not logged in and ask me to log in (by redirecting me to
> logon.jsp for example).  Now, after I successfully log in to the Logon
> ActionServlet, I want to submit all that POSTed form stuff just as if I was
> logged in the first time.
>
> Does struts have a mechanism for this, or should I just write my request
> info to my session before logging in and read it in after?
>

The normal assumption in Struts is that you are using container-managed security
for this.  In general, the information you POSTed (if this is the first request
that is to a protected resource) will be saved while authentication occurs, and
then "replayed" to the server after you have been authenticated.

For applications that manage their own logins, it is probably easier to insist
that every single page test for an authenticated user first, and redirect to the
login page if not.  The Struts example application does this -- partially by use
of an application-specific custom tag (app:checkLogon) that performs this check
at the top of every page.  The tag is application-specific, because the notion
of what constitutes a "logged on user" is application specific as well.

> Thanks.

Craig



Re: Iterating a ResultSet

2000-12-29 Thread Craig R. McClanahan

Steve A Drake wrote:

> On Thu, 28 Dec 2000, Ted Husted wrote:
>
> > I'm thinking that the Action could grab a connection from the pool, and
> > generate a statement based on the bean's query string, store the result
> > in the bean's ResultSet, punch the rows we need into the collection,
> > and foward it on to the form, where the interate tag could run it
> > through the iterate tag.
>
>  So can you clone a ResultSet? The last time I looked into this I found
> that you have to maintain the Connection you used to obtain a ResultSet
> until you've finished iterating through it. If you close the connection,
> you lose the ResultSet. If you can clone a ResultSet, close the
> connection, and then later iterate the cloned ResultSet, I'd sure like to
> see how to do that.
>
>  In lieu of cloning, I store a ResultSet in another object and then pass
> this new object along by firing an event. Problem is, my formulation is
> not a generic solution. But it does have the advantage that I can return
> the connection to the pool sooner and it confines connection handling to
> one method.

One option to do this, without maintaining a Connection throughout the process,
is to copy the ResultSet data into an appropriate RowSet implementation from the
JDBC 2.0 Standard Extensions API.  In particular, several of the available
RowSet implementations are designed to be used in a "disconnected" fashion, and
then later "reconnected" to apply any updates to the underlying database.

See the relevant spec at  for more info.

Craig



Checking for Security Roles

2000-12-29 Thread David Winterfeldt

If you are doing form based authentication, is there a
way to check what role someone is in with existing
tags?  If there isn't a way to do this currently, I
think that it would be a good thing to add to the
logic tags and possibly a bean tag.

David Winterfeldt

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/



Re: Strut your stuff article in JavaWorld

2000-12-29 Thread Ted Husted

On 12/29/2000 at 10:33 AM [EMAIL PROTECTED] wrote:
> Does Struts plan on rolling any of the features in?

Yes. See 

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00927.html
 >

*** REPLY SEPARATOR  ***

On 12/29/2000 at 10:33 AM [EMAIL PROTECTED] wrote:

Has anyone used the PageBean talked about in the link below?
http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts.html

Does Struts plan on rolling any of the features in?


Lou Farho
Sr. Engineer
Level (3) Communications, Inc.
720-888-7751




How to run Struts Example with Weblogic5.1

2000-12-29 Thread HT Levine

This is an update to a previous post.  I just spent 2 days on this and
here's what I can offer.  There are 2 ways to deploy this thing to get it to
work.

To do either, you must compile the org.apache.struts.example.*.java code and
place it in your weblogic_classpath.  You must also make sure that
ApplicationResources.properties is in the org.apache.struts.example
directory with those compiled example classes.

>From here your options are:

1.  deploy the struts-example.war in the weblogic.properties file as per
weblogic documentation.  This worked fine for me.

2.  unzip the struts-example.war into a directory and make that directory
your documentRoot in the weblogic.properties file.  When I did this, I had
to change all references to the *.tld's in the .jsp files to read "blah.tld"
instead of "WEB-INF/blah.tld" .  I also had to move action.xml up to the
documentRoot.  You also have to add some other stuff to weblogic.properties
to make sure ActionServlet starts up with the proper args and that the
pattern *.do fires the ActionServlet.  Here are my entries:

== cut from weblogic.properties  =
### deploy the .war if necessary
#weblogic.httpd.webApp.struts-example=/weblogic5/myserver/struts-example.war

### Register the servlets
weblogic.httpd.register.ActionServlet=org.apache.struts.action.ActionServlet

### Specify the startup servlet
weblogic.system.startupClass.StartMyServlet=weblogic.servlet.utils.ServletSt
artup

### set arguments for startup servlet
weblogic.system.startupArgs.StartMyServlet=servlet=ActionServlet

### set arguments for other servlets
weblogic.httpd.initArgs.ActionServlet=application=\
 org.apache.struts.example.ApplicationResources\
 ,config=action.xml\
 ,debug=2\
 ,detail=2

### map requests with pattern of *.do to the ActionServlet
weblogic.httpd.register.*.do=org.apache.struts.action.ActionServlet
 



Strut your stuff article in JavaWorld

2000-12-29 Thread Lou . Farho

Has anyone used the PageBean talked about in the link below?
http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts.html

Does Struts plan on rolling any of the features in?


Lou Farho
Sr. Engineer
Level (3) Communications, Inc.
720-888-7751




RE: struts example - fails under WebLogic 6.0

2000-12-29 Thread Ted Husted

Besides the workaround, I believe Craig is working on the "big fix" to
this, see:

<
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01054.html
 >



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/





RE: struts example - fails under WebLogic 6.0

2000-12-29 Thread Punyansky, Alex

Hi,

I posted the same question about a week ago. Please see an attached answer
to my message by Mikael Eriksson.

Hope this helps.

Alex

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 29, 2000 10:04 AM
To: [EMAIL PROTECTED]
Subject: struts example - fails under WebLogic 6.0


Hi,
I'm new to struts but would like to explore it as our future corporate
standard for web applications.  Unfortunately it doesn't work cleanly with
current WebLogic versions.  Weblogic 6.0 now supports  so
the example application initializes successfully, but the example now fails
(apparently) because MessageResourcesFactory is not serializable.

Can someone help out with this?

Thanks,
Bill Meier

java.io.NotSerializableException:
org.apache.struts.util.PropertyMessageResourcesFactory
 at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
 at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
 at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:7
1)
 at
weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon
text.java:211)
 at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:164)
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:229)
 at jsp_servlet._index._jspService(_index.java:107)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:244)
 at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
 at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

 <> <> <101017>
<[WebAppServletContext(4917275,struts-example)] Root cause of
ServletException>
javax.servlet.jsp.JspException: Missing resources attribute
org.apache.struts.action.MESSAGE
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:232)
 at jsp_servlet._index._jspService(_index.java:107)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:244)
 at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
 at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)




Hi

 I got the same problem, I had to make the following changes
(excerpt from a mail to Craig follows).

 The change in MessageResourcesFactory is that I changed
the "setDefaultWriter" method to just set the writer to null.
I was not able to make the writer used to be serializable.
(It's a subclass of PrintWriter that did not have an appropriate
constructor and includes a ServletContext that was not serializable...)

So I lost logging, but at least I was able to get the example-app up
and running. Would love to see a serializable variant of the writer...

 Regards
 Mikael


 Nothing in this letter is in any way BEA's official view on anything...
And so on





The classes I had to change was the following (from the 1216 build)

org.apache.struts.util.MessageResourcesFactory
   Made the class Serializable (not sure if its really necessary)
   Never allow setting of the defaultwriter, keeps it as null always

And the following classes where made Serializable:

All are in package org.apache.struts.action.
   Action
   ActionFormBean
   ActionFormBeans
   ActionForward
   ActionForwards
   ActionMapping
   ActionMappings
   ActionServlet


--
"Punyansky, Alex" wrote:

> Hi,
>
> I tried to run struts example app with a modified version of struts.jar (
> the one that uses factories for MessageResources ) on Weblogic 6.0 but I
got
> the following exception.
>
> I can't figure out where and why Weblogic accesses
> org.apache.struts.util.PropertyMessageResourcesFactory instance instead of
> org.apache.struts.util.PropertyMessageResources. Did anyone have this
> problem?




struts example - fails under WebLogic 6.0

2000-12-29 Thread wmeier

Hi,
I'm new to struts but would like to explore it as our future corporate
standard for web applications.  Unfortunately it doesn't work cleanly with
current WebLogic versions.  Weblogic 6.0 now supports  so
the example application initializes successfully, but the example now fails
(apparently) because MessageResourcesFactory is not serializable.

Can someone help out with this?

Thanks,
Bill Meier

java.io.NotSerializableException:
org.apache.struts.util.PropertyMessageResourcesFactory
 at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
 at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
 at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
 at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:71)
 at
weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletContext.java:211)
 at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:164)
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:229)
 at jsp_servlet._index._jspService(_index.java:107)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:244)
 at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
 at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

 <> <> <101017>
<[WebAppServletContext(4917275,struts-example)] Root cause of
ServletException>
javax.servlet.jsp.JspException: Missing resources attribute
org.apache.struts.action.MESSAGE
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:232)
 at jsp_servlet._index._jspService(_index.java:107)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
 at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:244)
 at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
 at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)




RE: attempting to use iterate and write tags with maps

2000-12-29 Thread Chris Wilson

no problem...

the funny thing is, is that if i put my own beans in a set, everything works
fine with the write tag.  it just has a problem accessing the getValue
method on a Map.Entry.  also, i tried a  and i got an illegal access error as well.  shouldn't
this work?  anyone have any clues?  i searched the lists, but didn't see
anything pertaining to having problems treating a Map.Entry as a bean.  is
it because it's actually an inner class of a Map that implements the
Map.Entry interface?

thanks!

chris

| chris wilson || web dev ||| [EMAIL PROTECTED] || | www.wondergeek.com |
|

> -Original Message-
> From: Michael Westbay [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 28, 2000 7:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: attempting to use iterate and write tags with maps
>
>
> Wilson-san wrote:
>
> > i believe that the first scope defines where the subjects beans
> is (in this
> > case, an attribute of the request) and the second one defines where the
> > subjectEntry bean is (created by the iterate tag, so it should
> only be page
> > scope)...  right?
>
> I'd like to get a better understanding of this, too.  So, what
> you're saying
> is that in
>
> > > > 
> the "subjectEntry" is defined for the "page" with data ("subjects") that
> was passed as a (or defined in the) "request"?
>
> > > >
>
> Then the current iteration of "subjects," which is this "subjectEntry,"
> belonging to this "page" has its "value" retrieved (via getValue)?
>
> OK.  I think I get it now.  Thank you.  I just regret that it didn't help
> out your situation.
>
> --
> Michael Westbay
> Work: Beacon-IT http://www.beacon-it.co.jp/
> Home:   http://www.seaple.icc.ne.jp/~westbay
> Commentary: http://www.japanesebaseball.com/
>




Re: Saving HTTP Request Info

2000-12-29 Thread Ted Husted

On 12/28/2000 at 10:47 PM Neal Kaiser wrote:
> Let's say I am POSTing a bunch of information from a form to an
ActionServlet. 

Usually, you would never get the chance to complete the form, since the
JSP can see that you are not logged in, and forward you to the login
form before you get the chance to enter anything ;-)

But one good trick would be to return the user to the JSP that they
were trying to access in the first place.

I think they way to do that would be to have the CheckLoginTag store a
"bookmark" attribute in the request session with current URI, and then
have the Login's action check for the attribute before forwarding you
to the default "after-login" location.

If for any reason they were able to complete the form without logging
in, the Struts Form tag would save the data to it's form bean,and so it
could be redisplayed after logging in (like a response to a validation
error).

The Struts Example application demonstrates a CheckLoginTag. There is
also an article about the Example at 
< http://husted.com/about/struts/ >


*** REPLY SEPARATOR  ***

On 12/28/2000 at 10:47 PM Neal Kaiser wrote:

I'm brand new to struts, so forgive me if this has been covered
heavily.

Let's say I am POSTing a bunch of information from a form to an
ActionServlet.  This ActionServlet will
detect I'm not logged in and ask me to log in (by redirecting me to
logon.jsp for example).  Now, after I successfully log in to the Logon
ActionServlet, I want to submit all that POSTed form stuff just as if I
was
logged in the first time.

Does struts have a mechanism for this, or should I just write my
request
info to my session before logging in and read it in after?

Thanks.






Re: Configuring struts with weblogic 5.1

2000-12-29 Thread Andreas Doerr

Hi,

are you sure, that you have all the necessary stuff installed below the META-INF
directory? The jar files under META-INF/lib and so on?

Regards,
--Andreas