Why /logoff is not called more than once in weblogic 6.0

2001-06-17 Thread Eda Srinivasareddy
Hi 
In my application I am using a hyperlink to call the logoff mapping. This mapping contains only the Action servlet where I am invalidating the session. For the first time, when I am clicking Logoff it is calling the logoff mapping and signing off. But if I logon again and click again on the logoff, it is not calling the Logoff action servlet and thus not invalidating the session. Why it is happening like this? 
Eda
 
  Matt Raible <[EMAIL PROTECTED]> wrote: 
Has anyone been successfully able to get the "struts-template" tag libraryworking on iPlanet Application Server 6.0 SP2. Here is a reference to thelibrary:http://jakarta.apache.org/struts/api/org/apache/struts/taglib/template/package-summary.html#package_descriptionI was successfully able to get the "struts-logic" and "struts-bean" taglibraries working, but I'm having no luck with the "struts-template"library.Thanks,Matt_Do You Yahoo!?Get your free @yahoo.com address at http://mail.yahoo.comDo You Yahoo!?
Yahoo! Mail Personal Address - 
Get email at your own domain with Yahoo! Mail.

Application working perfectly in Tomcat is not working in Weblogic 6.0

2001-06-17 Thread Eda Srinivasareddy
Hi 
I have developed an aplication which is perfectly functioning in Tomcat. When I deploy the same application on to Weblogic it is not working and showing many errors. Why it is?
Eda 
 
  Matt Raible <[EMAIL PROTECTED]> wrote: 

Has anyone been successfully able to get the "struts-template" tag libraryworking on iPlanet Application Server 6.0 SP2. Here is a reference to thelibrary:http://jakarta.apache.org/struts/api/org/apache/struts/taglib/template/package-summary.html#package_descriptionI was successfully able to get the "struts-logic" and "struts-bean" taglibraries working, but I'm having no luck with the "struts-template"library.Thanks,Matt_Do You Yahoo!?Get your free @yahoo.com address at http://mail.yahoo.comy Do You Yahoo!?
Yahoo! Mail Personal Address - 
Get email at your own domain with Yahoo! Mail.

Re: HREF link question - oops!

2001-06-17 Thread Rick Horowitz

Sorry about the last message. It didn't work due to a spelling mistake on 
my part.  The  tag seems to work as expected.

Thanks again,

Rick

At 02:18 PM 6/14/01 -0700, you wrote:
>Hi Craig,
>
>Thanks for your response. Unfortunately, it still doesn't work.  I tried 
>two different approaches: with the  tag and without it, and I 
>get the same result in both cases:
>
> I code the following link:
>
>  page="/jsp/prodinfo/prodinfo.jsp">Introduction
>
> The html source (in the browser, Netscape 4.6.1 or IE 4.72) shows:
>
> When I use the  tag:
>
>  href="http://localhost:8080/backup/jsp/prodinfo/prod-info.jsp";>   in the 
> HTML head section, and
>
> The link is generated as:
>
>  href="/backup/jsp/prodinfo/prodinfo.jsp">Introductionas the href link
>
> When I mouse over the link in the browser, the status line at the 
> bottom of the browser window displays:
>
> http://localhost:8080/backup/jsp/prodinfo/prod-info.jsp
>
> When I click the link, I get the following in the browser window:
>
> Not Found (404)
> Original request: /backup/jsp/prodinfo/prodinfo.jsp
>
> Not found request: /backup/jsp/prodinfo/prodinfo.jsp
>
>Am I doing something wrong?  Must be, since you use this approach all the 
>time.  Thanks again for your help.  It is greatly appreciated.
>
>Rick Horowitz
>
>
>At 09:59 AM 6/14/01 -0700, you wrote:
>
>
>>On Wed, 13 Jun 2001, Rick Horowitz wrote:
>>
>> > Hi,
>> >
>> > I'm trying to use href links with Struts templates, and can't figure out
>> > how to make my href links work properly.  [Templates seem to work just
>> > fine, otherwise.]... my compliments.
>> >
>> > 1. I want to use Struts  tags so that to automatically do URL
>> > session encoding.
>> >
>>
>>Struts does this automatically for you.
>>
>> > 2. I want to use absolute URLs to make coding of urls more robust. For
>> > example, if I have a directory structure of JSPs:
>> >  jsp
>> >  jsp/prodinfo
>> >  jsp/faq
>> >   ...I want to be able to code the url something like...
>> > jsp/faq/faq1.jsp or jsp/prodinfo/info1.jsp, in case I change the directory
>> > structure, rather than using relative links, e.g. ../faq/faq1.jsp.
>> >
>>
>>I have found it best to use context-relative URLs starting with a
>>"/" character throughout my applications, rather than trying to use
>>relative links -- for the reasons that you are probably familiar with.  To
>>do that for links, use the "page" attribute to specify the destination --
>>Struts will prepend the context path of the current application for you,
>>so that the browser always goes the right place.  For example, you might
>>code:
>>
>> To the FAQ
>>
>> > 3. For the portion of the website that I'm currently working on, I am
>> > creating href links from one JSP to other JSPs.  [For other portions 
>> of the
>> > website, I will be using an MVC architecture, hence forwarding from a
>> > servlet to a JSP and vice versa.]
>> >
>>
>>It works either way, but remember that links directly from one page to
>>another bypasses the controller -- and therefore bypasses the stuff that
>>the controller servlet does for you.
>>
>>
>> > 4. I have tried various approaches to using the  tag in the
>> > HTML  section of my Struts template file, not using a base tag, and
>> > have tried using the following to set the html base:
>> >  http://";
>> >  +request.getServerName() +":"
>> >  +request.getServerPort()
>> >  +request.getContextPath() %>/" >
>> >   Although the latter works with regular  tags, it does not
>> > seem to work with  Struts tags.
>> >
>>
>>See the  tag for a way to do this automatically.
>>
>>However, whether you create it yourself or not, the  element affects
>>only relative hyperlinks.  If you follow my suggestion above (always use
>>context-relative links), you won't need it.
>>
>> > I have tried a variety of combinations of these base tags with a 
>> variety of
>> > combinations of url encodings, but cannot seem to get them to work --
>> > except with regular  tags using the
>> >  http://";
>> >  +request.getServerName() +":"
>> >  +request.getServerPort()
>> >  +request.getContextPath() %>/" >
>> >  base tag setting.
>> >
>> > Thank you in advance to anyone who can help,
>> >
>> > 
>> > Rick Horowitz
>> >
>> >
>>
>>Craig
>
>
>Rick Horowitz


Rick Horowitz




Re: [ANNOUNCMENT] Strut by Strut

2001-06-17 Thread Dave Bettin

Your link to David Winterfeldt's page is broken.

Dave
--- Ted Husted <[EMAIL PROTECTED]> wrote:
> A new article regarding building Struts applications
> is available at 
> 
> < http://www.husted.com/about/struts/ >
> 
> entitled Strut by Strut. Feedback is welcome. A
> followup article
> regarding using a database with Struts ("Stepping
> Out") is nearly
> complete. Stay tuned. 
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



[ANNOUNCMENT] Strut by Strut

2001-06-17 Thread Ted Husted

A new article regarding building Struts applications is available at 

< http://www.husted.com/about/struts/ >

entitled Strut by Strut. Feedback is welcome. A followup article
regarding using a database with Struts ("Stepping Out") is nearly
complete. Stay tuned. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Re: Implementing Struts without using a Form to call the page...

2001-06-17 Thread Craig R. McClanahan



On Sun, 17 Jun 2001, Jason Kemp wrote:

> Good morning, All,
> 
> I am pretty new to Struts, and am having some problems tackling a specific
> issue. I have a jsp that is being called without a form, yet does come with
> some request paraemters that we'd like to check using a Struts solution.
> There are numerous routes to get to this jsp, so I was hoping for a solution
> that was triggered when the jsp was requested. Here are my basic questions
> (and I'm sure they're quite basic, indeed):
> 
> 1) How do you identify the Action class in the struts-config.xml? Or rather,
> how do you specify that the Action class is to be called before the jsp on
> when the jsp is requested?
> 

The Struts example application illustrates a common technique for this.

Consider the mainmenu.jsp page, and the option to "Edit your registration
information".  You will note that this links to the
"/editRegistration" action (because the hyperlink ends in ".do", it will
get mapped to the controller servlet).  This action initializes a
RegistrationForm bean with the current information, and then forwards to
the "registration.jsp" page to display it.

> 2) Will the request parameters carry through the Action class to the jsp
> itself? If not, how should I send that information along to the jsp?
> 

Yes, they do, as long as you *forward* to the page instead of redirect to
it.  For the latter case, you need to either save your information in
session scope instead, or include it all as hidden variables on the form.

> 3) Is it possible to send more information along with the request parameters
> provided? If so, how?
> 

One way is to note that if you have request parameters on the request URI
*and* in the input form, the servlet container will merge them.

> These are probably pretty straightforward solutions for most of you, but I'm
> still new in my experience with Struts and am looking for solutions and for
> expanding my understanding of how Struts can be implemented. Most of my
> efforts to date have produced no success, and so I am looking for any
> assistance in moving past this obstacle.
> 
> Thanks In Advance,
> Jason
> 

Craig





Re:

2001-06-17 Thread Craig R. McClanahan



On Sat, 16 Jun 2001, Rod Schmidt wrote:

> Does this mean you can't default a checkbox to true? If you can, how do you
> do it?
> 

When you create the ActionForm bean instance, set the corresponding
property to true.  You can do this in a couple of ways:

* Initialize the instance variable to true inside the bean as you
  declare it.  That way, this checkbox will *always* be initialized
  to checked.

* Create the form bean yourself in an action (instead of letting Struts
  do it automatically), and call the setFoo(true) method on it.

The Struts example application uses the latter technique, for example, on
the SubscriptionForm bean.  In the Edit Subscription action, the form bean
is created and the state of the autoConnect property is copied from the
underlying database bean.

Note that, no matter *what* you initialize it to, you must always call
setFoo(false) in the reset() method.

> Thanks,
> Rod Schmidt
> 

Craig


> - Original Message -
> From: "Ted Husted" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 5:45 PM
> Subject: Re: 
> 
> 
> > They are actually "cached" in the request. It's just that with boolean
> > checkboxes, you should reset them them to false first, or there are side
> > effects. You really, really don't have to do anything else.
> >
> > It's important to remember that there is not a direct connection between
> > the HTML form and Struts. Everything has to go through HTTP. When the
> > form is submitted, all the properties are sent as parameters to the
> > request by HTTP. Struts then "catches" them and puts them back into the
> > ActionForm.
> >
> > What can happen with checkboxes is that if they get unchecked, the
> > browser won't send them back, and so Struts has no way to set them true
> > or false. By setting them to false when the form is initialized and to
> > false again when the form is reset, you get consistent results.
> > Otherwise, if they unchecked the box, and the browser didn't send it
> > back, the setting on your box may be indeterminate.
> >
> > Mike Thompson wrote:
> > >
> > > So this means that I have to cache the original state of all my checkbox
> > > referenced vars so I can set them back in the reset method? :(
> > > --m
> >
> 
> 




XML config files in dev, staging & production

2001-06-17 Thread Mark Cyster

MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


Hi

I'm interested in how struts users
are handling the differences in struts
xml files between development, staging
and production environments.

Attributes I expect to change in XML files
between environments include:
  - urls
  - hostname/ip addresses (of site, database...)
  - connection pool sizes
  - other tuning parameters ...

This would apply to any configuration files, but
particularly struts-config.xml and web.xml

My current solution is to have a template XML
file and generate the XML file for each 
environment.

It would be great if the Digester had a mechanism
for handling this directly. 

Thanks 
Mark


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



Re:

2001-06-17 Thread Martin Cooper

If, by defaulting to true, you mean setting it to true when the page is
displayed, yes, you can do that. In your Action, set the property in your
form bean to true, and the checkbox will be displayed checked.

When the form is submitted, Struts will call your form bean's reset()
method, where you should set the property to false. If the checkbox was
checked when the form was submitted, there will be a query parameter
corresponding to it, and Struts will set the form bean property to true. If
the checkbox was not checked, there will be no corresponding query
parameter, so Struts will not set the property at all. The property will
then be false - as set by your reset() method - which is correct.

Hope this helps.

--
Martin Cooper


- Original Message -
From: "Rod Schmidt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 16, 2001 10:55 PM
Subject: Re: 


> Does this mean you can't default a checkbox to true? If you can, how do
you
> do it?
>
> Thanks,
> Rod Schmidt
>
> - Original Message -
> From: "Ted Husted" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 5:45 PM
> Subject: Re: 
>
>
> > They are actually "cached" in the request. It's just that with boolean
> > checkboxes, you should reset them them to false first, or there are side
> > effects. You really, really don't have to do anything else.
> >
> > It's important to remember that there is not a direct connection between
> > the HTML form and Struts. Everything has to go through HTTP. When the
> > form is submitted, all the properties are sent as parameters to the
> > request by HTTP. Struts then "catches" them and puts them back into the
> > ActionForm.
> >
> > What can happen with checkboxes is that if they get unchecked, the
> > browser won't send them back, and so Struts has no way to set them true
> > or false. By setting them to false when the form is initialized and to
> > false again when the form is reset, you get consistent results.
> > Otherwise, if they unchecked the box, and the browser didn't send it
> > back, the setting on your box may be indeterminate.
> >
> > Mike Thompson wrote:
> > >
> > > So this means that I have to cache the original state of all my
checkbox
> > > referenced vars so I can set them back in the reset method? :(
> > > --m
> >
>





Implementing Struts without using a Form to call the page...

2001-06-17 Thread Jason Kemp
Title: Implementing Struts without using a Form to call the page...





Good morning, All,


I am pretty new to Struts, and am having some problems tackling a specific issue. I have a jsp that is being called without a form, yet does come with some request paraemters that we'd like to check using a Struts solution. There are numerous routes to get to this jsp, so I was hoping for a solution that was triggered when the jsp was requested. Here are my basic questions (and I'm sure they're quite basic, indeed):

1) How do you identify the Action class in the struts-config.xml? Or rather, how do you specify that the Action class is to be called before the jsp on when the jsp is requested?

2) Will the request parameters carry through the Action class to the jsp itself? If not, how should I send that information along to the jsp?

3) Is it possible to send more information along with the request parameters provided? If so, how?


These are probably pretty straightforward solutions for most of you, but I'm still new in my experience with Struts and am looking for solutions and for expanding my understanding of how Struts can be implemented. Most of my efforts to date have produced no success, and so I am looking for any assistance in moving past this obstacle.

Thanks In Advance,
Jason





Re: struts-example.war

2001-06-17 Thread Isomorph Pty

BTW, I am running on Windows 2000.  If this matters.

--- Isomorph Pty <[EMAIL PROTECTED]> wrote:
> I just installed jakarta-tomcat-3.2.2, and tried to
> install and test run jakarta-struts-1.0.
> 
> I dropped the struts-documentation.war to the
> Tomcat's
> webapps directory and it works.  But when I dropped
> the struts-example.war to the webapps directory, and
> restart Tomcat, I got the following exception.
> 
> Any ideas what I am missing or has done wrong ?
> 
> Thanks.
> 
> New org.apache.struts.webapp.example.User
> Begin event threw exception
> java.lang.ClassNotFoundException:
> org.apache.struts.webapp.example.User
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
> at
> java.lang.Exception.(Exception.java,
> Compiled Code)
> at
>
java.lang.ClassNotFoundException.(ClassNotFoundException.java,
> Compiled Code)
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
> at
> java.security.AccessController.doPrivileged(Native
> Method)
> at
>
java.net.URLClassLoader.findClass(URLClassLoader.java,
> Compiled Code)
> 
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
> at
>
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
> Compiled Co
> de)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:124)
> at
>
org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.ja
> va:152)
> at
>
org.apache.struts.digester.Digester.startElement(Digester.java,
> Compi
> led Code)
> at
>
com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
> at
> com.sun.xml.parser.Parser.content(Parser.java:1499)
> at
>
com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
> at
>
com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
> at
> com.sun.xml.parser.Parser.parse(Parser.java:284)
> at
>
javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
> at
> javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
> at
>
org.apache.struts.digester.Digester.parse(Digester.java:755)
> at
>
org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet
> .java:251)
> at
>
org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet
> .java:175)
> at
>
javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
>
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> 
> at
>
org.apache.tomcat.core.Handler.init(Handler.java:215)
> at
>
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at
>
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
> StartupInterceptor.java, Compiled Code)
> at
>
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
> , Compiled Code)
> at
>
org.apache.tomcat.core.ContextManager.init(ContextManager.java,
> Compi
> led Code)
> at
>
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> at
>
org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> cannot load servlet name: database: Cannot load
> database from '/WEB-INF/database
> .xml'
> 
> __
> Do You Yahoo!?
> Spot the hottest trends in music, movies, and more.
> http://buzz.yahoo.com/


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



struts-example.war

2001-06-17 Thread Isomorph Pty

I just installed jakarta-tomcat-3.2.2, and tried to
install and test run jakarta-struts-1.0.

I dropped the struts-documentation.war to the Tomcat's
webapps directory and it works.  But when I dropped
the struts-example.war to the webapps directory, and
restart Tomcat, I got the following exception.

Any ideas what I am missing or has done wrong ?

Thanks.

New org.apache.struts.webapp.example.User
Begin event threw exception
java.lang.ClassNotFoundException:
org.apache.struts.webapp.example.User
at
java.net.URLClassLoader$1.run(URLClassLoader.java,
Compiled Code)
at java.lang.Exception.(Exception.java,
Compiled Code)
at
java.lang.ClassNotFoundException.(ClassNotFoundException.java,
Compiled Code)
at
java.net.URLClassLoader$1.run(URLClassLoader.java,
Compiled Code)
at
java.security.AccessController.doPrivileged(Native
Method)
at
java.net.URLClassLoader.findClass(URLClassLoader.java,
Compiled Code)

at
java.lang.ClassLoader.loadClass(ClassLoader.java,
Compiled Code)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,
Compiled Co
de)
at
java.lang.ClassLoader.loadClass(ClassLoader.java,
Compiled Code)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at
org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.ja
va:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java,
Compi
led Code)
at
com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at
com.sun.xml.parser.Parser.content(Parser.java:1499)
at
com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at
com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at
com.sun.xml.parser.Parser.parse(Parser.java:284)
at
javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at
javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at
org.apache.struts.digester.Digester.parse(Digester.java:755)
at
org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet
.java:251)
at
org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet
.java:175)
at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)

at
org.apache.tomcat.core.Handler.init(Handler.java:215)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
StartupInterceptor.java, Compiled Code)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
, Compiled Code)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compi
led Code)
at
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at
org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
cannot load servlet name: database: Cannot load
database from '/WEB-INF/database
.xml'

__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/