Newbie question for struts

H

Hannes Heckner

Hello,

I have the following code in my otherwise fully functional jsp:

<% String test = "Hello World"; %>
<logic:present name="test">
here is hello world
</logic:present>

This will never show "here is hello world
Why?

Suggestion:
Because test is no bean

What I am trying to accomplish is this:

<%MyBean bean = myForm.getBean() %>

it is possible in my application that bean is null
so if I use

<bean:write name="bean" property"someting"/>

I will get a NPE

so I tried to use

<logic:present name="bean"/>
Hurray it is here
<bean:write name="bean" property"something"/>
</logic:present>

with the same effect that even if the bean is there there is no output


Any tips on this one?

Best regards,
Hannes
 
J

jungi

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top