static content served relative to struts package namespace

2010-04-05 Thread Bogdan Dumitrascu
 hi guys, i am developing a webapp called LearningPlatform, i have written some 
secure actions in struts2 for the login section, placed them in a  package with 
namespace="secure" , and now static contents like images and .css files that 
invoke images get served relative to "secure" like /secure/images/Header.jpg, 
although the "images" folder is placed in app's context root.(LPlatform/images)
The error i get from Tomcat is HTTP Status 404: 
"The requested resource (/LPlatform/secure/images/Header.jpg) is not 
available."
I tried rewriting the urls inside the jsp's as absolute paths, like  
/images/Header.jpg , but then i get:
"HTTP Status 404 The requested resource (/images/Header.jpg) is not available."

The images are served ok when using actions in  the root ("/") namespace.

One fix i found is to set the Context's path in server.xml to blank so that 
both absolute and relative image paths get served directly from localhost:8080, 
but that's not a feasible solution (in case i have more than one app).

The other fix was to use 

Re: How to keep quotation marks

2010-04-05 Thread Alex Rodriguez Lopez

No problem, at least you are not asking where to download hibernate ;D

Em 05-04-2010 15:35, Craig Ricciuto escreveu:

Thank you very muchthat was so easy...can't believe I didn't find that
while searching. I guess I need to upgrade my searching abilities a bit,
heh.  I used the escape attribute (set it to false) and worked like a
charm.

Thanks again.

On Mon, Apr 5, 2010 at 10:14 AM, Alex Rodriguez Lopez<
alo...@flordeutopia.pt>  wrote:


Try escape or escapeJavaScript atributes of  tag, never used
them but maybe are helpful for your situation

http://struts.apache.org/2.x/docs/property.html

Em 05-04-2010 15:06, Craig Ricciuto escreveu:

  Hi there. I've run into situation that I'm not quite sure how to resolve.

  In one of my action classes I create a string from data from my database.
This string though is actually supposed to be some Javascript that I use
in
the resulting JSP but the quotation marks when being output by Struts2
change to the HTML entity *"* where I would like them to stay as the
quotation marks I set in my action class.

A simple example would be something like the following:

In my action class:
String javascriptString = "LabelName: \""+ databaseLabeName +
"\".";


But when I grab the string from within the JSP I get:
LabeName:"TheLabelName"

This is not what I want as I need the actual quotation marks, so I am
wondering what I can do to keep the quotation marks in that string?

Thanks,
Craig




-
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: How to keep quotation marks

2010-04-05 Thread Craig Ricciuto
Thank you very muchthat was so easy...can't believe I didn't find that
while searching. I guess I need to upgrade my searching abilities a bit,
heh.  I used the escape attribute (set it to false) and worked like a
charm.

Thanks again.

On Mon, Apr 5, 2010 at 10:14 AM, Alex Rodriguez Lopez <
alo...@flordeutopia.pt> wrote:

> Try escape or escapeJavaScript atributes of  tag, never used
> them but maybe are helpful for your situation
>
> http://struts.apache.org/2.x/docs/property.html
>
> Em 05-04-2010 15:06, Craig Ricciuto escreveu:
>
>  Hi there. I've run into situation that I'm not quite sure how to resolve.
>>  In one of my action classes I create a string from data from my database.
>> This string though is actually supposed to be some Javascript that I use
>> in
>> the resulting JSP but the quotation marks when being output by Struts2
>> change to the HTML entity *"* where I would like them to stay as the
>> quotation marks I set in my action class.
>>
>> A simple example would be something like the following:
>>
>> In my action class:
>> String javascriptString = "LabelName: \""+ databaseLabeName +
>> "\".";
>>
>>
>> But when I grab the string from within the JSP I get:
>> LabeName:"TheLabelName"
>>
>> This is not what I want as I need the actual quotation marks, so I am
>> wondering what I can do to keep the quotation marks in that string?
>>
>> Thanks,
>> Craig
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>


Re: Regarding download for Hibernate!

2010-04-05 Thread Burton Rhodes
Uh...  www.hibernate.org,  java.sun.com ?

Thanks you Captain Obvious!  ;)

On 4/5/10, reuben swaroop singh  wrote:
> Hi,
>
>
> I wanna download and use Hibernate,spring,JEEE,ajax.Kindly suggest the
> webpage where i can download Hibernate latest version?
>
> kindly forward this to appropriate mail id.
>
> In Anticipation
>
> With Regards
>
>
> Reuben Appadurai
>
> On Wed, 31 Mar 2010 20:56:02 +0530  wrote
>>Hi,
>>
>
>>
>
>>
> I wanna download and use Hibernate.Kindly suggest the webpage where i can
> download Hibernate latest version?
>>
>
>>
> kindly forward this to appropriate mail id.
>>
>
>>
> In Anticipation
>>
>
>>
> With Regards
>>
>
>>
>
>>
> Reuben Appadurai
>
>
>
>
>
>

-- 
Sent from my mobile device

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



Re: How to keep quotation marks

2010-04-05 Thread Alex Rodriguez Lopez
Try escape or escapeJavaScript atributes of  tag, never used 
them but maybe are helpful for your situation


http://struts.apache.org/2.x/docs/property.html

Em 05-04-2010 15:06, Craig Ricciuto escreveu:

Hi there. I've run into situation that I'm not quite sure how to resolve.
  In one of my action classes I create a string from data from my database.
This string though is actually supposed to be some Javascript that I use in
the resulting JSP but the quotation marks when being output by Struts2
change to the HTML entity *"* where I would like them to stay as the
quotation marks I set in my action class.

A simple example would be something like the following:

In my action class:
String javascriptString = "LabelName: \""+ databaseLabeName +
"\".";


But when I grab the string from within the JSP I get:
LabeName:"TheLabelName"

This is not what I want as I need the actual quotation marks, so I am
wondering what I can do to keep the quotation marks in that string?

Thanks,
Craig




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



How to keep quotation marks

2010-04-05 Thread Craig Ricciuto
Hi there. I've run into situation that I'm not quite sure how to resolve.
 In one of my action classes I create a string from data from my database.
This string though is actually supposed to be some Javascript that I use in
the resulting JSP but the quotation marks when being output by Struts2
change to the HTML entity *"* where I would like them to stay as the
quotation marks I set in my action class.

A simple example would be something like the following:

In my action class:
String javascriptString = "LabelName: \""+ databaseLabeName +
"\".";


But when I grab the string from within the JSP I get:
LabeName: "TheLabelName"

This is not what I want as I need the actual quotation marks, so I am
wondering what I can do to keep the quotation marks in that string?

Thanks,
Craig


Re: Websphere 6.1 and Struts 1.3

2010-04-05 Thread Struts Two
I am running 1.3.10 on WAS 6.1 with no issues. Have installed the latest 
Websphere fixpacks and test.

However; if you struts version is 1.1 or 1.2, you may need to add the following 
property:

prependSlashToResource = true

to custom properties of your server.

--- On Mon, 4/5/10, Darshan Shroff  wrote:

> From: Darshan Shroff 
> Subject: Re: Websphere 6.1 and Struts 1.3
> To: user@struts.apache.org
> Received: Monday, April 5, 2010, 9:35 AM
> 
> Hi, 
> 
> I am facing a similar issue. Any update on this. ?
> 
> Regards,
> Darshan Shroff
> shroffdars...@gmail.com
> 
> 
> newton.dave wrote:
> > 
> > IIRC it's not necessary to use the extension when
> defining actions. That'd
> > actually kind of defeat one of the purposes of having
> a definable
> > extension.
> > 
> > 
> > --- On Tue, 6/10/08, Martin 
> wrote:
> > 
> >> From: Martin 
> >> Subject: Re: Websphere 6.1 and Struts 1.3
> >> To: "Struts Users Mailing List" 
> >> Date: Tuesday, June 10, 2008, 1:53 PM
> >> struts-config.xml
> >> 
> >> 
> >>         
>    
> >>         
>    
> >>      
> >>    >> type="com.schpro.action.AdminAction">
> >>        name="configure"
> >> path="/jsp/admin.jsp" />
> >>        name="projectsearch"
> >> path="/projectsearch.do" />
> >>     
> >> 
> >> you have admin defined as path instead of
> >> 'admin.do'
> >> 
> >> Martin
> >>   - Original Message - 
> >>   From: Sury Balasubramanian 
> >>   To: user@struts.apache.org
> 
> >>   Sent: Tuesday, June 10, 2008 1:30
> PM
> >>   Subject: Websphere 6.1 and Struts
> 1.3
> >> 
> >> 
> >>   Hello all,
> >>   I am having an issue with a
> webapp developed on struts
> >> 1.3 on Websphere 6.1.07 (running on AIX). The
> webapp when
> >> compiled, tested and run on Windows (websphere
> 6.1.015)
> >> works fine. The problem is as follows. The
> application
> >> installs properly. If i login and directly access
> a JSP i
> >> don't have an issue at all. If I use a url
> >>   http://:/sp/admin.do 
> (struts
> >> url). Users get the following error:
> >> 
> >>   "Error 404: Parsing error
> processing resource path
> >> /WEB-INF/struts-config.xml" 
> >> 
> >>   The following files are
> attached:
> >> 
> >>   web.xml
> >>   struts-config.xml
> >>   trace on websphere when the
> struts request is sent
> >> 
> >> 
> >>   The following were already
> checked:
> >>   struts.xml is referred to with a
> leading slash
> >> /WEB-INF/struts.xml in the web.xml as prescried by
> IBM.
> >>   the server property of leading
> slash is also set to make
> >> sure we read the leading slash. 
> >> 
> >> 
> >>   Is this a good place to post this
> or on the websphere
> >> forum? Is there something missing on the
> config.xml that
> >> websphere specifically validates? 
> >> 
> >>   Thanks
> >> 
> >>   Sury
> >> 
> >> 
> >> 
> >>
> --
> >> 
> >> 
> >>  
> >>
> -
> >>   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
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Websphere-6.1-and-Struts-1.3-tp17760714p28138386.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/

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



Re: Chain Result with parameters.

2010-04-05 Thread Bruno
Thanks Okan, but as I've wrote on my e-mail, that's exactly what I did, but,
still, doesn't work.

On Mon, Apr 5, 2010 at 5:52 AM, Okan Özeren  wrote:

> Hi,
>
> You will be able to pass a parameter with using this syntax:
>
> *  
>collect-address
>${userId}
>  *
>
> The ${userId} syntax will call getUserId on your action and pass parameter.
> I didn't try this but i hope it'll run successfully.
>
> I hope, this will help to you,
>
> Okan Özeren.
>
> On Sun, Apr 4, 2010 at 10:57 PM, Bruno  wrote:
>
> > I'm trying to make a chain action result with a parameter.
> >
> > However, the chain action's parameter is being set as null. I've already
> > checked the fileServer object and it's oid, and they aren't null. So I
> > believe the problem is on the chain.
> >
> > Any sugestions?
> >
> > Thanks!
> >
> >
> >
> > 
> > /Server_main
> > /jsp/fileServer-edit.jsp
> > 
> > FileSource_main
> > /
> > true
> > ${fileServer.oid}
> > 
> > 
> >
> > --
> > Bruno Morelli Vargas
> > Mail: brun...@gmail.com
> > Msn: brun...@hotmail.com
> > Icq: 165055101
> > Skype: morellibmv
> >
>



-- 
Bruno Morelli Vargas
Mail: brun...@gmail.com
Msn: brun...@hotmail.com
Icq: 165055101
Skype: morellibmv


Re: i18n problem with Struts2 - getting weird

2010-04-05 Thread Alex Rodriguez Lopez
Do you have your struts.custom.i18n.resources property correctly 
assigned to your bundle(s)?


Em 05-04-2010 11:27, Marc Logemann escreveu:

Hi,

imagine the following jsp (saved in UTF-8 encoding):

-- snipp ---

<%@ taglib prefix="s" uri="/struts-tags" %>




Hauptmenü






-- END snipp ---

Now i have a resource bundle like that:

menu.mainmenu=Hauptmen\u00fc

Inside its the german u with 2 dots on top.

Now i run the following action:

-- snipp ---

public class TestStruts2Action extends ActionSupport {

 String foo;

 public String execute() {
 foo = getText("menu.mainmenu");

 return Action.SUCCESS;
 }

 public String getFoo() {
 return foo;
 }
}

-- END snipp ---

When i run this in the browser, i am getting 3 different things.

* The hardcoded "Hauptmenü" in the JSP will be displayed correcty. This means 
that the browser has correctly read the stream with a UTF-8 encoder.
* The string gets out of the bundle via  wil be broken. Instead of an Entity 
or the raw UTF-8 character, i am getting "ef bf bd" as last character, means unknown 
character.
* the third way of exposing attribute "foo" will result in the word 
"Hauptmenü" (with the correct HTML entity). Remeber, it comes from the same bundle 
as you can see in the action.

So something is wrong with  tag but what. I tried solving this one for about 4 hours 
without any luck. When switching the browser encoding to ISO-8859-1, the  works but 
then of course variant 1 doesnt work because i hardcoded the "umlaut" to the JSP and i 
definitely need that running because thats the natural way to do.

Thanks for hints.

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





-
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



i18n problem with Struts2 - getting weird

2010-04-05 Thread Marc Logemann
Hi,

imagine the following jsp (saved in UTF-8 encoding):

-- snipp ---

<%@ taglib prefix="s" uri="/struts-tags" %>




Hauptmenü






-- END snipp ---

Now i have a resource bundle like that:

menu.mainmenu=Hauptmen\u00fc

Inside its the german u with 2 dots on top.

Now i run the following action:

-- snipp ---

public class TestStruts2Action extends ActionSupport {

String foo;

public String execute() {
foo = getText("menu.mainmenu");

return Action.SUCCESS;
}

public String getFoo() {
return foo;
}
}

-- END snipp ---

When i run this in the browser, i am getting 3 different things.

* The hardcoded "Hauptmenü" in the JSP will be displayed correcty. This means 
that the browser has correctly read the stream with a UTF-8 encoder.
* The string gets out of the bundle via  wil be broken. Instead of 
an Entity or the raw UTF-8 character, i am getting "ef bf bd" as last 
character, means unknown character.
* the third way of exposing attribute "foo" will result in the word 
"Hauptmenü" (with the correct HTML entity). Remeber, it comes from the 
same bundle as you can see in the action.

So something is wrong with  tag but what. I tried solving this one for 
about 4 hours without any luck. When switching the browser encoding to 
ISO-8859-1, the  works but then of course variant 1 doesnt work because 
i hardcoded the "umlaut" to the JSP and i definitely need that running because 
thats the natural way to do.

Thanks for hints.

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





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



Re: Regarding download for Hibernate!

2010-04-05 Thread reuben swaroop singh
Hi,


I wanna download and use Hibernate,spring,JEEE,ajax.Kindly suggest the webpage 
where i can download Hibernate latest version?

kindly forward this to appropriate mail id.

In Anticipation

With Regards


Reuben Appadurai

On Wed, 31 Mar 2010 20:56:02 +0530  wrote
>Hi,
>

>

>
I wanna download and use Hibernate.Kindly suggest the webpage where i can 
download Hibernate latest version?
>

>
kindly forward this to appropriate mail id.  
>

>
In Anticipation
>
  
>
With Regards
>
  
>

>
Reuben Appadurai







Re: Websphere 6.1 and Struts 1.3

2010-04-05 Thread Darshan Shroff

Hi, 

I am facing a similar issue. Any update on this. ?

Regards,
Darshan Shroff
shroffdars...@gmail.com


newton.dave wrote:
> 
> IIRC it's not necessary to use the extension when defining actions. That'd
> actually kind of defeat one of the purposes of having a definable
> extension.
> 
> 
> --- On Tue, 6/10/08, Martin  wrote:
> 
>> From: Martin 
>> Subject: Re: Websphere 6.1 and Struts 1.3
>> To: "Struts Users Mailing List" 
>> Date: Tuesday, June 10, 2008, 1:53 PM
>> struts-config.xml
>> 
>> 
>> 
>> 
>>  
>>   > type="com.schpro.action.AdminAction">
>>   > path="/jsp/admin.jsp" />
>>   > path="/projectsearch.do" />
>> 
>> 
>> you have admin defined as path instead of
>> 'admin.do'
>> 
>> Martin
>>   - Original Message - 
>>   From: Sury Balasubramanian 
>>   To: user@struts.apache.org 
>>   Sent: Tuesday, June 10, 2008 1:30 PM
>>   Subject: Websphere 6.1 and Struts 1.3
>> 
>> 
>>   Hello all,
>>   I am having an issue with a webapp developed on struts
>> 1.3 on Websphere 6.1.07 (running on AIX). The webapp when
>> compiled, tested and run on Windows (websphere 6.1.015)
>> works fine. The problem is as follows. The application
>> installs properly. If i login and directly access a JSP i
>> don't have an issue at all. If I use a url
>>   http://:/sp/admin.do  (struts
>> url). Users get the following error:
>> 
>>   "Error 404: Parsing error processing resource path
>> /WEB-INF/struts-config.xml" 
>> 
>>   The following files are attached:
>> 
>>   web.xml
>>   struts-config.xml
>>   trace on websphere when the struts request is sent
>> 
>> 
>>   The following were already checked:
>>   struts.xml is referred to with a leading slash
>> /WEB-INF/struts.xml in the web.xml as prescried by IBM.
>>   the server property of leading slash is also set to make
>> sure we read the leading slash. 
>> 
>> 
>>   Is this a good place to post this or on the websphere
>> forum? Is there something missing on the config.xml that
>> websphere specifically validates? 
>> 
>>   Thanks
>> 
>>   Sury
>> 
>> 
>> 
>> --
>> 
>> 
>>  
>> -
>>   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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Websphere-6.1-and-Struts-1.3-tp17760714p28138386.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Chain Result with parameters.

2010-04-05 Thread Okan Özeren
Hi,

You will be able to pass a parameter with using this syntax:

*  
collect-address
${userId}
  *

The ${userId} syntax will call getUserId on your action and pass parameter.
I didn't try this but i hope it'll run successfully.

I hope, this will help to you,

Okan Özeren.

On Sun, Apr 4, 2010 at 10:57 PM, Bruno  wrote:

> I'm trying to make a chain action result with a parameter.
>
> However, the chain action's parameter is being set as null. I've already
> checked the fileServer object and it's oid, and they aren't null. So I
> believe the problem is on the chain.
>
> Any sugestions?
>
> Thanks!
>
>
>
> 
> /Server_main
> /jsp/fileServer-edit.jsp
> 
> FileSource_main
> /
> true
> ${fileServer.oid}
> 
> 
>
> --
> Bruno Morelli Vargas
> Mail: brun...@gmail.com
> Msn: brun...@hotmail.com
> Icq: 165055101
> Skype: morellibmv
>