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?

Thanks
Shipra Jain

-----Original Message-----
From: "Paradis, André" [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 8:58 AM
To: [EMAIL PROTECTED]
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
file
and modify the tld so it uses your tag class instead of the default one.

Andre

-----Original Message-----
From: Juraj Kazda [mailto:[EMAIL PROTECTED]]
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
what...


-------------------- 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' />
</template:insert>
-------------------- 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">

<html>

<head>
        <title>Confer title</title>
</head>


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

</html>
-------------------- END : indexTemplate.jsp -----------------------




-------------------- BEGIN : header.html --------------------------
-> HEADER
<hr>
-------------------- 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 --------------------------
<hr>
-> FOOTER
-------------------- 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">

<html>

<head>
        <title>Confer title</title>
</head>


<body>
        -> HEADER
<hr>

        

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

        <hr>
-> FOOTER

</body>

</html>
--------------------- 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:
                %RESIN_HOME%/webapps/confer/index.jsp
                %RESIN_HOME%/webapps/confer/indexTemplate.jsp
                %RESIN_HOME%/webapps/confer/header.html
                %RESIN_HOME%/webapps/confer/content.jsp
                %RESIN_HOME%/webapps/confer/footer.html
                %RESIN_HOME%/webapps/confer/WEB-INF/struts-bean.tld
                %RESIN_HOME%/webapps/confer/WEB-INF/struts-html.tld
                %RESIN_HOME%/webapps/confer/WEB-INF/struts-template.tld
                %RESIN_HOME%/webapps/confer/WEB-INF/struts-config.xml
                %RESIN_HOME%/webapps/confer/WEB-INF/web.xml
        
%RESIN_HOME%/webapps/confer/WEB-INF/classes/org/res/confer.properties
                %RESIN_HOME%/webapps/confer/WEB-INF/lib/struts.jar
- 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"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>


</struts-config>
-------------------- 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" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

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

        <servlet>

                <servlet-name>action</servlet-name>
        
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

                <init-param>
                        <param-name>config</param-name>
        
<param-value>/WEB-INF/struts-config.xml</param-value>
                </init-param>
                <init-param>
                    <param-name>application</param-name>
                    <param-value>org.res.confer</param-value>
                </init-param>
                <init-param>
                    <param-name>validate</param-name>
                    <param-value>true</param-value>
                </init-param>
        
                <load-on-startup>1</load-on-startup>
        </servlet>

        <servlet-mapping>
                <servlet-name>action</servlet-name>
                <url-pattern>*.do</url-pattern>
        </servlet-mapping>

        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>

        <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-template.tld</taglib-uri>
        
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
        </taglib>
</web-app>
-------------------- END : web.xml --------------------------------




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






Thank you for your help and have a nice day.

With regards

--jerryk

Reply via email to