Re: NullPointerException in while initializing message resource

2006-04-05 Thread Ramkumar Krishnan
Hi Ganesh,
 thanks for your reply. But my properties file is directly under  the
WEB-INF/classes folder, not under any package.

regs,
Ramkumar



On 4/4/06, RathinaGanesh MeenakshiSundaram <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> You should specify the full package location of the message-resource
> file..
> The parameter should be like this..
>  />
> Hope this helps..!
>
> Thanks,
> Ganesh.
>
>
> On 4/4/06, Ramkumar Krishnan <[EMAIL PROTECTED]> wrote:
> >
> > Hi All,
> >   I am getting Null PointerException when i tried to view my login page.
> > Struts is not able to find the message resources.
> >
> > This is configuration in my struts-config.xml
> >  null="false">
> >
> > i am getting
> > java.lang.NullPointerException at
> > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java
> > :1174)
> > atorg.apache.struts.taglib.TagUtils.message(
> > TagUtils.java:1037) at
> org.apache.struts.taglib.bean.MessageTag.doStartTag
> > (
> > MessageTag.java:224) at
> > jsp_servlet._content._jsp.__login._jspService(__login.java:161) at
> > weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
> >
> >
> > I have attached the struts source i and i found it is happening in the
> > following line of TagUtils class
> > 
> > if (resources == null) {
> > ModuleConfig moduleConfig =
> getModuleConfig(pageContext);  //
> > Returns Null !!
> > resources =
> > (MessageResources) pageContext.getAttribute(
> > bundle + moduleConfig.getPrefix(),
> > PageContext.APPLICATION_SCOPE);
> > }
> >
> >
> > While debugging, it  is returning the ModuleConfig as null. I dont' know
> > why
> > it is trying to get the module config even though i haven't configured
> any
> > struts module.
> >
> >
> > This is my web.xml
> >  > Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> > 
> > AdminWar
> > 
> > contextConfigLocation
> > /WEB-INF/classes/spring/*.xml
> > 
> >
> > 
> > 
> > locatorFactorySelector
> > beanRefContext.xml
> > 
> > 
> > parentContextKey
> > application-context
> > 
> > 
> > 
> > org.springframework.web.context.ContextLoaderListener
> > 
> > 
> > action
> > org.apache.struts.action.ActionServlet
> > 
> > 
> > config
> > /WEB-INF/struts-config.xml
> > 
> > 
> > debug
> > 0
> > 
> > 
> > 
> > action
> > *.do
> > 
> > 
> > /WEB-INF/struts-html.tld
> > /WEB-INF/tlds/struts-html.tld
> > 
> > 
> > /WEB-INF/struts-logic.tld
> > /WEB-INF/tlds/struts-logic.tld
> 
> > 
> > 
> > /WEB-INF/struts-bean.tld
> > /WEB-INF/tlds/struts-bean.tld
> > 
> > 
> > /WEB-INF/c.tld
> > /WEB-INF/tlds/c.tld
> > 
> > 
> > /WEB-INF/struts-html-extn.tld
> > /WEB-INF/tlds/struts-html-extn.tld
> > 
> > 
> >
> > 
> > /WEB-INF/fmt.tld
> > /WEB-INF/tlds/fmt.tld
> > 
> > 
> > /WEB-INF/struts-html-el.tld
> > /WEB-INF/tlds/struts-html-el.tld
> > 
> > 
> > 
> > /WEB-INF/struts-bean-el.tld
> > /WEB-INF/tlds/struts-bean-el.tld
> > 
> > 
> >
> > 
> > /WEB-INF/struts-nested.tld
> > /WEB-INF/tlds/struts-nested.tld
> 
> > 
> > 
> > /WEB-INF/tavant_taglib.tld
> >
> /WEB-INF/tlds/tavant_taglib.tld
> > 
> > 
> > /WEB-INF/homer.tld
> > /WEB-INF/tlds/homer.tld
> > 
> > 
> > /WEB-INF/struts-tiles.tld
> > /WEB-INF/tlds/struts-tiles.tld
> 
> > 
> > 
> > /WEB-INF/PermissionTags.tld
> >
> >
> /WEB-INF/tlds/PermissionTags.tld
> > 
> > 
> > /WEB-INF/oscache.tld
> > /WEB-INF/tlds/oscache.tld
> > 
> > 
> > 
> > SecurePages
> > Security constraint /secure
> > /content/jsp/*
> > POST
> > GET
> > 
> > 
> > These are the roles who have
> access
> > users
> > 
> > 
> > 
> > FORM
> > myrealm
> > 
> > /content/jsp/login.jsp
> >
> /content/jsp/loginError.jsp
> > 
> > 
> > 
> > An Employee
> > users
> > 
> > 
> >
> > thanks in advance,
> > --
> > Ramkumar K,
> >
> > http://www.spreadfirefox.com/?q=affiliates&id=0&t=65
> > "> > border="0" alt="Get Firefox!" title="Get Firefox!" src="
> > http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>
> >
> >
>
>


--
Ramkumar Yadav K,

http://www.spreadfirefox.com/?q=affiliates&id=0&t=65";>http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>


NullPointerException in while initializing message resource

2006-04-04 Thread Ramkumar Krishnan
Hi All,
  I am getting Null PointerException when i tried to view my login page.
Struts is not able to find the message resources.

This is configuration in my struts-config.xml


i am getting
java.lang.NullPointerException at
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1174)
atorg.apache.struts.taglib.TagUtils.message(
TagUtils.java:1037) at org.apache.struts.taglib.bean.MessageTag.doStartTag(
MessageTag.java:224) at
jsp_servlet._content._jsp.__login._jspService(__login.java:161) at
weblogic.servlet.jsp.JspBase.service(JspBase.java:33)


I have attached the struts source i and i found it is happening in the
following line of TagUtils class

if (resources == null) {
ModuleConfig moduleConfig = getModuleConfig(pageContext);  //
Returns Null !!
resources =
(MessageResources) pageContext.getAttribute(
bundle + moduleConfig.getPrefix(),
PageContext.APPLICATION_SCOPE);
}


While debugging, it  is returning the ModuleConfig as null. I dont' know why
it is trying to get the module config even though i haven't configured any
struts module.


This is my web.xml
http://java.sun.com/dtd/web-app_2_3.dtd";>

AdminWar

contextConfigLocation
/WEB-INF/classes/spring/*.xml




locatorFactorySelector
beanRefContext.xml


parentContextKey
application-context



org.springframework.web.context.ContextLoaderListener


action
org.apache.struts.action.ActionServlet


config
/WEB-INF/struts-config.xml


debug
0



action
*.do


/WEB-INF/struts-html.tld
/WEB-INF/tlds/struts-html.tld


/WEB-INF/struts-logic.tld
/WEB-INF/tlds/struts-logic.tld


/WEB-INF/struts-bean.tld
/WEB-INF/tlds/struts-bean.tld


/WEB-INF/c.tld
/WEB-INF/tlds/c.tld


/WEB-INF/struts-html-extn.tld
/WEB-INF/tlds/struts-html-extn.tld




/WEB-INF/fmt.tld
/WEB-INF/tlds/fmt.tld


/WEB-INF/struts-html-el.tld
/WEB-INF/tlds/struts-html-el.tld


/WEB-INF/struts-bean-el.tld
/WEB-INF/tlds/struts-bean-el.tld



/WEB-INF/struts-nested.tld
/WEB-INF/tlds/struts-nested.tld


/WEB-INF/tavant_taglib.tld
/WEB-INF/tlds/tavant_taglib.tld


/WEB-INF/homer.tld
/WEB-INF/tlds/homer.tld


/WEB-INF/struts-tiles.tld
/WEB-INF/tlds/struts-tiles.tld


/WEB-INF/PermissionTags.tld
/WEB-INF/tlds/PermissionTags.tld


/WEB-INF/oscache.tld
/WEB-INF/tlds/oscache.tld



SecurePages
Security constraint /secure
/content/jsp/*
POST
GET


These are the roles who have access
users



FORM
myrealm

/content/jsp/login.jsp
/content/jsp/loginError.jsp



An Employee
users



thanks in advance,
--
Ramkumar K,

http://www.spreadfirefox.com/?q=affiliates&id=0&t=65";>http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>


form field is not populating immediately

2005-06-13 Thread Ramkumar Krishnan
Hi All,
 I have a form which has two fields.One is a string array and
another field which determines the size of the first field. i have
indexed methods to populate the string array.

i need to initialize the string[] based on the size(another form
field) when the indexed method gets invoked. But my second form field
is not populated by the struts.
Because of this i am getting null pointer exception.

This is my indexed method in my form
..
 public void setDisabledUser(int index, String object)
{
if (arr == null)
arr = new String[Integer.parseInt(getTotalSizePerPage())];
arr[index] = object;
}
...

getTotalSizePerPage() returns null because the form field is not yet
populated by struts when this method gets invoked.


Any clues to solve this problem?

thanks in advance,
-- 
Ramkumar Yadav K,

http://www.spreadfirefox.com/?q=affiliates&id=0&t=65";>http://sfx-images.mozilla.org/affiliates/Buttons/110x32/safer.gif"/>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]