RE: [S1] message-resources

2009-01-13 Thread Evert Lammerts
Hi Lukasz,

Thanks for your answer. They get copied to WEB-INF/classes/content at 
compile-time, and looking in the container I see they're there.

So that's not the problem... And I still haven't figured it out :-(

Evert

-Original Message-
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] 
Sent: dinsdag 13 januari 2009 14:59
To: Struts Users Mailing List
Subject: Re: [S1] message-resources

2009/1/13 Evert Lammerts :
> In the WEB-INF/src/content folder I have two files - a Messages.properties 
> and Messages_en.properties, both containing a line looking like this:

Put it to WEB-INF/classes/content


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



[S1] message-resources

2009-01-13 Thread Evert Lammerts
Hi all,

Sorry for the repetition, but I can't seem to figure this out in spite of all 
those resources you can find online.

Using struts 1.3.8 (in Liferay 5.1.2 portal on Tomcat 6.0, through the apache 
bridge) I'm having trouble accessing message resources.

In a portlet I've a struts-config that loads the resource file like this:



In the WEB-INF/src/content folder I have two files - a Messages.properties and 
Messages_en.properties, both containing a line looking like this:

error.name.required=Please fill in your name

My JSP has a line saying: 

The exception that is generated is:

javax.servlet.jsp.JspException: Missing message for key "error.name.required"

Now I understand this is might be a classpath problem. However, I don't know 
how am I expected to tell Struts where it can find these resources?

Kind regards,
Evert


IRC channel

2008-12-17 Thread Evert Lammerts
The channel irc.darkmyst.org #struts_users seems to be pretty empty, is it 
still used at all?


[S1] HTML taglib WindowState.MAXIMIZED

2008-12-17 Thread Evert Lammerts
Hi,

Strangely enough I still cannot create a form that submits with a parameter 
WindowState.MAXIMIZED. This is easy enough by creating an actionURL and putting 
that in the action attribute of a normal HTML form tag, but I'm using an 
ActionForm to populate and validate my form. In order to do so you need to 
create your form and input tags with the struts HTML taglib (at least, that's 
my understanding!), e.g.:





But now how do I get this form to submit to an action with 
WindowState.MAXIMIZED? Or is wanting this a mistake of thought on my side - 
does it go against a principal or best practice I should be respecting? I 
cannot imagine that I'm the first to have this problem.

Of course I could extend the Struts taglib to support a windowstate attribute 
in a html:form tag, like IBM does for example... but that seems quite some 
overhead for such a simple need.

I must be missing something... Can anybody explain??

Thanks, Evert

-Original Message-
From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] 
Sent: dinsdag 16 december 2008 20:11
To: Struts Users Mailing List
Subject: Re: html:form windowstate

Are you using the struts 1 portlet bridge?
(http://portals.apache.org/bridges/multiproject/portals-bridges-struts)
Haven't used it myself, but I'd be surprised if the framework didn't
support creating portlet urls. I have only used a WebSphere
Portal-proprietary extension which (from what I remember) created
portlet urls automatically.

Nils-H


On Tue, Dec 16, 2008 at 5:27 PM, Evert Lammerts  wrote:
> Hi Nils,
>
> I've tried your suggestion but it doesn't seem to be possible. The action 
> attribute in html:form expects an Action URI, while actionURL creates an 
> absolute URL. Still, being a beginner with this, I'm pretty sure I'm missing 
> something - I guess it IS possible to create a form tag that submits to a 
> WindowState.MAXIMIZED state.
>
> Thanks, Evert Lammerts
>
> -Original Message-
> From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com]
> Sent: dinsdag 16 december 2008 13:07
> To: Struts Users Mailing List
> Subject: Re: html:form windowstate
>
> You can probably use the 'var' attribute of the portlet:actionURL tag
> to store the url as a variable which you can reference by an
> expression in the html:form tag. Take a look at the tag reference for
> the portlet tags (PLT.22.2) in the JSR168 spec [1] for details.
>
> Nils-H
>
> [1] - http://jcp.org/aboutJava/communityprocess/final/jsr168/index.html
>
> On Tue, Dec 16, 2008 at 12:47 PM, Evert Lammerts  
> wrote:
>> Hi all,
>>
>> Using struts 1.3.8 I'm trying to use the struts-html taglib to create a form 
>> attribute that submits the form to a maximized window state, like possible 
>> with the actionURL tag:
>>
>> > WindowState.MAXIMIZED.toString() %>">
>>
>>"
>>method="POST">
>>
>> Is there a way to do this? Maybe with a hidden form input?
>>
>> Thanks,
>> Evert Lammerts
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: html:form windowstate

2008-12-16 Thread Evert Lammerts
Hi Nils,

I've tried your suggestion but it doesn't seem to be possible. The action 
attribute in html:form expects an Action URI, while actionURL creates an 
absolute URL. Still, being a beginner with this, I'm pretty sure I'm missing 
something - I guess it IS possible to create a form tag that submits to a 
WindowState.MAXIMIZED state.

Thanks, Evert Lammerts

-Original Message-
From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] 
Sent: dinsdag 16 december 2008 13:07
To: Struts Users Mailing List
Subject: Re: html:form windowstate

You can probably use the 'var' attribute of the portlet:actionURL tag
to store the url as a variable which you can reference by an
expression in the html:form tag. Take a look at the tag reference for
the portlet tags (PLT.22.2) in the JSR168 spec [1] for details.

Nils-H

[1] - http://jcp.org/aboutJava/communityprocess/final/jsr168/index.html

On Tue, Dec 16, 2008 at 12:47 PM, Evert Lammerts  wrote:
> Hi all,
>
> Using struts 1.3.8 I'm trying to use the struts-html taglib to create a form 
> attribute that submits the form to a maximized window state, like possible 
> with the actionURL tag:
>
>  WindowState.MAXIMIZED.toString() %>">
>
>"
>method="POST">
>
> Is there a way to do this? Maybe with a hidden form input?
>
> Thanks,
> Evert Lammerts
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



html:form windowstate

2008-12-16 Thread Evert Lammerts
Hi all,

Using struts 1.3.8 I'm trying to use the struts-html taglib to create a form 
attribute that submits the form to a maximized window state, like possible with 
the actionURL tag:

">

"
method="POST">

Is there a way to do this? Maybe with a hidden form input?

Thanks,
Evert Lammerts


No action instance for path [/path] could be created

2008-12-08 Thread Evert Lammerts
Hi list,

With my last question still standing (even though the struts list might not be 
the right resource for it), I'm off to the next question.

I've created a portlet application wrapping two portlets. My first goal should 
be an easy one - trying to link from the one portlet to the other. In order to 
do so I've created a JSP for each portlet:

/my/namespace/applications/view.jsp

And

/my/namespace/submit/view.jsp

Using struts I defined these actions:






And with Tiles I created these:






In the JSP I link to the other JSP and vica versa using:





and





The links do work - they do load the other JSP - but also generate the 
following error:

ERROR [RequestProcessor:296] No action instance for path 
/my/namespace/submit/view could be created
java.lang.NullPointerException

Why is this happening, can anybody explain?

Thanks!
Evert Lammerts


More portlets in portlet-app

2008-12-08 Thread Evert Lammerts
Hi list,

I'm trying to get a grip on portlet development with struts and it would be 
great if someone can help me out! I'm using a Tomcat 6 application server icw a 
Liferay 5.1.2 portal. I've managed to get struts 1.3.8 portlets working through 
a struts bridge and now I want to start developing. My use case is the 
following:

I need to generate a list of available applications that run at different 
locations. The content of this list is based on user attributes, but that is 
out of the context of this use case. When a link to an application is clicked 
it should pull up an application specific form containing input fields for all 
parameters necessary to run the application.

Intuitively I'd say the list of applications is a single portlet, while the 
form represents a second portlet. There should be a parent class / portlet for 
the form that can handle submission. The portlet that lists the available 
applications needs to initialize the portlet that displays the form with 
specific parameters - it should tell the portlet which form to display.

So, starting to develop, I put two portlets inside a single portlet-app 
definition in portlet.xml and I started with defining two actions, one to 
display the list of applications and one to display a sample form. But now I 
need to find a way to specify which portlet when the portlet-app is started. 
How would I do that? If you need some more information just let me know. Also, 
I'd be very interested in suggestions on the design of this use case!

Thanks a bunch!
Evert Lammerts