Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Sonu Sen

Greenhorn
+ Follow
since Jun 03, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sonu Sen

Hi All,

Can any body help me that how can I use mojo jboss maven plugin for OSGI. Any sample example is very usefull for me.I am very new to this.I have also go through the link http://mojo.codehaus.org/jboss-maven-plugin/usage.html but I cant understand how can I use in OSGI. Please help me if there is any sample application using this.

Thanks.
8 years ago
Hi All,

Currently we are migrating our BEA weblogic portal application to Jboss in a short period. In the application we are using some webservices, JMS, EJBs, portlets, NetUI, JPF, JSP and etc. So I want to know how can I identify the BEA dependable components in the existing application so we can take care of that components while migrating.Anybody knows what would be the BEA dependable components in the application.
8 years ago
Hi All,

Anybody tell me that how can I develop OSGi Hello World application using Axis2 and how to deploy it into jboss eap 6.
It is really helpful for my project POC. I have searched on google but nobody having it on jboss 6.

Thanks.
Hi,

I am using Struts2 in my application. In my application I have one login form and one main page. on the successfull login I call main page and inside that main page I have called another action. Upto this all is working fine and page is also display after successfull login but when I press F5 or clik on browser refresh button it will give me login page but I want the same page on which I fire F5 or refresh button. How can I achieve this, my struts.xml is as follow..



After login I call main.jsp and from main.jsp I am calling mytable action. After showing me the main page the address bar of browser still shows me the Login action means http://localhost:8080/Login is it ok or it should shows me like http://localhost:8080/mytable

So please help me how can I maintain session.
8 years ago
Hi I am using Struts2-Jquery Grid plugin , I have some questions please help me to find answers.

The current functionality of grid is when you make editable attribute to true then that field will add to Edit/Add form, Now if I want to add this editable attribute on the fly means if in my Edit form suppose I have one select box , according to select box value I want to add some field in the form means suppose I select "A" from select box then I want to add one filed in the form, How can I achieve this please help me on this....

Thanks.

8 years ago
Has anybody ever tried to change the color of jstree perticular node using types plugin.And also I want to avoid click event on that node. I need to do this to prevent users from selecting the same node.
I am creating a jstree with JSON data in struts 2. I am creating JSON data successfully in Action class but

1. When I print JSON data into console it prints 2 times means my execute method executed 2 times why this happen I cant understand?
2. And please help me, How can I pass my JSON data from Action class to JSP means to Jstree.

If anybody provide me sample code for creating Jstree from struts 2 using JSON it really helpful for me.

Thanks..
8 years ago
Hi All,

I have a struts 2.2.3 tree and one text box, in that text box user type some word according to that word the tree should be filtered but I cant understand how to filter a tree with a custom criteria. If Anybody have the idea about this then please help me.

Thank You.
9 years ago
Hi,

I am generating a JSON String at client side that is in JSP page and send to the server means to servlet. And I catch that string in the servlet using getParameter(). But I cant access the single element from that JSON string in the servlet.Please tell me How can servlet reterive the single element from the String.

Eg. {"Iem1":"3","Item2":"4","Item3":"12"}

then I want only 3. How can I get that 3.
11 years ago
JSP
Thank you for giving attention on my question..let me explain in detail.

<ul class="checklist cl3">
<%
for (int i = 0; i < itemList.size(); i++) {
Item itm=(Item )itemList.get(i) ;

%>
<li class="alt" ><label for=""><input id="c1" name="<%=itm.getItemId() %>" type="checkbox" value=<%=itm.geItemId() %> onClick="return checkId()"/><%=itm.getName() %></label></li>
<%} %>
</ul>

This is my code from which i am creating a checkbox. Now my problem is. when the form is load at the same time I want to check a perticular checkbox.How its possible? please help.
11 years ago
JSP
Hello,

I am generating a project in which I am creating checkbox dynamically means from database. Now my problem is when the form is load at the same time the perticular checkbox will be selected.

I hope I am clear, Please help me.
11 years ago
JSP
I am developing a project for Hotel.In this when i select the room No from the copmbobox . the related bed , Allocated and non allocated bed are displayed in a div. For display that bed I used the Dynamic span means document.createElement("span");. While creating the span if the bed is allocated the BgColor of span is red and not allocated bed the BgColor is blue.

Now my problem is when I move the mouse over the allocated bed I want to display the information of customer for which that bed is allocated in the ToolTip from the database.

My Code is :



Please Help Me...Thank You
Create unlimited dynamic textbox and insert that value which is fill by user in database.how to do it in JSP and Hibernate
explanation:suppose i fill my name "David" in 1 textbox now i clik add more generate 1 text box fill in this "Chris" if wanna more add then click more fill it and finnaly he wants submit then insert all value of these dynamic textbox in database.
please anybody can send me solution how to do it ?
11 years ago
JSP
Hi everyone,

I am developing Hotel Management System, which is only JSP,Hibernate for connectivity and mysql for backend.

in my one jsp Room Reservation page i have a list of checkboxes which is dynamically created from the Facility Table.In this page i am selcting room and checkboxes etc & save and that all data are display in the table format on the same page from the database and in this table Room No has a hyperlink for edit ,this thing is working fine..

Now my problem is ... Suppose i am clicking on the Room No. then all the checkbox which selected for a perticular room are selected automatically..Suppose an Example, Room No 1 has a facility TV and AC, Now when i click the Room No in the Table which is in jsp page then all the data like Room No, Rate are filled automatically in the particular textboxes and also checkboxes are automatically selected , the textboxes are filled but checkboxes are not selected ,,So how it is do??? it is urgrnt plzzzzz


I am also using Servlet and bean files

My database structure is....

Facility table includes..

Facility_Id Name Description

1 TV It is Color TV
2 AC It is AC



Room Table

Room_Id Room_No Rate

1 001 1000
2 100 2000

RoomFacility table

Room_Id Facility_Id

1 1
1 2
11 years ago
JSP
Thank you Ujjwal for your reply....

But ujjwal i dont want to add another file ..When i click on the Submit button in jsp page the value should insert into the database. I know that in the jsp page, On the Value Attribute of the checkbox some code is add but i can't get that code..

My Full Servlet is....

if(act.equalsIgnoreCase("addRoomBed")){
log.info("inside addRoomBed Action");
RoomBed rmb = null;
String wardName = request.getParameter("wardNameCB");
String roomNo = request.getParameter("roomNoTF");
String rate = request.getParameter("rateTF");
String bedNo = request.getParameter("bedNoTF");
Boolean bwTVFlag = Boolean.valueOf(request.getParameter("bwTVFlag"));
Boolean colorTVFlag = Boolean.valueOf(request.getParameter("colorTVFlag"));
Boolean phoneFlag = Boolean.valueOf(request.getParameter("phoneFlag"));
Boolean singleBedFlag = Boolean.valueOf(request.getParameter("singleBedFlag"));
Boolean twinBedFlag = Boolean.valueOf(request.getParameter("twinBedFlag"));
String flag = request.getParameter("editFlag");
if(flag.equalsIgnoreCase("true")){
String id = request.getParameter("editID");
RoomBedBo rbBo = new RoomBedBo();
List editRoomBed1 = rbBo.getRoomBed(Long.parseLong(id.trim()));
rmb = (RoomBed)editRoomBed1.get(0);
}else{
rmb= new RoomBed();
}
//rmb.setWardName(wardName);
rmb.setRoomNo(roomNo);
rmb.setRate(rate);
rmb.setBedNo(bedNo);
rmb.setActive(new Boolean(true));
/*rmb.setBwTVFlag(new Boolean(true));
rmb.setColorTVFlag(new Boolean(false));
rmb.setPhoneFlag(new Boolean(false));
rmb.setSingleBedFlag(new Boolean(false));
rmb.setTwinBedFlag(new Boolean(false));*/
rmb.setBwTVFlag(bwTVFlag);
rmb.setColorTVFlag(colorTVFlag);
rmb.setPhoneFlag(phoneFlag);
rmb.setSingleBedFlag(singleBedFlag);
rmb.setTwinBedFlag(twinBedFlag);


RoomBedBo rbBo = new RoomBedBo();
boolean saveRecord = rbBo.addRoomBed(rmb);
if(saveRecord = false) {
response.sendRedirect("/error.jsp");
rbBo=null;
}
else {
List roomBedList = rbBo.getAllRoomBedList(1);
request.setAttribute("roomBedList", roomBedList);
request.setAttribute("nextPageNumber", 2);
request.setAttribute("previousPageNumber", 1);
getServletContext().getRequestDispatcher("/RoomBedSetup.jsp").forward(request, response);
//neb=null;
}


And My jsp file is.......


<input type="hidden" name="Action" value="addRoomBed"> <!-- for new and Save -->
<%
if (request.getAttribute("editRoomBedList") != null) {
List getRoomBedList = (List) request.getAttribute("editRoomBedList");

if (getRoomBedList.size() > 0) {
RoomBed rmb =(RoomBed)getRoomBedList.get(0) ;
//out.println("------------"+rmb);
%>
<input type="hidden" name="editFlag" value="true"> <!-- for new and Save -->
<input type="hidden" name="editID" value="<%=rmb.getRoomId()%>"> <!-- for new and Save -->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Ward Name </Div>
<select name="wardNameCB" size="1" >
<option value="" selected>Select</option>


</select>
</Div> <!--Div for Patient Name ends-->


<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Room No. </Div>
<Div> <input type = "text" name = "roomNoTF" maxlength ="20" value="<%=rmb.getRoomNo()%>"></input> </Div>
</Div> <!--Div for Patient Name ends-->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Rate </Div>
<Div> <input type = "text" name = "rateTF" maxlength ="20" value="<%=rmb.getRate()%>"></input> </Div>
</Div> <!--Div for Patient Name ends-->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Bed No. </Div>
<Div> <input type = "text" name = "bedNoTF" maxlength ="20" value="<%=rmb.getBedNo()%>"></input> </Div>
</Div> <!--Div for Patient Name ends-->



<%
}
}else{
%>
<input type="hidden" name="editFlag" value="false"> <!-- for new and Save -->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Ward Name </Div>
<select name="WardName" size="1">
<option value="" selected>Select</option>
<%Iterator itr;

if(request.getAttribute("wardList")!=null){
List wardname= (List)request.getAttribute("wardList");
if(wardname.size()>0){
for (int i=0;i<wardname.size();i++ )
{
Ward wrd = (Ward)wardname.get(i);
%>
<option value=<%=wrd.getWardName()%>><%=wrd.getWardName()%></option>
<% }
}
}

%>
</select>
</DIV> <!--DIV for Patient Name ends-->

<DIV class = "screenLableInputDiv"> <!--DIV for Patient F Name-->
<Div class = "screenLable"> Room No. </Div>
<Div> <input type = "text" name = "roomNoTF" maxlength ="20"></input> </Div>
</Div> <!--Div for Patient Name ends-->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Rate </Div>
<Div> <input type = "text" name = "rateTF" maxlength ="20"></input> </Div>
</Div> <!--Div for Patient Name ends-->
<DIV class = "screenLableInputDiv"> <!--Div for Patient F Name-->
<Div class = "screenLable"> Bed No. </Div>
<Div> <input type = "text" name = "bedNoTF" maxlength ="20"></input> </Div>
</Div> <!--Div for Patient Name ends-->

<div style="width:200px;margin-left:70px;height:0px;position:relative;top:-28px;"><br />

<ul class="checklist cl3">
<li class="alt"><label for="c1"><input id="c1" name="bwTVFlag" type="checkbox" value="true"/>B/W T.V</label></li>
<li><label for="c2"><input id="c2" name="colorTVFlag" type="checkbox" value="true" />Color T.V</label></li>
<li class="alt"><label for="c3"><input id="c3" name="phoneFlag" type="checkbox" value="true" />Phone</label></li>
<li><label for="c4"><input id="c4" name="singleBedFlag" type="checkbox" value="true" />Single Bed</label></li>
<li class="alt"><label for="c5"><input id="c5" name="twinBedFlag" type="checkbox" value="true" />Twin Bed</label></li>
</div>
11 years ago
JSP