struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jain, Shipra" <Shipra.J...@GTECH.COM>
Subject RE: <html:img.../> and Javascript; Templates
Date Fri, 17 Aug 2001 14:06:35 GMT
Hi Andre,

I have exactly same problem as Juraj described regarding <img> tag. I am
using Sturts 1.0. Can you please expand on which sturts code you are talking
about ( is it the nightly builds ? any specific dates? ). It would be just
great if you can specify which set of package/ classes I should take from
the nightly build & still not mess with the other code. Does this new code
also contains id attribute for the img tag?

Shipra Jain

-----Original Message-----
From: "Paradis, André" []
Sent: Friday, August 17, 2001 8:58 AM
Subject: RE: <html:img.../> and Javascript; Templates

Hi Juraz,

You can get the struts code and add support for missing javascript
attributes in html:img tag code, or copy and modify the code in a new
and modify the tld so it uses your tag class instead of the default one.


-----Original Message-----
From: Juraj Kazda []
Sent: August 17, 2001 2:51 AM
To: STRUTS-USER (el. adresa)
Subject: [Q]: <html:img.../> and Javascript; Templates

Hello friends,

I have a two problems: one with templates, and another (still) with
internationalization, resp. with <html:img .../> tag.

First <html:img .../> tag:
Is it possible to have struts render the HTML <img ...> tag _with_
support for _all_ Javascript event listeners? I need to make rollovers
with my navigation bar. However, I need to have my application
internationalized too. With struts' <html:img .../> tag I can achieve
internationalization in a very simple and convenient way (thank you for
that advice :-)), but I can't use onMouseOver and onMouseOut event
listeners in that tag. While using HTML <img ...> tag, I have no problem
with Javascript, but there is a problem with staying international...
How to break this ring?

Second templates:
I've defined very small template framework (all the sources follows) and
after running it, all files in the template which are JSP are not
rendered/processed as JSP (it's just copied source to the output) . Can
someone take a look at these very simple sources and tell me what's
wrong? I think I'm missing something very basic, but I can't find

-------------------- BEGIN : index.jsp ----------------------------
<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>

<template:insert template='/indexTemplate.jsp'>
    <template:put name='header' content='/header.html' />
    <template:put name='content' content='/content.jsp'/>
    <template:put name='footer' content='/footer.html' />
-------------------- END : index.jsp ------------------------------

-------------------- BEGIN : indexTemplate.jsp --------------------
<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


	<title>Confer title</title>

	<template:get name="header"/>
	<template:get name="content"/>
	<template:get name="footer"/>

-------------------- END : indexTemplate.jsp -----------------------

-------------------- BEGIN : header.html --------------------------
-------------------- END : header.html ----------------------------

-------------------- BEGIN : content.jsp --------------------------
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="html" %>

<h1><bean:message key="welcome.message"/></h1>
-------------------- END : content.jsp ----------------------------

-------------------- BEGIN : footer.html --------------------------
-------------------- END : footer.html ----------------------------

That part regarding content.jsp is not processed. There is shown
nothing. The source from browser follows:

-------------------- BEGIN : result in browser --------------------


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


	<title>Confer title</title>



<h1><bean:message key="welcome.message"/></h1>



--------------------- END : result in browser ----------------------

I really don't know why it doesn't work. My configuration:
- Resin 2.0.1 (application created in webapps/confer)
	- directory struture:
- Struts 1.0-b1
- Internet Explorer 5.5 under W2k Prof.
- configs:

-------------------- BEGIN : struts-config.xml --------------------
<?xml version="1.0" encoding="windows-1250"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.0//EN"


-------------------- END : struts-config.xml ----------------------

-------------------- BEGIN : web.xml ------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "">

	<classpath id="/WEB-INF/classes"/>






-------------------- END : web.xml --------------------------------

-------------------- BEGIN : --------------------
welcome.message=Hello, friend!
-------------------- END : ----------------------

Thank you for your help and have a nice day.

With regards


View raw message