You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/02/02 15:51:44 UTC

difference b/w html:button and html:submit

When to use these html:button and html:submit?

both have the property attribute.

I am not sure when to use which one. I was using only html:submit until now.


Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: difference b/w html:button and html:submit

Posted by Deepa Khetan <de...@gmail.com>.
html:button is a normal button for which u will have to write an onsubmit
event or onclick event. html:submit will submit the form in which this is
declared.

HTH
Deepa


On 2/2/06, fea jabi <zy...@hotmail.com> wrote:
>
> When to use these html:button and html:submit?
>
> both have the property attribute.
>
> I am not sure when to use which one. I was using only html:submit until
> now.
>
>
> Thanks.
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Image not getting displayed !

Posted by Dakota Jack <da...@gmail.com>.
You will be most helped by learning how the browser and your server work
together to locate files give certain URIs.  You also might try, after
learning this, to use logical names for the URIs and an application for
conversions which will always do right by you.

On 2/2/06, Jitendra Kumar <ji...@hth.bhel.co.in> wrote:
>
> I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
>
> In Design view the image is showing by when I view it in browser, the
> image doesn't show. Please let me know the reason.
>
> Images folder is in the same folder as my jsp page.
>
> I am baffled !!
>
> TIA
>
> Jitendra
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Struts and Velocity - example

Posted by Manfred Wolff <wo...@manfred-wolff.de>.
Hi.

Has anyone a "not trivial" example of a struts-velocity page with
iteration of lists. parameter in links etc.  The most things I have
collected in the internet, but it were fine, if I get an example that is
a little bit difficult.

Manfred

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] (Problem Solved)Re: Image not getting displayed !

Posted by Jitendra Kumar <ji...@hth.bhel.co.in>.
Hi Everyone ! 

The problem has been solved. Thanks everyone for your responses.

Solution: myeclipse ide was not packing the image file while deploying
on to Jboss. It created new image folder and put the image file again in
that and it worked.It was a silly mistake, I should have checked it
earlier. 

Thanks again
Jeet


-----Original Message-----
From: Jitendra Kumar [mailto:jitendrak@hth.bhel.co.in] 
Sent: Monday, February 06, 2006 11:42 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Re: Image not getting displayed !


Thanx Max ! (Wow.... Doesn't I sound poetic)

Appreciate your effort to reply to my mail. 

I have used all the possible permutations/combinations for the image
path. So there is no possibility of using a wrong root. I also tried to
type the URL of the image directly to the browser. 

I get this error:

HTTP Status 404 - /CMSystem/Webroot/images/struts-power.gif 
description The requested resource
(/CMSystem/Webroot/images/struts-power.gif) is not available.

Same error comes for all the paths

It seems that there is some other configuration error. Do I need to add
some lines in struts-config ???

Regards,
Jeet


-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com] 
Sent: Saturday, February 04, 2006 7:11 PM
To: Struts Users Mailing List
Subject: RE: [OT] Re: Image not getting displayed !


There are some useful browser plugins for finding (and correcting, based
on the info they help you obtain) broken image references. For example,
using Firefox with the Web Developer plugin, you can use Find Broken
Images.

1. Type stuff into your browser address bar until you know what the full
URL for the image *should* be.

2. Look at the source of your web page (View Source in browser) with the
broken image reference and see what the img src is. It will probably
start with / (a site-root relative reference). Browsers are completely
unaware of webapp context paths and so will always evaluate the URL
relative to the site root (e.g. http://your.server.com/ and not
http://your.server.com/contextPath/).

3. Do stuff to make #2 look like #1 (or more likely a site-root-relative
version of #1 -- Struts will add the contextPath for you if you use
page="/path/to/image"). :-)

Based on "The context is CMSystem folder" and
"CMSystem/WebRoot/images/", I would expect that you need something like
this:

<html:img page="/WebRoot/images/struts-power.gif"/>

(You might need module="", too, but I can't remember.)

which will become the following plain HTML when the JSP executes:

<img src="/whateverYourContextPathIs/WebRoot/images/struts-power.gif">

(Is CMSystem really the contextPath, or is your app really rooted at
WebRoot? Be careful not to confuse the contextPath with something in
your development file tree -- they aren't the same thing. It seems like
your webapp is probably rooted in WebRoot, in which case
page="/images/..." is what you need.)

-Max

On Fri, 2006-02-03 at 10:23 +0530, Jitendra Kumar wrote:
> I will try to be clearer this time !!
> 
> I am developing a Struts project using myeclipse IDE. In this I have
> developed a JSP page using struts tags. I want to insert a picture on 
> this page. For doing this I have used these two options:
> 
> 1. <html:img src="images/struts-power.gif" />
> 2. <html:img align="" alt="" border="" page="/images/struts-power.gif"

> />
> 
> The directory structure of my application is 
> CMSystem/WebRoot/images/... CMSystem/WebRoot/WEB-INF/...
> 
> The context is CMSystem folder.
> 
> But, none of the above is showing the image on viewing in browser. I
> am using JBOss 3.2.5
> 
> Please let me know what mistake I am doing.
> 
> 
> -----Original Message-----
> From: Dave Newton [mailto:newton@pingsite.com]
> Sent: Thursday, February 02, 2006 8:51 PM
> To: Struts Users Mailing List
> Subject: [OT] Re: Image not getting displayed !
> 
> 
> Jitendra Kumar wrote:
> > I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
> >
> > In Design view the image is showing by when I view it in browser,
> > the
> > image doesn't show. Please let me know the reason.
> >   
> I'm not sure how this is Struts-related.
> 
> Even if it were, as you have provided essentially zero information
> this will be difficult to diagnose.
> 
> Dave
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] Re: Image not getting displayed !

Posted by Jitendra Kumar <ji...@hth.bhel.co.in>.
Thanx Max ! (Wow.... Doesn't I sound poetic)

Appreciate your effort to reply to my mail. 

I have used all the possible permutations/combinations for the image
path. So there is no possibility of using a wrong root. I also tried to
type the URL of the image directly to the browser. 

I get this error:

HTTP Status 404 - /CMSystem/Webroot/images/struts-power.gif 
description The requested resource
(/CMSystem/Webroot/images/struts-power.gif) is not available.

Same error comes for all the paths

It seems that there is some other configuration error. Do I need to add
some lines in struts-config ???

Regards,
Jeet


-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com] 
Sent: Saturday, February 04, 2006 7:11 PM
To: Struts Users Mailing List
Subject: RE: [OT] Re: Image not getting displayed !


There are some useful browser plugins for finding (and correcting, based
on the info they help you obtain) broken image references. For example,
using Firefox with the Web Developer plugin, you can use Find Broken
Images.

1. Type stuff into your browser address bar until you know what the full
URL for the image *should* be.

2. Look at the source of your web page (View Source in browser) with the
broken image reference and see what the img src is. It will probably
start with / (a site-root relative reference). Browsers are completely
unaware of webapp context paths and so will always evaluate the URL
relative to the site root (e.g. http://your.server.com/ and not
http://your.server.com/contextPath/).

3. Do stuff to make #2 look like #1 (or more likely a site-root-relative
version of #1 -- Struts will add the contextPath for you if you use
page="/path/to/image"). :-)

Based on "The context is CMSystem folder" and
"CMSystem/WebRoot/images/", I would expect that you need something like
this:

<html:img page="/WebRoot/images/struts-power.gif"/>

(You might need module="", too, but I can't remember.)

which will become the following plain HTML when the JSP executes:

<img src="/whateverYourContextPathIs/WebRoot/images/struts-power.gif">

(Is CMSystem really the contextPath, or is your app really rooted at
WebRoot? Be careful not to confuse the contextPath with something in
your development file tree -- they aren't the same thing. It seems like
your webapp is probably rooted in WebRoot, in which case
page="/images/..." is what you need.)

-Max

On Fri, 2006-02-03 at 10:23 +0530, Jitendra Kumar wrote:
> I will try to be clearer this time !!
> 
> I am developing a Struts project using myeclipse IDE. In this I have 
> developed a JSP page using struts tags. I want to insert a picture on 
> this page. For doing this I have used these two options:
> 
> 1. <html:img src="images/struts-power.gif" />
> 2. <html:img align="" alt="" border="" page="/images/struts-power.gif"

> />
> 
> The directory structure of my application is
> CMSystem/WebRoot/images/...
> CMSystem/WebRoot/WEB-INF/...
> 
> The context is CMSystem folder.
> 
> But, none of the above is showing the image on viewing in browser. I 
> am using JBOss 3.2.5
> 
> Please let me know what mistake I am doing.
> 
> 
> -----Original Message-----
> From: Dave Newton [mailto:newton@pingsite.com]
> Sent: Thursday, February 02, 2006 8:51 PM
> To: Struts Users Mailing List
> Subject: [OT] Re: Image not getting displayed !
> 
> 
> Jitendra Kumar wrote:
> > I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
> >
> > In Design view the image is showing by when I view it in browser, 
> > the
> > image doesn't show. Please let me know the reason.
> >   
> I'm not sure how this is Struts-related.
> 
> Even if it were, as you have provided essentially zero information 
> this will be difficult to diagnose.
> 
> Dave
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] Re: Image not getting displayed !

Posted by Max Cooper <ma...@maxcooper.com>.
There are some useful browser plugins for finding (and correcting, based
on the info they help you obtain) broken image references. For example,
using Firefox with the Web Developer plugin, you can use Find Broken
Images.

1. Type stuff into your browser address bar until you know what the full
URL for the image *should* be.

2. Look at the source of your web page (View Source in browser) with the
broken image reference and see what the img src is. It will probably
start with / (a site-root relative reference). Browsers are completely
unaware of webapp context paths and so will always evaluate the URL
relative to the site root (e.g. http://your.server.com/ and not
http://your.server.com/contextPath/).

3. Do stuff to make #2 look like #1 (or more likely a site-root-relative
version of #1 -- Struts will add the contextPath for you if you use
page="/path/to/image"). :-)

Based on "The context is CMSystem folder" and
"CMSystem/WebRoot/images/", I would expect that you need something like
this:

<html:img page="/WebRoot/images/struts-power.gif"/>

(You might need module="", too, but I can't remember.)

which will become the following plain HTML when the JSP executes:

<img src="/whateverYourContextPathIs/WebRoot/images/struts-power.gif">

(Is CMSystem really the contextPath, or is your app really rooted at
WebRoot? Be careful not to confuse the contextPath with something in
your development file tree -- they aren't the same thing. It seems like
your webapp is probably rooted in WebRoot, in which case
page="/images/..." is what you need.)

-Max

On Fri, 2006-02-03 at 10:23 +0530, Jitendra Kumar wrote:
> I will try to be clearer this time !!
> 
> I am developing a Struts project using myeclipse IDE. In this I have
> developed a JSP page using struts tags. I want to insert a picture on
> this page. For doing this I have used these two options:
> 
> 1. <html:img src="images/struts-power.gif" />
> 2. <html:img align="" alt="" border="" page="/images/struts-power.gif"
> />
> 
> The directory structure of my application is 
> CMSystem/WebRoot/images/...
> CMSystem/WebRoot/WEB-INF/...
> 
> The context is CMSystem folder.
> 
> But, none of the above is showing the image on viewing in browser. I am
> using JBOss 3.2.5
> 
> Please let me know what mistake I am doing.
> 
> 
> -----Original Message-----
> From: Dave Newton [mailto:newton@pingsite.com] 
> Sent: Thursday, February 02, 2006 8:51 PM
> To: Struts Users Mailing List
> Subject: [OT] Re: Image not getting displayed !
> 
> 
> Jitendra Kumar wrote:
> > I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
> >
> > In Design view the image is showing by when I view it in browser, the 
> > image doesn't show. Please let me know the reason.
> >   
> I'm not sure how this is Struts-related.
> 
> Even if it were, as you have provided essentially zero information this
> will be difficult to diagnose.
> 
> Dave
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] Re: Image not getting displayed !

Posted by Jitendra Kumar <ji...@hth.bhel.co.in>.
I will try to be clearer this time !!

I am developing a Struts project using myeclipse IDE. In this I have
developed a JSP page using struts tags. I want to insert a picture on
this page. For doing this I have used these two options:

1. <html:img src="images/struts-power.gif" />
2. <html:img align="" alt="" border="" page="/images/struts-power.gif"
/>

The directory structure of my application is 
CMSystem/WebRoot/images/...
CMSystem/WebRoot/WEB-INF/...

The context is CMSystem folder.

But, none of the above is showing the image on viewing in browser. I am
using JBOss 3.2.5

Please let me know what mistake I am doing.


-----Original Message-----
From: Dave Newton [mailto:newton@pingsite.com] 
Sent: Thursday, February 02, 2006 8:51 PM
To: Struts Users Mailing List
Subject: [OT] Re: Image not getting displayed !


Jitendra Kumar wrote:
> I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
>
> In Design view the image is showing by when I view it in browser, the 
> image doesn't show. Please let me know the reason.
>   
I'm not sure how this is Struts-related.

Even if it were, as you have provided essentially zero information this
will be difficult to diagnose.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[OT] Re: Image not getting displayed !

Posted by Dave Newton <ne...@pingsite.com>.
Jitendra Kumar wrote:
> I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.
>
> In Design view the image is showing by when I view it in browser, the
> image doesn't show. Please let me know the reason.
>   
I'm not sure how this is Struts-related.

Even if it were, as you have provided essentially zero information this
will be difficult to diagnose.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Image not getting displayed !

Posted by Jitendra Kumar <ji...@hth.bhel.co.in>.
I am using <IMG src="images/imagename.gif"></IMG> in myeclipse.

In Design view the image is showing by when I view it in browser, the
image doesn't show. Please let me know the reason.

Images folder is in the same folder as my jsp page.

I am baffled !!

TIA

Jitendra


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org