Re: HTTPS Post Action

2004-11-27 Thread Aidas Semezys
Hi Dave,

I have quite a bit of experience with HTTPS+Apache+Tomcat+Struts. :]
But sincerely i don't understand the problem of yours...
If you are already in HTTPS schema, so what's the problem with form post?
Struts tag  accepts no relative or absolute URLs. You must specify
name of action declared in your struts-config.xml for the attribute action of
 tag.

Your form in JSP:
...


 ...




...

Excerpt from your struts-config.xml:
...

...

...

...

Struts forms and HTTPS has nothing in common.
If you are already in HTTPS schema, you will stay there until you
change to HTTP again (through clicking on link eith href value as absolute URL,
or through waiting some URL in your filter that is capable to recognize that URL
is the one that should not be secured anymore and to change the schema
to HTTP...)
Hope this helps.

Peace,
Aidas

Hardy, David T. <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Is there any way to post to an HTTPS URL in the html:form? It appears I 
> cannot use a relative URL or a fully qualified URL. I see the SSLEXT but I 
> would like a quicker and easier solution if possible. I am already at an 
> HTTPS URL for the current page.
> 
> Thank You,
> 
> Dave
>

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



Re: refresh body only from JSP

2004-11-27 Thread Aidas Semezys
Hi Peter,

David is right. You need frames if you want to reload just part of your page.
And yes tiles framework assembles all components and returns the accumulated
result.
But you CAN write JSP, that changes just one tile component (for example body)
of your page:

<%@ page language="Java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles"%>

  


In this JSP example you put another tile component described in
tiles-defs.xml as
another.definition in part of your previous body component /tiles/body.jsp.
But remember, that will reload all the page not only the body part.

Peace,
Aidas

David G. Friedman <[EMAIL PROTECTED]> wrote:
> Peter,
> 
> I believe you are confusing frames, or possibly "inline" frames, with tiles.
> The tile definition assembles the components of a page and hands that
> completed page back to your client's browser.  If your tiles defintion
> includes parts such as a header, footer, navigation bar, and main (i.e.
> "center") content, EVERYTHING will be assembled into a page and returned to
> the client.
> 
> To update only a section of the open browser's content, you will likely need
> either frames or "inline frames".  For more information on frames, see the
> HTML 4.01 spec.  A brief tutorial on frames is available free from the W3C
> (World Wide Web Consortium) at:
> http://www.w3.org/TR/html401/present/frames.html
> 
> One particular link at the bottom of that page can direct you to a section
> on "inline frames".
> 
> Regards,
> David
> 
> 
> 
> -Original Message-
> From: Peter O'Reilly [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 26, 2004 7:56 PM
> To: [EMAIL PROTECTED]
> Subject: refresh body only from JSP
> 
> Hi,
> I am using tiles in my project using the classic layout
> 
> This is my "tiles-defs.xml "
> 
>   
>   
>   
>   
>   
>   
>   
> 
> How can I create a JSP that will keep the header, footer and menu while only
> refreshing the body?  I keep getting the entire login.jsp page instead of it
> refeshing the body only.
> 
> Peter
> 
> __
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
> 
> Netscape. Just the Net You Need.
> 
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> 
> -
> 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: Why does a Form Bean declared as session-scope appear on both session and request?

2004-11-27 Thread erh
On Fri, Nov 26, 2004 at 11:49:43AM -, Paul McCulloch wrote:
> The attribute in org.apache.struts.taglib.html.BEAN is set by the
>  tag. This is how the other  tags know which form bean
> they are dealing with.
> 
> I'd be interested to know why the other html tags are made aware of the form
> bean this way, rather than directly asking their enclosing form tag. Any
> ideas anyone? The only thing I can think of is that it means that
> dynamically included pages can still use the html tags to reference the
> parent page's form.

I've found it extremely useful to get a handle on the form bean without
having to know it's name in the struts config file.  It makes it possible
to write jsp code that doesn't have to care about exactly which form it
happens to be in.

eric

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



Re: refresh body only from JSP

2004-11-27 Thread Peter O'Reilly
Aidas,

How do I define that body definition in the tiles-def.xml?

This is my tiles-def,

  
  
  
  
  
  
  
  
  
  

  
  
  
  

  
   
   
  
  
Thanks,
Peter


Aidas Semezys <[EMAIL PROTECTED]> wrote:

>Hi Peter,
>
>David is right. You need frames if you want to reload just part of your page.
>And yes tiles framework assembles all components and returns the accumulated
>result.
>But you CAN write JSP, that changes just one tile component (for example body)
>of your page:
>
><%@ page language="Java" contentType="text/html" pageEncoding="UTF-8"%>
><%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles"%>
>
>  
>
>
>In this JSP example you put another tile component described in
>tiles-defs.xml as
>another.definition in part of your previous body component /tiles/body.jsp.
>But remember, that will reload all the page not only the body part.
>
>Peace,
>Aidas
>
>David G. Friedman <[EMAIL PROTECTED]> wrote:
>> Peter,
>> 
>> I believe you are confusing frames, or possibly "inline" frames, with tiles.
>> The tile definition assembles the components of a page and hands that
>> completed page back to your client's browser.  If your tiles defintion
>> includes parts such as a header, footer, navigation bar, and main (i.e.
>> "center") content, EVERYTHING will be assembled into a page and returned to
>> the client.
>> 
>> To update only a section of the open browser's content, you will likely need
>> either frames or "inline frames".  For more information on frames, see the
>> HTML 4.01 spec.  A brief tutorial on frames is available free from the W3C
>> (World Wide Web Consortium) at:
>> http://www.w3.org/TR/html401/present/frames.html
>> 
>> One particular link at the bottom of that page can direct you to a section
>> on "inline frames".
>> 
>> Regards,
>> David
>> 
>> 
>> 
>> -Original Message-
>> From: Peter O'Reilly [mailto:[EMAIL PROTECTED]
>> Sent: Friday, November 26, 2004 7:56 PM
>> To: [EMAIL PROTECTED]
>> Subject: refresh body only from JSP
>> 
>> Hi,
>> I am using tiles in my project using the classic layout
>> 
>> This is my "tiles-defs.xml "
>> 
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>> 
>> How can I create a JSP that will keep the header, footer and menu while only
>> refreshing the body?  I keep getting the entire login.jsp page instead of it
>> refeshing the body only.
>> 
>> Peter
>> 
>> __
>> Switch to Netscape Internet Service.
>> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
>> 
>> Netscape. Just the Net You Need.
>> 
>> New! Netscape Toolbar for Internet Explorer
>> Search from anywhere on the Web and block those annoying pop-ups.
>> Download now at http://channels.netscape.com/ns/search/install.jsp
>> 
>> -
>> 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]
>
>

__
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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



How to retrieve parameters passed via GET method?

2004-11-27 Thread ZHENG Zhong

Hi all, here is a newbie's question:

For example, i have a page called accountList.jsp, which displays an account 
list of a certain customer. Each account has an ID as its primary key. Customer 
may click on the "Close" hyperlink to close an account. The hyperlink is like 
this: 

Close

As you may see, the parameter accountId is passed via the GET method.

In my Struts configuration file, an action element is defined as the following: 




When customer clicks on the hyperlink, ActionServlet receives the HTTP request, 
pre-processes it and forwards it to ForwardAction, who will simply forward the 
request to closeAccount.jsp. That page then asks customer to confirm the 
operation ("are you sure that you want to close account No. 100?"). The problem 
is, ActionServlet seems to have modified the request, so in my 
closeAccount.jsp, i cannot retrieve the accountId parameter: 
request.getAttribute("accountId") returns null.

I dumped the contents in the HTTP request that closeAccount.jsp receives. They 
look like this: 
javax.servlet.forward.request_uri = /badba/closeAccount.do 
javax.servlet.forward.context_path = /badba javax.servlet.forward.servlet_path 
= /closeAccount.do javax.servlet.forward.query_string = accountId=100 
org.apache.struts.action.mapping.instance = 
ActionConfig[path=/closeAccount,parameter=/closeAccount.jsp,scope=session,type=org.apache.struts.actions.ForwardAction
 org.apache.struts.action.MODULE = [EMAIL PROTECTED] 



In my web.xml file, i defined a security-constraint element to prevent customer 
from visiting JSP pages directly, so every request must pass through 
ActionServlet, and parameters passed via GET method will always be modified 
before the request arrives to a JSP page. The question is: how to retrieve 
those parameters in my JSP page? Using 
request.getAttribute("javax.servlet.forward.query_string") to get the value 
accountId=100 and then parsing the String seems to be a very stupid method.

Thanks in advance for your help.

Regards.

heavyz



ZHENG Zhong


-
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!

Re: Struts training

2004-11-27 Thread James Mitchell
Was your question ever answered?
There was talk about this among the Struts-Atlanta (Struts users group) 
members and I have considered putting something like this together, but like 
everything else, it has taken a back seat to other plans.

If there is enough "real" interest in this, I will bump it up on my priority 
list.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message - 
From: "Shyam Anand" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 23, 2004 12:17 PM
Subject: Struts training


Hi,
Could somebody recommend a good, advanced Struts
classroom training course in the US,that covers topics
like Tiles/JSTL, JSF et al?
Thanks,
Shyam
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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: refresh body only from JSP

2004-11-27 Thread Aidas Semezys
Hi Peter,

You can define definition i mentioned "another.definition" just like any
other definition in tiles-defs.xml.
Tiles framework will find it for you. Just add to your defs:

...


...


...

in this example your.jsp is the JSP that you want to substitute your
body.jsp with.
Hope this helps.

Peace,
Aidas


Peter O'Reilly <[EMAIL PROTECTED]> wrote:
> Aidas,
> 
> How do I define that body definition in the tiles-def.xml?
> 
> This is my tiles-def,
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
>   
>   
>   
>   
> 
>   
>
>
>   
> 
> Thanks,
> Peter
> 
> 
> 
> 
> Aidas Semezys <[EMAIL PROTECTED]> wrote:
> 
> >Hi Peter,
> >
> >David is right. You need frames if you want to reload just part of your page.
> >And yes tiles framework assembles all components and returns the accumulated
> >result.
> >But you CAN write JSP, that changes just one tile component (for example 
> >body)
> >of your page:
> >
> ><%@ page language="Java" contentType="text/html" pageEncoding="UTF-8"%>
> ><%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles"%>
> >
> >  
> >
> >
> >In this JSP example you put another tile component described in
> >tiles-defs.xml as
> >another.definition in part of your previous body component /tiles/body.jsp.
> >But remember, that will reload all the page not only the body part.
> >
> >Peace,
> >Aidas
> >
> >David G. Friedman <[EMAIL PROTECTED]> wrote:
> >> Peter,
> >>
> >> I believe you are confusing frames, or possibly "inline" frames, with 
> >> tiles.
> >> The tile definition assembles the components of a page and hands that
> >> completed page back to your client's browser.  If your tiles defintion
> >> includes parts such as a header, footer, navigation bar, and main (i.e.
> >> "center") content, EVERYTHING will be assembled into a page and returned to
> >> the client.
> >>
> >> To update only a section of the open browser's content, you will likely 
> >> need
> >> either frames or "inline frames".  For more information on frames, see the
> >> HTML 4.01 spec.  A brief tutorial on frames is available free from the W3C
> >> (World Wide Web Consortium) at:
> >> http://www.w3.org/TR/html401/present/frames.html
> >>
> >> One particular link at the bottom of that page can direct you to a section
> >> on "inline frames".
> >>
> >> Regards,
> >> David
> >>
> >>
> >>
> >> -Original Message-
> >> From: Peter O'Reilly [mailto:[EMAIL PROTECTED]
> >> Sent: Friday, November 26, 2004 7:56 PM
> >> To: [EMAIL PROTECTED]
> >> Subject: refresh body only from JSP
> >>
> >> Hi,
> >> I am using tiles in my project using the classic layout
> >>
> >> This is my "tiles-defs.xml "
> >>
> >>   
> >>   
> >>   
> >>   
> >>   
> >>   
> >>   
> >>
> >> How can I create a JSP that will keep the header, footer and menu while 
> >> only
> >> refreshing the body?  I keep getting the entire login.jsp page instead of 
> >> it
> >> refeshing the body only.
> >>
> >> Peter
> >>
> >> __
> >> Switch to Netscape Internet Service.
> >> As low as $9.95 a month -- Sign up today at 
> >> http://isp.netscape.com/register
> >>
> >> Netscape. Just the Net You Need.
> >>
> >> New! Netscape Toolbar for Internet Explorer
> >> Search from anywhere on the Web and block those annoying pop-ups.
> >> Download now at http://channels.netscape.com/ns/search/install.jsp
> >>
> >> -
> >> 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]
> >
> >
> 
> __
> 
> 
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
> 
> Netscape. Just the Net You Need.
> 
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> 
> -
> 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]