USage of bean:struts, bean:resource tag

2005-02-17 Thread [EMAIL PROTECTED]
Dear all
What is the exact usage of bean:struts and bean:resource tag
Please mail me back
thanks
senthil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts and jsp

2005-02-17 Thread Andrew Hill
Its considered best practice to go through an action first - even in 
those cases where the action doesnt need to do anything.

In such cases its recommended (though not unanimously - we had a bit of 
a debate about this a couple of weeks ago on the list!) that you also 
put your JSPs under WEB-INF so that they cannot be directly accessed 
from the client.

jonathan zhang wrote:
is it a good idea to have a  direct link to jsp instead of going
through an action in a jsp page?
thanks
-
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: [OT] java date and time issue

2005-02-17 Thread Andrew Hill

1. How to find out what time zone the user is in?

You cant (afaik). The closest you can get is to use javascript to determine
their current GMT offset, that however will not give you the actual
timezone (including such things as daylight savings rules and so forth)
but it may be close enough for your needs. In one webapp I did the
UI for I used the GMT offset to narrow down the list of timezones
available in java to those with which the gmt offset was compatable and
present these to the user in a select box on the login screen. The
selected timezone is then put into a session attribute. Use this
timezone when formatting any dates that you render so that they show up
to the user in their selected timezone and not the servers timezone.
(Btw: dont cache DateFormat instances in session as they arent threadsafe)

2. How to make data updation program use that time zone to update the
database

Presumably you will want to convert the users entry from a String into
one of the java date classes at some point before you pass it to the
database? You will parse the dates the users enter using an instance of
DateFormat. You can call its setTimeZone() method to set the timezone
from which the date is coming. This is necessary because a java date
doesnt store any timezone, but rather the date (and time) is represented
internally as a long value which contains the number of milliseconds
past the epoch (which in java is (and also rather conveniently in many
other languages including javascript) 1970-01-01 00:00:00 UTC).
This implies some potential gotchas when using the java date handling.
For example, if you parse the string "1970-01-01 00:00:00" into a Date,
the milliseconds will differ depending on which timezone you tell the
format that the string is coming from. For UTC (aka GMT) the resulting
long value would of course be 0, but for GMT+8 it would be -2880
(which is of course -8 hours worth of milliseconds). If you then go and
display this very same java.util.Date instance formatted for a user
whose timezone is PST (California) they will see 1969-12-31 16:00:00
because thats what time (and date) it is over there. This of course is
all good and correct, because after all 16:00PST and 00:00UTC are both 
at the same point in time, just represented differently depending
on the local timezone.

As I mentioned earlier however there are some potential gotchas relating
to the java date time handling that may (or may not) cause you some
problems.
For example, for the timezone "Asia/Singapore" parsing the "1970-01-01
00:00:00" string to a Date will get you a long value internally of
-2700 under a 1.4 JVM. But wait you say! Isn't Singapore 8 hours
ahead of GMT? Yes it is. Now. But in 1970 it was only 7 hours and 30
minutes ahead of GMT. (They didnt move it to 8 hours after GMT until 
1982). The 1.4 JVM actually models
this in its "Asia/Singapore" zone, but not of course under the more
generic "GMT+8" zone. Java 1.3 on the other hand, doesnt model this and 
so uses an 8 hour offset for 1970.

This caused me no end of grief recently (warning: rambling war story
follows!) in an RMI based (ie: not a web app(so actually its more a jar
story than a war story ;->)) timesheet application I wrote a few years
back where I was using the java.sql.Time class to represent time.
Recently we had been getting all sorts of wierd errors
and data corruption due to a combination of dodgy assumptions on the 
part of my code (ie: startTime < endTime, all clients in same timezone, 
etc...) together with the nasty issue that the time as perceived by the 
server was different to that perceived by the client as the server had 
been happily running on a 1.3 JVM for some 3 years, while the clients 
were now upgraded to 1.4 JVMs - some of which had the default timezone 
of GMT+8 and some "Asia/Singapore".

Now obviously the timesheet
system in question wasnt trying to record work done in 1970, but I was
using java.sql.Time to represent times of day for the start and end 
times of blocks of work, with a seperate field for the date. The 
java.sql.Time is a subclass of java.util.Date and as such works the same 
way as Date. Since its only recording a time however, it sets the 'date 
part' to be the epoch date. Its therefore representing a time on the 1st 
of January 1970, and that means that when we parse a string into a Time 
instance, such as its valueOf() method does, the UTC offsets applicable 
to 1970 are used.

If we then serialise this to another machine (and the only actual data 
recorded in a Date is a long as you will recall) and that machine has a 
different JVM or uses a different timezone, its going to consider the 
value as being different to what the client was considering it as.

For the most part this just meant time being recorded half an hour off 
from what the user intended, and since the process operated in reverse
when loading the sheets from the server back to the same client it wasnt
usually noticed.

Where we were recording ti

Does Javascript validation support Array?

2005-02-17 Thread Anthony Hong
I have a question about validation framework use javascipt in struts.

If I define a rule in validation.xml with field "customerName"
required, and there are two input text items use this name,
then javascript validation doesn't work.

What should I do? I use struts 1.1
-- 

Anthony Hong

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



struts and jsp

2005-02-17 Thread jonathan zhang
is it a good idea to have a  direct link to jsp instead of going
through an action in a jsp page?
thanks

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



[HELP] Understanding clearly about function of Nested Tags

2005-02-17 Thread Pham Anh Tuan
Hi all,
I don't know clearly about functions of Nested Tags. I have not used it 
before. I read in struts.apache.org about it, and all I know is it's 
somthing like logic ...

plz, show me the powerful ability of Nested Tags
Thanks for advance
Anh Tuan 


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


Re: [OT] Auto comment generation

2005-02-17 Thread Shed Hollaway
try http://javadocbuilder.sourceforge.net/


- Original Message -
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, February 17, 2005 11:00 AM
Subject: RE: [OT] Auto comment generation


> I wound up using NetBeans.  I couldn't find the function in jDeveloper,
> and Eclipse seems to be a manual process (which is still helpful).  Thanks
> for all the suggestions everyone that responded!
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Thu, February 17, 2005 1:16 pm, Andy Dailey said:
> > netbeans has this feature.
> >
> > www.netbeans.org
> >
> >
> >
> >
> >> -Original Message-
> >> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, February 17, 2005 1:05 PM
> >> To: user@struts.apache.org
> >> Subject: [OT] Auto comment generation
> >>
> >>
> >> Anyone know of a tool (Eclipse plug-in perhaps?) that will
> >> take a Java source file and put javadoc comments (a skeleton
> >> basically) before each method, that will include all
> >> parameters, methods and throws?, and then I just have to fill
> >> in the details?  Thanks!
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> 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]



Taglib error in SUN One Java Server version 8, PLS HELP!!!

2005-02-17 Thread Vincent Ho
When i deploy my application to the newly download Sun One Java System 
Server Platform Edition version 8, i got this error when i trying to call 
the first JSP page to display.

The application has been running well in JBOSS Server. ANy help will be much 
appreciate, tq.

The Error i got from the Log as follows:

DetailsTimestamp: Feb 18, 2005 10:10:06.896
  Log Level:  SEVERE
  Logger: javax.enterprise.system.container.web
  Name-Value Pairs: _ThreadID=18;
  Record Number: 10067
  Message ID: ApplicationDispatcher[/eApps] Servlet.service() for 
servlet com.ilium.jspc.invMainLayout_jsp threw exception 
java.lang.NullPointerException at 
org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java
  Complete Message
113)at com.ilium.jspc.invMainLayout_jsp._jspService(Unknown Source) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at 
java.lang.reflect.Method.invoke(Method.java:324)at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)  at 
java.security.AccessController.doPrivileged(Native Method)  at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)  
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
  at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
  at 
java.security.AccessController.doPrivileged(Native Method)  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
   at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
   at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at 
org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at 
org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
 at 
java.security.AccessController.doPrivileged(Native Method)  at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
  at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1058) 
at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:269)
 at 
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:249)
at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:303)
  at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
   at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:747)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at 
java.lang.reflect.Method.invoke(Method.java:324)at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)  at 
java.security.AccessController.doPrivileged(Native Method)  at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)  
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
  at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
  at 
java.security.AccessController.doPrivileged(Native Method)  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at 
com.ilium.eapps.syswar.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:152)
  at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter

Re: Struts or SpringFramework

2005-02-17 Thread Dakota Jack
You might profit from dropping into you local bookstore and perusing
through Rod Johnson's "J2EE Development without EJB" which is really
good.  Chapter 13 covers web tier design and the Web MVC that comes
with Spring.  (Rod is the primary author of the ideas behind as well
as the code behind the Spring framework.)  'Hope this is helpful.

Jack


-- 
"You can lead a horse to water but you cannot make it float on its back."
"Heaven has changed.  The Sky now goes all the way to our feet.

~Dakota Jack~

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



RE: You must specify exactly one of "forward", "href", or "page"

2005-02-17 Thread Vijay Kumar
Hai
 Thx for ur answer can u tell me why we have to use old plain html
Bye
vijay
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Beal
Sent: Thursday, February 17, 2005 8:04 PM
To: user@struts.apache.org
Subject: Re: You must specify exactly one of "forward", "href", or
"page"

Don't use  to execute a JavaScript.  Just use plain old
HTML.

-- Jeff

Vijay Kumar wrote:
> Hai
>  I am new to struts I am using  to call a java script and
> for displaying the images 
> But it's giving an error javax.servlet.jsp.JspException: Cannot create
> rewrite URL: java.net.MalformedURL
> Exception: You must specify exactly one of "forward", "href", or
"page" 
> Can any one have the solution for this
> Bye
> vijay
> 


-
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 or SpringFramework

2005-02-17 Thread Dakota Jack
I assume you know this but just in case: Struts (a web application
framework) is not a "rival" not for the Spring Framework (which is a
lightweight j2ee applicatoin framework).  I assume, then, that you
must mean the standard web application framework that comes with
Spring?  Is that right?

Jack


On Fri, 18 Feb 2005 09:17:33 +0800, Eric Chow 
> I have used Struts for four years. And I am evaluating SpinrgFramework.
> 
> Anybody can give me some suggestions on them ??
> 
> Eric

-- 
"You can lead a horse to water but you cannot make it float on its back."
"Heaven has changed.  The Sky now goes all the way to our feet.

~Dakota Jack~

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



[OT] Gmail Invites

2005-02-17 Thread Dakota Jack
I have 50 gmail invites, if anyone wants one.

Jack

-- 
"You can lead a horse to water but you cannot make it float on its back."
"Heaven has changed.  The Sky now goes all the way to our feet.

~Dakota Jack~

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



Struts or SpringFramework

2005-02-17 Thread Eric Chow
Hello,

I have used Struts for four years. And I am evaluating SpinrgFramework.

Anybody can give me some suggestions on them ??

Eric

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



Re: Tiles scope headache assistance needed.

2005-02-17 Thread Brian Moseley
Jason Long wrote:
I switched my code to the following jstl tags as suggested.  The first part
works with no problem, but I get no output from the tile attempt except for
the layout being applied with the word "testing".  Do I need to use
 or some other tag to make the quote bean accessible
from the tile?
yes: 
 

   
  

  
note that in a servlet 2.4/jsp 2.0 webapp you don't even 
have to use c:out. you can just do ${quote.offer...}.

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


Re: Caching Appliction Level Data?

2005-02-17 Thread David Johnson
Hi again

a related question. if I load up the data I need from within a plug in
and store it in the application scope, is this an acceptable
sepatation of "view" and "Model" as long as I am doing so from a
service?

Remember, this app architecture I'm using has a "service factory"
(which was set up from within a plug in), and the way all the data
access is done is from these "services".

Does that make sense? Essentially, I'll add a section to the init()
after this service factory is set up that uses the service factory to
instantiate a service whose purpose it is to pass back Application
Level data (I use the example of state codes, common to all users)
which I will then store in the application scope.

Am I making sense?

My goal is to keep this as simple as possible by introducing as little
complexity as possible

Dave J

P.S. I mean no disrespect to people who have suggested other ways of
doing this, I'm simply proposing what seems like a simple solution,
and wondering is it seems drastically wrong, or if it's reasonable.
thanks to everyone for the input!

On Mon, 14 Feb 2005 14:34:23 -0500 (EST), Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> On Mon, February 14, 2005 2:26 pm, David Johnson said:
> > Frank
> >
> > I see what you mean. I was assuming I'd just store the data in a
> > hashtable or something in the Application Context
> 
> That's what I think Wendy suggested, and it's probably a better idea than
> what I do frankly :)
> 
> > I have stupid question...where is your AppConfig actually getting
> > stored? I'd think you'd need to do the above at some point and do a
> 
> No question is stupid :)
> 
> > getServletContext().setAttribute( AppConfig, "myAppInfo");
> >
> > oh boy what am I missing.. or was that implied.. OR did I miss your
> > hwhole point? I really hope it's not the last one ;)
> 
> Your forgetting some basic Java is all (and everyone does it from time to
> time, regardless of what anyone might claim :)
> 
> A member of a class that is static is always present in the CLASS,
> independent of any instance of that class.  For instance:
> 
> public class myClass {
>  public static int PI = 3.14159;
> }
> 
> Now, if you have another class that wants to use PI, you just do:
> 
> public class test {
>  public void showPI() {
>System.out.println(myClass.PI);
>  }
> }
> 
> No instance of myClass is created, yet you can access the PI member of it
> through the instance of the CLASS... That's sometimes confusing to
> people... The way I learned to think of it is that the JVM (the class
> loader specifically) in a sense does automatically creates an instance of
> the myClass class, but an instance that ONLY contains the static members.
> That's not actually what happens AFAIK, but IN EFFECT it is.
> 
> As long as the two classes are loader by the same class loader, your good
> to go.
> 
> > For this app it's safe to assume we'll always be using struts (btw)
> 
> Then a plugin is safe.  But, as others have said, it's just about as easy
> to do it other ways, so you may as well have one less Struts tie-in.  And
> as Vic I think said, DAOs are the best-practice (one I haven't had cause
> to use yet myself, but I in *no way* disagree with his point).
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> >
> > On Mon, 14 Feb 2005 14:15:28 -0500 (EST), Frank W. Zammetti
> > <[EMAIL PROTECTED]> wrote:
> >> Using a plugin only tells you WHERE your going to read the information
> >> in,
> >> not where your going to STORE it.  I think that's the question you
> >> really
> >> want to ask.  Plugins are pretty standard practice when dealing with
> >> Struts, but if you have a concern that you might not be using Struts at
> >> some point, you might want to do something else.
> >>
> >> In any case, where you put the data is the question.  I'd still put my
> >> vote down for a static "storage" class.  I do that, read the data in a
> >> plugin, stick it in the storage class, and I'm done.  The storage class
> >> is
> >> pretty much nothing more than this:
> >>
> >> import java.util.HashMap;
> >> public class AppConfig {
> >>  private static HasMap config = new HashMap();
> >>  public static void setConfig(HashMap config) {
> >>this.config = config;
> >>  }
> >>  public static HashMap getConfig() {
> >>return config;
> >>  }
> >> }
> >>
> >> I start my plugin by doing:
> >>
> >> HashMap config = AppConfig.getConfig();
> >>
> >> ...then read in whatever data I need, shove it in config, and final do:
> >>
> >> AppConfig.setConfig(config);
> >>
> >> Again, so long as this data isn't going to change, and it's not a huge
> >> amount of data, that's all there is to it.  I don't know if this would
> >> be
> >> considered "best practice', but it's certainly "common practive" AFAIK
> >> :)
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> On Mon, F

Re: [ANNOUNCEMENT] New Struts subproject: Struts Flow

2005-02-17 Thread Dakota Jack
At the risk of causing people to run around in little circles [ ;-) ],
can you tell me what Faces is?  Is that MyFaces?  How does Faces
differ from Shale?  Thanks for any information.  If the question
upsets anyone, my apologies.

Jack


On Thu, 17 Feb 2005 14:03:32 -0800, Don Brown <[EMAIL PROTECTED]> wrote:
> The Apache Struts team is pleased to announce the adoption of its latest
> subproject, Struts Flow, a continuations-based approach to complex web
> workflows. Struts Flow originated at the struts.sf.net project and has
> been formally adopted now as a Struts subproject.  Struts Flow is a port
> of Apache Cocoon's Control Flow to Struts to allow complex workflow,
> like multi-form wizards, to be easily implemented using
> continuations-capable Javascript and eventually Java.
> 
> Today, Struts is comprised of nine subprojects: Core, Taglib, Tiles, El,
> Faces, Scripting, Applications, Shale, and (now) Flow.  Struts Flow is
> different from Struts Scripting/BSF as where Scripting brings any
> BSF-supported scripting language to Struts Actions, Struts Flow works on
> redefining the traditional Model 2 state-driven workflow into simplified
> scripts whose execution spans multiple requests.  Currently, the Rhino
> engine, a Javascript implementation, is used to provide continuations
> support, but with the maturation of Commons Javaflow -
> http://jakarta.apache.org/commons/sandbox/javaflow/ - a Java-based
> continuations implementation, Java will soon be supported as well.
> 
> For more information, visit the Struts Flow website at:
>- http://struts.apache.org/flow/index.html
> 
> Don Brown
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
"Heaven has changed.  The Sky now goes all the way to our feet.

~Dakota Jack~

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



Re: Newbie Page flow question

2005-02-17 Thread Nic Werner
Thanks for the help, that set me down the right path.
Now, on just a normal page with an ActionForm, all the data is 
automatically 'set' into the Bean by the ActionForm because the property 
names match. Do I need to write this code now to take each param and map 
it to a setter or is there a better way for this?

- Nic
Karr, David wrote:
You'll have a form with at least two submit buttons.  One to submit the
form, and another to lookup some other data.  You'll probably use a
LookupDispatchAction (or something similar) to map each submit button to
different methods in your Action class.  The lookup method will lookup
the data, store it into your ActionForm (using session scope), and then
forward to the page that displays the data.
 

-Original Message-
From: Nic Werner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 17, 2005 10:01 AM
To: user@struts.apache.org
Subject: Newbie Page flow question

Greetings,
   I've searched through the archives but can't really seem 
to find a 
solution. If one exists, please just point me there.

I have a form that is to be filled out. However, one of the 
fields needs 
to have a seperate lookup, and then return back to the original page 
with the results.

How do I create a form that lets a user enter some data in 
the fields, 
bring up a search page for one of the fields, and then 
returns back to 
the page, adding the new data from the results and keeping whatever 
they've already entered?

Thanks,
- Nic.
-
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]
 


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


multiple bean params getting clobbered on form submit

2005-02-17 Thread Kirby Vandivort
so i have a couple of beans that i'm sending to the frontend.  They
are getting their initial values just like they should.  (the jsp is
behind an action that saves values to bean1 and bean2.

The jsp page looks something like:

-
This is for bean 1


This is for bean 2

--

When the html gets created, I get two form entries that look like:

-
This is for bean 1


This is for bean 2

-

But, since both inputs have the name 'enabled' they are getting
clobbered on bean submit.

How can I get around this?  

Thanks!

-- 

Kirby Vandivort

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



RE: Tiles Question

2005-02-17 Thread David G. Friedman
Matthew,

I don't think that "extends" can be used with the "path" attribute.  I have
always understood, and practiced, tiles where one definition extends the
main definition (like a template) and overloads the COMPONENTS of the
original template.  I have always thought extends should NEVER be used with
path.  Using it that way, I have never had a problem.Can you change your
templates to something like the below, where the "admin" section is blank in
the original template but overloaded to show your admin parts jsp in the
"admin" definition?  I.E. like inserting an admin menu in to the page.
Example follows:


  ...
    Blank for most layouts



 *** Added to show a
piece in the page for this admin template


Then, in your /layout/mainLayout.jsp, you can have a  which will show your admin information if your Forward goes to the
"admin" tile, but nothing for the "mainLayout" tile or any new tiles which
might extend that layout.

THAT is how I do my templating with tiles.  So far, I've had no problems.

Regards,
David



-Original Message-
From: Matthew Hughes [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 17, 2005 4:37 PM
To: user@struts.apache.org
Subject: Tiles  Question


I think I am misunderstanding something.  I have two layout JSPs in my
application

doc.mainLayout
doc.admin


  ...




Basically mainLayout.jsp does 99% of the layout work.  adminLayout.jsp
just looks like this:

--adminLayout.jsp---
<%@ page language="java" contentType="text/html; charset=iso-8859-1" %>
<%@ taglib prefix="tiles" uri="struts-tiles" %>
Extra text

-


When I try to have a JSP use doc.admin as a layout, it blows up.  What
is happening?

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



error while deploying the war file

2005-02-17 Thread bala pamarti
Hi All,
I am new to struts and am trying to learn it...

I configured the action and forward in the struts
confuguration file and when i deploy the war file in
tomcat and restarted iti saw the following
errorcan anyone help me figure out where i am
going wrong.

TIA,
kishore
---


Feb 17, 2005 5:10:09 PM
org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 118 column 10: The content
of element type "action"
must match
"(icon?,display-name?,description?,set-property*,exception*,forward*)
".
org.xml.sax.SAXParseException: The content of element
type "action" must match "
(icon?,display-name?,description?,set-property*,exception*,forward*)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
S
ource)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)

at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:708)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
.java:670)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
at
javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1029)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
2)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4013)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
357)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:277)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:617
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:349)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Feb 17, 2005 5:10:09 PM
org.apache.struts.tiles.TilesPlugin
initDefinitionsFacto
ry



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



RE: Tiles scope headache assistance needed.

2005-02-17 Thread Jason Long
I switched my code to the following jstl tags as suggested.  The first part
works with no problem, but I get no output from the tile attempt except for
the layout being applied with the word "testing".  Do I need to use
 or some other tag to make the quote bean accessible
from the tile?

 

   
  

  

  



  

  

I would like to define the following tile definition:


   

And have quote.jsp as follows:


  
  testing
  

  


Thank you for your time, 

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 17, 2005 3:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Tiles scope headache assistance needed.

From: "Jason Long" <[EMAIL PROTECTED]>

> Where are all the Tiles gurus?  I asked this question in less detail about
a
> month ago and I still have not made any progress in this matter. Please
see
> original message below.

You would probably get more help if you were using JSTL's  and
 instead of  and .  The difference may be
irrelevant for this particular question, but I doubt I'm alone in skipping
right over most questions that use the 'classic' Struts tags without
expressions.

-- 
Wendy Smoak




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



RE: Tiles scope headache assistance needed.

2005-02-17 Thread Jason Long
I switched my code to the following jstl tags as suggested.  The first part
works with no problem, but I get no output from the tile attempt except for
the layout being applied with the word "testing".  Do I need to use
 or some other tag to make the quote bean accessible
from the tile?

 

   
  

  

  



  

  

I would like to define the following tile definition:


   

And have quote.jsp as follows:


  
  testing
  

  


Thank you for your time, 

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 17, 2005 3:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Tiles scope headache assistance needed.

From: "Jason Long" <[EMAIL PROTECTED]>

> Where are all the Tiles gurus?  I asked this question in less detail about
a
> month ago and I still have not made any progress in this matter. Please
see
> original message below.

You would probably get more help if you were using JSTL's  and
 instead of  and .  The difference may be
irrelevant for this particular question, but I doubt I'm alone in skipping
right over most questions that use the 'classic' Struts tags without
expressions.

-- 
Wendy Smoak




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



[OT] java date and time issue

2005-02-17 Thread Ashish Kulkarni
Hi
We have a situtation where we will be hosting our web
server in USA and users from all over the world will
be accessing this, these users will do some
transaction which will update the database.
Now the problem is with date and time, we dont want to
enter system date and time, but the local date and
time for the user, 
here are the possible situtation and i need some
suggestions on handling them
1. How to find out what time zone the user is in?
2. How to make data updation program use that time
zone to update the database
3. How to test this function is working, with out
traveling to different parts of world, 
Regards
Ashish



__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



??? Re: I have a jsp. that has two included jsp's, only one shows up.

2005-02-17 Thread Joe Germuska
At 10:30 PM + 2/17/05, Eric Lemle wrote:
Tried

but nothing shows up.  Is this what you meant?
So if I get the latest struts.. this might work?
You definitely can't pass parameters through a  call; 
the end result of the insert tag is a call to 
requestDispatcher.include(...), which doesn't accept parameters.  If 
you need something like this, you should use the 
MappingDispatchAction, which allows you to use the Struts Config to 
specify a dispatch method instead of passing it as a request 
parameter.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


RE: Newbie Page flow question

2005-02-17 Thread Karr, David
You'll have a form with at least two submit buttons.  One to submit the
form, and another to lookup some other data.  You'll probably use a
LookupDispatchAction (or something similar) to map each submit button to
different methods in your Action class.  The lookup method will lookup
the data, store it into your ActionForm (using session scope), and then
forward to the page that displays the data.

> -Original Message-
> From: Nic Werner [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 17, 2005 10:01 AM
> To: user@struts.apache.org
> Subject: Newbie Page flow question
> 
> 
> Greetings,
> I've searched through the archives but can't really seem 
> to find a 
> solution. If one exists, please just point me there.
> 
> I have a form that is to be filled out. However, one of the 
> fields needs 
> to have a seperate lookup, and then return back to the original page 
> with the results.
> 
> How do I create a form that lets a user enter some data in 
> the fields, 
> bring up a search page for one of the fields, and then 
> returns back to 
> the page, adding the new data from the results and keeping whatever 
> they've already entered?
> 
> Thanks,
> 
> - Nic.
> 
> -
> 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]



[ANNOUNCEMENT] New Struts subproject: Struts Flow

2005-02-17 Thread Don Brown
The Apache Struts team is pleased to announce the adoption of its latest
subproject, Struts Flow, a continuations-based approach to complex web
workflows. Struts Flow originated at the struts.sf.net project and has 
been formally adopted now as a Struts subproject.  Struts Flow is a port 
of Apache Cocoon's Control Flow to Struts to allow complex workflow, 
like multi-form wizards, to be easily implemented using 
continuations-capable Javascript and eventually Java.

Today, Struts is comprised of nine subprojects: Core, Taglib, Tiles, El, 
Faces, Scripting, Applications, Shale, and (now) Flow.  Struts Flow is 
different from Struts Scripting/BSF as where Scripting brings any 
BSF-supported scripting language to Struts Actions, Struts Flow works on 
redefining the traditional Model 2 state-driven workflow into simplified 
scripts whose execution spans multiple requests.  Currently, the Rhino 
engine, a Javascript implementation, is used to provide continuations 
support, but with the maturation of Commons Javaflow - 
http://jakarta.apache.org/commons/sandbox/javaflow/ - a Java-based 
continuations implementation, Java will soon be supported as well.

For more information, visit the Struts Flow website at:
  - http://struts.apache.org/flow/index.html
Don Brown
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


??? Re: I have a jsp. that has two included jsp's, only one shows up.

2005-02-17 Thread Eric Lemle
Tried



but nothing shows up.  Is this what you meant?

So if I get the latest struts.. this might work?

-Eric

Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111 
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]


>>> [EMAIL PROTECTED] 2/8/2005 2:20:29 PM >>>
At 2:15 PM -0700 2/8/05, Eric Lemle wrote:
>So how does one get the final HTML from two Actions into the same
page?

I am pretty sure that Tiles will do includes instead of forwards 
where necessary so that you can use actions as the source of 
 components.  I've never had to use it, but someone 
recently pointed out a bug in the chain version of TilesPreProcess 
which was causing this to break.

Joe


>Eric D. Lemle
>Senior Programmer / Analyst
>Intermountain Health Care
>36 South State Street, Suite 1100
>Salt Lake City, Utah 84111
>United States of America (USA)
>(801) 442-3688 -- e-mail: [EMAIL PROTECTED] 
>
>
  [EMAIL PROTECTED] 2/3/2005 5:28:09 PM >>>
>Sort of. Remember, the "normal" result of a Struts action is the
>equivalent
>of RequestDispatcher.forward(). So, I imagine you're also seeing an
>IllegalStateException as well. You've got the equivalent of the
>following:
>
>includer.jsp:
>-
><@% page contentType="text/plain" %>
>
>Before forwarder1:
>
>After forwarder1:
>
>Before forwarder2:
>
>After forwarder2:
>
>forwarder1.jsp:
>---
>
>
>forwarder2.jsp:
>---
>
>
>content1.jsp:
>-
>content1.jsp
>
>content2.jsp:
>-
>content2.jsp
>
>Which should generate:
>
>content1.jsp
>
>Along with raising an IllegalStateException.
>
>Eric Lemle wrote:
>>  I have a jsp. that has two included jsp's that are actually struts
>>  actions but the response only returns the first one.
>>  I have tried flush="false" (Doesn't matter)
>>  I have tried the >  Is there something in the framework that is preventing this?
>>
>>
>>  
>>  />
>>  
>>
>>  
>>  flush="true"
>>  />
>>  
>>
>>
>>  Eric D. Lemle
>>  Senior Programmer / Analyst
>>  Intermountain Health Care
>>  36 South State Street, Suite 1100
>>  Salt Lake City, Utah 84111
>>  United States of America (USA)
>>  (801) 442-3688 -- e-mail: [EMAIL PROTECTED] 
>
>--
>Kris Schneider 
>D.O.Tech   
>
>-
>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] 


-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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



Tiles Question

2005-02-17 Thread Matthew Hughes
I think I am misunderstanding something.  I have two layout JSPs in my
application

doc.mainLayout
doc.admin


  ...

  


Basically mainLayout.jsp does 99% of the layout work.  adminLayout.jsp
just looks like this:

--adminLayout.jsp---
<%@ page language="java" contentType="text/html; charset=iso-8859-1" %>
<%@ taglib prefix="tiles" uri="struts-tiles" %>
Extra text

-


When I try to have a JSP use doc.admin as a layout, it blows up.  What
is happening?

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



RE: ActionMessage without using a key from application.properties

2005-02-17 Thread Chaikin, Yaakov Y.
This might not be good for I18n, but if you just have some custom message
you want to bundle together with your ActionMessages, it would be nice to do
this without this hack... or having to resort to sticking it straight on the
request under some key.

I think, this is a pretty good question, flexibility for
internationalization aside.

I'd be interested to know if there is a cleaner way to do this in Struts
than having to deal application.properties. Anyone?

-Original Message-
From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 17, 2005 4:30 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionMessage without using a key from application.properties

Right. I thought of this.

Is there a way to do this without this hack? Whoops... I mean simulation...
:)

Thanks.

-Original Message-
From: Scott Piker [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 17, 2005 4:21 PM
To: user@struts.apache.org
Subject: Re: ActionMessage without using a key from application.properties

You usually want to avoid doing this because you lose a lot of
flexibility, but you can pretty easily simulate this behavior by just
defining an empty message in your .properties file with one argument:

message.custom={0}

and then use the arg0 slot for your hard-coded custom message

new ActionMessage("message.custom", "Your custom message goes here");


>>> [EMAIL PROTECTED] 2/17/2005 3:58:57 PM >>>
Is there a way to construct a completely custom message without using
a key from application.properties?

ActionMessage constructor seems to insist on having a key that would
be mapped to the application.properties.

Thanks,
JQ.

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



This message has originated from R.L. Polk & Co.,
26955 Northwestern Highway Southfield, MI 48034

R. L. Polk & Co. sends various types of e-mail
communications. If this email message concerns the
potential licensing of a Polk product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to [EMAIL PROTECTED]
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error please delete this
message and notify the Polk System Administrator at [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]

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



RE: ActionMessage without using a key from application.properties

2005-02-17 Thread Chaikin, Yaakov Y.
Right. I thought of this. 

Is there a way to do this without this hack? Whoops... I mean simulation...
:)

Thanks.

-Original Message-
From: Scott Piker [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 17, 2005 4:21 PM
To: user@struts.apache.org
Subject: Re: ActionMessage without using a key from application.properties

You usually want to avoid doing this because you lose a lot of
flexibility, but you can pretty easily simulate this behavior by just
defining an empty message in your .properties file with one argument:

message.custom={0}

and then use the arg0 slot for your hard-coded custom message

new ActionMessage("message.custom", "Your custom message goes here");


>>> [EMAIL PROTECTED] 2/17/2005 3:58:57 PM >>>
Is there a way to construct a completely custom message without using
a key from application.properties?

ActionMessage constructor seems to insist on having a key that would
be mapped to the application.properties.

Thanks,
JQ.

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



This message has originated from R.L. Polk & Co.,
26955 Northwestern Highway Southfield, MI 48034

R. L. Polk & Co. sends various types of e-mail
communications. If this email message concerns the
potential licensing of a Polk product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to [EMAIL PROTECTED]
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error please delete this
message and notify the Polk System Administrator at [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: ActionMessage without using a key from application.properties

2005-02-17 Thread Scott Piker
You usually want to avoid doing this because you lose a lot of
flexibility, but you can pretty easily simulate this behavior by just
defining an empty message in your .properties file with one argument:

message.custom={0}

and then use the arg0 slot for your hard-coded custom message

new ActionMessage("message.custom", "Your custom message goes here");


>>> [EMAIL PROTECTED] 2/17/2005 3:58:57 PM >>>
Is there a way to construct a completely custom message without using
a key from application.properties?

ActionMessage constructor seems to insist on having a key that would
be mapped to the application.properties.

Thanks,
JQ.

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



This message has originated from R.L. Polk & Co.,
26955 Northwestern Highway Southfield, MI 48034

R. L. Polk & Co. sends various types of e-mail
communications. If this email message concerns the
potential licensing of a Polk product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to [EMAIL PROTECTED]
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error please delete this
message and notify the Polk System Administrator at [EMAIL PROTECTED]


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



ActionMessage without using a key from application.properties

2005-02-17 Thread J Q
Is there a way to construct a completely custom message without using
a key from application.properties?

ActionMessage constructor seems to insist on having a key that would
be mapped to the application.properties.

Thanks,
JQ.

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



Thank you all for answering Re: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Yan Hu
Hello Guys:
First and foremost, I wanted to thank you all for answering my question.  I 
believe I can learn a
lot of Struts skills and other related skills here.  Thanks again.



> Yan Hu wrote:
> 
> >Hello Guys:
> >   This is my first real Struts-based project. I am fairly new to Struts. I 
> > know some basics
> and
> >tried a few toy examples. Now it is time for a serious one.
> >   My project involes students.   Each student has her own page that might 
> > take her to pages
> that
> >are customized just for her.  I can not jus write a JSP page for each 
> >student. For example, a
> >student is taking Eng101, Chem101, and CS120 this semester.  I fetch from 
> >the database all the
> >info for these 3 classes she is taking.I do not want to put all the info 
> >on the first page
> >after she logged in.  I want to have three links on the first page and take 
> >her to a sub JSP
> page
> >for each specific class for example Eng101.jsp.  There are lots of students. 
> >I can t write all
> the
> >pages for them.  In addition, it changes every semester what classes a 
> >student takes.   My
> >question is how do I construct JSPs on the fly? I will need to use Tile. 
> >What else do you
> suggest
> >me to look into? Thank you very much.
> >
> >
> >=
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> -- 
> CM II
> Resolution Systems Inc.
> /-- never compromise. what if you compromise and lose? --/
> 
> 
> -
> 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: Mapped properties and STRUTS-FACES

2005-02-17 Thread Craig McClanahan
On Thu, 17 Feb 2005 10:25:23 +0100, Ramiro Alba Queipo <[EMAIL PROTECTED]> 
wrote:
> Hello everybody:
> 
> I am trying to migrate from an struts application to STRUTS + JSF +
> TILES. The problem I have is that the old struts application is using
> heavily mapped properties at the action forms beans, and I can manage to
> make them work under JSF. For example, at the old application:
> 
> 
> 
> and
> 
> 

JSF uses essentially the same expression syntax that JSP 2.0 and JSTL
do for expressions, so you could do something like this:

  

or this (equivalent meaning):

  

The latter form is particularly useful if your map keys have periods in them.

Craig

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



Re: [OT] Auto comment generation

2005-02-17 Thread Ashish Kulkarni
Hi
http://jalopy.sourceforge.net/

this is a pretty cool plug-in to format the code as
well as add java documentation

Ashish 
--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> Anyone know of a tool (Eclipse plug-in perhaps?)
> that will take a Java
> source file and put javadoc comments (a skeleton
> basically) before each
> method, that will include all parameters, methods
> and throws?, and then I
> just have to fill in the details?  Thanks!
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: Tiles scope headache assistance needed.

2005-02-17 Thread Brian Moseley
Jason Long wrote:
  
   

try:

  

  

tho i recommend using jstl's c:foreach instead of logic:iterate :)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tiles scope headache assistance needed.

2005-02-17 Thread Jason Long
Where are all the Tiles gurus?  I asked this question in less detail about a
month ago and I still have not made any progress in this matter. Please see
original message below.

Thank you for your time,

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 


-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 16, 2005 10:59 PM
To: 'Struts Users Mailing List'
Subject: Tiles scope headache assistance needed.

I have the following problem with scope and tiles.  The whole point of this
is to be able to put a holder around items presented in a list on the page
to give better delineation. Here is what I am attempting to do.

  

  

  

  



I would like to define the following tile definition:


  


And have quote.jsp as follows:

  

  

  


And then switch the page to the following:

  
   


I always get Cannot find bean quote in any scope no matter what I do.  I
have tried many variations of  and
.  I do not want to want to simply pass a string to
the tile.  I need to be able to make any bean availble to other tiles
inserted into a page.  I would greatly appreciate any advice on how to make
this available to my subtiles.

Thank you for your time, 

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 



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




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



RE: Tiles scope headache assistance needed.

2005-02-17 Thread Jason Long
Where are all the Tiles gurus?  I asked this question in less detail about a
month ago and I still have not made any progress in this matter. Please see
original message below.

Thank you for your time,

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 


-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 16, 2005 10:59 PM
To: 'Struts Users Mailing List'
Subject: Tiles scope headache assistance needed.

I have the following problem with scope and tiles.  The whole point of this
is to be able to put a holder around items presented in a list on the page
to give better delineation. Here is what I am attempting to do.

  

  

  

  



I would like to define the following tile definition:


  


And have quote.jsp as follows:

  

  

  


And then switch the page to the following:

  
   


I always get Cannot find bean quote in any scope no matter what I do.  I
have tried many variations of  and
.  I do not want to want to simply pass a string to
the tile.  I need to be able to make any bean availble to other tiles
inserted into a page.  I would greatly appreciate any advice on how to make
this available to my subtiles.

Thank you for your time, 

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 



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




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



Re: Building accurate URI

2005-02-17 Thread Karan
Matt,
Try this:
href='<@html.rewrite page=""/>/FTL/resources/css/mainstyle.css'
(its in the freemarker syntax, so change that for JSPs)
When I use this, all links, etc. have to be given the path relative to 
the context and not to your current document.
That way I can keep everythign in order, and if I ever change the 
location of a particular document, a multiple-page search-and-replace is 
all thats required.

HTHs,
Karan
Matt Hughes wrote:
Previously all the JSPs in my application were in the same folder.  To
organize things a bit, I categorized them according to action and now
they are nice, but the problem is all the links in my application are
relative.  And they all expect that they are in the same base folder,
but now they're not.  Instead of prepending every single link my JSPs
with the context path, I was going to use  to generate a
full URI up to and including the context path.  The problem is: how do I
generate an accurate URI?  If I use ServletRequest to generate the URI
this was:
getScheme() + "://" + getServerName() + ":" + getServerPort() +
getContextPath()
The URL that the user sees will now have a port number, if it didn't
have one before.  OR, if the server is forwarding the request from
somewhere else, it might expose a whole new URI bypassing the forwarding
mechanism.  My alternative was this:
String context = request.getContextPath();
String fullUrl = request.getRequestURL().toString();
URL url = new URL(fullUrl);
String path = url.getPath();
String base = fullUrl.substring(0,fullUrl.indexOf(path)) + context;
Where base is the base of my web application as it was typed by the
user.  Does anyone forsee any problems with doing it this way?  Any
other ideas or warnings against using 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
--
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Building accurate URI

2005-02-17 Thread Matt Hughes
Previously all the JSPs in my application were in the same folder.  To 
organize things a bit, I categorized them according to action and now 
they are nice, but the problem is all the links in my application are 
relative.  And they all expect that they are in the same base folder, 
but now they're not.  Instead of prepending every single link my JSPs 
with the context path, I was going to use  to generate a 
full URI up to and including the context path.  The problem is: how do I 
generate an accurate URI?  If I use ServletRequest to generate the URI 
this was:
getScheme() + "://" + getServerName() + ":" + getServerPort() + 
getContextPath()

The URL that the user sees will now have a port number, if it didn't 
have one before.  OR, if the server is forwarding the request from 
somewhere else, it might expose a whole new URI bypassing the forwarding 
mechanism.  My alternative was this:

String context = request.getContextPath();
String fullUrl = request.getRequestURL().toString();
URL url = new URL(fullUrl);
String path = url.getPath();
String base = fullUrl.substring(0,fullUrl.indexOf(path)) + context;
Where base is the base of my web application as it was typed by the 
user.  Does anyone forsee any problems with doing it this way?  Any 
other ideas or warnings against using 

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


RE: [OT] Auto comment generation

2005-02-17 Thread Slattery, Tim - BLS
> I'm not seeing that option Tim... I'm using v9.0.3.1... I 
> don't see anything about comments when I right-click 
> anywhere, nor do I see a Source menu (or source anywhere that 
> I looked).

I'm using 9.0.5.2, so maybe they've added it since your version.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Temp file being written to / with Font

2005-02-17 Thread Shey Rab Pawo
Do you have any idea why that is not working for me?  Is there
something I should do with the Font object to close it or something? 
That seems unlikely but I wonder.  I am running this on XP
Professional on a laptop in development.


On Thu, 17 Feb 2005 09:54:57 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Yes it did.
> 
> Original Message Follows
> From: Shey Rab Pawo <[EMAIL PROTECTED]>
> Reply-To: Shey Rab Pawo <[EMAIL PROTECTED]>
> To: Mark Benussi <[EMAIL PROTECTED]>
> CC: user@struts.apache.org
> Subject: Re: Temp file being written to / with Font
> Date: Wed, 16 Feb 2005 13:20:50 -0800
> 
> I was too fast in responding.  I switched to Tiger (jre 5.0) but still
> have the same behavior when I create an image using a Font object.
> Did the change to 5.0 solve your companies' problem?
> 
> On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
> <[EMAIL PROTECTED]> wrote:
>  > Oh dear. I heard about something similar to this first time the other
>  > day.
>  >
>  > JDK 1.4 has a bug that does no release resources even when you release
> any
>  > Font objects.
>  >
>  > My company has had converstaion with Sun but what they ultimately
> recommend
>  > is upgrade to 1.5
>  >
>  > Sorry, I cant provide more than this.
>  >
>  >
> 
> --
> The radiance of all the stars does not equal a sixteenth part of the
> moon's radiance, likewise, good deeds giving us merit, all these do
> not equal a sixteenth part of the merit of loving-kindness..
> 
> -
> 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]
> 
> 


-- 
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..

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



RE: [OT] Auto comment generation

2005-02-17 Thread Frank W. Zammetti
I'm not seeing that option Tim... I'm using v9.0.3.1... I don't see
anything about comments when I right-click anywhere, nor do I see a Source
menu (or source anywhere that I looked).

I'm not all that familiar with jDeveloper, I usually stay away from IDEs
in general unless I have something specific I need one to do for me (like
now!).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, February 17, 2005 2:08 pm, Slattery, Tim - BLS said:
>> I wound up using NetBeans.  I couldn't find the function in
>> jDeveloper
>
> Right-click in your Java class, choose "Add Javadoc Comments". Or
> "Source|Add Javadoc Comments".
>
> --
> 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: [OT] Auto comment generation

2005-02-17 Thread Slattery, Tim - BLS
> I wound up using NetBeans.  I couldn't find the function in 
> jDeveloper

Right-click in your Java class, choose "Add Javadoc Comments". Or
"Source|Add Javadoc Comments".

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: [OT] Auto comment generation

2005-02-17 Thread Frank W. Zammetti
I wound up using NetBeans.  I couldn't find the function in jDeveloper,
and Eclipse seems to be a manual process (which is still helpful).  Thanks
for all the suggestions everyone that responded!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, February 17, 2005 1:16 pm, Andy Dailey said:
> netbeans has this feature.
>
> www.netbeans.org
>
>
>
>
>> -Original Message-
>> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, February 17, 2005 1:05 PM
>> To: user@struts.apache.org
>> Subject: [OT] Auto comment generation
>>
>>
>> Anyone know of a tool (Eclipse plug-in perhaps?) that will
>> take a Java source file and put javadoc comments (a skeleton
>> basically) before each method, that will include all
>> parameters, methods and throws?, and then I just have to fill
>> in the details?  Thanks!
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: [OT] Auto comment generation

2005-02-17 Thread Larry Meadors
In eclipse, you can do them one at a time easily:

Go above the method, and type /** and press enter. 

It fills in the skeleton for you.

You can also press Alt+Shift+J while in the method to do the same thing.

Larry


On Thu, 17 Feb 2005 13:04:56 -0500 (EST), Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> Anyone know of a tool (Eclipse plug-in perhaps?) that will take a Java
> source file and put javadoc comments (a skeleton basically) before each
> method, that will include all parameters, methods and throws?, and then I
> just have to fill in the details?  Thanks!

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



RE: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Arvind.Bir
Hi,

This is pretty simple application and the requirements are not new for
web based projects.

You don't have to create individual JSP pages for each of the student.
But yes, layout (template for each of the student is going to be same).
Information inserted can vary from student to student.

Moreover use JSTL. 



Arvind Bir

-Original Message-
From: Karan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 17, 2005 10:09 AM
To: Struts Users Mailing List
Subject: Re: Newbie--->Construct JSPs on the fly

Apart from all the other suggestions, if you're going to be doing this 
kind of work often you might want to look at Freemarker:
just create the template and retreive all customizable data from ur 
framework.

HTHs,
Karan

Yan Hu wrote:

>Hello Guys:
>   This is my first real Struts-based project. I am fairly new to
Struts. I know some basics and
>tried a few toy examples. Now it is time for a serious one.
>   My project involes students.   Each student has her own page that
might take her to pages that
>are customized just for her.  I can not jus write a JSP page for each
student. For example, a
>student is taking Eng101, Chem101, and CS120 this semester.  I fetch
from the database all the
>info for these 3 classes she is taking.I do not want to put all the
info on the first page
>after she logged in.  I want to have three links on the first page and
take her to a sub JSP page
>for each specific class for example Eng101.jsp.  There are lots of
students. I can t write all the
>pages for them.  In addition, it changes every semester what classes a
student takes.   My
>question is how do I construct JSPs on the fly? I will need to use
Tile. What else do you suggest
>me to look into? Thank you very much.
>
>
>=
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

-- 
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/


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



Trying to create a form object in code

2005-02-17 Thread Norris Shelton
FormBeanConfig cfg =
mapping.getModuleConfig().findFormBeanConfig(name);
form =(DynaActionForm)
DynaActionFormClass.createDynaActionFormClass(cfg).newInstance();

The cfg object has the properties for my dyna bean, but I get:
java.lang.IllegalArgumentException: ActionForm is not dynamic
at
org.apache.struts.config.FormBeanConfig.getDynaActionFormClass(FormBeanConfig.java:84)
at
org.apache.struts.action.DynaActionFormClass.createDynaActionFormClass(DynaActionFormClass.java:232)

Here is my method signature:
public void formDataCopy(ActionMapping mapping,
 HttpServletRequest request,
 ActionForm form,
 String name)


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



RE: [OT] Auto comment generation

2005-02-17 Thread Andy Dailey
netbeans has this feature.

www.netbeans.org

 


> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 17, 2005 1:05 PM
> To: user@struts.apache.org
> Subject: [OT] Auto comment generation
> 
> 
> Anyone know of a tool (Eclipse plug-in perhaps?) that will 
> take a Java source file and put javadoc comments (a skeleton 
> basically) before each method, that will include all 
> parameters, methods and throws?, and then I just have to fill 
> in the details?  Thanks!
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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



Re: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Nic Werner
It looks like your issue isn't about customized page names, but 
customized links.

I don't know your implementation, and I'm going to abstract out the 
Tiles/Struts portion, but here is how I would do it:

- For the intro page, load the class schedule from the database, and its 
according class code.

- Create dynamic links that pass it to a 'ShowIndivClasses.jsp' page, 
with the parameters of the class to display details for.
ie English 101

- This page now loads up the information from wherever (DB,Bean) and 
displays the relative information based on the param.

Hope this gave a bigger picture on flow.
- Nic
Mark Lowe wrote:
For example, a
student is taking Eng101, Chem101, and CS120 this semester
These all look like modules you'll want to search for "indexed
properties" on the archieves, and you'll start to see how to go about
this.
StudentBean student = new StudentBean();
CourseBean course = new Course();
course.setCode("ENG101");
course.setTitle("Introductory English");
student.addCourse(course);
request.setAttribute("student",student);
...

${course.code}

or




Mark
On Thu, 17 Feb 2005 11:48:51 -0500, Jerry Tan <[EMAIL PROTECTED]> wrote:
 

Hello Yan,
While the concept of constructing JSP's dynamically is an intriguing one, I
am still of the opinion that you can handle your situation below in a more
conventional manner.
For example, one simper way would be to have an array of String, which
represents that particular student's course list for that particular
semester.
Based on the values of contained in this array, you can construct the
appropriate links to that particular course, e.g., ENG101.jsp, etc.
hth,
Yan Hu
<[EMAIL PROTECTED]To:   Struts Users Mailing List 

.com>cc:   (bcc: Jerry Tan/DTCC)
 Subject:  Newbie--->Construct JSPs 
on the fly
02/17/2005 11:43
AM
Please respond to
"Struts Users
Mailing List"
Hello Guys:
 This is my first real Struts-based project. I am fairly new to Struts. I
 know some basics and
tried a few toy examples. Now it is time for a serious one.
 My project involes students.   Each student has her own page that might
 take her to pages that
are customized just for her.  I can not jus write a JSP page for each
student. For example, a
student is taking Eng101, Chem101, and CS120 this semester.  I fetch from
the database all the
info for these 3 classes she is taking.I do not want to put all the
info on the first page
after she logged in.  I want to have three links on the first page and take
her to a sub JSP page
for each specific class for example Eng101.jsp.  There are lots of
students. I can't write all the
pages for them.  In addition, it changes every semester what classes a
student takes.   My
question is how do I construct JSPs on the fly? I will need to use Tile.
What else do you suggest
me to look into? Thank you very much.
=
-
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]
 


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


RE: [OT] Auto comment generation

2005-02-17 Thread Slattery, Tim - BLS
> Anyone know of a tool (Eclipse plug-in perhaps?) that will 
> take a Java source file and put javadoc comments (a skeleton 
> basically) before each method, that will include all 
> parameters, methods and throws?, and then I just have to fill 
> in the details?  

Oracle JDeveloper (free from Oracle) has such a function.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Karan
Apart from all the other suggestions, if you're going to be doing this 
kind of work often you might want to look at Freemarker:
just create the template and retreive all customizable data from ur 
framework.

HTHs,
Karan
Yan Hu wrote:
Hello Guys:
  This is my first real Struts-based project. I am fairly new to Struts. I know 
some basics and
tried a few toy examples. Now it is time for a serious one.
  My project involes students.   Each student has her own page that might take 
her to pages that
are customized just for her.  I can not jus write a JSP page for each student. 
For example, a
student is taking Eng101, Chem101, and CS120 this semester.  I fetch from the 
database all the
info for these 3 classes she is taking.I do not want to put all the info on 
the first page
after she logged in.  I want to have three links on the first page and take her 
to a sub JSP page
for each specific class for example Eng101.jsp.  There are lots of students. I 
can t write all the
pages for them.  In addition, it changes every semester what classes a student 
takes.   My
question is how do I construct JSPs on the fly? I will need to use Tile. What 
else do you suggest
me to look into? Thank you very much.
=
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT] Auto comment generation

2005-02-17 Thread Frank W. Zammetti
Anyone know of a tool (Eclipse plug-in perhaps?) that will take a Java
source file and put javadoc comments (a skeleton basically) before each
method, that will include all parameters, methods and throws?, and then I
just have to fill in the details?  Thanks!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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



Re: common information in every view

2005-02-17 Thread Larry Meadors
The only thing I do not like about that solution is that it marries
you to both Struts and Tiles.

Both are fine tools, but I do not understand how they simplify the
process enough to justify using them over a simpler filter+jstl+tiles
solution.

Larry


On Thu, 17 Feb 2005 18:45:31 +0100, Mark Lowe <[EMAIL PROTECTED]> wrote:
> I agree that tiles controller is the nicest option in terms of design,
> but last time i use tiles controllers for exactly this problem I found
> that tiles controllers don't throw exceptions in such a way that a
> handler can deal with them, and an informative way during development.
> But they are a nice option.
> 
> > >>I'm not sure how I would reload this
> > >>after a change was made to the underlying database (or even detect
> > >>that a change was made).
> 
> You can repopulate the data whenever you like and from a struts action
> if you wish, the same way you would with httpsession or request.
> 
> Mark
> 
> On Thu, 17 Feb 2005 10:25:04 -0500, Bill Schneider <[EMAIL PROTECTED]> wrote:
> > >>3. load the menu options one time from the database and place in the
> > >>application scope.  While this is the best memory option (and probably
> > >>the most efficient for speed), I'm not sure how I would reload this
> > >>after a change was made to the underlying database (or even detect
> > >>that a change was made).
> >
> > How often do the menu options change in practice?  You might find that
> > they never actually change in your production environment, in which case
> > just shoving them in application scope is often sufficient.
> >
> > For the design pattern in general, you could consider using Tiles and a
> > Tiles controller, rather than using a base action class.  This would
> > give you greater separation of concerns: loading (possibly cached) menu
> > items is handled specifically by the tile that displays the menu, rather
> > than by each individual action.
> >
> > -- Bill
> > --
> > Bill Schneider
> > Chief Architect
> >
> > Vecna Technologies
> > 5004 Lehigh Rd., Suite B
> > College Park, MD 20740
> > [EMAIL PROTECTED]
> > t: 301-864-7253 x1140
> > f: 301-699-3180
> >
> >
> > -
> > 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]
> 
>

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



Newbie Page flow question

2005-02-17 Thread Nic Werner
Greetings,
   I've searched through the archives but can't really seem to find a 
solution. If one exists, please just point me there.

I have a form that is to be filled out. However, one of the fields needs 
to have a seperate lookup, and then return back to the original page 
with the results.

How do I create a form that lets a user enter some data in the fields, 
bring up a search page for one of the fields, and then returns back to 
the page, adding the new data from the results and keeping whatever 
they've already entered?

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


Re: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Mark Lowe
For example, a
student is taking Eng101, Chem101, and CS120 this semester

These all look like modules you'll want to search for "indexed
properties" on the archieves, and you'll start to see how to go about
this.

StudentBean student = new StudentBean();
CourseBean course = new Course();
course.setCode("ENG101");
course.setTitle("Introductory English");
student.addCourse(course);

request.setAttribute("student",student);

...


${course.code}


or







Mark


On Thu, 17 Feb 2005 11:48:51 -0500, Jerry Tan <[EMAIL PROTECTED]> wrote:
> 
> Hello Yan,
> 
> While the concept of constructing JSP's dynamically is an intriguing one, I
> am still of the opinion that you can handle your situation below in a more
> conventional manner.
> 
> For example, one simper way would be to have an array of String, which
> represents that particular student's course list for that particular
> semester.
> 
> Based on the values of contained in this array, you can construct the
> appropriate links to that particular course, e.g., ENG101.jsp, etc.
> 
> hth,
> 
>  Yan Hu
>  <[EMAIL PROTECTED]To:   Struts Users Mailing 
> List 
>  .com>cc:   (bcc: Jerry Tan/DTCC)
>   Subject:  Newbie--->Construct 
> JSPs on the fly
>  02/17/2005 11:43
>  AM
>  Please respond to
>  "Struts Users
>  Mailing List"
> 
> 
> Hello Guys:
>   This is my first real Struts-based project. I am fairly new to Struts. I
>   know some basics and
> tried a few toy examples. Now it is time for a serious one.
>   My project involes students.   Each student has her own page that might
>   take her to pages that
> are customized just for her.  I can not jus write a JSP page for each
> student. For example, a
> student is taking Eng101, Chem101, and CS120 this semester.  I fetch from
> the database all the
> info for these 3 classes she is taking.I do not want to put all the
> info on the first page
> after she logged in.  I want to have three links on the first page and take
> her to a sub JSP page
> for each specific class for example Eng101.jsp.  There are lots of
> students. I can't write all the
> pages for them.  In addition, it changes every semester what classes a
> student takes.   My
> question is how do I construct JSPs on the fly? I will need to use Tile.
> What else do you suggest
> me to look into? Thank you very much.
> 
> =
> 
> -
> 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: common information in every view

2005-02-17 Thread Mark Lowe
I agree that tiles controller is the nicest option in terms of design,
but last time i use tiles controllers for exactly this problem I found
that tiles controllers don't throw exceptions in such a way that a
handler can deal with them, and an informative way during development.
But they are a nice option.

> >>I'm not sure how I would reload this
> >>after a change was made to the underlying database (or even detect
> >>that a change was made).


You can repopulate the data whenever you like and from a struts action
if you wish, the same way you would with httpsession or request.

Mark

On Thu, 17 Feb 2005 10:25:04 -0500, Bill Schneider <[EMAIL PROTECTED]> wrote:
> >>3. load the menu options one time from the database and place in the
> >>application scope.  While this is the best memory option (and probably
> >>the most efficient for speed), I'm not sure how I would reload this
> >>after a change was made to the underlying database (or even detect
> >>that a change was made).
> 
> How often do the menu options change in practice?  You might find that
> they never actually change in your production environment, in which case
> just shoving them in application scope is often sufficient.
> 
> For the design pattern in general, you could consider using Tiles and a
> Tiles controller, rather than using a base action class.  This would
> give you greater separation of concerns: loading (possibly cached) menu
> items is handled specifically by the tile that displays the menu, rather
> than by each individual action.
> 
> -- Bill
> --
> Bill Schneider
> Chief Architect
> 
> Vecna Technologies
> 5004 Lehigh Rd., Suite B
> College Park, MD 20740
> [EMAIL PROTECTED]
> t: 301-864-7253 x1140
> f: 301-699-3180
> 
> 
> -
> 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: ?

2005-02-17 Thread Mark Lowe
Similar to c:url, rarely useful for media like stylesheet, javascripts
and images as appends session ids.

Mark


On Thu, 17 Feb 2005 10:11:49 -0700, Eric Lemle <[EMAIL PROTECTED]> wrote:
>  
> definition is ... Renders a URI
> 
> What exactly does this do?  Is it similar to  
> -Eric
> 
> Eric D. Lemle
> Senior Programmer / Analyst
> Intermountain Health Care
> 36 South State Street, Suite 1100
> Salt Lake City, Utah 84111
> United States of America (USA)
> (801) 442-3688 -- e-mail: [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]



?

2005-02-17 Thread Eric Lemle


Re: how to integrate struts project with hibernate?

2005-02-17 Thread Eric Lemle
I was referring to just the LabelValueBean class not the entire Struts
jar.



Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111 
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]


>>> [EMAIL PROTECTED] 2/16/2005 5:07:38 PM >>>
Not wrong, just a bit contradictory. ;-)

> LabelValueBean is just a data structure

I agree that LabelValueBean is a simple little data structure.

> Marrying is relative, aren't we all married to java.util anyway.

Major difference - java.util is core Java, Struts is not.

> If you always have web clients it will be helpful and if not I don't
think
> it will hurt or require other struts classes.

Huh? I think it would be nonsensical to include struts with a Swing
app for the sake of LabelValueBean. Sure, disk is cheap, but c'mon.
:-D

> I would just steal the struts one!

Exactly, it is so darn simple, why is it even in struts (if not for us
to steal)?

Steal the struts one, and call it your own - if only because you get
the benefit of not having a dependency from your DAO into struts.

Larry

-
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: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Jerry Tan

Hello Yan,

While the concept of constructing JSP's dynamically is an intriguing one, I
am still of the opinion that you can handle your situation below in a more
conventional manner.

For example, one simper way would be to have an array of String, which
represents that particular student's course list for that particular
semester.

Based on the values of contained in this array, you can construct the
appropriate links to that particular course, e.g., ENG101.jsp, etc.

hth,







   
  Yan Hu
   
  <[EMAIL PROTECTED]To:   Struts Users Mailing 
List 
  .com>cc:   (bcc: Jerry Tan/DTCC)  
   
   Subject:  Newbie--->Construct 
JSPs on the fly   
  02/17/2005 11:43  
   
  AM
   
  Please respond to 
   
  "Struts Users 
   
  Mailing List" 
   

   




Hello Guys:
   This is my first real Struts-based project. I am fairly new to Struts. I
   know some basics and
tried a few toy examples. Now it is time for a serious one.
   My project involes students.   Each student has her own page that might
   take her to pages that
are customized just for her.  I can not jus write a JSP page for each
student. For example, a
student is taking Eng101, Chem101, and CS120 this semester.  I fetch from
the database all the
info for these 3 classes she is taking.I do not want to put all the
info on the first page
after she logged in.  I want to have three links on the first page and take
her to a sub JSP page
for each specific class for example Eng101.jsp.  There are lots of
students. I canât write all the
pages for them.  In addition, it changes every semester what classes a
student takes.   My
question is how do I construct JSPs on the fly? I will need to use Tile.
What else do you suggest
me to look into? Thank you very much.


=


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





Re: Newbie--->Construct JSPs on the fly

2005-02-17 Thread Frank W. Zammetti
Do you really need to construct JSPs on-the-fly or do you instead need to
create a template that contains sections that are modified on a
per-student basis?

The student-specific page sounds to me from what you wrote to more or less
just be a links page with links to the classes specific to each student. 
That wouldn't require a separate JSP for each, just a database with the
classes a student is taking and perhaps addresses for the pages for each
class.  Just some usual JSP dynamic content there it seems.

By extension, do the same for each class... Don't literally have a JSP for
each class... instead, just have a JSP "template" that you insert the
class information from the database into.

You'd be down to just 2 JSPs for everything.

Am I missing a requirement somewhere?  If not, this seems pretty
straight-forward.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, February 17, 2005 11:43 am, Yan Hu said:
> Hello Guys:
>This is my first real Struts-based project. I am fairly new to Struts.
> I know some basics and
> tried a few toy examples. Now it is time for a serious one.
>My project involes students.   Each student has her own page that might
> take her to pages that
> are customized just for her.  I can not jus write a JSP page for each
> student. For example, a
> student is taking Eng101, Chem101, and CS120 this semester.  I fetch from
> the database all the
> info for these 3 classes she is taking.I do not want to put all the
> info on the first page
> after she logged in.  I want to have three links on the first page and
> take her to a sub JSP page
> for each specific class for example Eng101.jsp.  There are lots of
> students. I can’t write all the
> pages for them.  In addition, it changes every semester what classes a
> student takes.   My
> question is how do I construct JSPs on the fly? I will need to use Tile.
> What else do you suggest
> me to look into? Thank you very much.
>
>
> =
>
>
> -
> 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]



Newbie--->Construct JSPs on the fly

2005-02-17 Thread Yan Hu
Hello Guys:
   This is my first real Struts-based project. I am fairly new to Struts. I 
know some basics and
tried a few toy examples. Now it is time for a serious one.
   My project involes students.   Each student has her own page that might take 
her to pages that
are customized just for her.  I can not jus write a JSP page for each student. 
For example, a
student is taking Eng101, Chem101, and CS120 this semester.  I fetch from the 
database all the
info for these 3 classes she is taking.I do not want to put all the info on 
the first page
after she logged in.  I want to have three links on the first page and take her 
to a sub JSP page
for each specific class for example Eng101.jsp.  There are lots of students. I 
can’t write all the
pages for them.  In addition, it changes every semester what classes a student 
takes.   My
question is how do I construct JSPs on the fly? I will need to use Tile. What 
else do you suggest
me to look into? Thank you very much.


=


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



Customizing Validator

2005-02-17 Thread _3_Sergio Stateri Junior
Hi,
 
I´m trying to do a Validator class in Struts 1.2 with J2SE 1.4.2. I 
have got some sample codes, but all sample codes use Struts 1.1, and they don´t 
work at Struts 1.2... Can anyone send me a sample code of a Validator Class 
using Struts 1.2 ? Here´s the code that isn´t working with me:
 
 
package test.package;
 
import java.io.Serializable;
 
import javax.servlet.http.HttpServletRequest;
 
import org.apache.commons.validator.GenericValidator;
import org.apache.commons.validator.ValidatorAction;
import org.apache.commons.validator.util.ValidatorUtils;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.validator.Resources;
 
public class GenericFloatValueStrutsValidator implements Serializable {
 
public static boolean validateGenericFloatValue(
Object arg,
ValidatorAction va, 
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages actionMessages,
HttpServletRequest request) {
 
String floatValueAsString = ValidatorUtils.getValueAsString( arg, 
field.getProperty());
 
 
if (!GenericValidator.isBlankOrNull(floatValueAsString)) {
   try {
   if ( ( floatValueAsString.indexOf(".") != 
floatValueAsString.lastIndexOf(".") ) ||
   ( floatValueAsString.indexOf(",") != 
floatValueAsString.lastIndexOf(",") ) ||
   ( floatValueAsString.indexOf(",") != -1 && 
floatValueAsString.indexOf(".") != -1 ) ) {
   actionMessages.add( field.getKey(), new 
ActionMessage(field.getKey(),
Resources.getActionError(
request,
va,
field)) );
 
 return false;
  }
   } catch (Exception e) {
 e.printStackTrace();
 return false;
   }
}
 
return true;
}
 
}
 
 
validator-rules.xml:
 
 
 
 
 
validation.xml:
 

  

  

 
 
 
in the JSP file:
 

  
  <%= errosMyProperty %>

 
 
Thanks in advance,
 
Sergio Stateri Jr.
[EMAIL PROTECTED]


Re: how to integrate struts project with hibernate?

2005-02-17 Thread Bill Schneider
IMO, it is not wise to have your DAO return a list of LabelValueBean objects.
I would be more likely to use a Map or a simple bean to do that
instead of marrying your DAO layer to Struts.
Struts'  tag can introspect the label and value 
from the bean properties of your choice.  This works for *all* beans, 
not just LabelValueBeans.  If your own beans happen to have properties 
called "label" and "value",  will work out of 
the box.

-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7253 x1140
f: 301-699-3180
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: common information in every view

2005-02-17 Thread Bill Schneider
3. load the menu options one time from the database and place in the
application scope.  While this is the best memory option (and probably
the most efficient for speed), I'm not sure how I would reload this
after a change was made to the underlying database (or even detect
that a change was made).
How often do the menu options change in practice?  You might find that 
they never actually change in your production environment, in which case 
just shoving them in application scope is often sufficient.

For the design pattern in general, you could consider using Tiles and a 
Tiles controller, rather than using a base action class.  This would 
give you greater separation of concerns: loading (possibly cached) menu 
items is handled specifically by the tile that displays the menu, rather 
than by each individual action.

-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7253 x1140
f: 301-699-3180
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: You must specify exactly one of "forward", "href", or "page"

2005-02-17 Thread [EMAIL PROTECTED]
Check your relative path of image file give image fiel alone
Webappa name wil be appended automatically by struts
regards
Senthil
Vijay Kumar wrote:
Hai
I am new to struts I am using  to call a java script and
for displaying the images 
But it's giving an error javax.servlet.jsp.JspException: Cannot create
rewrite URL: java.net.MalformedURL
Exception: You must specify exactly one of "forward", "href", or "page" 
Can any one have the solution for this
Bye
vijay

 


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


Re: JavaScript Integer Validation - Leading zeros

2005-02-17 Thread snekse
> Although JavaScript is not Java, the language designers adopted the
> same syntax for integer literals that is found in Java (and C/C++/C#)
> ... integer literals with a leading 0 are interpreted to be octal
> literals, unless they start with 0x or 0X to indicate hexadecimal
> literals.
> 
> Craig

If this is true, then why does the validation pass when it does the
server side validation?  Isn't it just doing an Integer parse?

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



RE: Struts tags inside struts tags

2005-02-17 Thread Paul McCulloch
It is not possible. This a restriction of JSP rather than Struts.

One workaround would be:


 




Paul

> -Original Message-
> From: Ann Vah [mailto:[EMAIL PROTECTED]
> Sent: 17 February 2005 14:34
> To: Struts Users Mailing List
> Subject: Struts tags inside struts tags
> 
> 
> Is it not possible to use Struts tags inside struts tags? For 
> example, is not possible to do this:
> 
>  ">
> 
> thanks in advance
> 
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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



Re: You must specify exactly one of "forward", "href", or "page"

2005-02-17 Thread Jeff Beal
Don't use  to execute a JavaScript.  Just use plain old HTML.
-- Jeff
Vijay Kumar wrote:
Hai
 I am new to struts I am using  to call a java script and
for displaying the images 
But it's giving an error javax.servlet.jsp.JspException: Cannot create
rewrite URL: java.net.MalformedURL
Exception: You must specify exactly one of "forward", "href", or "page" 
Can any one have the solution for this
Bye
vijay


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


Struts tags inside struts tags

2005-02-17 Thread Ann Vah
Is it not possible to use Struts tags inside struts tags? For example, is not 
possible to do this:

 ">

thanks in advance



Re: common information in every view

2005-02-17 Thread Larry Meadors
Use a caching DAO layer (like iBATIS), and let it cache the data.
Then, to get the data, use a filter and have it run on requests for
resources that match "*.do" and "*.jsp". The filter can put the menu
into request scope (remember, it is just a reference to the menu, not
the entire menu structure, so it will be very lightweight).

It is then available everywhere, with a global and manageable cache. 

In addition, when you later decide that the menu should be application
or user specific, you have both the URI and the user requesting it.

Another benefit is that if you decide to use some other web framework,
you have no dependency on struts for your menu. The only requirement
you have is that it must be servlet based. Sorry, no .NET allowed. ;-)

Larry

On Wed, 16 Feb 2005 17:29:37 -0700, Mr Maillist <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am building an application that will store menu options in a
> database.  These menu options will display on every page in the
> application.  I am interested in finding the most efficient way of
> doing this.  My options as I see them are:
> 1. provide a base action for the entire site (similar to
> struts-mailreader) that will provide me with a method to load the menu
> information and store it in the request.  This option is heavy on
> database traffic.
> 2. still use the base action but store the information in the session
> when the user first visits the site.  This option is an awkward type
> of cache that might behave strangely with high volume to the site.
> 3. load the menu options one time from the database and place in the
> application scope.  While this is the best memory option (and probably
> the most efficient for speed), I'm not sure how I would reload this
> after a change was made to the underlying database (or even detect
> that a change was made).
> 
> I suppose that there is a final option which would be to use a
> chaching layer between for database transactions and go with option 1.
>  Is a base action the best approach?
> 
> thanks in advance for your comments.
> 
> -
> 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: [OT] For those who love fur, please take a look

2005-02-17 Thread Larry Meadors
This is TOTALLY inappropriate.

You have just won a free entry in my "delete immediately" filter.

Larry


On Thu, 17 Feb 2005 14:57:35 +0800, Koon Yue Lam <[EMAIL PROTECTED]> wrote:
> ** Be prepared, rate R **

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



Re: common information in every view

2005-02-17 Thread Mark Lowe
If the menu is to be the same for all users, then I'd have a servlet
that contructs the menu at startup and places it in the application
context.

Mark

On Wed, 16 Feb 2005 17:29:37 -0700, Mr Maillist <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am building an application that will store menu options in a
> database.  These menu options will display on every page in the
> application.  I am interested in finding the most efficient way of
> doing this.  My options as I see them are:
> 1. provide a base action for the entire site (similar to
> struts-mailreader) that will provide me with a method to load the menu
> information and store it in the request.  This option is heavy on
> database traffic.
> 2. still use the base action but store the information in the session
> when the user first visits the site.  This option is an awkward type
> of cache that might behave strangely with high volume to the site.
> 3. load the menu options one time from the database and place in the
> application scope.  While this is the best memory option (and probably
> the most efficient for speed), I'm not sure how I would reload this
> after a change was made to the underlying database (or even detect
> that a change was made).
> 
> I suppose that there is a final option which would be to use a
> chaching layer between for database transactions and go with option 1.
> Is a base action the best approach?
> 
> thanks in advance for your comments.
> 
> -
> 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: Interating through a Map [ which has DTO in the values ] using l ogic:iterate

2005-02-17 Thread Robert Taylor
It may be better to create a value object containing the Dept DTO and
its respective collection of EmpDetails DTO. Then you don't have to
"jump through hoops" when using Maps.






  
  



/robert
Sachin Bhutada wrote:
hi, 
   I have a HashMap which has Key and Value both as DTOs 

Key contains Dept DTO (Dept has Dept No, Dept Name)
Value contains Collection of EmpDetails DTO (It has Name, Email-Id,
etc information)
   In the jsp page I want to iterate through this Map using logic iterate
tag so that outpage html page should look like this..
  Dept No : Dept Name
	Emp One 	[EMAIL PROTECTED] 		.
	Emp Two 	[EMAIL PROTECTED] 		.
	and so on 
  Dept No 3 : Dept Name 3	
	Emp One 	[EMAIL PROTECTED] 		.
	Emp Two 	[EMAIL PROTECTED] 		.
	and so on ...

 To achieve this, I have written following code. For the time being I am
just concetrating on displaying the Department Details.. 

 
	  
   	   -- IT displayes the
Dept object name 

	When I try to use following code it shows error message 
	javax.servlet.jsp.JspException: No getter method for property
key.deptNo of bean element 
  	  
 

In my actionform class I have haspmap and getter and setter methods. 

How should I display deptNo and deptName in the Dept DTO ? 

Thanks in Advance
Sachin


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


Compiling STRUTS and STRUTS-FACES with servlet 2.4 and jsp 2.0

2005-02-17 Thread Ramiro Alba Queipo
Hello everybody:

I was using tomcat 4.0.24 to develop an application with struts, I and
decided to migrate to tomcat 5.0.28 so as I could user EL natively from
JSP 2.0. I thought it would be a good idea to compile STRUTS 1.2.4 under
servlet 2.4 and JSP 2.0 from tomcat 5.0.28. Everything went wright
except from one class:

org/apache/struts/upload/MultipartRequestWrapper.java

It is not implementing the following methods from interface
javax.servlet.ServletRequest corresponding to servlet-api.jar of tomcat
5.0.28:
 
public String getLocalName() {}
public String getLocalAddr() {}
public int getLocalPort() {} 
public int getRemotePort() {}

To bypass the problem I created trivial methods, and then I could
complete the compilation process. Everything seams to work, but in order
to work with tomcat 5.0.x:

1) Is it a good idea to make this compilation o better to stuck with
   the official binary supplied struts.jar?

2) Is this situation going to be solved in a near feature? (I have seen
no changes in struts 1.2.6)


I have found the same problem compiling struts-faces, which seams to be
compiled with servlet and jsp apis from tomcat 5.0.25

Thanks in advance

Regards



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



Re: Temp file being written to / with Font

2005-02-17 Thread Mark Benussi
Yes it did.
Original Message Follows
From: Shey Rab Pawo <[EMAIL PROTECTED]>
Reply-To: Shey Rab Pawo <[EMAIL PROTECTED]>
To: Mark Benussi <[EMAIL PROTECTED]>
CC: user@struts.apache.org
Subject: Re: Temp file being written to / with Font
Date: Wed, 16 Feb 2005 13:20:50 -0800
I was too fast in responding.  I switched to Tiger (jre 5.0) but still
have the same behavior when I create an image using a Font object.
Did the change to 5.0 solve your companies' problem?
On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Oh dear. I heard about something similar to this first time the other
> day.
>
> JDK 1.4 has a bug that does no release resources even when you release 
any
> Font objects.
>
> My company has had converstaion with Sun but what they ultimately 
recommend
> is upgrade to 1.5
>
> Sorry, I cant provide more than this.
>
>

--
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..
-
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: bean:message default value

2005-02-17 Thread lukas_oesterreicher
As noone has responded to my problem placing
a default value in case of a non-existent tag,
I found my own solution for it:

I created my own tld and corresponding class,
adding parameters like baseKey and defaultValue.

It was pretty easy: Just copy and past the existing
struts implementation and add the parameters to the
tld and their handling in the corresponding class.

I've spared you  the sources here, but I might
give them to you if you ask by sending a mail to me
(not the mailing list).

Lukas

Mapped properties and STRUTS-FACES

2005-02-17 Thread Ramiro Alba Queipo
Hello everybody:

I am trying to migrate from an struts application to STRUTS + JSF +
TILES. The problem I have is that the old struts application is using
heavily mapped properties at the action forms beans, and I can manage to
make them work under JSF. For example, at the old application:



and



does not work.

Is it possible to use "Mapped properties" with JSF or only classical
Java beans properties are working?

Thanks in advance

Cheers


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



Re: Regarding HTML:options tag

2005-02-17 Thread Pavel Kolesnikov
I guess you should better use the "collection" attribute instead of "name".
See http://struts.apache.org/userGuide/struts-html.html#options

Pavel


On Thu, 17 Feb 2005 14:05:06 +0530, Krishna Mohan Radhakrishnan
<[EMAIL PROTECTED]> wrote:
> 
> 
> HI,
> 
> I have one doubt regarding the use of html:options tag.
> 
> In the jsp itself I have got a set of values like List questions= "SOME
> VALUE OBTAINED FROM THE DATABASE- ie name value pairs".
> 
> In the jsp I have a html:options tag. 
> 
> I don't have any entries in the form bean for the collection . Only
> entry I have in the form bean corresponds to the property name I have
> given in the select tag.
> 
> Can anyone help
> Regards,
> Krishna MOhan
> 
> -
> 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]



Regarding HTML:options tag

2005-02-17 Thread Krishna Mohan Radhakrishnan


 
HI,

I have one doubt regarding the use of html:options tag.

In the jsp itself I have got a set of values like List questions= "SOME
VALUE OBTAINED FROM THE DATABASE- ie name value pairs".

In the jsp I have a html:options tag. 

I don't have any entries in the form bean for the collection . Only
entry I have in the form bean corresponds to the property name I have
given in the select tag.

 

Can anyone help
Regards,
Krishna MOhan


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



Re: log4j struts

2005-02-17 Thread Jan-Jaap Endenburg - Vera
Hi!
Can you give me an example of specifying log4j as init-param. within 
struts-config.xml?

Thanks,
Jan-Jaap
Ye, Young wrote:
yes, you can.
-Original Message-
From: Brian McGovern [mailto:[EMAIL PROTECTED]
Sent: 2005/02/16 4:48 PM
To: Struts Users Mailing List
Subject: log4j struts
I want to use log4j with my struts app.  Can I use the struts-config.xml to
specify log4j as an init parameter and point it to its external properties
file? Or do i have to make my own front controller servlet for that?
thanks
-
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]


Interating through a Map [ which has DTO in the values ] using l ogic:iterate

2005-02-17 Thread Sachin Bhutada


hi, 
   I have a HashMap which has Key and Value both as DTOs 

Key contains Dept DTO (Dept has Dept No, Dept Name)
Value contains Collection of EmpDetails DTO (It has Name, Email-Id,
etc information)
   In the jsp page I want to iterate through this Map using logic iterate
tag so that outpage html page should look like this..

  Dept No : Dept Name
Emp One [EMAIL PROTECTED]   .
Emp Two [EMAIL PROTECTED]   .
and so on 
  Dept No 3 : Dept Name 3   
Emp One [EMAIL PROTECTED]   .
Emp Two [EMAIL PROTECTED]   .
and so on ...

 To achieve this, I have written following code. For the time being I am
just concetrating on displaying the Department Details.. 

 
  
   -- IT displayes the
Dept object name 

When I try to use following code it shows error message 
javax.servlet.jsp.JspException: No getter method for property
key.deptNo of bean element 
  
 

In my actionform class I have haspmap and getter and setter methods. 

How should I display deptNo and deptName in the Dept DTO ? 

Thanks in Advance
Sachin