jsp

JSTL format tag?

I have a custom java.text.Format and would like to use it in my JSP. Is there a JSP/JSTL tag that can format an object using a custom java.text.Format? I'm looking for something similar to <fmt:formatNumber> and <fmt:formatDate> except that an custom format can be used. I know that I can write my own tag but am curious if there's an exi...

jsp get ip address

Hello, whats the best way of preventing someone from voting twice? How do i get the users ip address? What if they are on a large network? will everyone on that network show the same ip? thanks UPDATE: request.getRemoteAddr() and request.getRemoteHost() return the Server names, not the client's host name and ip. Anyone else got any br...

What do I need to learn to build a web app in Java?

Hi, I've been doing PHP/MySQL web development for a while and I'm fairly competent in it. Lately however, I've learnt Java and fallen in love with it, and I'd really like to do more Java work now. I've gotten my first opportunity with a client who needs a web 2.0ish web app built, and he has agreed to let me use anything I want to, inc...

printing in client machine

hi guys.. i am creating a jsp application in which i want to print a file in client (linux os only )machine by sending a command lets say "cat /root/data.txt >/dev/lp0" to the local port of the client systm because my printer is a thermal printer which will print a ticket... the data.txt will be on the client machine.. and i cant use wi...

What's the best database/data strategy to build up a forum using Java Servlet/JSP/JSF and combining Ajax?

Frequently for standard J2EE projects I use directly SQL constructs or ORM framework to manage data into forms and so on, but of course enterprise environments don't bother much about n-users access performances at the same time. So what could it be the most performance suited strategy for an user forum of up 50 users and more? Have yo...

Simple portlet jsp page flow question

I'm new to Java portlets, and am trying to get a handle on how these things work at a fairly basic level. I'm confused now about how to have multiple "views" in my portlet. Let's say my portlet will be used for CRUD operations. For the sake of simplicity, I'm imagining that when a user first views the portlet they'll see a table wit...

How can I tell which submit button was clicked

I have several different submit buttons on my JSP in one form tag that all point to the same servlet. I need to know which submit button was clicked. Ho can I find out which button was clicked? Regards ...

Please help with my JSP Internationalization problem

I have problem with I18N in JSP, specifically, with forms. When I enter some Czech characters (e.g., "ěščřžýá...") into my page one form, into the field "fieldOne", and then show text from that field on page two, instead of Czech characters I see this as "čč". (Note, the second page gets the Czech characters with "request.getProperty...

How can I check if a resource bundle key does not exist using JSTL tags?

I have a resource file that will have some optional keys. If the optional resource key is not present, I set a default instead. It appears that there is no easy way to determine if a key exists in the resource bundle. So this is what I'm doing to get around it. <fmt:message var="title" key="login.reg.signup.${signupForm.regfrom}.title"...

Is ext js compatible with .jsp, java backend?

Is ext js compatible with .jsp, java backend? ...

Problem with attribute

Hi,my problem is attribute onclick in tag a.I want to do scriplet command in attribute onclick.When I write this... <a href="somethig" onclick="session.setAttribute('newAttribute','value')" >Click on me</a> ...so nothing happens (session's attribute is not set), and if I write this one <a href="somethig" onclick="<% session.setAttrib...

jsp useBean scope in included page components

I'm creating a site on which there are many page components that refer to objects that are used elsewhere in the page. Some of these components are used in other pages as well, thus my desire to use includes rather than cut-and-paste. The problem is that if I have identical "jsp:useBean" statements in multiple components of the page,...

Field Names for Struts2 map entries in a JSP

I want to populate a map property on a Struts2 action from a JSP. What is the format of the data names that I should use? Initially I am interested in populating a Map<String, String> but in the future I would be interesting in populating a Map<String, DomainClass> where the DomainClass has properties of its own. ...

Events in JSP?

Hi, I'd like to ask if there is in the JSP events such as the swing (eg: ActionEvent)? ...

Error 404--Not Found (while using apache and weblogic)

I have an application deployed in weblogic, and am using apche server.Normally, when I enter the url for the application, it should display a jsp (1) kind of please wait then this one will redirect to another jsp (2). the problem is when I enter the url of the application, it displays jsp (1) "please wait" and while redirecting it gives...

Eclipse JSP preview

Is there an Eclipse plugin or feature that allows previewing of JSP files? Ideally such a feature would be aware of Spring tags. It's a major pain to edit the JSP in Eclipse, then build and deploy to see the results. ...

href error in .jsp

i had this code in my .jsp file: <li><a href="${pageContext.request.contextPath}/pages/client_home.jsp" id="home">Home</a></li> <li><a href="${pageContext.request.contextPath}/pages/client_about.jsp" id="about">About</a></li> and when i click the link, i got this error: HTTP Status 500 - type Exception report message descriptio...

How to embed java application into a jsp page

Hello, I have a simple java application and want to embed it into a jsp page. At the minute it takes a parameter at the command line, is it possible to pass the parameter from the web page, if so how? Thanks ~ Kyle G ...

JSP Buffer overflow

I have a 1MB file to upload and the following is set and I get an exception. I think it is my buffer size and or the autoFlush setting. currently: <%@ page errorPage="error.jsp" buffer="500kb" autoFlush="false" %> I tried to set the buffer to 2000KB but no luk. Any ideas? Thanks ...

Can an include file call a function from another include file?

I am new to working with jsp. The scenario is that all of the jsp pages will always have include file A. Some of these pages will need to call functions from include file B. My question is, can I call a function from include file A from functions inside include file B? Wikipedia says: It is as if the contents of the included file...