struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject include javascript (urgent)
Date Mon, 07 Jul 2003 13:34:37 GMT
Hi all,

I'm using the Struts framework for my web application.
Unfortunatly I have to include some java-script from an other webserver 
(Lotus Domino).

I have stored the url for the include in a Bean called: URLBean:

package ordermanager.urlbean;
public class URLBean {
        private String scriptFile;
        public String getScriptFile() {
                return scriptFile;
        public void setScriptFile(String string) {
                scriptFile = string;

In my first Action I create the URLBean. And I add it to the session 
object using the following code:

URLBean urlBean = new URLBean();
request.getSession().setAttribute("urls", urlBean);

Then In my JSP I tried to do this:

<logic:present name="urls">
        <jsp:useBean id="urls" scope="session" class="ordermanager.urlbean
.URLBean" />
        ScriptFile: <bean:write name="urls" property="scriptFile"/> <br/>

This code works... But I want to use this url in a <script> tag like this:

<script src="<%= urls.getScriptFile() %>"></script>

But when I try this I get a comiple error. Jasper complains that the urls 
object cannot be found.
What am I doing wrong. And what should I do to correct it?


Harm de Laat

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message