New twist on old topic? Back button issue with Token

2006-10-04 Thread pantichd

Hello,

Forgive me for bringing up what seems to be a topic that's been discussed
here a lot: Issues with the back button.

I am using the token mechanism to prevent multiple form submits.

My jsp is invoked with a ForwardAction where I set the token.

The jsp submits to an action that checks if the token is valid. So far, so
good. That works like a charm.

The problem, as is extensively pointed out in documentation everywhere, is
that there is nothing to prevent the user from hitting the browser back
button and submitting the form again. If the user hasn't changed anything on
the form then the resulting behavior (action class rejects the submit
because the token isn't valid anymore) is exactly what I want.

Where this scenario falls apart, though, is if the user changes some of the
values on the form before submitting the form again. At this point, the
logical thing (at least in the user's mind) is that the submit should be
accepted. However, the action will still think the token is invalid (because
it was never reset by the ForwardAction) and will therefore reject the
submittal.

OK, I understand why/how all this happens. My question is, how are others
dealing with this?

This is a pretty basic scenario that I'm sure anyone who has done Struts
development has run into. What are some of the solutions you've come up
with? 

I know I can put some text on the page(s) warning user NOT to use the back
button but there is no guarantee that they'll pay attention. 

I can also put some script that sets some hidden field value whenever any
input field on the form changes. However, that will kind of conflict with
the token mechanism and maybe even eliminate the need for the token
mechanism. The problem with that is ... what if user has Java Script turned
off.

Any feedback will be appreciated.
-- 
View this message in context: 
http://www.nabble.com/New-twist-on-old-topic--Back-button-issue-with-Token-tf2382440.html#a6639844
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: New twist on old topic? Back button issue with Token

2006-10-04 Thread pantichd



Chris Pratt wrote:
 
 How about basing the value of the tag on some computed value involving the
 data in question (like adding up all the hashcodes and using that as the
 token value).  Then if the data changes, it's a different token?
   (*Chris*)
 

Interesting! Hadn't thought of that. Have you used this method?

Thanks for the reply!
-- 
View this message in context: 
http://www.nabble.com/New-twist-on-old-topic--Back-button-issue-with-Token-tf2382440.html#a6646822
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: [OT] request.getServletPath() val not same in Filter Servlet

2006-08-25 Thread pantichd

The name of the app is 'app1'

The 'servlet' part of the address is required by the App Server (or
configurable somewhere that I don't know about). By the way, we're using
SAP's Netweaver Developer Studio. 

As for the web.xml setting... The only thing I have in web.xml is this
   servlet
servlet-nameServletName/servlet-name
servlet-classpackage.ServletName/servlet-class
/servlet

I don't have aservlet-mapping entry  for this particular servlet



David Friedman-2 wrote:
 
 First, is '/servlet' the name of your webapp?  If so then this might just
 make sense.  Why?
 
 The HttpServletRequest.getServletPath() object is described to:
 Returns the part of this request's URL that calls the servlet.
 
 In a filter, that is the mapping '/*' which as you wrote resulted
 in '/servlet'.  Well, assuming '/servlet' is the name of your webapp
 and not your servlet.
 
 In a servlet, how did you do your web.xml mapping for the servlet
 which resulted in this result '/servlet/package.ServletName' ?
 
 Regards,
 David
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5981994
Sent from the Struts - User forum at Nabble.com.


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



Re: [OT] request.getServletPath() val not same in Filter Servlet

2006-08-25 Thread pantichd

Hmm, that's a great tip. Wasn't aware of that. Now I just need to find out
where that invoker servlet is defined on the Netweaver platform.

Thanks!


Scott Van Wart-2 wrote:
 
 pantichd wrote:
 Hello,

 Sorry for posting this in Struts mailing list but I can't seem to get an
 answer on any other discussion groups. I've always had great results
 getting
 good answers here so here goes...

 I have a Filter in my app that uses the request.getServletPath() method
 to
 get the name of the page being invoked without the context path.

 This worked fine until I try to invoke a servlet. For example, if I
 invoke a
 url like http://localhost/app1/servlet/package.ServletName the result of
 calling request.getServletPath() is '/servlet'.

 However, if I make the same call when I'm in the servlet the result is
 '/servlet/package.ServletName'

 Why does it give a different result in the filter and the servlet?

 Thanks!

   
 AHH! http://tomcat.apache.org/faq/misc.html#invoker
 
 Use a different prefix or path for your servlets than servlet, no 
 matter how tempting it is.
 
 - Scott
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5982145
Sent from the Struts - User forum at Nabble.com.


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



Re: [OT] request.getServletPath() val not same in Filter Servlet

2006-08-25 Thread pantichd

Here is what I came up with to get around this issue.

Intead of using this:
 String requestedUrl = request.getServletPath();

I have started using this:
 String requestedUrl =
hreq.getRequestURI().replaceAll(hreq.getContextPath(), );

Does anyone know if there are any other issues (always seem to be) with this
way that'll get me in trouble?

Thanks everyone for all your help. 


pantichd wrote:
 
 Hello,
 
 Sorry for posting this in Struts mailing list but I can't seem to get an
 answer on any other discussion groups. I've always had great results
 getting good answers here so here goes...
 
 I have a Filter in my app that uses the request.getServletPath() method to
 get the name of the page being invoked without the context path.
 
 This worked fine until I try to invoke a servlet. For example, if I invoke
 a url like http://localhost/app1/servlet/package.ServletName the result of
 calling request.getServletPath() is '/servlet'.
 
 However, if I make the same call when I'm in the servlet the result is
 '/servlet/package.ServletName'
 
 Why does it give a different result in the filter and the servlet?
 
 Thanks!
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5982207
Sent from the Struts - User forum at Nabble.com.


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



RE: [OT] request.getServletPath() val not same in Filter Servlet

2006-08-24 Thread pantichd

David,

Maybe I'm missing something in your reply but I don't think I'm doing either
a forward or a dispatch. Here's the scenario...
- Simple app has (let's say) 10 pages
- A couple of pages are jsps using Struts forms. These are considered
'secure' pages and require a person to be logged in
- Some pages are straight html. These are 'unsecure' pages
- One page is a servlet. This is an 'unsecure' page
- App uses a Filter with a url-pattern of '/*'
- Filter interrogates the requested url to determine if requested page is a
'secure' page. 
- If request is for a secure page, and user is not logged in, the request is
redirected to a login page
- If request is not for a secure page then the doFilter method just does the
following:
 chain.doFilter(request, response);
 return;

My problem is that if the user requests the below address, the following
lines of code in the doFilter method get one result and the same lines of
code in the servlet give a different result.

requested address:
http://localhost/app1/servlet/package.ServletName 

doFilter code snippet:
HttpServletRequest hreq = (HttpServletRequest)request;
HttpServletResponse hres = (HttpServletResponse)response;
// This results in '/servlet'
String requestedUrl = hreq.getServletPath();
  
servlet code snippet:
// This results in '/servlet/package.ServletName'
String requestedUrl = hreq.getServletPath();



David Friedman-2 wrote:
 
 Are you doing a forward or a dispatch.   One of them handles mappings
 differently because you are inside the application already and won't use
 the
 filters a second time.   That is why the latest version of the servlet
 spec
 allows you to specify which one in your web.xml mappings.
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5964193
Sent from the Struts - User forum at Nabble.com.


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



[OT] request.getServletPath() val not same in Filter Servlet

2006-08-23 Thread pantichd

Hello,

Sorry for posting this in Struts mailing list but I can't seem to get an
answer on any other discussion groups. I've always had great results getting
good answers here so here goes...

I have a Filter in my app that uses the request.getServletPath() method to
get the name of the page being invoked without the context path.

This worked fine until I try to invoke a servlet. For example, if I invoke a
url like http://localhost/app1/servlet/package.ServletName the result of
calling request.getServletPath() is '/servlet'.

However, if I make the same call when I'm in the servlet the result is
'/servlet/package.ServletName'

Why does it give a different result in the filter and the servlet?

Thanks!

-- 
View this message in context: 
http://www.nabble.com/-OT--request.getServletPath%28%29-val-not-same-in-Filter---Servlet-tf2152125.html#a5943443
Sent from the Struts - User forum at Nabble.com.


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



Re: Need to do pagination but can't use DisplayTag

2006-08-16 Thread pantichd

Martin,

Did you mean to send this link as reply to my post? Although it is a good
overview of Struts I didn't see something in it that dealt with my issue.

I could have missed it. If that's the case maybe you can direct me to the
page that contains the relevant information.  : )

Thanks!


Martin Gainty wrote:
 
 Using Jsp2.0 with Struts
 http://64.233.161.104/search?q=cache:GETP5dJY3B8J:courses.coreservlets.com/Course-Materials/pdf/struts/03-Struts-Beans.pdf+%22JSP+2.0%22+AND+%22Beans%22+AND+%22package%22hl=engl=usct=clnkcd=10
 I would recommend JDeveloper for an IDE although many environments which
 will acommodate JSP 2.0
 
 M-
 *
 This email message and any files transmitted with it contain confidential
 information intended only for the person(s) to whom this email message is
 addressed.  If you have received this email message in error, please
 notify
 the sender immediately by telephone or email and destroy the original
 message without making a copy.  Thank you.
 
 
 
 - Original Message - 
 From: pantichd [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Tuesday, August 15, 2006 10:19 PM
 Subject: RE: Need to do pagination but can't use DisplayTag
 
 
 
 
 David,
 
 Thanks for the reply. It's encouraging to hear that you were able to use
 it
 with JSP 1.2. According to this link it requires JSP 2.0
 http://displaytag.sourceforge.net/11/displaytag/dependencies.html
 
 When I try to run a very simple JSP using the tag I get this message:
 
 com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException:
 Cannot parse custom tag with short name table.
 
 I know that's an SAP-specific error but when I contacted SAP support
 they,
 of course, blamed it on the DisplayTag requires JSP 2.0.  So I'm back
 to
 trying to figure this out on my own (and with the help of this group).
 
 Could you tell me what tld you used? Also, what version of the dtd?
 
 Any help would be greatly appreciated.
 
 
 David Friedman-2 wrote:
 
 I've used displaytag 1.X in JSP 1.2. Did you subscribe to
 their mailing list for installation help?  Have you also
 tried http://valuelist.sourceforge.net ?
 
 Regards,
 David
 
 -Original Message-
 From: pantichd [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 3:47 PM
 To: user@struts.apache.org
 Subject: Need to do pagination but can't use DisplayTag
 
 Hello,
 
 We are using SAP's Netweaver Developer Studio (NDS) to develop Struts
 applications.
 
 We want to implement pagination but we can't use DisplayTag because it
 requires JSP 2.0/Servlet 2.4. Unfortunately, NDS only supports JSP 1.2 +
 servlet 2.3.
 
 Can anyone recommend some other framework that would allow us to
 implement
 pagination?
 
 Thanks!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5824425
 Sent from the Struts - User forum at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

 

-- 
View this message in context: 
http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5831627
Sent from the Struts - User forum at Nabble.com.


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



Re: Choices, choices...How does one choose a taglib for displaying tables?

2006-08-16 Thread pantichd

Thanks Dave,

I have passed the info on to SAP's support and I'm trying some other things
to see if I can get it working.

I'd also like to try an older version of DisplayTag but all I can find is
1.1. Where would I find an earlier version for download?

Oh, and thanks for the reminder about the display tag mailing list. I don't
know why I didn't think of that. I always come to the Struts list first.  :
)



David Durham wrote:
 
 pantichd wrote:
 Some would say that variety is good and I agree but I also want to make
 sure
 we choose something that will work well with Struts and will be
 supported/enhanced going forward.
 
 I think displaytag is a reasonable choice.  There are displaytag forums 
 and displaytag mailing lists hosted by sourceforge.  You may get more 
 help there.  But, if you look in displaytag.tld (it's in META-INF/ of 
 displaytag.jar), the JSP version is 1.2 (I'm referring to 
 displaytag-1.1), so maybe you can give that info to your vendor with the 
 hope of getting a more helpful response.  Another thing to try is 
 deploying the displaytag examples war included in the binary (not sure 
 about source) distribution.  If that works, then you can get your app to 
 work.  If the example app doesn't work, then the problem is likely a bit 
 more tricky to find.
 
 Another option is to use an older version of displaytag.  Realise you're 
 looking for something that will be enhanced going forward, but you may 
 need to drop that aspect of your requirements if you're tied to older 
 versions of the Servlets and JSP specs (but not necessarily).
 
 
 -Dave
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Choices%2C-choices...How-does-one-choose-a-taglib-for-displaying-tables--tf2112352.html#a5835783
Sent from the Struts - User forum at Nabble.com.


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



Re: Choices, choices...How does one choose a taglib for displaying tables?

2006-08-16 Thread pantichd

Frank,

It doesn't *have* to be a taglib but it's preferred because the developers
we support are already used to working with taglib but not really all that
familiar with JavaScript. 

I took a look at both of the tools you suggested. Nice!! 

Would love to try those but I'm afraid it won't help us with the situation
we're in right now because it would require going through the whole process
of justifying buying new software and then going through the approval
process, blah, blah, blah. Any of you who work in a large corporation know
what I'm talking about.   : (

Thanks Frank!


Frank W. Zammetti wrote:
 
 Does it *have* to be a taglib?  And does it have to be free?  If the 
 answer to both is no, I *very* highly recommend:
 
 www.activewidgets.com
 
 I did about a weeks' worth of research last month trying to find the 
 best grid widget I could, and that one floated to the top pretty 
 quickly... the only other that was comparable over all was this:
 
 http://scbr.com/docs/products/dhtmlxGrid/index.shtml
 
 I can't vouch for that one because I actually discovered it only after 
 deciding on ActiveWidgets, but I can absolutely give an endorsement to 
 ActiveWidgets.  Been using it for a few weeks now, it's really fantastic.
 
 Frank
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Choices%2C-choices...How-does-one-choose-a-taglib-for-displaying-tables--tf2112352.html#a5835916
Sent from the Struts - User forum at Nabble.com.


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



RE: Choices, choices...How does one choose a taglib for displaying tables?

2006-08-16 Thread pantichd

Thanks for the info Dave.

My bad about the SAP comment. I had started another post
(http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html)
specifically about the DisplayTag and in that post I noted that we were
using SAP. 

When I updated this post I didn't refer to that post.

Sorry about that!


David Friedman-2 wrote:
 
 Psst the DisplayTag download page is what you want:
 http://displaytag.sourceforge.net/11/download.html
 
 CLICKing through to it shows v1.1.  SCROLL down and
 you can download v1.0 an v1.0-rc2.  CLICK right below
 that and the links shows old versions 0.8.6 (I started
 with that ages ago) and 0.8.5 via the link:
 http://sourceforge.net/project/showfiles.php?group_id=73068package_id=73060
 
 I must have missed something in your first post as to
 why you would pass this on to SAP when you are simply
 a developer using their studio product.  Well, that is
 if I read your previous post correctly.  Just so they
 (SAP) know of this resource in case other clients ask
 or am I missing something important from a different
 post?
 
 Regards,
 David
 
 

-- 
View this message in context: 
http://www.nabble.com/Choices%2C-choices...How-does-one-choose-a-taglib-for-displaying-tables--tf2112352.html#a5837204
Sent from the Struts - User forum at Nabble.com.


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



Re: Need to do pagination but can't use DisplayTag

2006-08-16 Thread pantichd

Thank you very much Wendy!


Wendy Smoak-3 wrote:
 
 On 8/15/06, pantichd [EMAIL PROTECTED] wrote:
 
 Thanks for the reply. It's encouraging to hear that you were able to use
 it
 with JSP 1.2. According to this link it requires JSP 2.0
 http://displaytag.sourceforge.net/11/displaytag/dependencies.html
 
 Those are the docs for Displaytag 1.1.
 
 Displaytag 1.0 works with Servlet 2.3/JSP 1.2.  Here is the dependencies
 page:
http://displaytag.sourceforge.net/10/dependencies.html
 
 You can download version 1.0 here:
http://sourceforge.net/project/showfiles.php?group_id=73068
 
 -- 
 Wendy
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5840359
Sent from the Struts - User forum at Nabble.com.


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



Need to do pagination but can't use DisplayTag

2006-08-15 Thread pantichd

Hello,

We are using SAP's Netweaver Developer Studio (NDS) to develop Struts
applications.

We want to implement pagination but we can't use DisplayTag because it
requires JSP 2.0/Servlet 2.4. Unfortunately, NDS only supports JSP 1.2 +
servlet 2.3.

Can anyone recommend some other framework that would allow us to implement
pagination?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5820748
Sent from the Struts - User forum at Nabble.com.


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



Re: Need to do pagination but can't use DisplayTag

2006-08-15 Thread pantichd

Just wanted to add that we'vefound the taglib below and it looks promising
but it's also old and I'm worried about going with something that's not as
widely supported (and used?) as DisplayTag
http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html
-- 
View this message in context: 
http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5820880
Sent from the Struts - User forum at Nabble.com.


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



RE: Need to do pagination but can't use DisplayTag

2006-08-15 Thread pantichd


David,

Thanks for the reply. It's encouraging to hear that you were able to use it
with JSP 1.2. According to this link it requires JSP 2.0
http://displaytag.sourceforge.net/11/displaytag/dependencies.html

When I try to run a very simple JSP using the tag I get this message:

com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException:
Cannot parse custom tag with short name table.

I know that's an SAP-specific error but when I contacted SAP support they,
of course, blamed it on the DisplayTag requires JSP 2.0.  So I'm back to
trying to figure this out on my own (and with the help of this group).

Could you tell me what tld you used? Also, what version of the dtd?

Any help would be greatly appreciated.


David Friedman-2 wrote:
 
 I've used displaytag 1.X in JSP 1.2. Did you subscribe to
 their mailing list for installation help?  Have you also
 tried http://valuelist.sourceforge.net ?
 
 Regards,
 David
 
 -Original Message-
 From: pantichd [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 3:47 PM
 To: user@struts.apache.org
 Subject: Need to do pagination but can't use DisplayTag
 
 Hello,
 
 We are using SAP's Netweaver Developer Studio (NDS) to develop Struts
 applications.
 
 We want to implement pagination but we can't use DisplayTag because it
 requires JSP 2.0/Servlet 2.4. Unfortunately, NDS only supports JSP 1.2 +
 servlet 2.3.
 
 Can anyone recommend some other framework that would allow us to implement
 pagination?
 
 Thanks!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Need-to-do-pagination-but-can%27t-use-DisplayTag-tf229.html#a5824425
Sent from the Struts - User forum at Nabble.com.


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



Choices, choices...How does one choose a taglib for displaying tables?

2006-08-15 Thread pantichd

Hello,

We have a need to display tabular data in a Struts application. Seems simple
enough. Start researching but all off a sudden it's not so simple.

just a quick search finds a bunch of different frameworks (DisplayTag,
ValueList, TableTag, PagerTag).

Some would say that variety is good and I agree but I also want to make sure
we choose something that will work well with Struts and will be
supported/enhanced going forward.

Is there a preferred or recommended tag lib that should be used with Struts?

By the way, we're on Struts 1.2.7 and using JSP 1.2 and servlet 2.3.
Unfortunately, we cannot upgrade to a higher level off JSP/Servlet because
of the App Server (SAP's Netweaver) we're using.
-- 
View this message in context: 
http://www.nabble.com/Choices%2C-choices...How-does-one-choose-a-taglib-for-displaying-tables--tf2112352.html#a5824428
Sent from the Struts - User forum at Nabble.com.


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



Re: Can Action class send user to url not in struts-config.xml?

2006-07-21 Thread pantichd

After doing some more research ran into some posts about ActionRedirect. 

Would this be a better fit for what I'm trying to do?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Can-Action-class-send-user-to-url-not-in-struts-config.xml--tf1968310.html#a5438442
Sent from the Struts - User forum at Nabble.com.


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



Can Action class send user to url not in struts-config.xml?

2006-07-19 Thread pantichd

Hello,

Is there a way for an action class to send a user to a url other than those
defined as forwards in the struts-config.xml file?

My situation is this:
A filter checks every request in the system to verify that the user has
logged in. If not, the user is sent to the login.jsp page.

The login.jsp executes a login action class that has a forward for a
successful and unsuccessful login. 

The action class is a generic class that can be used by different apps. I
want to customize it so that an app can specify that a user should be sent
to the original url requested upon a successful login.

I don't know how to accomplish that if I don't have the url specified as a
forward in the struts-config.xml.

Thanks in advance for any help.

David.
-- 
View this message in context: 
http://www.nabble.com/Can-Action-class-send-user-to-url-not-in-struts-config.xml--tf1968310.html#a5402595
Sent from the Struts - User forum at Nabble.com.


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



Re: Can Action class send user to url not in struts-config.xml?

2006-07-19 Thread pantichd

Thanks Adam!



Adam Hardy-3 wrote:
 
 String forwardUrl = /private/payments.do? + customQueryString;
 forward = new ActionForward(anyName, forwardUrl, false); 
 
 
 But I would recommend against going down that route, or at least try to
 keep it really simple. 
 
 
-- 
View this message in context: 
http://www.nabble.com/Can-Action-class-send-user-to-url-not-in-struts-config.xml--tf1968310.html#a5405946
Sent from the Struts - User forum at Nabble.com.


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



ValidatorActionForm vs ValidatorForm

2006-05-25 Thread pantichd

Hello,

I'm struggling to understand the difference between the ValidatorActionForm
and the ValidatorForm. 

The main difference I find in API is that the key passed into the
ValidatorForm is the action element's 'name' attribute from the
struts-config.xml and the key passed into the ValidatorActionForm is the
action element's 'path' attribute from the struts-config.xml

I understand that part but not the significance. 
  
In what situation(s) would I choose one over the other? 

Thanks in advance for any responses. Sorry for being dense.  : )

David.
--
View this message in context: 
http://www.nabble.com/ValidatorActionForm+vs+ValidatorForm-t1682623.html#a4563821
Sent from the Struts - User forum at Nabble.com.


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



RE: ValidatorActionForm vs ValidatorForm

2006-05-25 Thread pantichd

Makes sense. At least reading it here. 

I'll try it out and see if it still makes sense when I'm doing code.  : )

Thanks a lot!
--
View this message in context: 
http://www.nabble.com/ValidatorActionForm+vs+ValidatorForm-t1682623.html#a4564295
Sent from the Struts - User forum at Nabble.com.


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



Getting a list of fields in a form along with their values

2006-05-24 Thread pantichd
Hello,

The DynaActionForm class has a method called getMap which Returns the Map
containing the property values

We've found this quite useful for some of the things we need to do. I am
looking for a similar method in the ActionForm  ValidatorForm but I can't
find anything.

Can someone tell me if there is an easy way to get all the property keys
along with their values from those two classes?

Thanks in advance for any help.


David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: Getting a list of fields in a form along with their values

2006-05-24 Thread pantichd
Hello,

Sorry to be impatient. Does anyone know if what I'm asking is possible? If
my question isn't clear, please let me know and I'll be glad to elaborate.

If this isn't the right forum to ask this question please let me know.

Thanks!

David



   
 David Z.  
 Pantich/OE/FirstE 
 nergy  To 
   Struts Users Mailing List 
 05/24/2006 07:42  user@struts.apache.org
 AM cc 
   
   Subject 
   Getting a list of fields in a form  
   along with their values(Document
   link: David Z. Pantich) 
   
   
   
   
   
   



Hello,

The DynaActionForm class has a method called getMap which Returns the Map
containing the property values

We've found this quite useful for some of the things we need to do. I am
looking for a similar method in the ActionForm  ValidatorForm but I can't
find anything.

Can someone tell me if there is an easy way to get all the property keys
along with their values from those two classes?

Thanks in advance for any help.


David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: DynaActionForm

2006-05-24 Thread pantichd

Marcus,

I apologize for attaching my question to your thread. I honestly have no
idea how I managed to do that.

I'll just create a new post with my question.

David
--
View this message in context: 
http://www.nabble.com/DynaActionForm-t1674521.html#a4543726
Sent from the Struts - User forum at Nabble.com.


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



Getting a list of fields in a form

2006-05-24 Thread pantichd

Hello, 

The DynaActionForm class has a method called getMap which Returns the Map 
containing the property values 

We've found this quite useful for some of the things we need to do. I am 
looking for a similar method in the ActionForm  ValidatorForm but I can't 
find anything. 

Can someone tell me if there is an easy way to get all the property keys 
along with their values from those two classes? 

Thanks in advance for any help. 

David 

PS - I somehow posted this originally as a response to someone else's
thread. Sorry for the mixup.

--
View this message in context: 
http://www.nabble.com/Getting+a+list+of+fields+in+a+form-t1675847.html#a4543759
Sent from the Struts - User forum at Nabble.com.


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



Re: [OT] Survey - how do others accomplish this...

2006-04-21 Thread pantichd
I hope it's ok that I'm asking this here. I know it's not technically a
Struts-related question.

Based on the link Wendy provided, I googled ServletContextListener and
found this
(http://www.stardeveloper.com/articles/display.html?article=200901page=1)
 which sounded like exactly what I'm looking for.  Thanks Wendy!

Also, liked the SessionListener example later in the article and tried it.
It seems to increment the activeSessions counter just fine as long as the
session is being created by a jsp or servlet. However, it doesn't seem to
do anything if I open a new browser window and bring up a simple html page
in that webapp. I'm sure there is a good explanation for it but I don't
understand.

Can anyone explain it to me?

Would this be a good way to monitor how many active sessions a webapp has
or is there a better, more efficient, more standard way of doing it?

Thanks!

David



   
 Wendy Smoak 
 [EMAIL PROTECTED] 
   To 
   Struts Users Mailing List 
 04/20/2006 02:11  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re: [OT] Survey - how do others 
   Struts Users   accomplish this...  
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




On 4/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 I thought a cleaner way would be to have a servlet that starts when the
 webapp starts. The servlet would look up the values in some database (or
 properties file(s)) and place the values in the app context. Initially,
we
 thought about doing this at the time a user logs into the site but
storing
 that info in everybody's session is inefficient.

 How have others dealt with this? Thanks for any feedback.

From this morning. :)

http://www.nabble.com/Re%3A-Class-that-%22listens%22-is-app-%22alive%22-p4008084.html


--
Wendy

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




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: date picker (tried javawebparts but facing problem)

2006-04-21 Thread pantichd
Frank,

You mention CalendarTag. Is that some third-party tag that extends struts
tags? I can't find any info on it.

Could you send me a link to example(s) or documentation about it?

Thanks!


David



   
 Frank W. 
 Zammetti 
 [EMAIL PROTECTED]  To 
 com  user@struts.apache.org  
cc 
 04/21/2006 12:17  
 AMSubject 
   Re: date picker (tried javawebparts 
   but facing problem) 
 Please respond to 
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




Hi Vijay,

Sorry, didn't see this earlier...

 From: *vijay r* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 Date: Apr 20, 2006 3:21 PM
 Subject: date picker (tried javawebparts but facing problem)
 To: Struts Users Mailing List user@struts.apache.org
 mailto:user@struts.apache.org

 Hello,

 I need to use a data picker. I tried javawebparts but I am getting the
 problem of class version incompatibility for class 'CalendarTag'. I am
 using WAS 5.0 which is based on JDK 1.3.

 Is there a version of javawebparts for JDK 1.3 which I can use. Or is
 there any other free date picker available.

Unfortunately we have standardized JWP on JDK 1.4 (for the time being...
I'm sure we'll bump to 5 at some point).  However, I do not believe
there is anything 1.4-specific in the CalendarTag... so, you could
certainly pull out the tag class and compile it with 1.3, it should work
just fine.

Also, since that tag is really just rendering a big chunk of Javascript,
if you have a machine with 1.4 laying around, you could just run the
sample app and then grab the rendered Javascript and markup.  Remove any
version concerns altogether :)  Of course, the tag makes things a bit
nicer, but you do have the option.

 regards,
 vijay.

HTH,
Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



RE: date picker (tried javawebparts but facing problem)

2006-04-21 Thread pantichd
Thank you very much!


David



   
 George.Dinwiddie 
 @wellsfargo.com  
To 
 04/21/2006 05:18  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to RE: date picker (tried javawebparts 
   Struts Users   but facing problem) 
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




http://cvs.sourceforge.net/viewcvs.py/javawebparts/javawebparts/WEB-INF/
src/javawebparts/taglib/uiwidgets/CalendarTag.java?rev=1.3view=log

or http://tinyurl.com/efdrt

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 21, 2006 3:11 PM
 To: Struts Users Mailing List
 Subject: Re: date picker (tried javawebparts but facing problem)


 Frank,

 You mention CalendarTag. Is that some third-party tag that
 extends struts tags? I can't find any info on it.

 Could you send me a link to example(s) or documentation about it?

 Thanks!


 David





  Frank W.

  Zammetti

  [EMAIL PROTECTED]
   To
  com  user@struts.apache.org


   cc
  04/21/2006 12:17

  AM
  Subject
Re: date picker (tried
 javawebparts
but facing problem)

  Please respond to

Struts Users

Mailing List

  [EMAIL PROTECTED]

   he.org









 Hi Vijay,

 Sorry, didn't see this earlier...

  From: *vijay r* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  Date: Apr 20, 2006 3:21 PM
  Subject: date picker (tried javawebparts but facing problem)
  To: Struts Users Mailing List user@struts.apache.org
  mailto:user@struts.apache.org
 
  Hello,
 
  I need to use a data picker. I tried javawebparts but I am
 getting the
  problem of class version incompatibility for class
 'CalendarTag'. I am
  using WAS 5.0 which is based on JDK 1.3.
 
  Is there a version of javawebparts for JDK 1.3 which I can
 use. Or is
  there any other free date picker available.

 Unfortunately we have standardized JWP on JDK 1.4 (for the
 time being... I'm sure we'll bump to 5 at some point).
 However, I do not believe there is anything 1.4-specific in
 the CalendarTag... so, you could certainly pull out the tag
 class and compile it with 1.3, it should work just fine.

 Also, since that tag is really just rendering a big chunk of
 Javascript, if you have a machine with 1.4 laying around, you
 could just run the sample app and then grab the rendered
 Javascript and markup.  Remove any version concerns
 altogether :)  Of course, the tag makes things a bit nicer,
 but you do have the option.

  regards,
  vijay.

 HTH,
 Frank

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM: fzammetti
 Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Java Web Parts -
 http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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




 -
 The information contained in this message is intended only
 for the personal and confidential use of the recipient(s)
 named above. If the reader of this message is not the
 intended recipient or an agent responsible for delivering it
 to the intended recipient, you are hereby notified that you
 have received this document in error and that any review,
 dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication
 in error, please notify us immediately, and delete the
 original message.


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



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

Re: date picker (tried javawebparts but facing problem)

2006-04-21 Thread pantichd
Great. Thanks very much!


David Z. Pantich
FirstEnergy Corp.
E-mail: [EMAIL PROTECTED]
Phone:(330) 315-6775
Mail Stop: Ghent 308A



   
 Frank W. 
 Zammetti 
 [EMAIL PROTECTED]  To 
 com  Struts Users Mailing List   
   user@struts.apache.org
 04/21/2006 06:02   cc 
 PM
   Subject 
   Re: date picker (tried javawebparts 
 Please respond to but facing problem) 
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




CalendarTag is one of the tags in the Java Web Parts UIWidgets package.
  Here's the javadoc for it:

http://javawebparts.sourceforge.net/javadocs/javawebparts/taglib/uiwidgets/CalendarTag.html


There's only two widgets in that package right now, this and Swapper
(one of these here's two boxes with items on the left, now you can
select some and click an arrow to move them to the right, and re-order
them, etc things), but there are others on the way.  These ARE NOT
Struts-specific (or even Struts-aware), they should work with just about
any framework.

Frank

[EMAIL PROTECTED] wrote:
 http://cvs.sourceforge.net/viewcvs.py/javawebparts/javawebparts/WEB-INF/
 src/javawebparts/taglib/uiwidgets/CalendarTag.java?rev=1.3view=log

 or http://tinyurl.com/efdrt

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 21, 2006 3:11 PM
 To: Struts Users Mailing List
 Subject: Re: date picker (tried javawebparts but facing problem)


 Frank,

 You mention CalendarTag. Is that some third-party tag that
 extends struts tags? I can't find any info on it.

 Could you send me a link to example(s) or documentation about it?

 Thanks!


 David





  Frank W.

  Zammetti

  [EMAIL PROTECTED]
   To
  com  user@struts.apache.org


   cc
  04/21/2006 12:17

  AM
  Subject
Re: date picker (tried
 javawebparts
but facing problem)

  Please respond to

Struts Users

Mailing List

  [EMAIL PROTECTED]

   he.org









 Hi Vijay,

 Sorry, didn't see this earlier...

 From: *vijay r* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 Date: Apr 20, 2006 3:21 PM
 Subject: date picker (tried javawebparts but facing problem)
 To: Struts Users Mailing List user@struts.apache.org
 mailto:user@struts.apache.org

 Hello,

 I need to use a data picker. I tried javawebparts but I am
 getting the
 problem of class version incompatibility for class
 'CalendarTag'. I am
 using WAS 5.0 which is based on JDK 1.3.

 Is there a version of javawebparts for JDK 1.3 which I can
 use. Or is
 there any other free date picker available.
 Unfortunately we have standardized JWP on JDK 1.4 (for the
 time being... I'm sure we'll bump to 5 at some point).
 However, I do not believe there is anything 1.4-specific in
 the CalendarTag... so, you could certainly pull out the tag
 class and compile it with 1.3, it should work just fine.

 Also, since that tag is really just rendering a big chunk of
 Javascript, if you have a machine with 1.4 laying around, you
 could just run the sample app and then grab the rendered
 Javascript and markup.  Remove any version concerns
 altogether :)  Of course, the tag makes things a bit nicer,
 but you do have the option.

 regards,
 vijay.
 HTH,
 Frank

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM: fzammetti
 Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Java Web Parts -
 http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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




 -
 The information contained in this message is intended only
 for the personal and confidential 

[OT] Survey - how do others accomplish this...

2006-04-20 Thread pantichd
Hello,

I'm looking for an elegant and simple solution to something that I'm sure
others have dealt with already. Don't want to reinvent the wheel so I
thought might help to hear from others on how they're handling it.

We have many webapps that need access to some common (mostly static) data
for doing validations or populating dropdowns, radio buttons, etc. Some
examples are lists of operating companies, company locations and/or company
holidays, etc.

A long time ago, someone here coded a utility class with static methods.
The static methods return values which are hardcoded in the code. This
works OK as long as the data NEVER changes. If it does, we have to
recompile the class and tell everyone to get the new copy of the class in
their app.

I thought a cleaner way would be to have a servlet that starts when the
webapp starts. The servlet would look up the values in some database (or
properties file(s)) and place the values in the app context. Initially, we
thought about doing this at the time a user logs into the site but storing
that info in everybody's session is inefficient.

How have others dealt with this? Thanks for any feedback.


David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: [OT] Survey - how do others accomplish this...

2006-04-20 Thread pantichd
Oh man, do I feel stupid now. I missed that one. SORRY!

Thanks Wendy


David



   
 Wendy Smoak 
 [EMAIL PROTECTED] 
   To 
   Struts Users Mailing List 
 04/20/2006 02:11  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re: [OT] Survey - how do others 
   Struts Users   accomplish this...  
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




On 4/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 I thought a cleaner way would be to have a servlet that starts when the
 webapp starts. The servlet would look up the values in some database (or
 properties file(s)) and place the values in the app context. Initially,
we
 thought about doing this at the time a user logs into the site but
storing
 that info in everybody's session is inefficient.

 How have others dealt with this? Thanks for any feedback.

From this morning. :)

http://www.nabble.com/Re%3A-Class-that-%22listens%22-is-app-%22alive%22-p4008084.html


--
Wendy

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




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: [OT] Survey - how do others accomplish this...

2006-04-20 Thread pantichd
I know you didn't.   : )

Well, one good thing that came out my goof was that I found out about
http://www.nabble.com.

Thanks again Wendy!

David



   
 Wendy Smoak 
 [EMAIL PROTECTED] 
   To 
   Struts Users Mailing List 
 04/20/2006 02:33  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re: [OT] Survey - how do others 
   Struts Users   accomplish this...  
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




On 4/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 Oh man, do I feel stupid now. I missed that one. SORRY!

That wasn't my intent, I just started writing a response and partway
through realized it sounded awfully familiar!  There's too much
traffic to expect anyone to read and remember every single message.

--
Wendy

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




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Can't figure out how to do if then else with Struts logic tags

2006-04-18 Thread pantichd
Hello,

Is it possible to do if then else type of processing using Struts Logic
tags? I don't see anything in the Struts Logic tags documentation at this
link  http://struts.apache.org/struts-doc-1.2.7/userGuide/struts-logic.html

Here's my situation:
1) I want to put in some logic in all my jsps to check if a user has
authenticated.
2) If user has not then I want the page to display a simple message saying
that login is required and include a link back to login page.
3) If user HAS authenticated I want the page to display the normal stuff
(e.g. content, struts form, etc) that the page is intended for.
4) Upon valid login, a user object is placed in session and it will have a
boolean property called authenticated

I know I could do something like this

...
logic:equal name=user property=authorized value=false
  h3You must be logged in to view this page. Please login a href=
login.jsphere/a/h3
/logic:equal
logic:equal name=user property=authorized value=true
  Thank you for loggin in... Normal stuff for this page
/logic:equal


One of the problems is that I also need to check if the user session object
is null because a user could have tried to go directly to an internal
(after login page) page using a bookmark. How can I check for the presence
of an object in the session?


Any help would be greatly appreciated.

Thanks.

David.


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: Can't figure out how to do if then else with Struts logic tags

2006-04-18 Thread pantichd
Dave,

I totally agree with you about doing this kind of checking in an action
class and I AM doing it there. However, the problem is that I still need a
way to prevent a user from going to the jsp w/o first logging in.

Let's say the user logged in during a previous session and bookmarked the
jsp.  They can get back to it w/o having to login. I know that once they
submit the form  the action class will catch that they're not logged in and
send them back to login page. But I'd rather catch it before then. I hate
to have the user fill in a bunch of information, submit form and THEN get
redirected to login.

I'll look into JSTL. Are you saying it has if-then-else type of
processing? Could you point me in the right direction for that and for the
check if object exists in session issue?

Also, I haven't used filters before. We just upgraded from Struts 1.0.2 so
I'm pretty ignorant of all the features of newest version of Struts. Is
this some kind of Struts filter or what is described here?
http://java.sun.com/products/servlet/Filters.html

Thanks again for your reply.

[EMAIL PROTECTED] wrote:
 Is it possible to do if then else type of processing using Struts Logic
 tags? I don't see anything in the Struts Logic tags documentation at this
 link  http://struts.apache.org/struts-doc-1.2.7
/userGuide/struts-logic.html


Use JSTL; you'll be better off in the long run anyway, and there's
essentially zero learning curve.



 1) I want to put in some logic in all my jsps to check if a user has
 authenticated.


Don't do this in the JSP; do this in either a filter, base Action class,
etc. Try to use JSP pages for presentation only to keep concerns separated.

 One of the problems is that I also need to check if the user session
object
 is null because a user could have tried to go directly to an internal
 (after login page) page using a bookmark. How can I check for the
presence
 of an object in the session?


Again, if you're doing this outside of a JSP (highly recommended) it's
trivial. Otherwise you could always use a JSTL tag to check for a value
in the appropriate session scope attribute key.

Als0-Dave




David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: Can't figure out how to do if then else with Struts logic tags

2006-04-18 Thread pantichd
Matt,

Thanks for your reply.  I've seen the suggestion about putting jsp files
under the WEB-INF directory before but have never had a need to do it.

One thing Im not clear on... if I place the jsps under WEB-INF directory,
what happens if someone tries to access one of them directly using a
bookmark? Do they just get a page not found error?

Maybe I just need to try it but here's the scenario I'm envisioning.

I create a login.do action that ends up bringing up the login.jsp. The
action called from the login.jsp page will then forward to ... let's say
main.jsp. Do I need to wrap that jsp in a main.do action?

If I don't what's to stop the user from bookmarking main.jsp and then
getting an ugly (or custom) page not found message if the jsp is not
accessible directly?

Like I said, maybe I just need to try it.

Thanks again for all the replies. I don't know what I'd do without all the
help I get from this mailing list.






   
 Matthew J.   
 Vincent  
 [EMAIL PROTECTED]  To 
 jax.org  Struts Users Mailing List   
   user@struts.apache.org
 04/18/2006 02:00   cc 
 PM
   Subject 
   Re: Can't figure out how to do if  
 Please respond to then else with Struts logic tags   
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




Not sure if this is a solution for you or not, but you could also put
your JSPs under WEB-INF
directory so that they cannot be directly accessed by a user.  They
would instead have to go
through an Action first.

Filters may be your best bet (and yes, that is the URL to look at).

As far as JST syntax, you could use something like:

c:choose
c:when test=${numberOfResults==0}
!-- DO SOMETHING --
/c:when
c:otherwise
!-- DO SOMETHING ELSE --
/c:otherwise
/c:choose

Hope that helps!

Matt




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: Can't figure out how to do if then else with Struts logic tags

2006-04-18 Thread pantichd
OK, great. I just wanted to make sure I understood correctly.

Thanks a lot!


David



   
 Dave Newton   
 [EMAIL PROTECTED] 
 com   To 
   Struts Users Mailing List   
 04/18/2006 04:07  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re: Can't figure out how to do if  
   Struts Users   then else with Struts logic tags   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




[EMAIL PROTECTED] wrote:
 I create a login.do action that ends up bringing up the login.jsp. The
 action called from the login.jsp page will then forward to ... let's say
 main.jsp. Do I need to wrap that jsp in a main.do action?


That what I was saying when I mentioned that in general you'll never see
a naked JSP in a Struts app.

If the logic is in a filter it doesn't matter--filters can process of an
entire application's URL-space.

Dave



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




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Re: Looking for a tutorial or complete example of using DynaValidatorForm

2006-04-09 Thread pantichd

Laurie,

Thanks for getting back to me.

I've been able to get a little further. I've gotten the jsp to come up.
When I click the submit button with nothing in either input field it stops
on a breakpoint in the validate method of the DynaValidatorForm class.
Just in case you don't have the code of that class in front of you : )
here's the method I'm talking about
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
this.setPageFromDynaProperty();
ServletContext application = getServlet().getServletContext();
ActionErrors errors = new ActionErrors();
String validationKey = getValidationKey(mapping, request);
Validator validator = Resources.initValidator(validationKey,this
,application, request,errors, page);
try {
validatorResults = validator.validate();
} catch (ValidatorException e) {
log.error(e.getMessage(), e);
}
return errors;
}

It creates the validationKey variable fine. When I inspect it I see that
the value of it is the name I specified for the form-bean in my
struts-config.xml file.

It also creates the validator variable fine.When I inspect it I see that
the formName variable is correct and the resources.hFormSets variable has
the info about my form and the field that is required.

However, when it executes the validator.validate() method it goes to the
catch block. If I try to inspect the ValidatorException variable I get a e
cannot be resolved error message. This could be just a quirk of the SAP
IDE but I'm kind of lost why it would fail there.

So now I have two questions:
1)  What do I need to to see the output of fthe log.error(e.getMessage())
statement in the catch block?
2)  Could someone review my modified xml and jsp files (see below) and see
if there is anything obviously wrong?

Thanks in advance for any help

***STRUTS-CONFIG.XML
struts-config
form-beans
 form-bean name=dynaForm
type=org.apache.struts.validator.DynaValidatorForm
  form-property name=customer type=java.lang.String/
  form-property name=email type=java.lang.String/
  /form-bean
/form-beans
global-forwards
  forward
name=/thankYou
path=/thankyou.html
redirect=true /
/global-forwards
action-mappings
  action path=/dynaTest type=com.firstenergycorp.dzp.DynaTester
name=dynaForm
scope=request
input=/dyna.jsp
validate=true
forward name=/success path=/thank_you.html/
  /action
/action-mappings
message-resources parameter=application/
plug-in className=org.apache.struts.validator.ValidatorPlugIn
  set-property property=pathnames
  value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml/
/plug-in
/struts-config

***WEB.XML
web-app
display-nameWEB APP/display-name
descriptionWEB APP description/description
 servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet
/servlet-class
load-on-startup1/load-on-startup
/servlet
 servlet
servlet-namedyna.jsp/servlet-name
jsp-file/dyna.jsp/jsp-file
/servlet
servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping
taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib
taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
/taglib
/web-app

***VALIDATOR.XML
form-validation
formset
form name=dynaForm
  field property=customer depends=required
arg0 key=customer resource=false/
  /field
/form
/formset
/form-validation

***DYNA.JSP
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
body
html:form action = /dynaTest
Customer Name:*html:text property=customer /
logic:messagesPresent property=customer
font color = red
  html:messages property=customer id=error
bean:write name=error/
  /html:messages
/font
/logic:messagesPresent
brbr
email:html:text property=email /brbr
html:submitSubmit/html:submit
/html:form
/body
/html





   
 Laurie Harper 
 [EMAIL PROTECTED] 
 etTo 
 Sent by: news user@struts.apache.org  
 [EMAIL PROTECTED]  cc 
 rg   
   

Looking for a tutorial or complete example of using DynaValidatorForm

2006-04-08 Thread pantichd
Hello,

I have been using Struts for awhile but it was a very old (1.02) version.
Just finished upgrading my apps to Struts 1.2.7 and would like to take
advantage of the DynaValidatorForm.

I've found several articles on it and many examples. However, I haven't
found one that includes a complete example app and I am having trouble
getting it to work properly with the pieces I have.

Basically, what I want to do is create the form dynamically in the
struts-config.xml file, define the error messages in a properties file and
define the validations in a validator.xml file.

Here is what I have so far. When I try to to run my dyna.jsp I get a
javax.servlet.jsp.JspException: null error. I'v'e put breakpoints in my
action class but it never gets that far.

Any help would be greatly appreciated.

***STRUTS-CONFIG.XML
struts-config
form-beans
 form-bean name=dynaForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=customer type=java.lang.String/
form-property name=email type=java.lang.String/
  /form-bean
/form-beans
action-mappings
  action path=/dynaTest type=com.firstenergycorp.dzp.DynaTester
name=dynaForm
validate=true
scope=request
input=/dyna.jsp
forward name=/success path=/thank_you.html/
  /action
/action-mappings
message-resources parameter=application/
plug-in className=org.apache.struts.validator.ValidatorPlugIn
  set-property property=pathnames
  value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml/
/plug-in
/struts-config

***WEB.XML
web-app
display-nameWEB APP/display-name
descriptionWEB APP description/description
 servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet
/servlet-class
init-param
param-nameapplication/param-name
param-valueApplicationResources/param-value
/init-param
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namevalidate/param-name
param-valuetrue/param-value
/init-param
/servlet
 servlet
servlet-namedyna.jsp/servlet-name
jsp-file/dyna.jsp/jsp-file
/servlet
servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping
/web-app


***VALIDATOR.XML
form-validation
formset
form name=dynaForm
  field property=customer depends=required
msg name=required key=error.customer/
  /field
/form
/formset
/form-validation

***DYNA.JSP
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
body
html:form action = /dynaTest
Customer Name:*html:text property=customer /brbr
  email:*html:text property=email /brbr
html:submitSubmit/html:submit
/html:form
/body
/html



-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


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



Picking a framework

2005-11-09 Thread pantichd
Hello,

I realize that this is not the most unbiased group  : )  but it seems to be
a very sensible and well behaved (no nasty name calling like you find on
some other groups). So I'm hoping not to get beat up when I ask this.

We have been using Struts for about 4 years now and we've never updated..
Don't ask why!

Anyway, now we're moving to a new J2EE development environment and trying
to decide how to build apps going forward Struts is the logical choice
because we know it. However, one of the big issues we have with Struts
right now is that it still involves a lot of things to be done by hand. I
don't mind but management keeps coming back at us with how come the .NET
group can crank out the webapps so much faster? Why do you have to build
all these common components? Why does it take so long?  blah, blah, blah

I know that part of the problem is that we're on such an old version of
Struts. I also know that there are a ton of Java (Struts, JSF, Spring,
Turbine, Tapestry, Cocoon, ) frameworks and tools out there. Since this is
a good time to make a change (upgrade or switch) I want to make sure we
don't make the wrong choice. But I'm feeling a little overwhelmed with
everything out there. How does one pick? Once you commit to one it's not
easy to change.

I know some will come back with it depends on your situation and
experience I understand that. Obviously, Struts has an advantage because
our are comfortable with it.

I'm sure there are tools that make development (especially the Visual part
of the MVC) quicker in java but I am having a hard time sifting thru
everything to find them

Has anyone seen any good comprehensive reviews/investigations of the
various frameworks?

Anyhelp would be greatly appreciated.

Sorry for the long rambling message.

David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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



Showing my ignorance here. Sorry.

2005-10-28 Thread pantichd
Hello,

Every once in a while I'll see an e-mail with a +1 in the body. Sorry for
my ignorance but can someone please explain the meaning of +1?

Thanks!



-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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



Re: Showing my ignorance here. Sorry.

2005-10-28 Thread pantichd
Oh, OK.  Thanks for clearing that up.

By the way, I just want to say that this mailing list is awesome. I think
we all sometimes take for granted the unbelievable level of support we
get from something like this and all for free. Thanks everyone for donating
your time to help out.




   
 Larry Meadors 
 [EMAIL PROTECTED] 
 org   To 
 Sent by:  Struts Users Mailing List   
 [EMAIL PROTECTED] user@struts.apache.org
 il.com cc 
   
   Subject 
 10/28/2005 08:31  Re: Showing my ignorance here.  
 AMSorry.  
   
   
 Please respond to 
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




+1 == I agree, like if someone said your email discalimer was too long...I
would reply and say:

+1!

Larry


On 10/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 Hello,

 Every once in a while I'll see an e-mail with a +1 in the body. Sorry for
 my ignorance but can someone please explain the meaning of +1?

 Thanks!




-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.



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



Re: Performance test tool

2005-10-28 Thread pantichd
We use Mercury's LoadRunner. It's a pretty decent tool but like Christian
says, it comes with a hefty price.


David Z. Pantich



   
 Christian 
 Bollmeyer 
 [EMAIL PROTECTED]  To 
 llmeyer.de   Struts Users Mailing List   
   user@struts.apache.org
 10/28/2005 11:05   cc 
 AM
   Subject 
   Re: Performance test tool   
 Please respond to 
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




Hi,

you may want to take a look at this one:

http://grinder.sourceforge.net/g3/features.html

If you want code-based auditing/profiling/code metrics
capabilities, there are a lot of commercial tools on the
market, most of them bearing a hefty price tag. One
exception is Oracle's JDeveloper which has these
features already built-in, it's freely available from
otn.oracle.com now.

HTH,
-- Chris

[EMAIL PROTECTED] schrieb:
 Hi

 I'm looking for a good tool for performance testing and analysis for a
 medium size web-application. The testing results are for the
 management of the company.

 I need some recommandations.

 Thanks
 Kurt

 -
 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 information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.




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



Re: Struts 1.1 and Validation

2005-10-28 Thread pantichd
Swt!

We're still on Struts 1.0.2 (in process of upgrading to 1.2.7) and you
wouldn't believe the gyrations we've had to go through to get that
functionality.

Thanks!




   
 Martin Gainty   
 [EMAIL PROTECTED] 
 com   To 
   Struts Users Mailing List 
 10/28/2005 02:52  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re:  Struts 1.1 and Validation  
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




using html:cancel bypasses form bean validate method
http://struts.apache.org/struts-taglib/tagreference-struts-html.html#cancelHTH-

Original Message -
From: April Francis [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Friday, October 28, 2005 12:30 PM
Subject: Struts 1.1 and Validation


 On Struts 1.1, does the html:cancel tag work?

 Example:
 If I click on the cancel button below, will validation be ignored?

 html:cancel onClick=bCancel=true;
 bean:message./
 html:cancel

 I have put the above in my jsp, but the struts validation still runs when

 I use
 the cancel button.  I'm thinking maybe struts 1.1 doesn't have the
 necessary
 pieces in place  If so, then how can I handle a cancel?

 thank you,
 April


 -
 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 information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.




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



Question about ActionForward.setRedirect method

2005-10-24 Thread pantichd
Hello,

I'm converting my struts apps from version 1.0.2 to 1.2.7.

In my 1.0.2 app I can call ActionForward.setRedirect method and pass it
true with no problem. When running with 1.2.7 it generates the following
error.

   Error [javax.servlet.ServletException: Configuration is frozen], with
   root cause [java.lang.IllegalStateException: Configuration is frozen].


Can someone please explain why?

Thanks!


David


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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



TLD file placement

2005-10-20 Thread pantichd
Wendy,

I'm curious about your comment about Servlet 2.2 and placement of tld
files.

Sorry if I'm asking a basic question but I didn't know that you can just
use the tld files in the jar. You said unless you're on Servlet 2.2...
Does that mean that after Servlet 2.2 you can just use the tld files in the
jar file?

If so, do I need to do anything special to tell Struts to look there or is
it enough to just take out the tld mappings from the web.xml file?

Thanks!

David



   
 Wendy Smoak 
 [EMAIL PROTECTED] 
 com   To 
   Struts Users Mailing List 
 10/19/2005 10:35  user@struts.apache.org
 PM cc 
   
   Subject 
 Please respond to Re: Strange Struts tld problem  
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




From: Koon Yue Lam [EMAIL PROTECTED]

 Assume I have 2 jsp(s), header.jsp and content.jsp

 In content.jsp, I include header.jsp like the following:
 %@ include file=../common/Header.jsp %

The include isn't working.  Possibly because your file is named
'header.jsp'
and you're including 'Header.jsp', (watch the case!) or possibly because it

isn't where you think it is relative to content.jsp.

In addition, unless you're on Servlet 2.2, you don't need to put the tlds
under WEB-INF and map them in web.xml.  Just use the URIs such as
%@ taglib uri=http://struts.apache.org/tags-html; prefix=html %
and the tld file that's in struts.jar will be used.

--
Wendy Smoak





-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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



Re: TLD file placement

2005-10-20 Thread pantichd
Fantastic.

Thank you so much!


David



   
 Wendy Smoak 
 [EMAIL PROTECTED] 
 com   To 
   Struts Users Mailing List 
 10/20/2005 09:45  user@struts.apache.org
 AM cc 
   
   Subject 
 Please respond to Re: TLD file placement  
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




From: [EMAIL PROTECTED]

 Sorry if I'm asking a basic question but I didn't know that you can just
 use the tld files in the jar. You said unless you're on Servlet 2.2...
 Does that mean that after Servlet 2.2 you can just use the tld files in
 the
 jar file?

Yes.  http://wiki.wsmoak.net/cgi-bin/wiki.pl?WebXmlNoTaglib

 If so, do I need to do anything special to tell Struts to look there or
is
 it enough to just take out the tld mappings from the web.xml file?

Nothing special.  Use the correct URI, remove the tld files from under
WEB-INF, remove taglib from web.xml, and it Just Works.  One less thing
to
maintain. :)

--
Wendy



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


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.




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



Looking for instructions on migrating from Struts 1.0.2 to 1.2.7

2005-10-20 Thread pantichd
Hello,

Can anyone point me to some documentation that helps you migrate Struts
apps from version 1.0.2 to 1.2.7?

Thanks in advance for any help.


-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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



Moving from Struts 1.0.2 to 1.2.7. Encountering problems

2005-10-19 Thread pantichd
Hello,

We are in process of moving to different IDE and at same time have decided
to upgrade to Struts 1.2.7.

Started out with a just two pages from an app that is running fine in our
current environment. It consists of a login page and a viewPrices.jsp
page. Upon valid login the user is supposed to see the viewPrices.jsp
page.

Using the debugger to step thru the execute method of my LoginAction
class I can see that it's finding my action mapping and pointing to the
right jsp page. However, after it exits the execute method of my
LoginAction class I get the following error:

Cannot get request dispatcher for path viewPrices.jsp

If I try open the viewPrices.jsp file directly in the browser it comes up
fine.

Thanks in advance for any help.

David.



Not sure what to include to help you help me so if you need anything else
please let me know.

I've downloaded and placed the following files in my WEB-INF\lib folder:
- struts.jar
- antlr.jar
- commons-beanutils.jar
- commons-digester.jar
- commons-fileupload.jar
- commons-logging.jar
- commons-validator.jar
- jakarta-oro.jar

I have also downloaded the following tlds and placed them in my WEB-INF
folder
- struts-bean.tld
- struts-html.tld
- struts-logic.tld

Here is the content of my web.xml file:
  ?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameWEB APP/display-name
descriptionWEB APP description/description
servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet
/servlet-class
init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
param-namedebug/param-name
param-value2/param-value
/init-param
init-param
param-namedetail/param-name
param-value2/param-value
/init-param
load-on-startup2/load-on-startup
/servlet
 servlet
servlet-namelogin.jsp/servlet-name
jsp-file/login.jsp/jsp-file
/servlet
servlet
servlet-nameviewPrices.jsp/servlet-name
jsp-file/viewPrices.jsp/jsp-file
/servlet
servlet-mapping
servlet-nameaction/servlet-name
url-pattern/forms/*/url-pattern
/servlet-mapping
 /web-app

Here is the content of my struts-config.sml file:
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE struts-config PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 1.0//EN
http://fe-dev/jds/struts-config_1_1.dtd;
struts-config
form-beans
  form-bean
 name=rtpForm
type=com.firstenergycorp.hep.RTPForm/
/form-beans
action-mappings
  action
  path=/viewPrices
  type=com.firstenergycorp.hep.ViewPricesAction
  name=rtpForm
  scope=session
  input=viewPrices.jsp
  forward
name=viewPrices
path=viewPrices.jsp/
  /action
  action
  path=/login
  type=com.firstenergycorp.hep.LoginAction
  name=rtpForm
  scope=session
  input=login.jsp
  forward
name=viewPrices
path=viewPrices.jsp/
  /action
/action-mappings
/struts-config



-
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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