Re: Struts and WebSphere

2001-04-28 Thread Stephen Schaub

An alternate approach that worked for me:

Add the web folder to the struts-example application
classpath:

C:\WebSphere\AppServer\hosts\default_host\struts-example\web

When I did this, the struts-example app worked flawlessly.

That might be a little simpler config than maintaining two
separate WEB-INF folders, especially when updating a
deployment.

I like your idea of putting the DTDs in the systemwide
classpath.

Stephen

- Original Message -
From: Dan Miser [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 28, 2001 1:36 AM
Subject: Re: Struts and WebSphere


My fault. I was using an older version of struts.jar on that
machine. I have the revised instructions at work, but the
short of it is that the original article was right about
adding the XML files to servlets\WEB-INF and
the TLD files to web\WEB-INF.

I would still make the argument that putting the DTDs in
c:\websphere\appserver\classes is a good thing, since it can
be done once system-wide *and* it solved my problems where
the SYSTEM DTDs were not being registered properly. But that
looks like the only change on there now.
--
Dan Miser
http://www.distribucon.com

- Original Message -
From: Stephen Schaub [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 27, 2001 4:56 PM
Subject: Re: Struts and WebSphere


  I'd appreciate it if someone else running WAS would
  give this a spin to  double-check me.

..





Possiblility Answer to: html form widgets not appearing

2001-04-28 Thread Jonathan Asbell

It sounds like you have a classpath problem.  I bet you either have a
system classpath (ie a classpath set in your
settings/controlpanel/system/advanced/environmentvariables assuming it
is a pc) which conflicts with the classpath you start up when you run your
server.  Either way it seems that it cant find your file in the classpath to
load.  Try to loop through and print to the console all of your system
variables at the point after you start up your server. (cut and paste class
below)
What you are looking for is the following system properties:
java.class.path
user.dir
Put your properties in the directory that indicates your user.dir.  If it
works than your problem is your classpath.

import java.util.*;
public class DisplayEnvironment{
 public static void main(String[] args){
  new DisplayEnvironment();
 }
 public DisplayEnvironment(){
  System.out.println();
  displaySystemProperties();
  System.out.println();
  displayWeblogicProperties();
  System.out.println();
 }
 private void displaySystemProperties(){
  Properties p = System.getProperties();
Set set = p.keySet();
Object[] o = set.toArray();
List l = Arrays.asList(o);
Collections.sort(l);
Iterator i = l.iterator();
  while(i.hasNext()){
   String s = (String)i.next();
   System.out.println(s +   + p.getProperty(s));
   System.out.println();
  }//while
 }//method
 private void displayWeblogicProperties(){
 }
}








- Original Message -
From: Jason Chaffee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 28, 2001 1:30 AM
Subject: Re: html form widgets not appearing


 The app server is the container for the servlet, so all of servlet code is
being
 done by the app server, therefore if something is implemented wrong like
 getServletContext() or something, than you will have a problem.  Weblogic
has
 all kinds of bugs like this.

 G.L. Grobe wrote:

  Are you sure it's up to the app server to pass the found resources to
  struts. I thought I passed over some code where struts did the reading
of
  params from web.xml? Therefore making it a struts problem.
 
  - Original Message -
  From: Jason Chaffee [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, April 27, 2001 11:59 PM
  Subject: Re: html form widgets not appearing
 
   If you have everything set correctly as you say, there might be a bug
with
  you app
   server and its ability to find resources.
  
   G.L. Grobe wrote:
  
Ok, I just grabbed the struts nightly source from 4-27 and built it
and
sprinkled loadLocale() with println()'s. I got the same errors. Very
  true
that if loadLocale does not find the file, it will not trap the
error.
   
---My jsp page printed this --
500 Internal Server Error
javax.servlet.jsp.JspException: Cannot find message resources under
key
org.apache.struts.action.MESSAGEat
org.apache.struts.util.RequestUtils.message(RequestUtils.java:292)
  at
   
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
  at
/index.jsp._jspService(/index.jsp.java:148) (JSP page line 129) at
com.orionserver[Orion/1.4.8 (build
10374)].http.OrionHttpJspPage.service(Unknown Source)   at
com.evermind[Orion/1.4.8 (build 10374)]._aj._nxd(Unknown Source)
  at
com.evermind[Orion/1.4.8 (build
10374)].server.http.JSPServlet.service(Unknown Source)  at
com.evermind[Orion/1.4.8 (build 10374)]._iib._vfd(Unknown Source)
  at
com.evermind[Orion/1.4.8 (build 10374)]._iib._qjc(Unknown Source)
-
   
In the loadLocale() I got this on my console after starting my app
  server.
The name line is the properties files being found, obviously my
~/WEB-INF/classes/cais.properties (configured in my web.xml) is not
  being
found.
   
Anyone know right off where I should be looking in order to find
this
  stuff.
   
--
cassia(build):/u/public/orion# java -jar orion.jar
Auto-unpacking /u/build/release/cais.ear... done.
Auto-unpacking /u/build/release/cais/cais-web.war... done.
Auto-deploying cais (Assembly had been updated)...
Auto-deploying cais-ejb.jar (ejb-jar.xml had been touched since the
  previous
deployment)... done.
Orion/1.4.8 initialized
Auto-deploying CAIS (Assembly had been updated)...
name = org/apache/struts/util/LocalStrings_en_US.properties
name = org/apache/struts/util/LocalStrings_en.properties
name = org/apache/struts/util/LocalStrings.properties
key = message.bundle
key = lookup.bean
key = 

Re: Reducing the burden on ActionServlet.

2001-04-28 Thread Jonathan Asbell
Title: Reducing the burden on ActionServlet.



Isnt it true that if you have 10 users you would 
have 10 instances of the ActionServlet? I believe it is not a singleton 
and that you always have an instance of the servet for each threaded 
request.

  - Original Message - 
  From: 
  Tewathia, Atul 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Friday, April 27, 2001 11:44 
  PM
  Subject: Reducing the burden on 
  ActionServlet.
  
  In our project we have more than one hundred jsp 
  (each having an average of 2 or 3 forms )and we have already decided to use 
  struts as our framework. Now the dilema :- We found that managing such a large 
  number of jsp from a single stuts-config.xml file will be a huge burden. 
  Plus, it seems the ActionServlet will be hard pressed always, as a controller. 
  Considering both these facts we realize that there should be a mechanism to 
  share the load of servlet through some way. Though this can be achieved by 
  using more than one servlet , we don't want to use this solution because it is 
  highlt complex considering the projects interwoven functional 
  requirements.Is there some way by which we can accomplish an efficient way 
  to manage a large number of jsp files and to increase the performance by 
  reducing load on the servlet.
  Thanking in advance. 



RE: Reducing the burden on ActionServlet.

2001-04-28 Thread Danail Grigorov
Title: Reducing the burden on ActionServlet.



No - 
you have ONLY ONE instance for the ActionServlet. The user requests are 
just different threads that simultaneously call methods of the instance of that 
servlet. I think this is not related to Struts but to Java Servlet Specification 
- the Application Server creates only one instance of each servlet and calls 
it's service() method on request.

So it 
doesn't matter if you have 1 or N servlets (unless you run out of memory because 
you have too many servlets, of course ;-.
It's 
better to stay withone ActionServlet.

Danail

  -Original Message-From: Jonathan Asbell 
  [mailto:[EMAIL PROTECTED]]Sent: Saturday, April 28, 2001 3:01 
  PMTo: [EMAIL PROTECTED]Subject: Re: 
  Reducing the burden on ActionServlet.
  Isnt it true that if you have 10 users you would 
  have 10 instances of the ActionServlet? I believe it is not a singleton 
  and that you always have an instance of the servet for each threaded 
  request.
  
- Original Message - 
From: 
Tewathia, Atul 
To: '[EMAIL PROTECTED]' 

Sent: Friday, April 27, 2001 11:44 
PM
Subject: Reducing the burden on 
ActionServlet.

In our project we have more than one hundred jsp 
(each having an average of 2 or 3 forms )and we have already decided to use 
struts as our framework. Now the dilema :- We found that managing such a 
large number of jsp from a single stuts-config.xml file will be a huge 
burden. Plus, it seems the ActionServlet will be hard pressed always, as a 
controller. Considering both these facts we realize that there should be a 
mechanism to share the load of servlet through some way. Though this can be 
achieved by using more than one servlet , we don't want to use this solution 
because it is highlt complex considering the projects interwoven functional 
requirements.Is there some way by which we can accomplish an efficient 
way to manage a large number of jsp files and to increase the performance by 
reducing load on the servlet.
Thanking in advance. 



Re: Reducing the burden on ActionServlet.

2001-04-28 Thread Danail Grigorov




No - 
you have ONLY ONE instance for the ActionServlet. The user requests are 
just different threads that simultaneously call methods of the instance of that 
servlet. I think this is not related to Struts but to Java Servlet Specification 
- the Application Server creates only one instance of each servlet and calls 
it's service() method on request.

So it 
doesn't matter if you have 1 or N servlets (unless you run out of memory because 
you have too many servlets, of course ;-.
It's 
better to stay withone ActionServlet.

Danail

  -Original Message-From: Jonathan Asbell 
  [mailto:[EMAIL PROTECTED]]Sent: Saturday, April 28, 2001 3:01 
  PMTo: [EMAIL PROTECTED]Subject: Re: 
  Reducing the burden on ActionServlet.
  Isnt it true that if you have 10 users you would 
  have 10 instances of the ActionServlet? I believe it is not a singleton 
  and that you always have an instance of the servet for each threaded 
  request.
  
- Original Message - 
From: 
Tewathia, Atul 
To: '[EMAIL PROTECTED]' 

Sent: Friday, April 27, 2001 11:44 
PM
Subject: Reducing the burden on 
ActionServlet.

In our project we have more than one hundred jsp 
(each having an average of 2 or 3 forms )and we have already decided to use 
struts as our framework. Now the dilema :- We found that managing such a 
large number of jsp from a single stuts-config.xml file will be a huge 
burden. Plus, it seems the ActionServlet will be hard pressed always, as a 
controller. Considering both these facts we realize that there should be a 
mechanism to share the load of servlet through some way. Though this can be 
achieved by using more than one servlet , we don't want to use this solution 
because it is highlt complex considering the projects interwoven functional 
requirements.Is there some way by which we can accomplish an efficient 
way to manage a large number of jsp files and to increase the performance by 
reducing load on the servlet.
Thanking in advance. 



Re: switch from http to https

2001-04-28 Thread Ted Husted

When I put Eric's code at the bottom of a secure logon action

String url = mapping.findForward(success).getPath();
ActionForward actionForward = new ActionForward(url,true);
return (actionForward);

and the success forward is hardcoded with an absolute URL
(http://mysite.com/myapp/), it goes to standard mode, but I get a
warning from the browser. 

Obviously, the warning would generate some questions. 

Do I need some type of bridge page to do the redirect in the browser?

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



Re: Possiblility Answer to: html form widgets not appearing

2001-04-28 Thread Jason Chaffee

It shouldn't be a class path problem because it is trying to load the resource
within the web app, which should never be in the class path to begin with.  It
is more likely a bug with the app server.

Jonathan Asbell wrote:

 It sounds like you have a classpath problem.  I bet you either have a
 system classpath (ie a classpath set in your
 settings/controlpanel/system/advanced/environmentvariables assuming it
 is a pc) which conflicts with the classpath you start up when you run your
 server.  Either way it seems that it cant find your file in the classpath to
 load.  Try to loop through and print to the console all of your system
 variables at the point after you start up your server. (cut and paste class
 below)
 What you are looking for is the following system properties:
 java.class.path
 user.dir
 Put your properties in the directory that indicates your user.dir.  If it
 works than your problem is your classpath.
 
 import java.util.*;
 public class DisplayEnvironment{
  public static void main(String[] args){
   new DisplayEnvironment();
  }
  public DisplayEnvironment(){
   System.out.println();
   displaySystemProperties();
   System.out.println();
   displayWeblogicProperties();
   System.out.println();
  }
  private void displaySystemProperties(){
   Properties p = System.getProperties();
 Set set = p.keySet();
 Object[] o = set.toArray();
 List l = Arrays.asList(o);
 Collections.sort(l);
 Iterator i = l.iterator();
   while(i.hasNext()){
String s = (String)i.next();
System.out.println(s +   + p.getProperty(s));
System.out.println();
   }//while
  }//method
  private void displayWeblogicProperties(){
  }
 }
 

 - Original Message -
 From: Jason Chaffee [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, April 28, 2001 1:30 AM
 Subject: Re: html form widgets not appearing

  The app server is the container for the servlet, so all of servlet code is
 being
  done by the app server, therefore if something is implemented wrong like
  getServletContext() or something, than you will have a problem.  Weblogic
 has
  all kinds of bugs like this.
 
  G.L. Grobe wrote:
 
   Are you sure it's up to the app server to pass the found resources to
   struts. I thought I passed over some code where struts did the reading
 of
   params from web.xml? Therefore making it a struts problem.
  
   - Original Message -
   From: Jason Chaffee [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, April 27, 2001 11:59 PM
   Subject: Re: html form widgets not appearing
  
If you have everything set correctly as you say, there might be a bug
 with
   you app
server and its ability to find resources.
   
G.L. Grobe wrote:
   
 Ok, I just grabbed the struts nightly source from 4-27 and built it
 and
 sprinkled loadLocale() with println()'s. I got the same errors. Very
   true
 that if loadLocale does not find the file, it will not trap the
 error.

 ---My jsp page printed this --
 500 Internal Server Error
 javax.servlet.jsp.JspException: Cannot find message resources under
 key
 org.apache.struts.action.MESSAGEat
 org.apache.struts.util.RequestUtils.message(RequestUtils.java:292)
   at

 org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
   at
 /index.jsp._jspService(/index.jsp.java:148) (JSP page line 129) at
 com.orionserver[Orion/1.4.8 (build
 10374)].http.OrionHttpJspPage.service(Unknown Source)   at
 com.evermind[Orion/1.4.8 (build 10374)]._aj._nxd(Unknown Source)
   at
 com.evermind[Orion/1.4.8 (build
 10374)].server.http.JSPServlet.service(Unknown Source)  at
 com.evermind[Orion/1.4.8 (build 10374)]._iib._vfd(Unknown Source)
   at
 com.evermind[Orion/1.4.8 (build 10374)]._iib._qjc(Unknown Source)
 -

 In the loadLocale() I got this on my console after starting my app
   server.
 The name line is the properties files being found, obviously my
 ~/WEB-INF/classes/cais.properties (configured in my web.xml) is not
   being
 found.

 Anyone know right off where I should be looking in order to find
 this
   stuff.

 --
 cassia(build):/u/public/orion# java -jar orion.jar
 Auto-unpacking /u/build/release/cais.ear... done.
 Auto-unpacking /u/build/release/cais/cais-web.war... done.
 Auto-deploying cais (Assembly had been updated)...
 Auto-deploying cais-ejb.jar (ejb-jar.xml had been touched since the
   previous
 

Re: Struts and WebSphere

2001-04-28 Thread Dan Miser

Good thought. Makes sense to me. I'll update the docs to reflect these
things and pass it on if TPTB want it.
--
Dan Miser
http://www.distribucon.com

- Original Message -
From: Stephen Schaub [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 28, 2001 6:50 AM
Subject: Re: Struts and WebSphere


 An alternate approach that worked for me:

 Add the web folder to the struts-example application
 classpath:

 C:\WebSphere\AppServer\hosts\default_host\struts-example\web

 When I did this, the struts-example app worked flawlessly.





html:errors tag

2001-04-28 Thread jsmith

I am trying to figure out how the html:errors are ordered when they 
are redisplayed and if there is a way to control it.  I have a page that 
can have several errors and I would like to control the order they are 
displayed but I can't figure out how to do this.

Thanks,

--
Jason Smith
[EMAIL PROTECTED]