[Tomcat, HTTPD, Servlets & JSP] - JSP, I18n and XML
by dobbo
Hi
I'm using XML based JSP files, and they are working well for me. Somethings like this:
<jsp:root xmlns="http://www.w3c.org/1999/xhtml"
| xmlns:jsp="http://java.sun.com/JSP/Page"
| xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:c="http://java.sun.com/jsp/jstl/core"
| version="2.0">
| <jsp:useBean
| id="editor"
| class="my.path.Editor"
| scope="request"/>
| <fmt:bundle basename="my.path.Messages">
| <form method="submit/form.jsp">
| <frameset>
| <legend><fmt:message key="legend.label"/></legend>
| <c:forEach var="code" items="${editor.columnCodes}">
| <input id="code-${code.text}" type="radio" name="code"
| value="${code.text}"
| title="${code.description}"/>
| </c:forEach>
| </frameset>
| </firm>
| </fmt:bundle>
| </jsp:root>
|
Now the frameset's label is correctly rendered using the appropriate language, and the radio buttons class is set correctly to pick up the correct CSS style sheet.
My problem is how do I code the radio button's "value" and "title" attributes so they get correctly internationalised too? I really don't want to pass in the servlet request to the editor bean. Yes it would allow the bean to extract the locale and do the internationisation within itself and thus return the correct string. However, I think it would be much better to handle all the internationalisation in the JSP file and just have the bean return the keys (or part thereof). That seams a neater, and therefore better, design to me.
Many thanks for your suggestions
Steve
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111765#4111765
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111765
18 years, 4 months
[JBoss Seam] - Re: SeamTest Unit Tests Working...But Not Integration Tests
by neilac333
I hinted at this already, but I want to be clear about the structure of my project. The overall structure of my project is a WAR file deployed to WebLogic. In the WEB-INF/lib directory, along with all the third-party library files like Seam, etc will be two JAR files of my creation--a persistence JAR (which contains all my entities and some utility classes that use those entities) and a model JAR that contains all the Seam action classes that do all the work. Both JARs are in the classpath of my test and have seam.properties in their respective META-INF folders, and it is a class in the model JAR that I am trying to test. Then again, I am not actually testing any of my code since all I am calling is getValue("#{identity.loggedIn}");.
Now maybe none of this has anything to do with this issue, but since the SeamTest infrastructure is such a mystery, I thought I would mention it just in case. Especially since the SeamTest stuff I tested successfully in IntelliJ relies on all the configuration files and compiled classes to be in a directory called test-build.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111757#4111757
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111757
18 years, 4 months
[JBoss jBPM] - Please help~~deployment of webservice
by sim9739
HI all,
I am using jboss 4.0.4, jwsdp-2.0 and jbpm-bpel 1.1 beta 3. I have install everything needed to run the web service. after the installation, i deploy the hello example in the folder of jbpm-bpel.
I can see the hello service in this link
http://localhost:8080/jbossws/services
then , i click the link http://localhost:8080/hello/greeter?wsdl
then nothing is shown up in the browser. i am using safari as my browser.
Is that suppose to see something after clicking the link?
and i start my web service by going to link http://localhost:8080/hello/greeter
it throws an exception
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.jboss.util.NotImplementedException: HTTP GET not supported
org.jboss.ws.server.ServiceEndpointServlet.doGet(ServiceEndpointServlet.java:95)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
Did i do something wrong? Can anyone tell me why it throws exception? And How to fix the problem?
Thanks a lot!!!!!
sim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111755#4111755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111755
18 years, 4 months