jboss 1 « Development « JSP-Servlet Q&A





1. Large JSP response is truncated :(    stackoverflow.com

I have a JSP accessed through JBoss. It renders a list (a search result). If the response gets big, approximately larger than 200k the response is truncated. I can see how the ...

2. How to get user roles in a JSP / Servlet    stackoverflow.com

Is there any way to get a String[] with the roles a user has in the JSP or Servlet? I know about request.isUserInRole("role1") but I also want to know all the roles ...

3. How do I get information from a servlet into a portlet in JBoss Portal 2.5.4    stackoverflow.com

I have a portal built on JBoss Portal 2.5.4 that needs to have some I18N. On the login.jsp page (which is in portal-server.war), we added a language switch. ...

4. Where is the servlet jar file on JBoss 5.0.1?    stackoverflow.com

Hi All: I'm trying to set up my build file to be run for deployment on JBossAS 5.0.1, and I need to find the servlet jar file that I should use ...

5. File download servlet behaving differently with IE on clustered server    stackoverflow.com

I have a servlet that sends a file by setting the HTTP Content-Type to "application/zip", the Content-Disposition to "attachment" and writing it on the response's OutputStream; it behaves correctly when deployed ...

6. Using Jboss Portal, How do I retrieve page properties in a jsp?    stackoverflow.com

Using Jboss portal, how do I retrieve the page properties in a jsp? I've declared my page like that in *-object.xml file:

<page>
  <page-name>MyPage</page-name>
  <properties>
    <property>
   ...

7. How to get the user roles in Servlet?    stackoverflow.com

I'm using Jbos AS 5 and the DatabaseServerLoginModule for the authorization. I've my application policy defined as (for example only, not the actual code):

<application-policy name = "jbossmq">
  <authentication>
   ...

8. Javascript source files on JBoss have the wrong content-type/mime type?    stackoverflow.com

I am writing a JSP application and am deploying it to JBoss 5.0. When I attempt to retrieve my CSS or Javascript files, JBoss returns the wrong Content-type for the ...

9. How can you force recompilation of jsps in JBoss 4.2?    stackoverflow.com

I hit on this nasty behavior on JBoss 4.2 in QA, and I want to nip it in the bud before we go into production and find some other corner case. A ...





10. How to pop up a new window in JBoss AS portlet?    stackoverflow.com

Working in the JBoss AS portlet we have been unable to open a jsp page in a new portlet. We are fairly new to JBoss, and unsure how to go about ...

11. How do you configure JBoss to trim additonal whitespaces generated by JSPs?    stackoverflow.com

Getting lots of additional whitespace in the html output, looks like its because of the JSP tags =/ I saw this referenced somewhere:

<init-param>
  <param-name>trimSpaces</param-name>
  <param-value>true</param-value>
</init-param>
That should put it in web.xml, ...

12. HttpServletRequest.getRemoteAddr() returning wrong address    stackoverflow.com

We need to log the client's IP address from a Seam action. Currently, we're using the code:

ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest request = (HttpServletRequest)context.getRequest();

this.remoteAddress =  request.getRemoteAddr();
However, this seems to be always ...

13. Load properties file in a java servlet deployed in JBoss as a war    stackoverflow.com

I have a servlet deployed as a war in JBoss 4.0.2. I have a properties file for the deployed application. Where should I put this file? Under the conf ...

14. JDK 1.6 and servlet containers    stackoverflow.com

When you upgrade to a newer version of the JDK (from 1.5 to 1.6), do you also have to reinstall your servlet container so it takes advantage of the new JDK? The ...

15. getting javax.servlet.ServletException: when running my eclipse on jboss?    stackoverflow.com

I am getting javax.servlet.ServletException: when running my web application on jboss. I am not getting want to do. need help. below is the log;

javax.servlet.ServletException: Failed to load application class: com.example.tutorials.TutorialsApplication
  ...

16. Servlet Spec for Jboss 4.2.3    stackoverflow.com

What Servlet Spec and JSP version does Jboss 4.2.3 support?





17. HttpServletRequest.getServerName() occasionally returning null in concurrent use?    stackoverflow.com

Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web services that are running under the same instance. I'm using request.getServerName() (on HttpServletRequest) to construct the endpoint ...

18. JspC in jboss 4.2 distribution    stackoverflow.com

Where can I find the org.apache.jasper.JspC class in the JBoss 4.2 distribution (exactly a 4.2.2.GA one)? Thanks Claudio

19. Where can I find the source code for the JBoss AS 5 default exception handling JSP?    stackoverflow.com

The title pretty much says it all. I have JBoss AS 5. I'd like to see the default JSP that JBoss uses for handling exceptions.

20. genStrAsCharArray optimisation benefits    stackoverflow.com

I am looking into the options available to me for optimising the performance of JBoss 5.1.0. One of the options I am looking at is setting genStrAsCharArray to true in <JBOSS_HOME>/server/<PROFILE>/deployers/jbossweb.deployer/web.xml. This ...

21. Finding JNP port in JBoss from Servlet    stackoverflow.com

I have a servlet running in JBoss (4.2.2.GA and 4.3-eap) that needs to connect to an EJB to do work. In general this code works fine to get the Context to connect ...

22. Why is contextInitialized() called multiple times?    stackoverflow.com

I'm running a Stripes web app on Jboss 4.2.3.GA and am trying to call a method when I start JBoss. I created a ServletContextListener like so:

public class TimerContextListener implements ServletContextListener ...

23. get the war file name in jboss    stackoverflow.com

How can I get the deployed war file name inside jboss. For example, when I am inside a servlet and I want to know the which war file name that I ...

24. Remove server name from JSESSIONID    stackoverflow.com

Our application runs on JBOSS and its front end on Apache. When accessign the URL externally, the JSESSIONID displays the servername within the Content property of the cookie. Any ideas how this ...

25. RESTeasy and Returning to a JSP page with a model    stackoverflow.com

Is there an easy, not using spring, way to have RESTeasy return a jsp or html page with a model? I want to do something similar to the spring ModelAndView where ...

26. Specifying JBoss HTTP-404 error page    stackoverflow.com

Is it possible to change the JBoss HTTP-404 error to a custom page where i can also check what the user was looking for and offer suggestions? JBoss 5.1.0.GA

27. How to get the current HttpServletResponse in JBoss 4.2.3.GA login module    stackoverflow.com

How can I get the current HttpServletResponse in JBoss 4.2.3.GA login module? For HttpServletRequest I can do:

PolicyContext.getContext("javax.servlet.http.HttpServletRequest");
Have tried changing the string but no luck, an exception is thrown. Is there any way to ...

28. What is the difference between java.net.SocketException: Connection reset and java.net.SocketException: Broken Pipe?    stackoverflow.com

What is the difference between java.net.SocketException: Connection reset and java.net.SocketException: Broken Pipe? I am trying to figure what are the reasons for these two exceptions. We are getting following error on our ...

29. JMS MessageListener started from ServletContextListener Stops after sometime    stackoverflow.com

I am creating a RichFaces Web Application which is running on JBOSS 5.1.0ga AS/Sun OS. The application also processes JMS Requests(Reading the Request from a Weblogic Queue running in different server ...

30. JSP+APOLLOSERVER+JBOSS    stackoverflow.com

I want to allow users to add placemark in maps. I m using jboss,apolloserver and jsp. How can i do this???

31. How to avoid illegal state exception?    stackoverflow.com

Every time I get a "405 method not allowed" response from the server, I want to redirect the user to a given url. However, I keep getting IllegalStateExceptions saying the ...

32. My app is loading the index.jsp of another app    stackoverflow.com

I'm running 2 apps on Jboss. Each one has its own domain name and an index.jsp that forwards to its respective home page. But for one of the domains, ...

33. How to use JNI correctly with JEE (Servlets) on windows?    stackoverflow.com

I am trying to understand what is the correct way of usage JNI from Servlet. As I understand there are several problems: a) If native DLL crashes, it will bring down whole app ...

34. Rest easy and init params - how to access?    stackoverflow.com

I'd like to have some init params in my web.xml and retrieve them later in the application, I know I can do this when I have a normal servlet. However with ...

35. Jsp compilation not on the fly with jboss    stackoverflow.com

It is possible to compile jsp during the application deployment or during jboss startup? Usually jsp are compiled on the fly but it would be convenient if the compilation was done ...

36. Get image path in non-servlet    stackoverflow.com

I have a scheduled task running in JBoss 5.1 on a daily basis for sending birthday wishes. The mail content is HTML and I embed images in the mail. Now I would like ...

37. JSP for adminstrating JBoss web service    stackoverflow.com

For example, I write a simple code, pack it as *.jar and deploy WebService in JBoss, evrything works..

@WebService
@Stateless
public class TestService{
    static int takeMePlz = 1;
    ...

38. Restart/ReInit a servlet    stackoverflow.com

I want to restart a servlet (declared in web.xml, when JBoss is running) simply because its init-param points to a file which content has changed (i.e. providers.fac below has been modified). If ...

39. IOException on snmpwalk when run on JBoss server(JSP - servlet model)    stackoverflow.com

When I run the code below in plain java project, everything works fine.

Process p = Runtime.getRuntime().exec(cmd);
--> where cmd = "snmpwalk -v 2c -c public 192.168.11.95 hrStorageAllocationUnits.1" But when I place the ...

40. JSP taglib in a JAR file packaged in an EAR file    stackoverflow.com

I have the following situation:

  • taglib.jar: A custom JSP taglib packaged as a JAR file. The TLD file is /META-INF/taglib.tld.
  • webapp.war: A web application with JSP files that use the tags provided by ...

41. CDI stops working when using weld-se-core and weld-servlet-core?    stackoverflow.com

I am playing with Weld-SE. I have a project which has pluggable modules. With one module, weld works. When other module, which uses weld-servlet-core, is put on classpath (with it's deps), ...

42. JBoss AS7: ServletContextListener#contextInitialized called after Servlet instantiation    stackoverflow.com

I am trying to deploy my webservice (originally running on JBoss AS5) on the new JBoss AS7 (Everything) Final.
The problem is that i used a ServletContextListener to initialize my environment (f.e. ...

43. How to pass variable from JSP/Jboss to Apache    stackoverflow.com

I'm running Apache on webservers and Jboss on appservers, using mod_jk for integration. I want to run some JSP and return a flag (variable) to Apache. How to do this? TIA, Vitaly ...

44. Error:Only a type can be imported. while running an web application    stackoverflow.com

this is my jsp file

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page  import="java.sql.Connection,java.sql.CallableStatement,javax.naming.*,java.util.*,dataMining.Brige;"%>
<%!

public void jspInit() 
{
  Connection conn = null;
  String sql = "";
  CallableStatement stmt = null;

  ...

45. How do I get javax.crypto classes such as javax.crypto.Cipher to work on a servlet with jboss?    stackoverflow.com

My application validates a license file in order for it to work. It does this by calling javax.crypto.Cipher.getInstance("DES","SunJCE") inorder to decipher the license key file. When I run my application locally everything ...

46. How to forward from a JAX-WS service to JSP?    stackoverflow.com

Jboss Version: 4.2.3GA. This works in apache tomcat 6.0. In JBoss, I had to add the following setting: -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false to get the forward to work, but now when I load the ...

47. How/where do I configure jboss as 7 so that I do not have to redeploy my .war file everytime I modify a JSP?    stackoverflow.com

How/where do I configure jboss as 7 so that I do not have to redeploy my .war file everytime I modify a JSP? It is much more time consuming to have ...

48. Incremental publish to JBoss does not update JSP files, only Java files.    stackoverflow.com

I feel like I'm having this issue: https://issues.jboss.org/browse/JBIDE-264 I am using Eclipse Indigo, with the latest JBossAS Tools. The target is JBoss 4.2. When I make a change to a ...

49. JSPWiki on JBoss using LDAP Authentication    stackoverflow.com

After some research, I couldn't find anything useful enough to get me a clear idea on how to set JSPWiki (running on JBoss) to use LDAP authentication. The closer one was (http://www.jspwiki.org/wiki/WebContainerAuthenticationViaLDAP), ...

50. Is it possible to create a RichFaces based webinterface from within a servlet?    stackoverflow.com

I would like to use the RichFaces API (or something similar) from a Servlet, is this possible? Or are there any alternatives to RichFaces which can be used this way? EDIT I have found ...

51. How do I run a RingoJS app as a Portlet in JBOSS Portal?    stackoverflow.com

The customer wants to run an existing RingoJS application inside a JBOSS Portal, as a portlet. As far as I found out, there's no Portlet in RingoJS, only a Servlet that runs ...

52. RESTEasy java.lang.LinkageError: LinkageError while defining class: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher    stackoverflow.com

I am trying to implement RESTEasy in my project, which is giving

java.lang.LinkageError: LinkageError while defining class:org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
I am using websphere 6.1 and RESTEasy 2.1.0.GA The detail error is as follows:
...

53. Servelt thread pool vs Servlet instance pool - by the web container    stackoverflow.com

I understand that web cotainers like jboss have a parameter to mention the number of threads of the servlet to created, which is the maximum number of threads the container can ...

54. How To Read JSP/JBoss Code?    stackoverflow.com

I am troubleshooting a slowness of our internal web app written in JSP, jboss with SQL server back-end but I am new to Java in general. Please help me understand the ...

55. Call method on undeploy from a Java web-application    stackoverflow.com

I am developing a Java web-application. The application connects to a Lucene index. I create a singleton instance of IndexSearcher. This instance opens some files. When I redeploy the web-application, the ...

56. JBoss error report: HTTP Status 404 - Servlet is not available    stackoverflow.com

I'm trying to create a very basic web project called "web" using MyEclipse and JBoss 5 as an application server. I've created one package called "pages" and inside it one servlet ...

57. jBoss and JRun    coderanch.com

Thanks Oliver I'll try your advice. Actually Im in the midst of review in SCWCD at the same time has a project with that technology. As I go along I've read that class might be a simple bean? Am I going to use the jsp:useBean action? My former code inside the jsp simply instantiate it... I put that class inside the ...

61. JSP 2.0 and JBoss 3.2.3    coderanch.com

63. UploadBean with JBoss Problem    coderanch.com

64. org.jboss. util.NestedSQL Exception    coderanch.com

65. org.jboss. util.NestedSQL Exception    coderanch.com

66. Error Starting jboss-4.2.3.GA    coderanch.com

67. jboss plugin for eclipse    coderanch.com

68. JBoss Messaging Bridge Problem    coderanch.com

69. EJB2.0 with JBOSS4.0    coderanch.com

70. Connection Pooling in JBOSS 4.0    coderanch.com

72. Newbie with servlets and JBoss    coderanch.com

73. Getting class cast exception in JBOSS    coderanch.com

75. Twist on server/packaged library problem - Jboss/Packaging    coderanch.com

I'm attempting to deploy an ear file on jboss (3.2.5), which contains both a war and a wsr. i have somewhat of a circular problem. There are two files (related to xbeans/qname) that share classes, but one uses a higher version than another. So I figured out that you could simply add a class-path attribute to the manifest file in order ...

76. datasource through jboss API..    coderanch.com

78. Non-datasource JNDI values in JBoss    coderanch.com

79. JNDI Name binding in JBOSS 5.1.0 Beta.    coderanch.com

Hi, I am following the MasteringEJB4thEdition book, which I downloaded from The Server Site website. There is a simple example of HelloBean, which works perfectly with GlassFish V3 app server. The same example when deployed on JBOSS fails because of JNDI name lookup. Is there any rule how the JNDI lookup names in JBOSS are decided if we don't provide any ...

80. Jboss Configuration for MessageBean    coderanch.com

81. To run a simple servlet in Jboss 5.1.0    coderanch.com

87. Duplicate Timers in JBOSS    coderanch.com

Good day, I have used Quartz with no real problems in Tomcat. Now I am using EJB3 over JBOSS 4.2.2 and it looks straight-forward, however I have run into an issue. I seem to end up with multiple instances of the timer. After I have deployed / restarted several times I end up with my job executing repeatedly. Obviously I am ...

93. could not publish to server on jboss    coderanch.com

94. new MQConnectionFactory throwing null pointer in jboss    coderanch.com

I am trying to execute the following command view plaincopy to clipboardprint? 1. MQConnectionFactory connFactory = new MQConnectionFactory(); MQConnectionFactory connFactory = new MQConnectionFactory(); and i get a null pointer that i can't seem to track down, i have attached the stack trace, any help would be greatly appreciated. java.lang.NullPointerException at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:169) at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:165) at com.ibm.mq.jms.MQConnectionFactory.(MQConnectionFactory.java:271) at com.foundation.agent.plugin.JMSClient.createConnection(JMSClient.java:154) at com.foundation.agent.plugin.JMSClient.launch(JMSClient.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native ...

95. incompletely deployed packages: JBOSS error, Any help is greatly appreciated    coderanch.com

Hi All: I am new to javaranch. I am chaitanya. I have some problems in deploying a jar file in jboss4.0/server/default/deploy directory. I used : Java 1. 5 update 21, Jboss 4.0.0, Ant to build the jar file. 14:14:47,172 ERROR [URLDeploymentScanner] Incomplete Deployment listing: Packages waiting for a deployer: org.jboss.deployment.DeploymentInfo@78c5fb1d { url=file:/C:/jboss-4.0.0/jboss-4.0.0/server/default/deploy/FirstEJB3.jar } deployer: null status: null state: INIT_WAITING_DEPLOYER watch: file:/C:/jboss-4.0.0/jboss-4.0.0/server/default/deploy/FirstEJB3.jar ...

97. jboss guide for beginers    coderanch.com

98. Regaring JBoss-ql LIMIT offset problem    coderanch.com

99. Jboss configuration: not getting    coderanch.com

I Don't know how to use admin console of JBoss what i am doing is Using netBeans create jboss.jar in meta inf and put following ExampleMDB queue/testQueue then created ejb.jar and one follownig: JBoss Message Driven Bean Tutorial ...

100. Im get this error is Jboss    coderanch.com