Set permissions for GlassFish application (a war deployment) - java

I am totally new to java/GlassFish deployment. I am using solr for the search functions of my rails app. i can able to set the mater password for the domain from the shell. It was fine. It greets with authentication screen when i tried to launch GlassFish portal.
But i could't find how to set the permissions for my deployed solr war instance. Can someone help me how to do this?

There are a number of tutorials that outline what you need to do to secure a web app deployed onto GlassFish.
This is a tutorial on developing a secure a web app that you are creating in NetBeans for deployment onto GlassFish.
This is chapter from the Java EE 6 Tutorial describes how to secure access to a web app.

Related

How do i publish my Java code to localhost using Tomcat 6?

I'm very new to programming and i'm too lost.
I wrote a simple Java code on Eclipse (2 Classes) without any GUI and i want to access this simple Java App from any device in my LAN using a browser.
According to what i found on Google and Stack Overflow, Tomcat might help me.
Tomcat 7 didn't work on my Eclipse, so i'm using version 6 of it.
How can i make a GUI for my app?
And what do I need to be able to publish it using Tomcat?
Any help will be appreciated.
Thanks Everyone in Advance.
Tomcat is an application server. It means that you can write an application and then deploy it to a server (for example Tomcat). Then this application will be accessible on the server by some URL (for example http://localhost:8080/AwesomeApplication).
It only makes sense for web applications that handle some requests. You can't deploy an application with GUI, or simple console application to Tomcat or any other app server.
In language of final file representing your app - it must be a WAR file.

deploying netbeans web application on cloud

I created a java web application in NetBeans.i was looking for a cloud service provider to deploy it.Most of the cloud platforms that i checked do not have any plugin for netbeans as they do for eclipse.
I tried to use the Google App Engine for netbeans 6.9 but that does not work for me.I also managed to deploy my app on jelastic but i am looking for some other options.Are there any other cloud service providers which i can use?
I am using glassfish as a server for my application.
While deploying your application on Jelastic did you face any difficulties?
Why are you searching for other options?
The plugin for NetBeans is still under the development and is going to be supported in Jelastic soon. So, stay tuned for updates.

General Java Web App

I have a client server setup. I need my client to be able to call the server, and the server pass down either a file or the text contained in the file. I am new to web development. Which type of technologies should I investigate. I know that Java Web Services, Java Servlets, Java EE Applications all exist. But which one would be best for my uses? The server side application must be Java and run in Apache Tomcat.
Any suggestions would be greatly appreciated.
Thanks
Check out the Google Web Toolkit
Try Restlet in combination with Jetty container, but it works with any container (including Tomcat). Here is where you can start.
Restlet can be used for both desktop or in-browser web apps. Also it nicely integrates with Google Web Toolkit.

jboss client-server app. concurrent user

I have a client-server application. Client app. is a swing application. Server app. is ejb3 based Java EE application and working on JBoss AS 4.2.1.GA. Client and server are communicating with RMI. I want to monitor, how many user is using the application and active clients that are requesting information from server. Is there any monitoring tool in JBoss AS i can use, for example by using web/jmx console etc.
Thanks,
Deger
Simplest solution is to install the Embedded JOPR solution, it means copy a file on the deploy directory and configure JMX security if needed.
More info:
Quick and dirt page with installation guide
Main page of the project

What web server should I use with NetBeans?

I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using.
What would be the best and simplest server for me to start using with NetBeans?
Since the NetBeans IDE is a Sun product, I would assume that the Glassfish application server would be a natural fit.
That said, one of the pluses of developing a web application in Java is that the interface for working with the http is standardized (i.e. the Servlet specification), so that you can pick any servlet container you want: be it Glassfish, Tomcat, Jetty or Weblogic. Since it sounds to me that you're experimenting and you want to use something easy to administer, I might go with Glassfish. However, be open to revisit that decision when you need to actually deploy your web application in a production environment. Be sure to check out other options like Tomcat or Jetty.
Unless you are deploying to a full J2EE application server, I would recommend using Tomcat. Tomcat can run as a standalone web/servlet/jsp server and avoids some of the complexities of a full J2EE app server.
The web development bundle for Netbeans will include installers for and automated integration with Glassfish and Tomcat. You will get the "best" experience using Netbeans with those servers.
That said, the workflow in Netbeans can be easily integrated with other application servers. As of 6.1, this includes Sun Java System Application Server 8 and 9, GlassFish v1 and v2, Apache Tomcat 4, 5 and 6, JBoss 4, BEA WebLogic 10, IBM WebSphere 6.0 and 6.1, Sailfin V1. See the Netbeans J2EE Features site for more info.
Glassfish is actually an easy to use app server. I think it's easier for a beginner to use and it's integrated with Netbeans. Setting up database connection caches is easy, for example.
You administer the server through this web page:
http://localhost:4848
(login: admin, password: adminadmin)
Glassfish will run your apps on port 8080.
The Glassfish home page: http://glassfish.dev.java.net (don't really need to read)
For non-Netbeans users there's a QuickStart guide:
http://glassfish.dev.java.net/downloads/quickstart/index.html
Here's a screencast overview:
http://download.java.net/javaee5/screencasts/admin-console/index.html
At some point you will want to learn Tomcat too because it's so prevalent, but Glassfish is a much friendlier start. In fact, it's probably better as a production server too, if you can find an affordable host.

Categories