Minh Phuc

Greenhorn
+ Follow
since Aug 07, 2012
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Minh Phuc

Hi all,
I had deploy my project on internet. It's using session for login. From A machine I logged with admin role, from other machine I access this web, I don't need login but I have all things same A machine. Please suggest some things for me!
7 years ago
JSF

Tim Holloway wrote:


Encountered "." at line 2, column 37.



Most likely this means that you have a syntactical error in an EL expression at this location on your View Definition file.



Dear, If i remove tomahawk library if have no error. Here is a portion in my web.xml


<filter>
<filter-name>Extensions Filter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<description>
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>
Set the threshold size - files below this limit are stored
in memory, files above this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<init-param>
<description>
Set the path where the intermediary files will be stored.
</description>
<param-name>uploadRepositoryPath</param-name>
<param-value>/quangCaoBanner</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Extensions Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/f_quangcao/*</url-pattern>
</filter-mapping>

7 years ago
JSF
I'm doing demo fileupload using Tomahawk from http://balusc.blogspot.com. It's ok but in a portion in my code fired error, this code in last time ran normally. This is log file:


StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception com.sun.el.parser.ParseException: Encountered "." at line 2, column 37. Was expecting: ... at com.sun.el.parser.ELParser.generateParseException(ELParser.java:2309) at com.sun.el.parser.ELParser.jj_consume_token(ELParser.java:2191) at com.sun.el.parser.ELParser.DotSuffix(ELParser.java:1094) at com.sun.el.parser.ELParser.ValueSuffix(ELParser.java:1071) at com.sun.el.parser.ELParser.Value(ELParser.java:1016) at com.sun.el.parser.ELParser.Unary(ELParser.java:986) at com.sun.el.parser.ELParser.Multiplication(ELParser.java:750) at com.sun.el.parser.ELParser.Math(ELParser.java:670) at com.sun.el.parser.ELParser.Compare(ELParser.java:482) at com.sun.el.parser.ELParser.Equality(ELParser.java:376) at com.sun.el.parser.ELParser.And(ELParser.java:320) at com.sun.el.parser.ELParser.Or(ELParser.java:264) at com.sun.el.parser.ELParser.Choice(ELParser.java:222) at com.sun.el.parser.ELParser.Expression(ELParser.java:214) at com.sun.el.parser.ELParser.DeferredExpression(ELParser.java:152) at com.sun.el.parser.ELParser.CompositeExpression(ELParser.java:80) at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:177) at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:229) at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:273) at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:98) at com.sun.jsftemplating.component.ComponentUtil.resolveValue(ComponentUtil.java:608) at com.sun.jsftemplating.layout.descriptors.handler.Handler.getInputValue(Handler.java:197) at com.sun.jsftemplating.layout.descriptors.handler.HandlerContextImpl.getInputValue(HandlerContextImpl.java:142) at com.sun.jsftemplating.handlers.UtilHandlers.write(UtilHandlers.java:160) at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:321) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:250) at com.sun.jsftemplating.renderer.TemplateRenderer.encodeEnd(TemplateRenderer.java:139) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.TableColumnRenderer.encodeChildren(TableColumnRenderer.java:188) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:91) at com.sun.webui.jsf.renderkit.html.TableRowGroupRenderer.encodeChildren(TableRowGroupRenderer.java:199) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:91) at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeChildren(TableRenderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:551) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:246) at com.sun.jsftemplating.layout.LayoutViewHandler.renderView(LayoutViewHandler.java:683) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722)

7 years ago
JSF

Bill Gorder wrote:I don't see any @Entity annotations on them. You can persist and update them using an EntityManager.


There are entities, I don't want post long code. Somebody suggest?
I have 3 entities which mirror from 3 tables in database. The first entity named Khachhang


The 2nd entity named MaSoThuong:


The 3rd entity named ThamDu


and the entity are generated automatically


How can I insert or update table ThamDu?
I create a bean as

And my jsf page:

And my faces-config


I click on command link the random was called but the data on page was not change although i have been edited data on database. Another case, i navigate to other page after that i return but the data is old! Please help me!
7 years ago
JSF

Greg Charles wrote:Hi anh Phúc,

I think you're asking the same question I asked awhile back. Check it out here: https://coderanch.com/t/523651/JSF/java/URLs-always-one-step-behind


Bạn biết tiếng Việt hả? Rất vui khi được bạn giúp. Rất cảm ơn, mình đã giải quyết được vấn đề.
7 years ago
JSF
I have two page: index.xhtml in root directory and other page named dot_list.xhtml in f_dot folder. I run project, i see URL as http://localhost:8080/MyApp/ and the home page is index.xhtml. I redirect to dot_list.xhtml by using commandlink <h:commandLink action="dot_list">Next page</h:commandLink>. I recive URL is http://localhost:8080/MyApp/faces/index.xhtml. In my project have do filter on folder f_dot, so i can not do filter with URL as http://localhost:8080/MyApp/faces/index.xhtml. A part in my faces-config:

<navigation-rule>
<navigation-case>
<from-outcome>dot_list</from-outcome>
<to-view-id>/f_dot/dot_list.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
Please help me do filter on this folder.
7 years ago
JSF
I have 2 pages. The page 1 will transfer some data into page 2 so i have to use session scoped for bean in page 1. In page 2, i have to change some data which will influence data in page 1. But i go back page 1, the data is still not change. If i use View scope in page 1 i cannot transfer into page 2. Please help me do!
7 years ago
JSF