Win a copy of Rust Web Development this week in the Other Languages forum!

prathibha shiju

Greenhorn
+ Follow
since Jun 19, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prathibha shiju

Hi,
I have a Java object saved in session. I need to access that object in JavaScript code. This script code is written in .js file only not inside JSP or ASP.
Is there any way to do that?

Regards
Prathibha
hi
i think certification helps in job hunting, but to a small level.
its easy to get the resume shortlisted.
some openings are there only for certified people.
the other side is that
Interviewer may focus mainly on some areas like threads, synchronisation, functions of Collection class, strings etc.
And if they didnot answer one more question may come like "who gave you certificate?"

regards
prathibha
please tell me how to find out the number of string objects created in the following string creations.can space be counted as a string object?
String s1="abc"+"cfg";
String s2="abc"+"abc";
String s3=" "+"cfg";
yes that was nullpointer exception. but still i could not corre t that.
Hi
my service implementation class is marked as @Service and my controller class as @Controller,
and i have @Autowired
private FruitService fruitService; in my controller class. and getters and setters of the same. but when i try to acesss fruitService through getter methos i am getting classnotfound exception. can any body tell me what might have went wrong.
hi Dusi,
my front screen is getting populated with the values .

this is the code..
<h:selectOneListbox id="drinks" value="#{StoreNameBean.drinks}"
size="5">
<f:selectItems value="#{drinks}"/>

</h:selectOneListbox>

in the main bean if i declare drinks as string , then i can print the value of value property using "#{StoreNameBean.drinks}"

but i want to get all the properties.
please help me
regards
prathibha
13 years ago
JSF
hi
i want to read the selected item from from a selectonelistbox. the list entries are having values label and value fields.
so i put the getters and setters of label and value in a seperate bean class and the getter and setter of that class inside my main bean class that is userbean. nad i want to get the label value of what i selected from list. so i tried to read that as
<h:outputText value="#{StoreNameBean.drinks.label}" />
but i am getting the error
(Conversion Error setting value '300' for 'null Converter'. )

can anyone tell me what might have went wrong?
since i am new to jsf ,not sure of the way that i am using to read the field.please correct me if i am wrong.



my faces-config.xml is
<faces-config>
<managed-bean>
<managed-bean-name>StoreNameBean</managed-bean-name>
<managed-bean-class>my.UserBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

<managed-bean>
<managed-bean-name>drinks</managed-bean-name>
<managed-bean-class>java.util.ArrayList</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>

<list-entries>
<value-class>javax.faces.model.SelectItem</value-class>
<value>#{drink0}</value>
<value>#{drink1}</value>

</list-entries>

</managed-bean>

<managed-bean>
<managed-bean-name>drink0</managed-bean-name>
<managed-bean-class>
javax.faces.model.SelectItem</managed-bean-class>
<managed-bean-scope>none</managed-bean-scope>
<managed-property>
<property-name>label</property-name>

<value>pepsi</value>
</managed-property>
<managed-property>
<property-name>value</property-name>

<value>200</value>
</managed-property>
</managed-bean>

<managed-bean>
<managed-bean-name>drink1</managed-bean-name>
<managed-bean-class>
javax.faces.model.SelectItem</managed-bean-class>
<managed-bean-scope>none</managed-bean-scope>
<managed-property>
<property-name>label</property-name>

<value>cola</value>
</managed-property>
<managed-property>
<property-name>value</property-name>
<value>300</value>
</managed-property>
</managed-bean>

<navigation-rule>
</navigation-rule>
</faces-config>



regards
prathibha
13 years ago
JSF
hi
please tell me how to read the selected item from selectOneListBox.
I tried using select in myBean but i am getting only value but i wnat the label.
<h:selectOneListbox id="sel" value="#{myBean.select}"
size="5">
regards
prathibha
13 years ago
JSF
hi
when i tried to run my simple jsf application in jboss i am getting the following exceptions. the same application works in tomcat with out building.

please help me to solve this...

javax.servlet.ServletException: viewId:/firstpage.jsf - View /firstpage.jsf could not be restored.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.faces.application.ViewExpiredException: viewId:/firstpage.jsf - View /firstpage.jsf could not be restored.
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


regards
prathibha
13 years ago
This is my web.xml:....

<web-app>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>


</web-app>




This is my faces-config.xml:..........

<faces-config>
<navigation-rule>
<from-view-id>firstpage.jsp</from-view-id>
<navigation-case>
<from-outcome>secondpage</from-outcome>
<to-view-id>secondpage.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

please help me...
13 years ago
JSF
how you corrected this problem? now i too face the same problem
13 years ago
hi ,
actually that web.xml,application.xml and faces-config.xml are inside web-inf only.what you saw was a typing problem.
still thats not working.
13 years ago
JSF
hi,
i created a simple application in jsf for page navigation.with out building that works in tomcat. and i tried to run the war file in jboss .
and i got the following exception.
the folder structure if my war file is

meta-inf , web-inf ,firstpage.jsp , secondpage.jsp, index.jsp
| |
V V
manifest.mf application.xml,faces-config.xml,web.xml




javax.servlet.ServletException: viewId:/firstpage.jsf - View /firstpage.jsf could not be restored.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.faces.application.ViewExpiredException: viewId:/firstpage.jsf - View /firstpage.jsf could not be restored.
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

can anyone tell me, what i have to change to make that application running correctly.?

regards
prathibha
13 years ago
JSF
krishna,
for my project i have to use eclipse,ant and jboss server.i have to release war files.
i am new to jsf. and i learned jsf
using tomcat only,with out eclipse.and after builing those application i tried on jboss,that was
not working.
so i thought its the difference of folder structure thats creating problem.i tried that in
myeclipse with tomcat, that was
working . again from kickstart site i got a war file ,that also showed the same problem.this
is the situation. now please tell me
what are the plugins,files and folders i have to use to make a jsf application using
eclipse and run on jboss.
13 years ago
JSF
i want to deploy my jsf application in jboss.i created war files using ant.
same application runs in tomcat but not in jboss. from the first screen i cant go to second screen , the error showed is jsp page not found. but that page is there and mapping is there in faces-config.xml.
so i felt like may be the folder structure is not correct.can any one tell me the actual folder structure . if you have please send me one build.xml file.

thanks well in advance
13 years ago
JSF