Suzanne Israel

Greenhorn
+ Follow
since Aug 23, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suzanne Israel

Originally posted by Abhilash AT:
friends
I am working in struts frame work and i have to pass a data through the struts tag <html:link> as we do in HTML. The corresponding code in HTML will be like as follows

<a href='/LibraryManagement/StaffEditMember2.jsp?id=108>Edit</a>

On the target page we get the value of id using request.getParameter(id)

How can i replace <a> with <html:link>

Please help me



Try this:

<html:link href="/LibraryManagement/StaffEditMember2.jsp" paramId="id" paramName="id" paramScope="request">Edit</html:link>

You can also use paramName in conjunction with paramProperty if the value you want is contained within a bean rather than the request.

I hope this helps -

Suzanne Israel
SCJP 1.4
19 years ago

Originally posted by Todd Farmer:
I see that there are subprojects of Struts that have "-el" attached to them (e.g., struts-el.jar), but I can't really find useful documentation on whether this would help me enable EL with Struts or not, or how to use it.



Todd - you're on the right track.

you will need to put the following in your WEB-INF/lib folder or server classpath in addition to struts.jar etc:

struts-el.jar
jstl.jar

Your JSP page should include EL-specific taglib directives, e.g:
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>

That should give you what you need.

Specific information regarding Struts EL implementation is at:
http://struts.apache.org/faqs/struts-el.html

There's also some helpful content regarding the non-EL vs EL Struts taglibs in Struts: The Complete Reference (James Holmes & Herb Schildt)

I hope this helps.

regards,
Suzanne Israel
[ October 31, 2004: Message edited by: Suzanne Israel ]
19 years ago
I have a JSP page that displays any informational messages saved using the ActionMessages.GLOBAL_MESSAGE key.

The code itself works OK - the problem is that regardless of how I code the <html:messages> tag (and believe me I've tried multiple combinations), the message output always seems to include some question marks in the output, as shown in the generated HTML below:

<b>Informational Messages:</b><ul>
<li>???Values were successfully overridden.???</li>
</ul><br/>

If anybody can shed some light on what is causing these question marks to appear (and how I can get rid of them), I'd much appreciate it!

My deployment environment is:
Weblogic 6.1 (sp3) (servlet api 2.3)
Struts 1.1
JDK 1.3.1
JSTL 1.1

Our standard page header sets the character encoding to:
<meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">

Relevant code extracts etc are shown below:

JSP:

<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<html:messages id="msg" message="true"
header="messages.header"
footer="messages.footer">
<li><fmt:message key="${msg}"/></li>
</html:messages>

MESSAGE RESOURCES:

messages.header=<b>Informational Messages:</b><ul>
messages.footer=</ul><br/>
messages.override.success=Values were successfully overridden.

JAVA:

ActionMessages msgs = new ActionMessages();

try {
// does stuff here
msgs.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("messages.override.success"));
} catch (Exception e) {
msgs.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.generic.message"));
}

saveMessages(request, msgs);
return mapping.findForward("success");


Hopefully,

Suzanne Israel
19 years ago
Wow - that is AWESOME. Congratulations!

19 years ago
With many thanks to all the resources/people at JavaRanch.

Next up: SCWCD 1.4 - I've already started working my way through Head First Servlets & JSP.... Terrific book.
19 years ago
Thanks for all your replies and suggestions. I'll definitely try to find out more about Cruise Control - it sounds like it might be exactly what we need.

Suzanne
20 years ago
Some of the beauties of Ant (as opposed to running builds directly from within an IDE) include:

- it's not tied to a specific application/IDE. While it's often possible to run Ant scripts from within an IDE, build tasks that are IDE-specific don't necessarily translate to another environment. If your shop suddenly abandoned JDeveloper for another product, you'd have to reimplement your build process. With Ant your build script is portable not just from one platform to another, but from one development environment to another.

- secondly, Ant can run both inside and outside of an IDE. If you need automated builds, Ant really shines.

- thirdly, you can use Ant to create both developer and production builds. The sample introductory chapter of the Pragmatic Automation book gives a perfect example of what happens when one person's build works perfectly within his own environment/IDE, but fails for another person because of a missing file. Using Ant alongside of your own IDE builds helps to ensure that the main project build is also running smoothly.

regards,
Suzanne Israel
20 years ago
Lasse wrote:


To me it sounds like your complex build scripts aren't due to using the wrong tools but due to a complex application. Are there any specific things about your daily development routines that bugs you (pun not intended)?

Regarding the use of CruiseControl, if you'd like to incorporate more visual feedback into your scheduled builds then CruiseControl is definitely a safe choice.



You're right - our tools are good so far as they go (and definitely a huge improvement on what we had before).

The tricky part is the feedback, especially integrating all of the sub build results into the overall results displayed to our developers on our build results web page.

The overall build log includes all the sub-build log info, but we aren't currently able to automatically integrate (for example) the sub-build junit test reports or javadocs. We're handcoding these links into the build results page as each new sub-build is added.

thanks,
Suzanne
20 years ago
I work on a huge application with a primary project and a growing number of subprojects. At present, we manage the automated build process using a combination of perl and Ant (submitted nightly via a Unix cron job).

The perl scripts manage setting and verifying system and environment properties, backup of the prior build, checkout from CVS, triggers the primary Ant build tasks, starts and stops our development Weblogic 6.1 server and precompiles our JSPs.

The Ant build script itself is large and complex (it includes java and C++ compiles, javadocs, automated unit tests etc), and additionally invokes perl wrappers for other Ant build files.

As our application grows larger, the build process becomes more and more convoluted and the number of sub-builds grows.

What tools are most effective for this type of scenario? I know that we could probably improve the process a lot by using a build.properties file instead of the separate perl wrapper scripts, and handling the CVS checkout directly from within Ant, but would we benefit from using Cruise Control, Maven or some of the other automation tools?

Suzanne Israel
20 years ago

Originally posted by Jim Pleger:
For Java, Eclipse is a VERY good IDE. It is truly free, too! And, since it is the foundation for IBM's WebSphere Development Studio, it will be good to know if you ever migrate to that.
Yes, there is a bit of a learning curve to Eclipse, but (FINALLY) there are a couple of books out there on it now:
Eclipse in Action by David Gallardo (Manning)
and
The Java Developer's Guide to Eclipse by Sherry Shavor (Addison Wesley).
I recommend the former; it's easier.


Jim -
Thanks for the info regarding Eclipse.
For myself, I've been using Netbeans for some time, and I like it. I supplement Netbeans with UltraEdit (which is a great text editor and well worth the license fee).
Several co-workers are using Eclipse, though, and from what I can tell it offers a lot of extra features that aren't (as far as I know) available in Netbeans. However, I've not yet been able to work out how to configure Eclipse to suit my needs, and the learning curve has been what's held me back from using it. I will certainly check out the books you mentioned.
Suzanne

Originally posted by Jim Pleger:
For Java, Eclipse is a VERY good IDE. It is truly free, too! And, since it is the foundation for IBM's WebSphere Development Studio, it will be good to know if you ever migrate to that.
Yes, there is a bit of a learning curve to Eclipse, but (FINALLY) there are a couple of books out there on it now:
Eclipse in Action by David Gallardo (Manning)
and
The Java Developer's Guide to Eclipse by Sherry Shavor (Addison Wesley).
I recommend the former; it's easier.


Jim -
Thanks for the info regarding Eclipse.
For myself, I've been using Netbeans for some time, and I like it. I supplement Netbeans with UltraEdit (which is a great text editor and well worth the license fee).
Several co-workers are using Eclipse, though, and from what I can tell it offers a lot of extra features that aren't (as far as I know) available in Netbeans. However, I've not yet been able to work out how to configure Eclipse to suit my needs, and the learning curve has been what's held me back from using it. I will certainly check out the books you mentioned.
Suzanne
21 years ago