[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm a Crystal Reports newbie, I want to write a simple java application that is print my data (using hibernate and jsf).
This is my method in my managebean:

public void print(List<Child> list) {
            
            try {
                  
                  // Instantiate the report object
                  String report_Location;
                  report_Location = "/com/reports/Report1.rpt";
                  
                  // This interface provides a common service point for getting a report source that is used to view and export reports.
                  IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
                  
                  // It is recommended to use the ReportClientDocument to obtain an IReportSource object.
                  // it's also Creates a new reportsource for the report specified.
                  Object reportSource = null;
                  reportSource = rptSrcFactory.createReportSource(report_Location, java.util.Locale.getDefault());
                  
                  // creating a Fields object, populating it with the parameter values then adding that to the viewer.
              CrystalReportViewer viewer = new CrystalReportViewer();
              
              /*
               * Before parameter fields can be set in a report, the fields must first be created and initialized.
               * Individual parameter fields are all stored in a Fields object.
               * The Fields object is simply a collection of different fields that can be passed to the viewer.
               */
              
              // Create a Fields object to store the parameter fields in.
              // Returns an object that contains the parameters in the report.…
0
Free Tool: Path Explorer
LVL 11
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

HI Experts,

Name i have added french language displaying properly
billername i have added korean language displaying as ????
how to resolve this issue

try  {
			
			OutputStream out = new FileOutputStream("example.properties");
			Properties properties = new Properties();
			properties.setProperty("name", "Rapport de paiement de facture");
			properties.setProperty("billername", "\u767C\u55AE\u4EBA\u540D\u7A31");
			properties.setProperty("version", "1.0");			
			properties.store(out, "This is a sample for java properties");

		} catch (IOException e) {
			e.printStackTrace();
		}

		try  {
			
			BufferedReader in = new BufferedReader(
			   new InputStreamReader(
	                      new FileInputStream("example.properties"), "UTF8"));			
			Properties prop = new Properties();
			prop.load(in);			

			System.out.println("####Properties.stringPropertyNames usage####");
			for (String property : prop.stringPropertyNames()) {
				String value = prop.getProperty(property);
				System.out.println(property + "=" + value);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

Open in new window



o/p:

####Properties.stringPropertyNames usage####
version=1.0
billername=?????                        //COMING AS ? INSTEAD OF KOREAN LANGUAGE
name=Rapport de paiement de facture
0
Hi,
I want to populate data into the model from inside a controller.
Suppose there is a controller method  fetchResponse(Task task) That takes some Task object...
and returns a json TaskResponse object.

now here could be one implementation :

fetchResponse(Task task  @(RequestParam))
{

TaskResponse taskResponse = new TaskResponse(task);
return serialize taskResponse.
}

TaskResponse {

attributes.
.
.
.
TaskResponse(Task task)
{
populate attributes
}

This is one way in which all the attributes of the TaskResponse object will be filled inside the TaskResponse object which will be serialized and sent .

Please suggest any pros and cons of this aproach... Also any alternatives.

Thanks
0
Description: We have a Java app configured to let uses run it from a server on one of our servers on our network via RDS. The issue is that the Java app does not have a built-in timeout, So the network admins set a timeout on the server for the users sessions.

Problem:  The server timeout sessions do timeout, but the java app running in a window does not report mouse and keystroke activity back to the remote server, and when the time-out expires your session  is just gone.
Usually mid something important !

Question: Is there someway to configure either the java session or the RDS session to report activity so that the app behaves like a windows developed application ?

Thanks, any help is appreciated.
0
hi am having this error when seting my java home am in window 7
[code]C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries


C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent librarie

C:\Users\userpc>set JAVA_HOME=C:\java6

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%\BIN;

C:\Users\userpc>JAVA -VERSION
'JAVA' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>set JAVA_HOME=C:\java6

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%/BIN;

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>SET PATH=PATH%JAVA_HOME%;

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

Open in new window

[/code]
0
Hi,

I'm currently facing the following issue with a javafx-application under NetBeans IDE.

When I'm adding a specific maven dependy (bcprov158- bouncycastle provider), I can't build program anymore:

failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project

Does anyone know how to solve this?

Klaus
0
I see the below exeception without much details. Not sure the root cause of it
javax.servlet.ServletException
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at some.other.package.RoleRestoreFilter.doFilter(RoleRestoreFilter.java:115)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at some.package.SecurityFilter.doFilter(SecurityFilter.java:321)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:203)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at …
0
I am working in a new project on a complex GUI with Java 8 and Swing. We use among others the Container class that has a void add(Component comp, Object constraints) method that adds the component with constraints information. I want to build a dialogue with three panels, where pressing a button would result in switching the constraint information of the components that do not include the button object. How is it possible to switch the constraint information easily?
0
Hello,
facing a problem to choose best client side framework for localization with jsp?
I have REST API which i need to consume at client side and display it on jsp will it be safe to use spring mvc for client side?
What is the best practice to integrate client-server ?
0
how to configure https in jboss7
0
Free Tool: SSL Checker
LVL 11
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

we have web portal running on jboss7.
how to support both IPv6 and IPV4 for web portal.
0
We are using Jasper reports in our product, and there is a requirement to sort the report based on the click on the header of any column.

We are not using the Reports Server but the Jasper libraries are bundled within our Web-application itself, and the report content is loaded into an iFrame via a Servlet.

However, while the column cells can contain hyperlinks and are clickable, but the column headers are not coming as clickable at all but they are static.

We have tried the sample application provided with Jasper library that enables Jive features, however in that one we are unable to send custom parameters to the report/ data-source.

If anyone has experience in Jasper reports libraries bundling within Java EE web-apps and sorting of columns based on header-click, please revert.
0
Hello All,

Is it possible to convert an Indesign file ( i.e. CS 5.5, CS 6) into a Word document (.docx)?

Please help me out how it can be done and what will be the steps for the same?

Thanks in advance....
0
In  Eclipse   when  I do "Run As > Maven Install"    for my project using eclipse Maven plugin ,  I get  "BUILD SUCCESS"  
 
However  Eclipse editor  still shows  error in one java class in my project  for the following import
 
import springfox.documentation.spring.web.plugins.Docket;


Error message :

The import springfox.documentation.spring.web.plugins.Docket cannot be resolved
 
 
Could you please suggest how to fix this error in Eclipse editor ?
0
public ModelAndView EditDetails(Http Request req,Http Response res,SampleDTO sampleDTO)
{
ModelAndView mvc=new ModelAndView();
String n=req.getParameter("name");
List<String>details=//some list values;
mvc.addObject("details",details);
mvc.setviewname("ll.jsp");
return mvc;
}
 

in jsp , can u say how to use spring bind and set to dto and use it in controller
0
Please help, I am trying to run my project through debug as it helps me see my break points and if my code it working line by line but now when i try to debbug i get this exception. I tried using this link below to resolve my issue but now I am worried it could be something in my code.

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014690354 

When I run it straight with the server its fine but I want to debug. I am fairly new in JAVA and feel very very DUMB



[2017/08/16 10:03:01:061 CAT] 00000087 LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[2017/08/16 10:03:01:061 CAT] 00000087 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[GenericServletWrapper]: javax.el.ELException: Unable to find ExpressionFactory of type: com.ibm.javart.debug.resolution.InterpExpressionFactory
      at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:190)
      at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:118)
      at com.ibm.ws.jsp.configuration.JspConfiguration.<init>(JspConfiguration.java:63)
      at com.ibm.ws.jsp.configuration.JspConfigurationManager.getConfigurationForUrl(JspConfigurationManager.java:99)
      at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:560)
      at …
0
Hi, I'm Pradip Kumar, Java Developer. I need some help to Develop My Java application for my desktop.
To show registry key, subregistry key till n number,
To show control panel Installed software under J Frame Java .
0
We are still using Tomcat 6.0 and plan to move to latest version by next year. Problem with current version is to set the access deny to our web-application.

I tried adding valve with webapps/META-INF/context.xml file as below but nothing works. Can you please provide a fix.

<Context antiJARLocking="true" path="/">
<Valve className="org.apache.catalina.valves.RemoteIpValve" />
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="{IP_address}" />
</Context>

Or

<Context antiResourceLocking="false" privileged="true">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.0\.0\.1,8\.8\.4\..*"/>
</Context>

Open in new window


Do you guys have any another solution as I want to restrict outside users from accessing Manager view and it will be accessible only from localhost?

Best Regards
0
In my java web application,generating the policy pdf  .Java compiler used is jdk1.4 .Need to affix the digital signature to existing pdf .Here we are using pdf template and replace the specially values dynamically.Need to affix the digital signature to existing pdf.
0
Concerto's Cloud Advisory Services
LVL 5
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

How could i provide the security(Authentciation) in spring
0
adding child class in virtual document getting ucf session wait timeout.
errors are
java.lang.IllegalStateException: ucf session wait timeout:
at com.documentum.web.contentxfer.ucf.UcfSessionManager.newSession(UcfSessionManager.java:391)
at com.documentum.web.contentxfer.ucf.UcfSessionManager.getSession(UcfSessionManager.java:137)
at com.documentum.web.contentxfer.ucf.UcfContentTransport.getUcfSession(UcfContentTransport.java:195)
at com.documentum.web.contentxfer.ucf.UcfContentTransport.<init>(UcfContentTransport.java:68)
at sun.reflect.GeneratedConstructorAccessor208.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at com.documentum.webcomponent.library.contenttransfer.ContentTransferServiceContainer.createTransport(ContentTransferServiceContainer.java:731)
at com.documentum.webcomponent.library.contenttransfer.checkout.CheckoutContainer.createTransport(CheckoutContainer.java:325)
at com.documentum.webcomponent.library.contenttransfer.edit.EditContainer.createTransport(EditContainer.java:63)
at com.documentum.webcomponent.library.contenttransfer.ContentTransferServiceContainer.invokeService(ContentTransferServiceContainer.java:320)
at …
0
i am new to qrtz.
My project is based on spring mvc. spring version is 4.3.3.
we need to write some qrtz schedulers in spring.
please provide examples.

we will have one common database and multipul server instances. If scheduler is running in one server instance, It should not run in other instance in same time.  (it is like HA setup)
0
if ((option != null) && option.equals("PDFFILE")) {
                  String fileName = req.getParameter("fileName");
                        //Added By Ambrish on 20170207 - Fortify Fix: Path Manipulation
                        if(fileName != null){
                              if(NBSFilterOutput.validateFileName(fileName)){
                                    String pathFileName = DataDict.getFileProperty("reportpath", "reminder_property_path") +"/"+fileName;
                                    //added following if by Raghavendra on 20170609 to fix issue: Path Manipulation
                                    if(pathFileName != null){
                                          try{
                                                File file = new File(pathFileName);
                                                downloadFile(file, req, res);
                                          }catch(IOException ioe){
                                                logger.debug("IOException in ReminderEnquiryServlet for File, directory " + pathFileName + " may not exist" + ioe);
                                          }
                                    }
                              }
                        }
Hi please suggest how to resolve path manipulation issue.on line-
File file = new File(pathFileName);
0
When I run Java dynamic Web  Project. I got an error  :Publishing J2EE preview at localhost..has encountered a problem.
Could you please tell the alternative of this problem.
0
I am getting the above exception while running the spring batch application in eclipse without maven
0

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.